Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Random Foto ir random avatar kartu.

Parašė INFINITY· 2009 Lap. 16 18:11:16
#1

Gal galit kas sujunkt šias dvi paneles šonu o ne vieno po kitos, kas žemyn eina. Dėkui ;] ( Kad butu galima dėti i centrine panele)

if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery("SELECT panel_name FROM ".$db_prefix."panels WHERE panel_filename = 'latest_images_panel'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$panel_name = $data['panel_name'];
}
$result=dbquery(
"SELECT tp.*, ta.* FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING(album_id)
WHERE ".groupaccess('album_access')." ORDER BY RAND() LIMIT 1"
);
if(dbrows($result)==1){
}
opentable("Random foto");
$data=dbarray($result);
$randphotodir = PHOTOS.(!@ini_get("safe_mode") ? "album_".$data['album_id']."/" : "");
if(!file_exists($filename)) $filename=$image_url.'/imagenotfound.jpg';
echo "<center>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".$randphotodir.$data['photo_thumb1']."' title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>".$data['photo_title']."</a>
<br>
<a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' class='side'>".$data['album_title']."
</center></a>";
$id = dbresult(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_avatar!='' ORDER BY RAND()"), 0);
$count = dbcount("(user_id)", "users", "user_avatar!=''");
$rez = dbcount("(user_id)", "users");
$proc = number_format($rez / 100 * $count);
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$id'"));
echo"<div style='text-align: center;'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'><img src='".IMAGES."avatars/".$data['user_avatar']."' alt='' border='0'><br>".$data['user_name']."</a></div>";
echo "<div style='text-align: center;'><span class='small'><b>$count Members</b> (".$proc."%)<br>Jau turi avatara.</span>";
if (!$userdata['user_avatar'] && iMEMBER) {
echo "<br><a href='".BASEDIR."infusions/auto_avatar_resizer_infusion/auto_avatar_resizer.php' class='side'>Ir aš noriu avataro!</a>";
}
echo "</div>";
closetable();