Parašė Nepas· 2010 Geg. 25 12:05:29
#199
<?php
global $settings, $db_prefix, $data;
if (!defined("IN_FUSION")) { die("Access Denied"); }
$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,3");
$data=dbarray($result);
$randphotodir = PHOTOS.(!@ini_get("safe_mode") ? "album_".$data['album_id']."/" : "");
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' border='0'>
<img src='".$randphotodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a>";
echo"<br>";
$result = dbquery("SELECT count(photo_id) FROM ".$db_prefix."photos");
closeside1();
?>
Netikiu kad veiks :D