Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Top foto

Parašė Dandžu· 2008 Rugp. 6 08:08:23
#2

Bandyk.
<?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'>";
$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);
 
echo "<tr><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></tr>\n";

$i++;
}
} else {
 
echo $locale['f'];
}
echo "</table>";
                 
closetable();
?>