<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="52" align="left">[img]<?php echo IMAGES . 'own/active_member.png'; ?>[/img]</td><td valign="top">In dieser Liste können die aktivisten User eingesehen werden. Der User mit den meisten Gesamtbeiträgen wird über der Tabelle nominiert. Die Tabelle beinhaltet die fünf aktivsten Foren Mitglieder.</td></tr></table>
<?php
$highnr = 0;
$result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_posts Desc LIMIT 5");
while ($data = dbarray($result))
{
$rank = 'Neuling';
$img = IMAGES . 'ranks/0.gif';
if ($data['user_posts'] >= 25) { $rank = 'Junior Member'; $img = IMAGES . 'ranks/1.gif'; }
if ($data['user_posts'] >= 50) { $rank = 'Light Member'; $img = IMAGES . 'ranks/2.gif'; }
if ($data['user_posts'] >= 100) { $rank = 'Advanced Member'; $img = IMAGES . 'ranks/3.gif'; }
if ($data['user_posts'] >= 250) { $rank = 'Senior Member'; $img = IMAGES . 'ranks/4.gif'; }
if ($data['user_posts'] >= 500) { $rank = 'Elite Member'; $img = IMAGES . 'ranks/5.gif'; }
if ($data['user_posts'] >= 1000) { $rank = 'Top Member'; $img = IMAGES . 'ranks/6.gif'; }
if ($data['user_posts'] >= 5000) { $rank = 'Super Member'; $img = IMAGES . 'ranks/master.gif'; }
if ($data['user_posts'] >= 10000) { $rank = 'Ehren Member'; $img = IMAGES . 'ranks/master2.gif'; }
$echostr = $echostr . "<tr>";
$echostr = $echostr . "<td class='tbl2'>";
$echostr = $echostr . "[
url=" . BASEDIR . "]" . $data['user_name'] . "[/
url]";
$echostr = $echostr . "</td>";
$echostr = $echostr . "<td class='tbl1'>";
$echostr = $echostr . "<span class='alt'>Beiträge: </span>" . number_format($data['user_posts']) . "
<span class='alt'>Rang: </span>" . $rank . "
[img]" . $img . "[/img]";
$echostr = $echostr . "</td>";
$echostr = $echostr . "<td class='tbl1'>";
$echostr = $echostr . number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"));
$echostr = $echostr . "</td>";
$echostr = $echostr . "<td class='tbl1'>";
$echostr = $echostr . number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"));
$echostr = $echostr . "</td>";
$currentnr = $data['user_posts'] + dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'") + dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'");
$echostr = $echostr . "<td class='tbl1'>";
$echostr = $echostr . $currentnr;
$echostr = $echostr . "</td>";
$echostr = $echostr . "</tr>";
if ($highnr < $currentnr) { $highnr = $currentnr; $highdata = $data;}
}
?>
<p align="center">[b]Aktivestes Mitglied:[/b]</p>
<center><table width="300" height="150" cellpadding="0" cellspacing="0" class="tbl-border"><tr><td>
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="tbl2" width="150" height="150" align="center">
<?php echo "[
url=" . BASEDIR . "]" . $highdata['user_name'] . "[/
url]"; ?>
[img]<?php echo IMAGES . [/img]" alt="Avatar" title="Avatar">
</td>
<td class="tbl1" width="150" height="116" align="center" valign="center">
<table cellpadding="0" cellspacing="0" width="151" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="151"><center><span class='alt'>Forenbeiträge: </span>
<?php echo $highdata['user_posts']; ?></center></td>
</tr>
<tr>
<td width="151"><center><span class='alt'>Shoutboxeinträge: </span>
<?php echo number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$highdata['user_id']."'")); ?></center></td>
</tr>
<tr>
<td width="151"><center><span class='alt'>Kommentare: </span>
<?php echo number_format(dbcount("(comment_id)", "comments", "comment_name='".$highdata['user_id']."'")); ?></center></td>
</tr>
<tr>
<td width="151"><center><span class='alt'>Gesamtpunkte: </span>
<?php echo $highnr; ?></center></td>
</tr>
</table>
</td>
</tr>
</td></tr></table></table></center>
<table width="100%" cellpadding="0" cellspacing="0" class="tbl-border"><tr><td>
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr><td width="200" class="forum-caption">[b]Name:[/b]</td><td class="forum-caption">[b]Forumstatus:[/b]</td><td class="forum-caption">[b]Shoutboxbeiträge:[/b]</td><td class="forum-caption">[b]Kommentare:[/b]</td><td class="forum-caption">[b]Gesamtpunkte:[/b]</td class="forum-caption"></tr>
<?php echo $echostr; ?>
</tr></td></table></table>