Файл: 2/3020.ru/modules/search/components/photos.php
Строк: 9
<?php
IF (ISSET($_SESSION['search'])){
$search = STRIPSLASHES(HTMLSPECIALCHARS($_SESSION['search']));
}ELSE{
$search = NULL;
}
$photos = 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 ($photos->FETCH())
{
$column++;
}
IF ($column >= 1){
ECHO "<a href='/modules/?path=search&type=photos'><div class='list-menu hover'>";
ECHO "".ICONS('image', 15, 'fa-fw')." ".LG('Фото')." <span class='count'>".$column."</span>";
ECHO "</div></a>";
}
?>