Parašė ex-it· 2008 Sau. 16 23:01:10
#1
PAbandykite:
@opentable('Ggggggeras');
$i=0;
echo "<div style='text-align:center'><table align='center'><tr>";
while($i<4){
//Definerer SAFEMODE
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
$result = dbquery(
"SELECT t1.photo_id, t1.album_id, t1.photo_title, t1.user_id, t2.user_name FROM ".$db_prefix."photos t1
LEFT JOIN ".$db_prefix."users t2 ON t1.user_id=t2.user_id ORDER BY photo_date DESC LIMIT 5"
);
if (dbrows($result) == 1) {
$data=dbarray($result);
//Checker om safemode er on eller ej
if (!SAFEMODE) {
$user = $data['user_id'];
$album_real = "usergalerie/";
}
//$filename=PHOTOS.$data['photo_id'].'t.jpg';
if (!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
//echo "<div style='text-align:center'>
echo "<td>
<a href='".INFUSIONS."usergalerie/view_usergalerie.php?user_id=".$data['user_id']."&photo=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/usergalerie/".$data['photo_id'].'t.jpg'."'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br><center><a href='".INFUSIONS."usergalerie/view_usergalerie.php?userid=".$data['user_id']."'>Se hele albummet</a></center>
</td>";
$i+=1;
}
}
echo"</tr></table></div>";
@closetable();
Paziurekite, ka gausite ;)