File size: 1.17Kb
<?php
$title='Фотоальбомы';
require"../system/config.php";
require"../system/func.php";
require"../system/head.php";
require"../system/error.php";
echo'<div class="i">Фотоальбомы<br></div>';
if(isset($_GET['st'])){$st=cifry($_GET['st']);}else{$st=0;}
$num=5;
$aphot=mysql_query("SELECT * FROM `users` WHERE `photos`!='0'");
$sphot=mysql_query("SELECT `id_user`,`photos` FROM `users` WHERE `photos`!='0' ORDER BY `photos` DESC LIMIT $st,$num");
$kol=mysql_num_rows($aphot);
if($kol==0){
echo'<div class="p">Пользователи пока не загружали фотографии...<br></div>';
}else{
while($photo=mysql_fetch_array($sphot)){
echo'<div class="p"><img src="'.$dirsite.'/design/default/act.gif" alt=""> '.nik_tri($photo['id_user']).' <a href="../pages/about.php?mod=6&id_kogo='.$photo['id_user'].'&'.$s.'">В альбом</a> ['.$photo['photos'].']</div>';
}
if($st!=0){
echo'<div class="p"><a href="./?st='.($st-$num).'&'.$s.'">Назад</a><br></div>';
}
if($kol>$st+$num){
echo'<div class="p"><a href="./?st='.($st+$num).'&'.$s.'">Далее</a><br></div>';
}
}
require"../system/foot.php";
?>