Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Top forumo nariai su avatarais taisymas

Parašė ex-it· 2009 Lie. 5 13:07:16
#7

<?
$sql=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_posts DESC LIMIT 0,10");

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='http://www.e-mp3.lt/moduliai/user_info_panel/images/noimage.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>";
?>