- adjusted the ranglist so it is sorted on elo from the beginning (introduced the level)

- adjusted the profile so no php syntax error
main
hecht 13 years ago
parent 6d0717d9f3
commit 64446d74f8

@ -28,13 +28,13 @@ if ($wahl == 'geld') {
$wahl_y= 'Niederlagen'; $wahl_y= 'Niederlagen';
$wahl_z = 'Elo'; $wahl_z = 'Elo';
} else { } else {
$wahl = 'siege'; $wahl = 'elo';
$wahl_x= 'Siege'; $wahl_x= 'Siege';
$wahl_y= 'Niederlagen'; $wahl_y= 'Niederlagen';
$wahl_z = 'Elo'; $wahl_z = 'Elo';
} }
$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'; $sql = 'SELECT i.level, 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>'; //echo $sql . '<br>';
$char_s = mysql_query($sql); $char_s = mysql_query($sql);
?> ?>
@ -71,6 +71,7 @@ $char_s = mysql_query($sql);
<th valign="middle" height="25" align="center">#</th> <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%">Name</th>
<th valign="middle" height="25" align="center" width="20%">Leader</th> <th valign="middle" height="25" align="center" width="20%">Leader</th>
<th valign="middle" height="25" align="center">Level</th>
<th valign="middle" height="25" align="center">Member</th> <th valign="middle" height="25" align="center">Member</th>
<th valign="middle" height="25" align="center">Slots</th> <th valign="middle" height="25" align="center">Slots</th>
<?php <?php
@ -92,6 +93,7 @@ while($row = mysql_fetch_assoc($char_s)) {
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">'.$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"><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">'.displayUserLink($row['leader'], $row['nickname']).'</th>'."\n";
echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.$row['level'].'</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">'.(getMaximumMembers($row['id']) - $row['member']).'</th>'."\n"; echo '<th valign="middle" height="25" bgcolor="'.$cols[$x].'" align="center">'.(getMaximumMembers($row['id']) - $row['member']).'</th>'."\n";

@ -192,7 +192,7 @@ function display($user, $usergroups){
$che2 = 'checked="checked"'; $che2 = 'checked="checked"';
} }
?> moderat: <input type="radio" name="ads" value="0" <?php echo $che1; ?> /> <?php ?> moderat: <input type="radio" name="ads" value="0" <?php echo $che1; ?> /> <?php
if(!(getLayerAdvertisement() == '' or getLayerAdvertisement == null)){ if(!(getLayerAdvertisement() == '' || getLayerAdvertisement() == null)){
echo 'hardcore: <input type="radio" name="ads" value="1"'.$che2.'/>'; echo 'hardcore: <input type="radio" name="ads" value="1"'.$che2.'/>';
} }
?> ?>

@ -55,7 +55,7 @@ if(!semaphoreUP($ressource)) {
} else { } else {
$ids = getAwatingChallengeIDs(); $ids = getAwatingChallengeIDs();
foreach($ids as $id) { foreach($ids as $id) {
echo 'Werte Clanfight mit ID ' . $id . ' aus<br>'; echo 'Werte Clanfight mit ID ' . $id . ' aus<br>'.PHP_EOL;
$challenge = getChallenge($id); $challenge = getChallenge($id);
$clan_ids = getParticipatingClanIDs($id); $clan_ids = getParticipatingClanIDs($id);
@ -99,7 +99,7 @@ if(!semaphoreUP($ressource)) {
$sql = 'UPDATE clan_challenge_clans SET elo_change = ' .$eloClan2 . ', exp_change = ' . $expClan2 . ' WHERE clan_challenge_id = ' . $id . ' AND clan_id = ' . $clan2['id']; $sql = 'UPDATE clan_challenge_clans SET elo_change = ' .$eloClan2 . ', exp_change = ' . $expClan2 . ' WHERE clan_challenge_id = ' . $id . ' AND clan_id = ' . $clan2['id'];
// echo $sql . '<br>'; // echo $sql . '<br>';
mysql_query($sql); mysql_query($sql);
addClanExp($clan2['id'], $expClan1); addClanExp($clan2['id'], $expClan2);
$appendum = null; $appendum = null;
if($winner == $clan2['id']) { if($winner == $clan2['id']) {

Loading…
Cancel
Save