Top10 Addon - Nickname statt ID
Hallo
Ich möchte bei dem Top10 Addon statt die ID's die Nicknamen stehen haben
hier ist die top10.php
Code:
<?
@require_once ('lib/functions.lib.php');
$kontostand = mysql_fetch_array(db_query("SELECT `kontostand` FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']." and passwort = '".$_SESSION['passwort']."' LIMIT 1"));
$guthaben = round($kontostand['kontostand'],0);
?>
<?head("$seitenname - Top 10 Liste");?>
<center><br><b>Hier findest Du unsere Aktuelle User Top 10 Liste.<br><br>
<?foot();?>
<?head("Top 10 - Rangliste ( Nach Klicks )");?>
<br><table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="white"><b>Rang</b></font></td>
<td align="center"><font color="white"><b>Klamm ID</b></font></td>
<td align="center"><font color="white"><b>Klicks</b></font></td>
</tr>
<?
$rang = 1;
$klicksrang = db_query("SELECT * FROM ".$db_prefix."_kontodaten ORDER BY klicks DESC LIMIT 10");
while ($klickliste=mysql_fetch_array($klicksrang)) {
echo '
<tr bgcolor="#FAEBD7">
<td align="center">'. $rang++ .'</td>
<td align="center">'.$klickliste[uid].'</td>
<td align="center">'.number_format($klickliste[klicks],0,",",".").'</td>
</tr>
';
}
?>
</table>
<?foot();?>
<?head("Top 10 - Rangliste ( Nach Loseguthaben )");?>
<br>
<table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="white"><b>Rang</b></font></td>
<td align="center"><font color="white"><b>Klamm ID</b></font></td>
<td align="center"><font color="white"><b>Lose</b></font></td>
</tr>
<?
$rang = 1;
$guthabenrang = db_query("SELECT * FROM ".$db_prefix."_kontodaten ORDER BY kontostand DESC LIMIT 10");
while ($guthabenliste=mysql_fetch_array($guthabenrang)) {
echo '
<tr bgcolor="#FAEBD7">
<td align="center">'. $rang++ .'</td>
<td align="center">'.$guthabenliste[uid].'</td>
<td align="center">'.number_format($guthabenliste[kontostand],0,",",".").'</td>
</tr>
';
}
?>
</table>
<?foot();?>