PHP-Code:
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="450">
<tr>
<td width="25%">
<?
// Variabeln
$rp = 0;
// Ralleydaten auslesen
$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='klickralley'"));
?>
<table width="100%" cellpadding="2" cellspacing="2" border="0" align="center">
<tr>
<td align="center"><b>User</b></td>
<td align="center"><b>Klicks</b></td>
</tr>
<?
$platz = db_query("SELECT * FROM ".$db_prefix."_klickralley ORDER BY klicks DESC LIMIT 10");
while ($pa = mysql_fetch_array($platz)) {
$rp++;
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$rp],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp],2,",",".");
}
if ($rp > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">'.$pa['uid'].'</td>
<td align="right">'.number_format($pa['klicks'],0,",",".").' </td>
</tr>
';
}
for($x=$rp+1;$x<11;$x++){
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$x],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$x],2,",",".");
}
if ($x > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">N/A</td>
<td align="right">0 </td>
</tr>
';
}
?>
</table>
</td>
<td width="25%">
<?
// Variabeln
$rp = 0;
// Ralleydaten auslesen
$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='aktivralley'"));
?>
<table width="100%" cellpadding="2" cellspacing="2" border="0" align="center">
<tr>
<td align="center"> <b>User</b> </td>
<td align="center"> <b>Punkte</b> </td>
</tr>
<?
$platz = db_query("SELECT * FROM ".$db_prefix."_aktivralley WHERE punkte > '".$ralleydaten['pro']."' ORDER BY punkte DESC LIMIT 10");
while ($pa = mysql_fetch_array($platz)) {
$rp++;
$mg = number_format($ralleydaten['p'.$rp],2,",",".");
if ($rp > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">'.$pa['uid'].'</td>
<td align="right">'.number_format($pa['punkte'],2,",",".").' </td>
</tr>
';
}
for($x=$rp+1;$x<11;$x++){
$mg = number_format($ralleydaten['p'.$x],2,",",".");
if ($x > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">N/A</td>
<td align="right">0 </td>
</tr>
';
}
?>
</table>
</td>
<td width="25%">
<?
// Variabeln
$rp = 0;
// Ralleydaten auslesen
$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='bettelralley'"));
?>
<table width="100%" cellpadding="2" cellspacing="2" border="0" align="center">
<tr>
<td align="center"> <b>User</b> </td>
<td align="center"> <b>Aufrufe</b> </td>
</tr>
<?
$platz = db_query("SELECT * FROM ".$db_prefix."_bettelralley ORDER BY klicks DESC LIMIT 10");
while ($pa = mysql_fetch_array($platz)) {
$rp++;
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$rp],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp],2,",",".");
}
if ($rp > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">'.$pa['uid'].'</td>
<td align="right">'.number_format($pa['klicks'],0,",",".").' </td>
</tr>
';
}
for($x=$rp+1;$x<11;$x++){
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$x],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$x],2,",",".");
}
if ($x > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr>
<td align="center">N/A</td>
<td align="right">0 </td>
</tr>
';
}
?>
</table>
</td>
<td width="25%">
<?
// Variabeln
if (!isset($rs)) $rs = "";
if (!isset($count)) $count = "";
if (!isset($platz1)) $platz1 = "";
if (!isset($platz2)) $platz2 = "";
if (!isset($platz3)) $platz3 = "";
if (!isset($platz4)) $platz4 = "";
if (!isset($platz5)) $platz5 = "";
if (!isset($platz6)) $platz6 = "";
if (!isset($platz7)) $platz7 = "";
if (!isset($platz8)) $platz8 = "";
if (!isset($platz9)) $platz9 = "";
if (!isset($platz10)) $platz10 = "";
$filename = 'lib/texte/refralley.txt';
// Ralleydaten auslesen
$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='refralley'"));
// Datei auslesen
$fp = fopen ($filename, "r");
$inhalt = fread ($fp, filesize ($filename));
fclose ($fp);
$inhalt = str_replace('\\', '', $inhalt);
?>
<?
$refs = mysql_query("SELECT werber , COUNT(werber)AS total FROM ".$db_prefix."_werberdaten WHERE werber != 0 and zuordnungszeit >= '".$ralleydaten['start']."' and zuordnungszeit <= '".$ralleydaten['ende']."' and gesamt >= '".$ralleydaten['pro']."' GROUP BY werber ORDER BY total DESC LIMIT 10");
$count = 1;
while ($row = mysql_fetch_array($refs)) {
$user = mysql_fetch_array(mysql_query("SELECT uid FROM ".$db_prefix."_kontodaten WHERE `uid`='$row[0]'"));
if ($count == 1) {$users[1] = $user[0]; $ref1[1] = $row[1];}
if ($count == 2) {$users[2] = $user[0]; $ref1[2] = $row[1];}
if ($count == 3) {$users[3] = $user[0]; $ref1[3] = $row[1];}
if ($count == 4) {$users[4] = $user[0]; $ref1[4] = $row[1];}
if ($count == 5) {$users[5] = $user[0]; $ref1[5] = $row[1];}
if ($count == 6) {$users[6] = $user[0]; $ref1[6] = $row[1];}
if ($count == 7) {$users[7] = $user[0]; $ref1[7] = $row[1];}
if ($count == 8) {$users[8] = $user[0]; $ref1[8] = $row[1];}
if ($count == 9) {$users[9] = $user[0]; $ref1[9] = $row[1];}
if ($count == 10) {$users[10] = $user[0]; $ref1[10] = $row[1];}
$count = $count + 1;
}
?>
<table width="25%" cellpadding="2" cellspacing="2" border="0" align="center">
<tr>
<td align="center"><b>User</b></td>
<td align="center"><b>Refs</b></td>
</tr>
<?
for($x=1;$x<11;$x++){
$rs++;
if (!isset($users[$rs])) $users[$rs] = "N/A";
if (!isset($ref1[$rs])) $ref1[$rs] = "0";
?>
<tr>
<td align="center"><?=$users[$rs];?></td>
<td align="center"><?=$ref1[$rs];?></td>
</tr>
<?
}
?>
</table>
Wäre cool wenn das mal einer probiert und sagt was da nicht richtig ist.