18.03.2006, 21:17
$content .="<td valign=\"top\" bgcolor=\"#f8f9fa\" style=\"border-Right: 1px dotted #8B9494\">";
//$content .= "Лидеры форума:<hr size=1>";
$i = 1;
$result8 = sql_query("select user_id, username, user_avatar, user_posts from ".$prefix."_users where user_id !=1 order by user_posts desc limit 0,1", $dbi);
while(list($user_id, $username, $user_avatar, $user_posts) = sql_fetch_row($result8, $dbi)) {
if ($i >= 10) { $pc = $i; }
if ($i < 10) { $pc = "$i"; }
if ($i == 1) {
$content .= "<center><table cellspacing=\"1\" cellpadding=\"0\" bgcolor=#000000><tr><td><img border=\"0\" src=\"modules/Forums/images/avatars/$user_avatar\"></td></tr></table>Лидер: <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><b>$username</b></a><font class=\"titleset\"> ($user_posts с.)</font>";
$i++;
}
else {
$content .= "<br><font class=\"titleset\">$pc: </font><a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"><b>$username</b></a> <font class=\"titleset\">($user_posts с.)</font>";
$i++;
}
}
$content .="</td>";
тут переделай запросы и все ок будет
|