<br>
<table cellpadding="1" cellspacing="1" border="0" bgcolor="#f0f0f0" align="center">
<tr bgcolor="#919090">
<td align="center"> <b>UID</b> </td>
<td align="center"> <b>Nickname</b> </td>
<td align="center"> <b>gewertete Refs</b> </td>
<td align="center"> <b>geworbene Refs</b> </td>
<td align="center"> <b>möglicher Gewinn</b> </td>
</tr>
<?
$refs = db_query('SELECT COUNT(uid) AS refs, werber FROM '.$db_prefix.'_refralley WHERE ap >= '.$ralleydaten['pro'].' GROUP BY werber DESC LIMIT 10');
while ($werber = mysql_fetch_array($refs)) {
$refs_1 = db_query('SELECT COUNT(uid) AS anzahl_refs FROM '.$db_prefix.'_refralley WHERE werber = '.$werber['werber'].'');
while ($werber_1 = mysql_fetch_array($refs_1)) {
$nick = mysql_fetch_array(db_query("SELECT nickname FROM ".$db_prefix."_userdaten WHERE uid = '".$werber['werber']."' LIMIT 1"));
echo mysql_error();
$rp++;
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$rp],0,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp],0,",",".");
}
if ($rp > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr bgcolor="#6F6F6F">
<td align="center"><a href="?content=/ralleys/refuebersicht&uid='.$werber['werber'].'" target="_blank">'.$werber['werber'].'</a></td>
<td align="center">'.$nick['nickname'].'</td>
<td align="center">'.$werber['refs'].' </td>
<td align="center">'.$werber_1['anzahl_refs'].' </td>
<td align="center">'.$mg.' </td>
</tr>
';
} }
for($x=$rp+1;$x<11;$x++){
$mg = number_format($ralleydaten['p'.$x],2,",",".");
if ($x > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr bgcolor="#6F6F6F">
<td align="center">N/A</td>
<td align="center">N/A</td>
<td align="center">0 </td>
<td align="center">0 </td>
<td align="center">'.$mg.' </td>
</tr>
';
}
?>
</table>