erstelle ne Datei Namens top10.php und füge in diese folgendes ein
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 - Banner-Klicks"); ?>
<table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="#FFFFFF"><b>Rang</b></font></td>
<td align="center"><font color="#FFFFFF"><b>User</b></font></td>
<td align="center"><font color="#FFFFFF"><b>Klicks</b></font></td>
</tr>
<?
$rang = 1;
$klicksrang = db_query("SELECT * FROM ".$db_prefix."_kontodaten ORDER BY klicks DESC LIMIT 10");
while ($klicks=mysql_fetch_array($klicksrang)) {
$userdaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_userdaten WHERE uid=".$klicks['uid'].""));
echo '
<tr bgcolor="#04548f">
<td align="center">'. $rang++ .'</td>
<td align="center"><a href="/?content=/nickpage&id='.$klicks['uid'].'">'.$userdaten["nickname"].'</a></td>
<td align="center">'.number_format($klicks['klicks'],0,",",".").'</td>
</tr>
';
}
?>
</table>
<? foot(); ?>
<? head("Top 10 - Paidlinkklicks"); ?>
<table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="#FFFFFF"><b>Rang</b></font></td>
<td align="center"><font color="#FFFFFF"><b>User</b></font></td>
<td align="center"><font color="#FFFFFF"><b>Klicks</b></font></td>
</tr>
<?
$rang = 1;
$klicksrang = db_query("SELECT * FROM ".$db_prefix."_kontodaten ORDER BY textlinks DESC LIMIT 10");
while ($klicks=mysql_fetch_array($klicksrang)) {
$userdaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_userdaten WHERE uid=".$klicks['uid'].""));
echo '
<tr bgcolor="#04548f">
<td align="center">'. $rang++ .'</td>
<td align="center"><a href="/?content=/nickpage&id='.$klicks['uid'].'">'.$userdaten["nickname"].'</a></td>
<td align="center">'.number_format($klicks['textlinks'],0,",",".").'</td>
</tr>
';
}
?>
</table>
<? foot(); ?>
<? head("Top 10 - Loseguthaben"); ?>
<table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="#FFFFFF"><b>Rang</b></font></td>
<td align="center"><font color="#FFFFFF"><b>User</b></font></td>
<td align="center"><font color="#FFFFFF"><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)) {
$userdaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_userdaten WHERE uid=".$guthabenliste['uid'].""));
echo '
<tr bgcolor="#04548f">
<td align="center">'. $rang++ .'</td>
<td align="center"><a href="/?content=/nickpage&id='.$guthabenliste['uid'].'">'.$userdaten["nickname"].'</a></td>
<td align="center">'.number_format($guthabenliste[kontostand],0,",",".").'</td>
</tr>
';
}
?>
</table>
<? foot(); ?>
<? head("Top 10 - Bettelaufrufe"); ?>
<table width="100%" cellpadding="1" cellspacing="1" border="0" bgcolor="#f6d288">
<tr bgcolor="#4169E1">
<td align="center"><font color="#FFFFFF"><b>Rang</b></font></td>
<td align="center"><font color="#FFFFFF"><b>User</b></font></td>
<td align="center"><font color="#FFFFFF"><b>Aufrufe</b></font></td>
<td align="center"><font color="#FFFFFF"><b>Erbettelte <?=$waehrung;?></b></font></td>
</tr>
<?
$rang = 1;
$bettelrang = db_query("SELECT * FROM ".$db_prefix."_kontodaten ORDER BY angebettelt DESC LIMIT 10");
while ($bettelliste=mysql_fetch_array($bettelrang)) {
$userdaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_userdaten WHERE uid=".$bettelliste['uid'].""));
echo '
<tr bgcolor="#04548f">
<td align="center">'. $rang++ .'</td>
<td align="center"><a href="/?content=/nickpage&id='.$bettelliste['uid'].'">'.$userdaten["nickname"].'</a></td>
<td align="center">'.number_format($bettelliste['angebettelt'],0,",",".").'</td>
<td align="center">'.number_format($bettelliste['bv'],2,",",".").'</td>
</tr>
';
}
?>
</table>
<? foot(); ?>
diese Datei denn in zum Beispiel /content/intern/ hochladen und mit
<a href="?content=/intern/top10">Top10</a>  
in der header.php verlinken wenn du es dort haben willst...
habe hier nun auch Top10 Guthaben drin^^
LG Muecke : >