Parašė DRAQ· 2007 Vas. 4 00:02:57
#1
<?php
/* Created for
PHP-FUSION 6.00
Copyright (c) 2005 Petter Paulsson
http://www.php-fusion.se/
Gets itĀ´s name from panel administration. */
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);
$result = dbquery("SELECT * FROM ".$db_prefix."photos ORDER BY photo_id DESC LIMIT 0,4");
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['photo_id']."' title='".$data['photo_title']."' class='side'><center>
<img src='".BASEDIR."images/photoalbum/".$data['photo_id']."t.jpg' border='0'><br /> $itemdescription <p> </center></a>\n";
}
} else {
echo $locale['004'];
}
closeside();
?>
ant naujausios versijos kazkodel neveikia,nerodo foto gal kas turit veikiancia. prikabinau faila
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