Parašė balzhak· 2008 Geg. 4 12:05:29
#4
SpRoGaLT taip irgi neveike, bet radau kitą vaikiantį, jei kam prireiks tai va:
openside('Paskutinės foto');
$result = dbquery(
"SELECT tp.*, ta.*, tu.user_id,user_name FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING (album_id)
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
WHERE ".groupaccess('ta.album_access')." ORDER BY tp.photo_datestamp DESC LIMIT 0,9"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['photo_id'], 23);
$itemdescription = trimlink($data['photo_title'], 23);
$photodir = (!SAFEMODE ? "album_".$data['album_id']."/" : "");
echo "<br>\n";
echo "<center><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' title='".$data['photo_title']."' class='side'>
<img src='".PHOTOS.$photodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'><br>$itemdescription</a><br>\n";
echo $locale['459'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['460']."<a href='".BASEDIR."profile.php?lookup=".$data['photo_user']."' class='side'>".$data['user_name']."</a><br></center>\n";
echo "<br>\n";
}
} else {
echo $locale['004'];
}
closeside();
?>