";
$result = dbquery("SELECT * FROM ".$db_prefix."userphotos WHERE photo_id ");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;
$result = dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".DB_PREFIX."userphoto_albums ta ".
"JOIN ".DB_PREFIX."userphotos USING (album_id) ORDER BY photo_views DESC LIMIT $rowstart,24");
while($data = dbarray($result)) {
if (($i%5)==0) echo "
";
$i++;
$itemtitle = trimlink($data['photo_title'], 23);
echo "";
echo "
";
}
} else {
echo $locale['004'];
}
if (($i%4)==0) echo " |
";
echo "";
//PAGINACJA
if ($rows > 24) echo "\n".makePageNav($rowstart,3,$rows,24,FUSION_SELF."?album_id=$album_id&")."\n
\n";
closetable();
require_once "side_right.php";
require_once "footer.php";