@ -17,35 +17,48 @@ $char_name = $_GET['char_name'];
$wahl = $_GET['wahl'];
$wahl = $_GET['wahl'];
if ($wahl == 'geld') {
if ($wahl == 'geld') {
$wahl_x = 'Geld';
$wahl_x = 'Geld';
} elseif ($wahl == 'siege' OR $wahl == 'niederlagen' OR $wahl == 'unentschieden') {
$wahl_y = 'Elo';
} elseif ($wahl == 'siege' OR $wahl == 'niederlagen') {
$wahl_x= 'Siege';
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$wahl_y= 'Niederlagen';
$wahl_z= 'Unentschieden';
$wahl_z = 'Elo';
} elseif ($wahl == 'elo'){
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$wahl_z = 'Elo';
} else {
} else {
$wahl = 'siege';
$wahl = 'siege';
$wahl_x= 'Siege';
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$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 . '< br > ';
$char_s = mysql_query($sql);
?>
?>
< table border = "0" cellpadding = "0" cellspacing = "0" style = "border-collapse: collapse" bordercolor = "#111111" width = "100%" height = "1" >
< table border = "0" cellpadding = "0" cellspacing = "0" style = "border-collapse: collapse" bordercolor = "#111111" width = "100%" height = "1" >
<!-- MSTableType="layout" -->
<!-- MSTableType="layout" -->
< tr > < th colspan = "6" > Diese Seite befindet sich gerade im Umbau, daher kö nnen ein paar Fehler auftreten!< / th > < / tr >
< tr >
< tr >
< td valign = "middle" colspan = "3" >
< td valign = "middle" colspan = "3" >
< p align = "center" >
< p align = "center" >
< form action = " <?php echo $_SERVER [ 'PHP_SELF' ]; ?> " method = "get" >< br >
< form action = " <?php echo $_SERVER [ 'PHP_SELF' ]; ?> " method = "get" >< br >
< input type = "hidden" name = "as" value = "clan/c_ranglist" / >
< input type = "hidden" name = "as" value = "clan/c_ranglist" / >
< input type = "hidden" name = "char_name" value = " <?php echo $char_name ; ?> " />
< input type = "hidden" name = "char_name" value = " <?php echo $char_name ; ?> " />
< select id = "input" name = "wahl" >
< select id = "input" name = "wahl" >
< option value = "siege" > Siege
<?php
< option value = "unentschieden" > Unentschieden
$choices = array('elo', 'siege', 'niederlagen', 'geld');
< option value = "niederlagen" > Niederlagen
$choice_labels = array('ELO-Wertung', 'Siege', 'Niederlagen', 'Geld');
< option value = "geld" > Geld
for($i = 0; $i< count ( $ choices ) ; $ i + + ) {
$selected = '';
if($wahl == $choices[$i]) {
$selected = ' selected="selected"';
}
echo '< option value = "'.$choices[$i].'" ' . $ selected . ' > '.$choice_labels[$i].'< / option > '. PHP_EOL;
}
?>
< / select >
< / select >
< input id = "input" type = submit value = "ordnen" / >
< input id = "input" type = submit value = "ordnen" / >
< / form >
< / form >
@ -63,13 +76,14 @@ $char_s = mysql_query('SELECT i.siege, i.leader, i.niederlagen, i.unentschieden,
<?php
<?php
if ($wahl != 'geld') {
if ($wahl != 'geld') {
echo '< th valign = "middle" height = "25" > '.$wahl_x.'< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_x.'< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_z.'< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_y.'< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_y.'< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_z.'< / th > ';
} else {
} else {
echo '< th valign = "middle" height = "25" > '.$wahl_x.' Aktuell< / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_x.' Aktuell< / th > ';
echo '< th validn = "middle" height = "25" > '.$wahl_x.' ∑ < / th > ';
echo '< th validn = "middle" height = "25" > '.$wahl_x.' ∑ < / th > ';
echo '< th valign = "middle" height = "25" > '.$wahl_z.'< / th > ';
}
}
?>
?>
< / tr >
< / tr >
<?php
<?php
$x=1;
$x=1;
@ -80,17 +94,17 @@ while($row = mysql_fetch_assoc($char_s)) {
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayUserLink($row['leader'], $row['nickname']).'< / th > '."\n";
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayUserLink($row['leader'], $row['nickname']).'< / th > '."\n";
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.$row['member'].'< / th > '."\n";
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.$row['member'].'< / th > '."\n";
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.$row['freeslots'].'< / th > '."\n";
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.$row['freeslots'].'< / th > '."\n";
if($wahl == "geld"){
if($wahl == "geld"){
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayMoney($row[$wahl]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayMoney($row[$wahl]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayMoney($row['summe']).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayMoney($row['summe']).'< / th > ';
} else {
} else {
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_x)]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_x)]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_z)]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_y)]).'< / th > ';
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_y)]).'< / th > ';
}
echo '< th valign = "middle" height = "25" bgcolor = "'.$cols[$x].'" align = "center" > '.displayCount($row[strtolower($wahl_z)]).'< / th > ';
}
echo '< / tr > '."\n";
echo '< / tr > '."\n";
?>
?>
<?php
<?php