<?php
  
IF (ISSET($_SESSION['search'])){
  
  $search = STRIPSLASHES(HTMLSPECIALCHARS($_SESSION['search']));
  
}ELSE{
  
  $search = NULL;
  
}
  
$videos = DB::GET_STRING_ALL("SELECT `PHOTOS`.`ID` FROM `PHOTOS` LEFT JOIN `PHOTOS_DIR` ON (`PHOTOS_DIR`.`ID` = `PHOTOS`.`ID_DIR` OR `PHOTOS_DIR`.`ID_DIR` = `PHOTOS`.`ID_DIR`) WHERE `PRIVATE` = '0' AND (`PHOTOS`.`NAME` LIKE '%".$search."%' OR `PHOTOS`.`MESSAGE` LIKE '%".$search."%') GROUP BY `PHOTOS`.`ID`");

$column = 0;

WHILE ($videos->FETCH())
{
  
  $column++;
  
}

IF ($column >= 1){
  
  ECHO "<a href='/modules/?path=search&type=videos'><div class='list-menu hover'>";
  ECHO "".ICONS('film', 14, 'fa-fw')." ".LG('Видео')." <span class='count'>".$column."</span>";
  ECHO "</div></a>";
  
}
  
?>