Parašė toon· 2010 Bir. 1 12:06:06
#3
Fusion V6, į paneles dėkit, jei kam reiks, rodys eilutėje 4 naujausias foto ;):
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'latest_images_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
openside($panel_name);
echo"<table><tr>";
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_id DESC LIMIT 0,4");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
echo "<td><a href='".BASEDIR."photogallery.php?photo=".$data['photo_id']."' title='".$data['photo_title']."' class='side'><center>
<img height='110' src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_filename']."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'><p> </center></a></td>\n";
}
} else {
echo $locale['004'];
}
echo"</tr></table>";
closeside();
Redagavo toon· 2010 Bir. 1 12:06:50