Parašė ramon· 2007 Rugs. 15 23:09:35
#10
Meginkit tada taip :
[cia atsitiktines foto]
Tai rasykit i nauja faila.php:
<?
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'random_images_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
$result=dbquery(
"SELECT tp.*, ta.* FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING(album_id)
WHERE ".groupaccess('album_access')." ORDER BY RAND() LIMIT 2"
);
if(dbrows($result)==1){
}
openside("Atsitiktiniu foto galerija");
$data=dbarray($result);
$randphotodir = PHOTOS.(!@ini_get("safe_mode") ? "album_".$data['album_id']."/" : "");
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<b><center>Atsitiktine Foto</b></center><br>";
echo "<marquee behavior='scroll' scrolldelay='25' scrollamount='2' truespeed='' width='100%' onmouseover='this.stop()' onmouseout='this.start()'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".$randphotodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a>
</marquee>";
closeside();
?>
Redagavo ramon· 2007 Rugs. 16 01:09:36