Parašė Haked· 2008 Rugp. 6 02:08:04
#1
Reikia pagalbos su top foto:
štai kodas:
<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'latest_images_center_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
opentable("Top nuotraukos");
echo "<table width='100%' cellspacing='2' cellpadding='0'><tr>";
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_views DESC LIMIT 0,10");
if (dbrows($result) != 0) {
$i=0;
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 14);
$itemdescription = trimlink($data['photo_title'], 14);
if ($i % 5 == 0 && $i != 0) { echo "</tr><tr>";}
echo "<td><center><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."' class='gallery'>
<img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."'title='".$data['photo_title']."'alt='".$data['photo_title']."'><br/> $itemdescription </center></a></td>\n";
$i++;
}
} else {
echo $locale['f'];
}
echo "</tr></table>";
closetable();
?>