Файл: user/info/foto.php
Строк: 16
<?
$sql = mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC LIMIT 4");
$coll=mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]' ORDER BY `id` DESC"),0);if ($coll>0){
echo "<div class='main'>";
echo "<a href='/foto/$ank[id]/'>Фотографии</a> ";
echo "" . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0) . "";
echo "</div>";
echo "<div class='nav1'>";
while ($photo = mysql_fetch_assoc($sql)){
echo "<a href='/foto/$ank[id]/$photo[id_gallery]/$photo[id]/'><img style='padding:1px; padding: 0px; margin:2px; height: 51px; width:51px; border: vertical-align:top; background-image: url(); background-position: center top;' src='/foto/foto50/$photo[id].$photo[ras]' alt=''/></a>";
}
echo "</div>";
}
?>