Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Padėkit dėl "Atsitiktinė foto"

Parašė Minzee· 2008 Sau. 26 23:01:10
#5

PHP fusion versija: 6.00.305


<?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 ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);

if (dbrows($result) == 1) {
@openside($locale['FOT_001']);
$data=dbarray($result);

if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/".$data['photo_filename']."' width='100' height='75'
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>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/".$data['photo_thumb2']."' width='100' height='75'
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 ozzWANTED· 2008 Sau. 26 23:01:12