Parašė doshis· 2008 Bal. 20 21:04:14
#1
radau nauja panele todel db veikia viskas, bet rodo tik 1 foto toje paneleje, man reikia kad rodytu 5 bet jau, kaip taij padaryti ?
<?php
if (file_exists(INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."random_photo_panel/locale/English.php";
}
$result=dbquery(
"SELECT pa.album_id,pa.album_title,ph.photo_id,ph.photo_title,ph.photo_thumb1,pa.album_access".
" FROM ".$db_prefix."photo_albums pa, ".$db_prefix."photos ph".
" WHERE pa.album_access <= ".$userdata['user_level'].
" AND pa.album_id = ph.album_id".
" ORDER BY rand() LIMIT 1"
);
if (dbrows($result) == 1) {
@openside($locale['FOT_001']);
$data=dbarray($result);
echo "<div style='text-align:center'><a href='".
BASEDIR."photogallery.php?photo_id=".
$data['photo_id']."' class='gallery'><img src='".
PHOTOS."album_".
$data['album_id']."/".
$data['photo_thumb1']."' title='".
$data['photo_title']."' alt='".
$data['photo_title']."'></a><br /><a href='".
BASEDIR."photogallery.php?album=".
$data['album_id']."'>".
$data['photo_title']."</a><br />".
$data['album_title']."</div>";
@closeside();
}
?>
Redagavo doshis· 2008 Bal. 22 22:04:05