<?php
  
IF (ISSET($_SESSION['search'])){
  
  $search = STRIPSLASHES(HTMLSPECIALCHARS($_SESSION['search']));
  
}ELSE{
  
  $search = NULL;
  
}
  
$column = DB::GET_COLUMN("SELECT COUNT(*) FROM `COMMUNITIES` WHERE (`NAME` LIKE '%".$search."%' OR `MESSAGE` LIKE '%".$search."%')");

IF ($column >= 1){
  
  ECHO "<a href='/modules/?path=search&type=communities'><div class='list-menu hover'>";
  ECHO "".ICONS('users', 15, 'fa-fw')." ".LG('Сообщества')." <span class='count'>".$column."</span>";
  ECHO "</div></a>";
  
}
  
?>