Файл: users/profile/account/plugins/photo_list.php
Строк: 17
<?php
$sql = "SELECT `PHOTOS`.`ID`,`PHOTOS`.`ID_DIR` FROM `PHOTOS` LEFT JOIN `PHOTOS_DIR` ON (`PHOTOS_DIR`.`ID` = `PHOTOS`.`ID_DIR` OR `PHOTOS_DIR`.`ID_DIR` = `PHOTOS`.`ID_DIR`) AND `PHOTOS`.`USER_ID` = '".$account['ID']."' WHERE `PRIVATE` = '0' GROUP BY `PHOTOS`.`ID`";
$count = DB::GET_STRING_ALL($sql);
$photo_i = 0;
WHILE ($count->FETCH()){ $photo_i++; }
IF ($photo_i > 0){
$data = DB::GET_STRING_ALL($sql." ORDER BY `PHOTOS`.`TIME` DESC LIMIT 15");
ECHO "<div class='list-body'>";
ECHO "<div class='list-menu list-menu-title'>".ICONS('photo', 15, 'fa-fw')." ".LG('Фотографии')." ".TEXT_ABSOLUTE($account['LOGIN'])." <a href='/modules/?path=photos§ion=users&id=".$account['ID']."' style='float: right;'>".LG('Все')." ".ICONS('chevron-right', 15, 'fa-fw')."</a></div>";
ECHO "<div class='menu-list-optimize'>";
WHILE ($list = $data->FETCH()){
ECHO "<a href='/modules/?path=photos§ion=show&photo_id=".$list['ID']."'>";
ECHO " <img src='/photo/150x150/".$list['ID_DIR']."/".$list['ID']."/' style='border-radius: 4px; max-width: 75px; margin: 1px;'> ";
ECHO "</a>";
}
IF ($photo_i > 5){
ECHO " <a class='menu-list-all' href='/modules/?path=photos§ion=users&id=".$account['ID']."'><b>".LG('ВСЕ')."</b> ".ICONS('chevron-right', 15, 'fa-fw')."</a> ";
}
ECHO "</div></div>";
}
?>