Parašė Vilme· 2008 Bal. 22 17:04:13
#8
Gal zinot kaip padaryti kad rodytu 5 paskutines foto o ne 1 ???
<?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 5"
);
if (dbrows($result) == 5) {
@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();
}
?>