Размер файла: 1.37Kb
<?php
$sql = "SELECT `PHOTOS`.`ID`,`PHOTOS`.`ID_DIR` FROM `PHOTOS` LEFT JOIN `PHOTOS_DIR` ON (`PHOTOS_DIR`.`ID` = `PHOTOS`.`ID_DIR` OR `PHOTOS`.`ID_DIR` = '0') AND `PHOTOS`.`USER_ID` = '".$account['ID']."' WHERE `PHOTOS_DIR`.`PRIVATE` = '0' GROUP BY `PHOTOS`.`ID` ORDER BY `PHOTOS`.`TIME` DESC LIMIT 7";
$data = DB::GET_STRING_ALL($sql);
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'>";
$photo_i = 0;
WHILE ($list = $data->FETCH()){
$photo_i++;
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>";
}
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>";
IF ($photo_i == 0){
ECHO "<div class='list-menu'>";
ECHO LG('У пользователя пока нет публичных фото');
ECHO "</div>";
}
ECHO "</div>";
?>