You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
4.3 KiB
105 lines
4.3 KiB
<?php
|
|
/*
|
|
*
|
|
* @copyright (c) 2009 animegame.eu
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
*
|
|
*/
|
|
|
|
include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php');
|
|
include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/parse.inc.php');
|
|
include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/designfunctions.inc.php');
|
|
// GET-Section
|
|
// Kritisch (SQL-Injections)
|
|
|
|
//Unkritisch
|
|
$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= 'Siege';
|
|
$wahl_y= 'Niederlagen';
|
|
$wahl_z= 'Unentschieden';
|
|
} else {
|
|
$wahl = 'siege';
|
|
$wahl_x= 'Siege';
|
|
$wahl_y= 'Niederlagen';
|
|
$wahl_z= 'Unentschieden';
|
|
}
|
|
|
|
$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');
|
|
?>
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
|
|
<!-- MSTableType="layout" -->
|
|
<tr>
|
|
<td valign="middle" colspan="3">
|
|
<p align="center">
|
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"><br>
|
|
<input type="hidden" name="as" value="clan/c_ranglist" />
|
|
<input type="hidden" name="char_name" value="<?php echo $char_name; ?>" />
|
|
<select id="input" name="wahl">
|
|
<option value="siege">Siege
|
|
<option value="unentschieden">Unentschieden
|
|
<option value="niederlagen">Niederlagen
|
|
<option value="geld">Geld
|
|
</select>
|
|
<input id="input" type=submit value="ordnen" />
|
|
</form>
|
|
</td>
|
|
<td valign="middle" colspan="3" height="1">
|
|
<p align="center"><b>
|
|
</b></td>
|
|
</tr>
|
|
<tr>
|
|
<th valign="middle" height="25" align="center">#</th>
|
|
<th valign="middle" height="25" align="center" width="20%">Name</th>
|
|
<th valign="middle" height="25" align="center" width="20%">Leader</th>
|
|
<th valign="middle" height="25" align="center">Member</th>
|
|
<th valign="middle" height="25" align="center">Slots</th>
|
|
<?php
|
|
if ($wahl != 'geld') {
|
|
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>';
|
|
} else {
|
|
echo '<th valign="middle" height="25">'.$wahl_x.' Aktuell</th>';
|
|
echo '<th validn="middle" height="25">'.$wahl_x.' ∑</th>';
|
|
}
|
|
?>
|
|
</tr>
|
|
<?php
|
|
$x=1;
|
|
while($row = mysql_fetch_assoc($char_s)) {
|
|
echo '<tr>'."\n";
|
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.$x.'</th>'."\n";
|
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center"><a href="index.php?as=clan/clan_info&clan_id='.$row['id'].'">'.$row['clanname'].'</a></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['freeslots'].'</th>'."\n";
|
|
|
|
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['summe']).'</th>';
|
|
} 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_z)]).'</th>';
|
|
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.displayCount($row[strtolower($wahl_y)]).'</th>';
|
|
}
|
|
echo '</tr>'."\n";
|
|
|
|
?>
|
|
|
|
<?php
|
|
$x++;
|
|
}
|
|
?>
|
|
</table>
|
|
|
|
</body>
|