Parašė Vilmokas· 2012 Rugp. 10 14:08:50
#2
openside("Top Forumo Nariai");
$sql=dbquery("SELECT * FROM ".$db_prefix."users where user_posts != 0 ORDER BY user_posts DESC LIMIT 5");
echo "<table width='auto' cellspacing='0' cellpadding='0'>";
$i=0;
while ($data=dbarray($sql)) {
echo "<tr>
<td align='left'>
<a href='".BASEDIR."profile.php?lookup=".$data ['user_id']."'>";
if(!empty($data['user_avatar']))
{
$avatar="<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$data['user_name']."' width='50' height='50'>";
}else{
$avatar="<img src='".IMAGES."noavatar.gif' alt='".$data['user_name']."' width='50' height='50'>";}
echo"$avatar</a></td>
<td align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br> - ".$data['user_posts']." Pranesimai</td></tr>";
$i++;
}
echo "</table>";
closeside();
Štai kodas. Čia panelė, net su avatar'ais. :)
Redagavo Vilmokas· 2012 Rugp. 10 14:08:32