From 646090ae7aee45eaf39d02a85f81b0f379d19ede Mon Sep 17 00:00:00 2001 From: hecht Date: Sat, 29 Oct 2011 10:00:23 +0000 Subject: [PATCH] small fixes on top10 clan + added a method to read out the clans that are capable of clan-fights! --- ag/clan/c_ranglist.php | 50 ++++++++++++++++++++++------------ ag/include/clan.inc.php | 5 ++-- ag/include/clan_fights.inc.php | 11 ++++++++ 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/ag/clan/c_ranglist.php b/ag/clan/c_ranglist.php index 9b946d1..352c0d9 100644 --- a/ag/clan/c_ranglist.php +++ b/ag/clan/c_ranglist.php @@ -17,35 +17,48 @@ $char_name = $_GET['char_name']; $wahl = $_GET['wahl']; if ($wahl == 'geld') { - $wahl_x = 'Geld'; -} elseif ($wahl == 'siege' OR $wahl == 'niederlagen' OR $wahl == 'unentschieden') { + $wahl_x = 'Geld'; + $wahl_y = 'Elo'; +} elseif ($wahl == 'siege' OR $wahl == 'niederlagen') { $wahl_x= 'Siege'; $wahl_y= 'Niederlagen'; - $wahl_z= 'Unentschieden'; + $wahl_z = 'Elo'; +} elseif ($wahl == 'elo'){ + $wahl_x= 'Siege'; + $wahl_y= 'Niederlagen'; + $wahl_z = 'Elo'; } else { $wahl = 'siege'; $wahl_x= 'Siege'; $wahl_y= 'Niederlagen'; - $wahl_z= 'Unentschieden'; + $wahl_z = 'Elo'; } -$char_s = mysql_query('SELECT i.siege, i.leader, i.niederlagen, i.unentschieden, i.geld, i.clanname, i.id, u.nickname, (Select count(*) from user u1 where clan = i.id) as member, (Select 10 - count(*) from user u2 where clan = i.id and ((i.leader is null || i.leader != u2.id) and (i.co_leader is null ||i.co_leader != u2.id))) as freeslots, (select sum(spende) as summe from user_clan where clanid = i.id) as summe FROM clan i LEFT JOIN user u ON(i.leader=u.id) ORDER BY i.'.$wahl.' DESC LIMIT 50'); +$sql = 'SELECT i.siege, i.leader, i.niederlagen, i.geld, i.clanname, i.id, u.nickname, (Select count(*) from user u1 where clan = i.id) as member, (Select 10 - count(*) from user u2 where clan = i.id and ((i.leader is null || i.leader != u2.id) and (i.co_leader is null ||i.co_leader != u2.id))) as freeslots, (select sum(spende) as summe from user_clan where clanid = i.id) as summe, elo FROM clan i LEFT JOIN user u ON(i.leader=u.id) ORDER BY i.'.$wahl.' DESC LIMIT 50'; +//echo $sql . '
'; +$char_s = mysql_query($sql); ?> - '; echo ''; + echo ''; } else { echo ''; - echo ''; + echo ''; + echo ''; } - ?> + ?> '.displayUserLink($row['leader'], $row['nickname']).''."\n"; echo ''."\n"; echo ''."\n"; - + if($wahl == "geld"){ echo ''; echo ''; } else { echo ''; - echo ''; echo ''; - } + echo ''; + } echo ''."\n"; - + ?>
Diese Seite befindet sich gerade im Umbau, daher können ein paar Fehler auftreten!

-


+
   
@@ -63,13 +76,14 @@ $char_s = mysql_query('SELECT i.siege, i.leader, i.niederlagen, i.unentschieden, '.$wahl_x.''; - echo '
'.$wahl_z.''.$wahl_y.''.$wahl_z.''.$wahl_x.' Aktuell'.$wahl_x.' ∑'.$wahl_x.' ∑'.$wahl_z.'
'.$row['member'].''.$row['freeslots'].''.displayMoney($row[$wahl]).''.displayMoney($row['summe']).''.displayCount($row[strtolower($wahl_x)]).''.displayCount($row[strtolower($wahl_z)]).''.displayCount($row[strtolower($wahl_y)]).''.displayCount($row[strtolower($wahl_z)]).'