|
|
|
@ -38,13 +38,11 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($wahl == 'geld') {
|
|
|
|
|
$choice_s = mysql_query('SELECT geld, id, nickname FROM user where id >= 2 ORDER BY geld DESC LIMIT 50');
|
|
|
|
|
$choice_s = mysql_query('SELECT geld, id FROM user where id >= 2 ORDER BY geld DESC LIMIT 50');
|
|
|
|
|
} else {
|
|
|
|
|
$sql = 'SELECT cl.clanzeichen, u.nickname, u.id as userid, c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck as powerlevel' .
|
|
|
|
|
' FROM chars as c INNER JOIN user as u on c.besitzer = u.id' .
|
|
|
|
|
' LEFT JOIN clan as cl on u.clan = cl.id ' .
|
|
|
|
|
$sql = 'SELECT c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck as powerlevel' .
|
|
|
|
|
'WHERE rasse != \'NPC\' ORDER BY ('.$wahl.') DESC LIMIT 50';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Uncomment for hp/mp in PL
|
|
|
|
|
// $sql = 'SELECT cl.clanzeichen, u.nickname, u.id as userid, c.name, c.level, c.besitzer, c.starke, c.preis, c.speed, c.glueck, c.bild, c.verteidigung, c.ausdauer, c.siege, c.niederlagen, c.id as charid, starke+verteidigung+speed+ausdauer+glueck+substring_index(hp,\',\',-1)/10+substring_index(mp,\',\',-1)/5 as powerlevel' .
|
|
|
|
|
// ' FROM chars as c INNER JOIN user as u on c.besitzer = u.id' .
|
|
|
|
@ -122,9 +120,9 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){
|
|
|
|
|
$cols[$x] = 'bgcolor="#666666"';
|
|
|
|
|
$found = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row['bild'] = getPicture($row);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row['wahl'] = $row[$wahl];
|
|
|
|
|
|
|
|
|
|
$clan_logo = explode(',',$row['clanzeichen']);
|
|
|
|
@ -133,7 +131,7 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo $x; ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo displayUserLink($row['id'], $row['nickname']); ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo generateUserLinkByID($row['id']); ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center">???</th>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
@ -144,7 +142,7 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){
|
|
|
|
|
<tr>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo $x; ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo displayCharLink($row['charid'],$row['name'],$row['bild']); ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo displayUserLink($row['besitzer'], $row['nickname'], $clan_logo[0], $clan_logo[1]); ?></b></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo generateUserLinkByID($row['besitzer']); ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo $row['wahl']; ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo $row['siege'].' / '.$row['niederlagen']; ?></th>
|
|
|
|
|
<th <?php echo $cols[$x];?> align="center"><?php echo $row['preis']; ?></th>
|
|
|
|
@ -172,7 +170,7 @@ function displayHighscore($wahl, $char_name, $user, $char_vorhanden){
|
|
|
|
|
<tr>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo $z; ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo displayCharLink($char_x_name['id'],$char_x_name['name'],$char_x_name['bild']); ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo displayUserLink($char_x_name['besitzer'],$nick_name2['nickname']); ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo generateUserLinkByID($char_x_name['besitzer']); ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo $char_x_name[$wahl]; ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo $char_x_name['siege'].' / '.$char_x_name['niederlagen']; ?></th>
|
|
|
|
|
<th bgcolor="<?php echo $cols[$x];?>" align="center"><?php echo $char_x_name['preis']; ?></th>
|
|
|
|
|