Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Del naujausiu images

Parašė bruzgis· 2009 Kov. 4 23:03:51
#3

nzn ar veiks, netestavau, bandyk:

<?php

if (!defined("IN_FUSION")) { die("Access Denied"); }

openside('Naujausias paveiksliukas');
$i=0;
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".DB_PREFIX."photo_albums ta ".
"JOIN ".DB_PREFIX."photos USING (album_id) ORDER BY photo_id DESC LIMIT 0,6");

if (dbrows($result) != 0) {
echo "<table width='100%'>";
while($data = dbarray($result)) {
$i++;
if($i==1) echo "<tr>";
echo "<td width='25%' ALIGN='CENTER'>";
$itemdescription = trimlink($data['photo_title'], 23);
echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."'>
<img border='0' src='".BASEDIR."images/photoalbum/album_".$data['album_id']."/".$data['photo_thumb1']."' width='150' height='150'
title='".$data['photo_title']."' alt='".$data['photo_title']."'></a><br>
<b><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>$itemdescription</a></b>
<br>Albumas:
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' class='gallery' title='Albumas: ".$data['album_title']."'>
".$data['album_title']."</a><br><br></td>\n";
if($i==4) { echo "</tr>"; $i=0; }
}
if($i==2 || $i==3 || $i==1) echo "</tr>";
echo "</table>";
}
closeside();
?>

Redagavo bruzgis· 2009 Kov. 4 23:03:09