From 3a58cb2802c8be14f78015105afe759b1c7ce692 Mon Sep 17 00:00:00 2001 From: Matthijs Kuiper Date: Tue, 9 Jan 2018 00:43:43 +0100 Subject: Implement design for pages and update includes --- html/assets/main.js | 5 + html/includes/clanbase.php | 0 html/includes/config.php | 6 +- html/includes/config_pic.php | 0 html/includes/countries.php | 0 html/includes/ftp.php | 2 +- html/includes/ftp_class.php | 0 html/includes/ftp_class_native.php | 0 html/includes/ftp_class_pure.php | 0 html/includes/ftp_class_sockets.php | 0 html/includes/geoip.inc | 0 html/includes/hints.php | 6 +- html/includes/teamstats.php | 338 ++++++++-------- html/includes/weaponstats.php | 48 +-- html/pages/admin/acelog.php | 4 +- html/pages/admin/aclog.php | 228 ++++++----- html/pages/admin/dmatch.php | 4 +- html/pages/admin/dplayer.php | 2 +- html/pages/admin/dpmatch.php | 2 +- html/pages/admin/editgames.php | 2 +- html/pages/admin/editgamestype.php | 6 +- html/pages/admin/editweapons.php | 2 +- html/pages/admin/ipsearch.php | 2 +- html/pages/admin/main.php | 51 ++- html/pages/admin/mplayers.php | 2 +- html/pages/admin/mservers.php | 2 +- html/pages/admin/pban.php | 4 +- html/pages/admin/pinfo.php | 4 +- html/pages/admin/plm.php | 34 +- html/pages/admin/recalcflags.php | 2 +- html/pages/admin/recalcranking.php | 2 +- html/pages/admin/utdclog.php | 4 +- html/pages/admin/utdcshot.php | 0 html/pages/credits.php | 661 ++++++++++++++++--------------- html/pages/dpmatch.php | 2 +- html/pages/graph_mbreakdown.php | 247 ++++++------ html/pages/graph_pbreakdown.php | 2 +- html/pages/help.php | 477 +++++++++++++--------- html/pages/home.php | 266 ++++++++++--- html/pages/maps.php | 42 +- html/pages/maps_info.php | 507 ++++++++++++------------ html/pages/match_info.php | 115 +++--- html/pages/match_info_ass.php | 8 +- html/pages/match_info_bt.php | 2 +- html/pages/match_info_ctf.php | 634 +++++++++++++++--------------- html/pages/match_info_killsmatrix.php | 58 +-- html/pages/match_info_lms.php | 27 +- html/pages/match_info_other.php | 206 +++++----- html/pages/match_info_other2.php | 40 +- html/pages/match_player.php | 165 ++++---- html/pages/match_report.php | 9 +- html/pages/players_explain_ranking.php | 66 ++-- html/pages/players_info.php | 694 ++++++++++++++++++--------------- html/pages/players_search.php | 46 ++- html/pages/rank_extended.php | 26 +- html/pages/report.php | 0 html/pages/report/bbcode.php | 0 html/pages/report/clanbase.php | 0 html/pages/report/index.htm | 0 html/pages/report_cb.php | 6 +- html/pages/servers.php | 18 +- html/pages/servers_info.php | 208 +++++----- html/pages/servers_query.php | 6 +- html/pages/totals.php | 565 +++++++++++++-------------- 64 files changed, 3118 insertions(+), 2747 deletions(-) mode change 100755 => 100644 html/includes/clanbase.php mode change 100755 => 100644 html/includes/config_pic.php mode change 100755 => 100644 html/includes/countries.php mode change 100755 => 100644 html/includes/ftp.php mode change 100755 => 100644 html/includes/ftp_class.php mode change 100755 => 100644 html/includes/ftp_class_native.php mode change 100755 => 100644 html/includes/ftp_class_pure.php mode change 100755 => 100644 html/includes/ftp_class_sockets.php mode change 100755 => 100644 html/includes/geoip.inc mode change 100755 => 100644 html/includes/hints.php mode change 100755 => 100644 html/includes/weaponstats.php mode change 100755 => 100644 html/pages/admin/acelog.php mode change 100755 => 100644 html/pages/admin/aclog.php mode change 100755 => 100644 html/pages/admin/dmatch.php mode change 100755 => 100644 html/pages/admin/dplayer.php mode change 100755 => 100644 html/pages/admin/dpmatch.php mode change 100755 => 100644 html/pages/admin/editgames.php mode change 100755 => 100644 html/pages/admin/editgamestype.php mode change 100755 => 100644 html/pages/admin/editweapons.php mode change 100755 => 100644 html/pages/admin/ipsearch.php mode change 100755 => 100644 html/pages/admin/main.php mode change 100755 => 100644 html/pages/admin/mplayers.php mode change 100755 => 100644 html/pages/admin/mservers.php mode change 100755 => 100644 html/pages/admin/pban.php mode change 100755 => 100644 html/pages/admin/pinfo.php mode change 100755 => 100644 html/pages/admin/plm.php mode change 100755 => 100644 html/pages/admin/recalcflags.php mode change 100755 => 100644 html/pages/admin/recalcranking.php mode change 100755 => 100644 html/pages/admin/utdclog.php mode change 100755 => 100644 html/pages/admin/utdcshot.php mode change 100755 => 100644 html/pages/dpmatch.php mode change 100755 => 100644 html/pages/graph_pbreakdown.php mode change 100755 => 100644 html/pages/maps.php mode change 100755 => 100644 html/pages/maps_info.php mode change 100755 => 100644 html/pages/match_info_ass.php mode change 100755 => 100644 html/pages/match_info_bt.php mode change 100755 => 100644 html/pages/match_info_ctf.php mode change 100755 => 100644 html/pages/match_info_killsmatrix.php mode change 100755 => 100644 html/pages/match_info_lms.php mode change 100755 => 100644 html/pages/match_info_other2.php mode change 100755 => 100644 html/pages/match_report.php mode change 100755 => 100644 html/pages/players_explain_ranking.php mode change 100755 => 100644 html/pages/players_search.php mode change 100755 => 100644 html/pages/rank_extended.php mode change 100755 => 100644 html/pages/report.php mode change 100755 => 100644 html/pages/report/bbcode.php mode change 100755 => 100644 html/pages/report/clanbase.php mode change 100755 => 100644 html/pages/report/index.htm mode change 100755 => 100644 html/pages/report_cb.php mode change 100755 => 100644 html/pages/servers.php mode change 100755 => 100644 html/pages/servers_info.php mode change 100755 => 100644 html/pages/servers_query.php (limited to 'html') diff --git a/html/assets/main.js b/html/assets/main.js index b1e9b9e..5863530 100644 --- a/html/assets/main.js +++ b/html/assets/main.js @@ -8,4 +8,9 @@ $(document).ready(function() { window.document.location = $(this).attr("href"); } }); + + // Credits changelog toggle + $(".changeLog").click(function() { + $("#contentChangeLog").slideToggle(300); + }); }); diff --git a/html/includes/clanbase.php b/html/includes/clanbase.php old mode 100755 new mode 100644 diff --git a/html/includes/config.php b/html/includes/config.php index 55b9ffe..77d42fa 100755 --- a/html/includes/config.php +++ b/html/includes/config.php @@ -1,9 +1,9 @@ '; + if ($html) echo' - - - '; - - $sql_players = "SELECT pi.name, pi.banned, p.pid, p.team, p.country, p.gametime, p.gamescore, p.frags, p.deaths, p.suicides, p.teamkills, p.eff, p.accuracy, p.ttl, p.rank".(($extra) ? ', p.'.$extra.' AS '.$extra : '')." - FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $mid - ORDER BY".(($teams) ? ' team ASC,' : '')." $order"; - $q_players = mysql_query($sql_players) or die(mysql_error()); - $header = true; - teamstats_init_totals($totals, $num); - - while ($r_players = zero_out(mysql_fetch_array($q_players))) { - $r_players['dom_cp'] = $r_players['gamescore'] - $r_players['frags']; - $r_players['team'] = intval($r_players['team']); - - if ($teams and $oldteam != $r_players['team']) { - if ($r_players['team'] != 0) teamstats_team_totals($totals, $num, $teams, $extra, $teamscore[$oldteam]); - $oldteam = $r_players['team']; - teamstats_init_totals($totals, $num, $extra); - - switch(intval($r_players['team'])) { - case 0: $teamname = 'Red'; break; - case 1: $teamname = 'Blue'; break; - case 2: $teamname = 'Green'; break; - case 3: $teamname = 'Gold'; break; - } - - echo''; - $header = true; - } - - if ($header) { - $header = false; - echo ' - - - - '; - if ($extra) echo ''; - echo' - - - - '; - if ($teams) echo ''; - echo ' - - - - '; - } - - $eff = get_dp($r_players['eff']); - $acc = get_dp($r_players['accuracy']); - $ttl = GetMinutes($r_players['ttl']); - $kills = $r_players['frags'] + $r_players['suicides']; - $pname = $r_players['name']; - - $totals['gamescore'] += $r_players['gamescore']; - if ($extra) $totals[$extra] += $r_players[$extra]; - $totals['frags'] += $r_players['frags']; - $totals['kills'] += $kills; - $totals['deaths'] += $r_players['deaths']; - $totals['suicides'] += $r_players['suicides']; - $totals['teamkills'] += $r_players['teamkills']; - $totals['eff'] += $r_players['eff']; - $totals['acc'] += $r_players['accuracy']; - $totals['ttl'] += $r_players['ttl']; - $num++; - - if ($r_players['banned'] == 'Y') { - $eff = '-'; - $acc = '-'; - $ttl = '-'; - $kills = '-'; - $r_players['gamescore'] = '-'; - $r_players[$extra] = '-'; - $r_players['frags'] = '-'; - $r_players['deaths'] = '-'; - $r_players['suicides'] = '-'; - $r_players['teamkills'] = '-'; - } - - $class = ($num % 2) ? 'grey' : 'grey2'; - echo ''; - - if ($r_players['banned'] != 'Y') { - echo ''; - } else { - echo ''; - } - - echo ''; - echo ''; - - if ($extra) echo ''; - - echo ''; - echo ''; - echo ''; - echo ''; - - if ($teams) echo ''; - - echo ''; - echo ''; - echo ''; - echo ''; - } - - teamstats_team_totals($totals, $num, $teams, $extra, $teamscore[$oldteam]); - - echo '
'; echo "FTP Transferring Log Files...\n"; diff --git a/html/includes/ftp_class.php b/html/includes/ftp_class.php old mode 100755 new mode 100644 diff --git a/html/includes/ftp_class_native.php b/html/includes/ftp_class_native.php old mode 100755 new mode 100644 diff --git a/html/includes/ftp_class_pure.php b/html/includes/ftp_class_pure.php old mode 100755 new mode 100644 diff --git a/html/includes/ftp_class_sockets.php b/html/includes/ftp_class_sockets.php old mode 100755 new mode 100644 diff --git a/html/includes/geoip.inc b/html/includes/geoip.inc old mode 100755 new mode 100644 diff --git a/html/includes/hints.php b/html/includes/hints.php old mode 100755 new mode 100644 index b8da8de..7ba11a3 --- a/html/includes/hints.php +++ b/html/includes/hints.php @@ -24,10 +24,8 @@ $hint['Multis'] = "text" => "Special event: If you manage to kill more 2 than people within a short space of time you get a Double Kill, 3 is a Multi Kill etc" ); -$hint['Sprees'] = - array ( "caption" => "Killing Sprees", - "text" => "Special event: If you manage to kill 5 or more opponents without dying yourself, you will be on a killing spree. If you kill more than 10 opponents, you are on a rampage, etc." - ); +$hint['Sprees'] = "Special event: If you manage to kill 5 or more opponents without dying yourself, you will be on a killing spree. If you kill more than 10 opponents, you are on a rampage, etc." + ; $hint['EFF'] = array ( "caption" => "Efficiency", "text" => "A ratio that denotes the player's kill skill by comparing it with his overall performance. A perfect efficiency is equal to 1 (100%), anything less than 0.5 (50%) is below average.
Formula: Kills / (Kills + Deaths + Suicides [+Team Kills])" diff --git a/html/includes/teamstats.php b/html/includes/teamstats.php index b2116b9..d0b1b58 100755 --- a/html/includes/teamstats.php +++ b/html/includes/teamstats.php @@ -1,182 +1,176 @@ -
'.htmlentities($title).'
Team: '.$teamname.'
PlayerTimeScore'.htmlentities($extratitle).'FKDSTKEff.Acc.Avg TTL
'.FormatPlayerName($r_players['country'], $r_players['pid'], $r_players['name'], $gid, $gamename, true, $r_players['rank']).''.FormatPlayerName($r_players['country'], $r_players['pid'], $r_players['name'], $gid, $gamename, true, $r_players['rank']).''.GetMinutes($r_players['gametime'] / TIMERATIO).''.$r_players['gamescore'].''.$r_players[$extra].''.$r_players['frags'].''.$kills.''.$r_players['deaths'].''.$r_players['suicides'].''.$r_players['teamkills'].''.$eff.''.$acc.''.$ttl.'

'; + global $gamename, $gid; + $r_info = small_query("SELECT teamgame, t0score, t1score, t2score, t3score FROM uts_match WHERE id = '$mid'"); + if (!$r_info) die("Match not found"); + + $teams = ($r_info['teamgame'] == 'True') ? true : false; + $teamscore[-1] = 0; + $teamscore[0] = $r_info['t0score']; + $teamscore[1] = $r_info['t1score']; + $teamscore[2] = $r_info['t2score']; + $teamscore[3] = $r_info['t3score']; + + $cols = 10; + if ($teams) $cols++; + if ($extra) $cols++; + + $oldteam = -1; + + echo' + + + + '; + + $sql_players = "SELECT pi.name, pi.banned, p.pid, p.team, p.country, p.gametime, p.gamescore, p.frags, p.deaths, p.suicides, p.teamkills, p.eff, p.accuracy, p.ttl, p.rank".(($extra) ? ', p.'.$extra.' AS '.$extra : '')." + FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $mid + ORDER BY".(($teams) ? ' team ASC,' : '')." $order"; + $q_players = mysql_query($sql_players) or die(mysql_error()); + $header = true; + teamstats_init_totals($totals, $num); + + while ($r_players = zero_out(mysql_fetch_array($q_players))) { + $r_players['dom_cp'] = $r_players['gamescore'] - $r_players['frags']; + $r_players['team'] = intval($r_players['team']); + + if ($teams and $oldteam != $r_players['team']) { + if ($r_players['team'] != 0) teamstats_team_totals($totals, $num, $teams, $extra, $teamscore[$oldteam]); + $oldteam = $r_players['team']; + teamstats_init_totals($totals, $num, $extra); + + switch(intval($r_players['team'])) { + case 0: $teamname = 'Red'; break; + case 1: $teamname = 'Blue'; break; + case 2: $teamname = 'Green'; break; + case 3: $teamname = 'Gold'; break; + } + + echo''; + $header = true; + } + if ($header) { + $header = false; + echo ' + + + + '; + if ($extra) echo ''; + echo ' + + + + '; + if ($teams) echo ''; + echo ' + + + + '; + } + + $eff = get_dp($r_players['eff']); + $acc = get_dp($r_players['accuracy']); + $ttl = GetMinutes($r_players['ttl']); + $kills = $r_players['frags'] + $r_players['suicides']; + $pname = $r_players['name']; + + $totals['gamescore'] += $r_players['gamescore']; + if ($extra) $totals[$extra] += $r_players[$extra]; + $totals['frags'] += $r_players['frags']; + $totals['kills'] += $kills; + $totals['deaths'] += $r_players['deaths']; + $totals['suicides'] += $r_players['suicides']; + $totals['teamkills'] += $r_players['teamkills']; + $totals['eff'] += $r_players['eff']; + $totals['acc'] += $r_players['accuracy']; + $totals['ttl'] += $r_players['ttl']; + $num++; + + if ($r_players['banned'] == 'Y') { + $eff = '-'; + $acc = '-'; + $ttl = '-'; + $kills = '-'; + $r_players['gamescore'] = '-'; + $r_players[$extra] = '-'; + $r_players['frags'] = '-'; + $r_players['deaths'] = '-'; + $r_players['suicides'] = '-'; + $r_players['teamkills'] = '-'; + } + + $class = ($num % 2) ? 'grey' : 'grey2'; + echo ''; + if ($r_players['banned'] != 'Y') { + echo ''; + } else { + echo ''; + } + echo ''; + echo ''; + + if ($extra) echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + + if ($teams) echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + } + + teamstats_team_totals($totals, $num, $teams, $extra, $teamscore[$oldteam]); + echo '
'.htmlentities($title).'
Team: '.$teamname.'
PlayerTimeScore'.htmlentities($extratitle).'FKDSTKEff.Acc.Avg TTL
'.FormatPlayerName($r_players['country'], $r_players['pid'], $r_players['name'], $gid, $gamename, true, $r_players['rank']).''.FormatPlayerName($r_players['country'], $r_players['pid'], $r_players['name'], $gid, $gamename, true, $r_players['rank']).''.GetMinutes($r_players['gametime'] / TIMERATIO).''.$r_players['gamescore'].''.$r_players[$extra].''.$r_players['frags'].''.$kills.''.$r_players['deaths'].''.$r_players['suicides'].''.$r_players['teamkills'].''.$eff.''.$acc.''.$ttl.'

'; } function teamstats_init_totals(&$totals, &$num, $extra = null) { - $totals['gamescore'] = 0; - if ($extra) $totals[$extra] = 0; - $totals['frags'] = 0; - $totals['kills'] = 0; - $totals['deaths'] = 0; - $totals['suicides'] = 0; - $totals['teamkills'] = 0; - $totals['eff'] = 0; - $totals['acc'] = 0; - $totals['ttl'] = 0; - $num = 0; + $totals['gamescore'] = 0; + if ($extra) $totals[$extra] = 0; + $totals['frags'] = 0; + $totals['kills'] = 0; + $totals['deaths'] = 0; + $totals['suicides'] = 0; + $totals['teamkills'] = 0; + $totals['eff'] = 0; + $totals['acc'] = 0; + $totals['ttl'] = 0; + $num = 0; } function teamstats_team_totals(&$totals, $num, $teams, $extra, $teamscore) { - if ($num == 0) $num = 1; - $eff = get_dp($totals['eff'] / $num); - $acc = get_dp($totals['acc'] / $num); - $ttl = GetMinutes($totals['ttl'] / $num); - - echo ''; - echo 'Totals'; - echo ''; - - if ($teams) { - echo ''.$teamscore.' ('.$totals[gamescore].')'; - } else { - echo ''.$totals[gamescore].''; - } - if ($extra) echo ''.$totals[$extra].''; - - echo ''.$totals[frags].''; - echo ''.$totals[kills].''; - echo ''.$totals[deaths].''; - echo ''.$totals[suicides].''; - - if ($teams) echo ''.$totals[teamkills].''; - - echo ''.$eff.''; - echo ''.$acc.''; - echo ''.$ttl.''; - echo ''; + if ($num == 0) $num = 1; + $eff = get_dp($totals['eff'] / $num); + $acc = get_dp($totals['acc'] / $num); + $ttl = GetMinutes($totals['ttl'] / $num); + + echo ''; + echo 'Totals'; + echo ''; + if ($teams) { + echo ''.$teamscore.' ('.$totals[gamescore].')'; + } else { + echo ''.$totals[gamescore].''; + } + if ($extra) echo ''.$totals[$extra].''; + + echo ''.$totals[frags].''; + echo ''.$totals[kills].''; + echo ''.$totals[deaths].''; + echo ''.$totals[suicides].''; + + if ($teams) echo ''.$totals[teamkills].''; + + echo ''.$eff.''; + echo ''.$acc.''; + echo ''.$ttl.''; + echo ''; } - ?> diff --git a/html/includes/weaponstats.php b/html/includes/weaponstats.php old mode 100755 new mode 100644 index 872fa5a..bccdd6d --- a/html/includes/weaponstats.php +++ b/html/includes/weaponstats.php @@ -26,7 +26,6 @@ function weaponstats($_mid, $_pid, $title = 'Weapons Summary') { AND (wn.id = w.weapon) AND wn.hide <> 'Y'"; - if ($_pid == 0 and $_mid != 0) { $sql_weapons = "SELECT w.matchid, w.pid AS playerid, @@ -99,15 +98,15 @@ uts_weaponstats AS w } echo' - - - - - '; - +
'.htmlentities($title).'
+ + + + '; if ($one) { ws_header($wsort, $weapons, $colspan, $one, $playercol); + echo ''; foreach($wsort as $wid => $bar) { for ($i = 1; $i <= $colspan; $i++) { @@ -119,8 +118,7 @@ uts_weaponstats AS w case 5: $extra = 'Dmg'; break; } $extra = ''. $extra .''; - echo ' - '; + echo ''; } } echo ''; @@ -128,10 +126,10 @@ uts_weaponstats AS w $i = 0; foreach($psort as $pid => $foo) { $i++; - echo ''; + echo ''; if ($playercol) { echo ' - '; + '; } foreach($wsort as $wid => $bar) { ws_cell($wd, $pid, $wid, 'kills', $i); @@ -146,23 +144,22 @@ uts_weaponstats AS w if (!$one) { ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Kills', 'kills'); - ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Shots', 'shots'); - ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Hits', 'hits'); + //ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Shots', 'shots'); + //ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Hits', 'hits'); ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Damage', 'damage'); ws_block($wd, $weapons, $wsort, $psort, $colspan, $playercol, $one, $_mid, $gamename, 'Accuracy', 'acc'); } - echo '
'.htmlentities($title).'
'.$extra.''.$extra.'
'.FormatPlayerName($wd[$pid]['country'], $pid, $wd[$pid]['playername'], $gid, $gamename).''.FormatPlayerName($wd[$pid]['country'], $pid, $wd[$pid]['playername'], $gid, $gamename).'
'; } function ws_header(&$wsort, &$weapons, $colspan, $one, $playercol) { echo ''; - if ($playercol and $playercol != -1) echo 'Player'; - if ($playercol == -1) echo ' '; + if ($playercol and $playercol != -1) echo ''; + if ($playercol == -1) echo ' '; foreach($wsort as $wid => $bar) { if (!empty($weapons[$wid]['image'])) { - $content = ''.$weapons[$wid]['name'].''; + $content = ''.$weapons[$wid]['name'].''; } else { $content = ''.$weapons[$wid]['name'].''; } @@ -172,27 +169,23 @@ function ws_header(&$wsort, &$weapons, $colspan, $one, $playercol) { echo ''; } - function ws_cell(&$wd, $pid, $wid, $field, $i) { $content = ''; if (isset($wd[$pid][$wid][$field])) $content = $wd[$pid][$wid][$field]; $class = ($i % 2) ? 'grey' : 'grey2'; echo ' - '.$content.''; + '.$content.''; } - - - function ws_block(&$wd, &$weapons, &$wsort, &$psort, &$colspan, $playercol, $one,$_mid, $gamename, $caption, $field) { global $gamename, $gid; if (count($psort) != 1) { echo ' - + - '.$caption.' + '.$caption.' '; ws_header($wsort, $weapons, $colspan, $one, $playercol); } @@ -204,8 +197,8 @@ function ws_block(&$wd, &$weapons, &$wsort, &$psort, &$colspan, $playercol, $one $i = 0; foreach($psort as $pid => $foo) { $i++; - echo ''; - if ($playercol and $playercol != -1) echo ''.FormatPlayerName($wd[$pid]['country'], $pid, $wd[$pid]['playername'], $gid, $gamename).''; + echo ''; + if ($playercol and $playercol != -1) echo ''.FormatPlayerName($wd[$pid]['country'], $pid, $wd[$pid]['playername'], $gid, $gamename).''; if ($playercol == -1) echo ''.$caption.''; foreach($wsort as $wid => $bar) { ws_cell($wd, $pid, $wid, $field, $i); @@ -213,4 +206,5 @@ function ws_block(&$wd, &$weapons, &$wsort, &$psort, &$colspan, $playercol, $one echo ''; } } -?> \ No newline at end of file + +?> diff --git a/html/pages/admin/acelog.php b/html/pages/admin/acelog.php old mode 100755 new mode 100644 index 365174a..a9c80c0 --- a/html/pages/admin/acelog.php +++ b/html/pages/admin/acelog.php @@ -90,7 +90,7 @@ if (empty($filename)) { }
- +
@@ -252,7 +252,7 @@ if (empty($filename)) { if (!empty($filename)) { if (!file_exists('logs/ace/'. $filename) or !is_file('logs/ace/'. $filename)) die('File not found (2)'); - echo'
Available ACE Logs:
+ echo'
'.$filename.' '; diff --git a/html/pages/admin/aclog.php b/html/pages/admin/aclog.php old mode 100755 new mode 100644 index ada35c8..2d78b77 --- a/html/pages/admin/aclog.php +++ b/html/pages/admin/aclog.php @@ -1,108 +1,120 @@ - - - - '; - $logdir = opendir('logs/ac'); - $logs = array(); - $sort = array(); - $i = 0; - while (false !== ($filename = readdir($logdir))) { - if (!is_file('logs/ac/'. $filename)) continue; - if ($filename == '.htaccess' or $filename == 'index.htm') continue; - $i++; - $logs[$i] = $filename; - $extra = 0; - if (substr($filename, -4) == '.bz2') $extra = 4; - if (substr($filename, -3) == '.gz') $extra = 3; - - $sort[$i] = substr($filename, strlen($filename) - (23 + $extra), 19); - } - closedir($logdir); - if (count($logs) == 0) { - echo ''; - } else { - arsort($sort); - $i = 0; - foreach($sort as $id => $date) { - $log = $logs[$id]; - $extra = 0; - if (substr($log, -4) == '.bz2') $extra = 4; - if (substr($log, -3) == '.gz') $extra = 3; - - $i++; - $class = ($i%2) ? 'grey' : 'grey2'; - echo ''; - } - } -} - - -if (!empty($filename)) { - if (!file_exists('logs/ac/'. $filename) or !is_file('logs/ac/'. $filename)) die('bla'); - echo'
Available AnthChecker Logs:
No logs available!
'; - $tmp = substr($log, strlen($log) - (23 + $extra), 19); - $tmp = str_replace('.', '', $tmp); - $ts = mtimestamp($tmp); - echo ' '.date('Y-m-d H:i', $ts).''; - echo ''; - echo ''.substr($log, 6, strlen($log) - 30 - $extra).''; - echo ''; - $d_size = file_size_info(filesize('logs/ac/'. $log)); - echo $d_size['size'] .' '. $d_size['type']; - echo ''; - echo 'Delete'; - echo '
- - - - '; - - $fp = my_fopen('logs/ac/'.$filename, 'rb', $compression = NULL); - if (!$fp) die("Error opening file"); - - $i = 0; - echo ''; - */ - echo wordwrap(htmlentities($line), 80, '
', 1) ."
"; - } - echo ''; - my_fclose($fp, $compression); -} - -echo ''; -if (!empty($filename)) echo''; -echo''; -echo '
'.$filename.''; - echo 'Delete'; - echo '
'; - - while (($line = my_fgets($fp, 5000, $compression)) !== FALSE) { - /* - $i++; - $class = ($i%2) ? 'grey' : 'grey2'; - echo '
'; - echo ''; - echo htmlentities($line); - echo ''; - echo '
Go Back To Logfile Overview
Go Back To Admin Page
'; - -?> + + + + '; + + $logdir = opendir('logs/ac'); + $logs = array(); + $sort = array(); + $i = 0; + + while (false !== ($filename = readdir($logdir))) { + if (!is_file('logs/ac/'. $filename)) continue; + if ($filename == '.htaccess' or $filename == 'index.htm') continue; + + $i++; + $logs[$i] = $filename; + $extra = 0; + + if (substr($filename, -4) == '.bz2') $extra = 4; + if (substr($filename, -3) == '.gz') $extra = 3; + + $sort[$i] = substr($filename, strlen($filename) - (23 + $extra), 19); + } + + closedir($logdir); + + if (count($logs) == 0) { + echo ''; + } else { + arsort($sort); + $i = 0; + + foreach($sort as $id => $date) { + $log = $logs[$id]; + $extra = 0; + + if (substr($log, -4) == '.bz2') $extra = 4; + if (substr($log, -3) == '.gz') $extra = 3; + + $i++; + $class = ($i%2) ? 'grey' : 'grey2'; + echo ''; + } + } +} + +if (!empty($filename)) { + if (!file_exists('logs/ac/'. $filename) or !is_file('logs/ac/'. $filename)) die('bla'); + + echo'
Available AnthChecker Logs:
No logs available!
'; + $tmp = substr($log, strlen($log) - (23 + $extra), 19); + $tmp = str_replace('.', '', $tmp); + $ts = mtimestamp($tmp); + + echo ''.date('Y-m-d H:i', $ts).''; + echo ''; + echo ''.substr($log, 6, strlen($log) - 30 - $extra).''; + echo ''; + + $d_size = file_size_info(filesize('logs/ac/'. $log)); + + echo $d_size['size'] .' '. $d_size['type']; + echo ''; + echo 'Delete'; + echo '
+ + + + '; + + $fp = my_fopen('logs/ac/'.$filename, 'rb', $compression = NULL); + if (!$fp) die("Error opening file"); + $i = 0; + echo ''; + */ + + echo wordwrap(htmlentities($line), 80, '
', 1) ."
"; + } + + echo ''; + my_fclose($fp, $compression); +} + +echo ''; + +if (!empty($filename)) echo''; + +echo''; +echo '
'.$filename.''; + echo 'Delete'; + echo '
'; + + while (($line = my_fgets($fp, 5000, $compression)) !== FALSE) { + /* + $i++; + $class = ($i%2) ? 'grey' : 'grey2'; + echo '
'; + echo ''; + echo htmlentities($line); + echo ''; + echo '
Go Back To Logfile Overview
Go Back To Admin Page
'; + +?> diff --git a/html/pages/admin/dmatch.php b/html/pages/admin/dmatch.php old mode 100755 new mode 100644 index 9fed97d..3c7ebc5 --- a/html/pages/admin/dmatch.php +++ b/html/pages/admin/dmatch.php @@ -20,7 +20,7 @@ $results = adminselect($options); $matchid = $results['mid']; -echo'
+echo'
@@ -47,7 +47,7 @@ while ($r_radjust = mysql_fetch_array($q_radjust)) { mysql_query("UPDATE uts_rank SET rank = $newrank, prevrank = $oldrank, matches = $matchcount WHERE id = $rid") or die(mysql_error()); mysql_query("DELETE FROM uts_rank WHERE matches = 0") or die(mysql_error()); } - echo' + echo''; diff --git a/html/pages/admin/dplayer.php b/html/pages/admin/dplayer.php old mode 100755 new mode 100644 index 0239e5d..ca3e747 --- a/html/pages/admin/dplayer.php +++ b/html/pages/admin/dplayer.php @@ -15,7 +15,7 @@ $results = adminselect($options); $pid = $results['pid']; $playerid = $pid; -echo'
Deleting Match ID '.$matchid.'
DoneDone
Removing Match Record:
+echo'
diff --git a/html/pages/admin/dpmatch.php b/html/pages/admin/dpmatch.php old mode 100755 new mode 100644 index b021054..ff4258e --- a/html/pages/admin/dpmatch.php +++ b/html/pages/admin/dpmatch.php @@ -21,7 +21,7 @@ $results = adminselect($options); $matchid = $results['mid']; $pid = $results['pid']; -echo'
Deleting Player
+echo'
'; diff --git a/html/pages/admin/editgames.php b/html/pages/admin/editgames.php old mode 100755 new mode 100644 index 3f7a542..d2981b8 --- a/html/pages/admin/editgames.php +++ b/html/pages/admin/editgames.php @@ -16,7 +16,7 @@ if (isset($_REQUEST['submit'])) { } } -echo'
Delete Player From Match ID '.$matchid.'
+echo'
diff --git a/html/pages/admin/editgamestype.php b/html/pages/admin/editgamestype.php old mode 100755 new mode 100644 index d9e4ff1..26bff62 --- a/html/pages/admin/editgamestype.php +++ b/html/pages/admin/editgamestype.php @@ -29,7 +29,7 @@ if (isset($_REQUEST['submit'])) { ") or die(mysql_error()); if (isset($_REQUEST['update'])) { - echo'
Edit games
+ echo'
@@ -102,7 +102,7 @@ if (isset($_REQUEST['del'])) { -echo'
Updating...
+echo'
@@ -153,7 +153,7 @@ echo '
Current Mappings
'; -echo'
+echo'
diff --git a/html/pages/admin/editweapons.php b/html/pages/admin/editweapons.php old mode 100755 new mode 100644 index 2baeab9..dec6b64 --- a/html/pages/admin/editweapons.php +++ b/html/pages/admin/editweapons.php @@ -11,7 +11,7 @@ if (isset($_REQUEST['submit'])) { } } -echo'
Add new gamestype
+echo'
diff --git a/html/pages/admin/ipsearch.php b/html/pages/admin/ipsearch.php old mode 100755 new mode 100644 index 4ac9731..fcfe17f --- a/html/pages/admin/ipsearch.php +++ b/html/pages/admin/ipsearch.php @@ -22,7 +22,7 @@ $results = adminselect($options); $ip_from = $results['ip_from']; $ip_to = $results['ip_to']; -echo'
Edit weapons
+echo'
'; diff --git a/html/pages/admin/main.php b/html/pages/admin/main.php old mode 100755 new mode 100644 index 4d60302..e2c191e --- a/html/pages/admin/main.php +++ b/html/pages/admin/main.php @@ -17,7 +17,7 @@ function nf($number) { } -echo'
Players using IPs '.$ip_from.' - '.$ip_to.' and their last 5 matches using these IPs
+echo'
'; @@ -71,47 +71,46 @@ echo'
Database Statistics

'; -echo' -
'; +echo' + +
'; -echo ' - '; -echo'
'; +echo'
'; ?> diff --git a/html/pages/admin/mplayers.php b/html/pages/admin/mplayers.php old mode 100755 new mode 100644 index 3754d99..c9b58a3 --- a/html/pages/admin/mplayers.php +++ b/html/pages/admin/mplayers.php @@ -26,7 +26,7 @@ $mplayer2 = $results['mplayer2']; $mp1name = small_query("SELECT name FROM uts_pinfo WHERE id = $mplayer1"); $mp2name = small_query("SELECT name FROM uts_pinfo WHERE id = $mplayer2"); -echo'
+echo'
diff --git a/html/pages/admin/mservers.php b/html/pages/admin/mservers.php old mode 100755 new mode 100644 index b52a9d1..9e0bf6a --- a/html/pages/admin/mservers.php +++ b/html/pages/admin/mservers.php @@ -24,7 +24,7 @@ $mserver2 = $results[mserver2]; $q_myserver1 = small_query("SELECT servername, serverip FROM uts_match WHERE id = $mserver1"); $q_myserver2 = small_query("SELECT servername, serverip FROM uts_match WHERE id = $mserver2"); -echo'
Merging '.$mp2name[name].' Into '.$mp1name[name].'
+echo'
diff --git a/html/pages/admin/pban.php b/html/pages/admin/pban.php old mode 100755 new mode 100644 index f421ef5..88aa6a4 --- a/html/pages/admin/pban.php +++ b/html/pages/admin/pban.php @@ -26,7 +26,7 @@ $results = adminselect($options); $pid = $results['pid']; if ($ban) { - echo'
Merging '.$q_myserver2[servername].' ('.$q_myserver2[serverip].')
Into '.$q_myserver1[servername].' ('.$q_myserver1[serverip].')
+ echo'
@@ -45,7 +45,7 @@ if ($ban) {
Banning Player
Player Banned - Go Back To Admin Page
'; } else { - echo' + echo'
diff --git a/html/pages/admin/pinfo.php b/html/pages/admin/pinfo.php old mode 100755 new mode 100644 index 7be13ae..3ae57f7 --- a/html/pages/admin/pinfo.php +++ b/html/pages/admin/pinfo.php @@ -25,7 +25,7 @@ echo '
'; $sql_ips = "SELECT INET_NTOA(p.ip) AS ip, COUNT(p.id) AS matches, MIN(m.time) AS first, MAX(m.time) AS last FROM uts_player AS p, uts_match AS m WHERE p.pid = ".$pid." AND m.id = p.matchid GROUP BY ip ORDER BY ip"; $q_ips = mysql_query($sql_ips) or die("Can't get ip's: " . mysql_error()); echo ' -
Unbanning Player
+
@@ -60,7 +60,7 @@ mysql_free_result($q_ips); $sql_fakes = "SELECT INET_NTOA(p1.ip) AS ip, pi.name FROM uts_player AS p1, uts_player AS p2, uts_pinfo AS pi WHERE p1.pid = ".$pid." AND p1.ip = p2.ip AND p1.pid <> p2.pid AND pi.id = p2.pid GROUP BY pi.name"; $q_fakes = mysql_query($sql_fakes) or die("Can't retrieve fake nicks: " . mysql_error()); echo ' -
IP\'s used
+
diff --git a/html/pages/admin/plm.php b/html/pages/admin/plm.php old mode 100755 new mode 100644 index 68992e2..1ea9f52 --- a/html/pages/admin/plm.php +++ b/html/pages/admin/plm.php @@ -43,13 +43,13 @@ if($debug) { } // Print header & links -echo '

Player merging tool

'; +echo '

Player merging tool

'; echo "

Merge ip's - Merge ip's, limited on range - Manage ignored ip's - Manage ignored ip's - only range

"; // CASE: MANAGE IGNORED IPS if($_GET['manignore'] == "true") { if($_POST['submit'] == "Remove from ignored list") { - echo "

Stopped ignore ip's

"; + echo "

Stopped ignore ip's

"; foreach($_POST as $key=>$value) { if($key !='submit') { $key = mysql_real_escape_string(str_replace("_",".",$key)); @@ -60,7 +60,7 @@ if($_GET['manignore'] == "true") { } } else if($_GET['onlyrange'] == "true") { if($_POST['submit'] == "Confirm") { - echo '

Ignored ip\'s in range '.htmlentities($_POST['from']).' to '.htmlentities($_POST['to']).'
If you want to stop ignoring some ip\'s, because for example you accidently ignored these, check these and press the button at the lower end to confirm this

'; + echo '

Ignored ip\'s in range '.htmlentities($_POST['from']).' to '.htmlentities($_POST['to']).'
If you want to stop ignoring some ip\'s, because for example you accidently ignored these, check these and press the button at the lower end to confirm this

'; echo ''; $from = mysql_real_escape_string($_POST['from']); @@ -75,7 +75,7 @@ if($_GET['manignore'] == "true") { $trueplayerip = long2ip($playerip); $pidcount = $r_pipcheck[pidcount]; - echo "
$trueplayerip"; + echo "
$trueplayerip"; // Query for player names and ids associated to that ip during the cycle $sql_pcheck = "SELECT pi.id, pi.name, pi.country, p.pid, p.ip FROM uts_pinfo AS pi, uts_player AS p WHERE pi.id = p.pid AND p.ip = $playerip GROUP BY pi.id, pi.name, p.pid, p.ip, pi.country"; @@ -90,13 +90,13 @@ if($_GET['manignore'] == "true") { echo "

No ignored ip's found

"; } } else { - echo "

Ignored ip's in range: Enter range to filter on

"; + echo "

Ignored ip's in range: Enter range to filter on

"; echo ''; echo '
Ranging from to '; echo '

'; } } else { - echo '

Ignored ip\'s
If you want to stop ignoring some ip\'s, because for example you accidently ignored these, check these and press the button at the lower end to confirm this

'; + echo '

Ignored ip\'s
If you want to stop ignoring some ip\'s, because for example you accidently ignored these, check these and press the button at the lower end to confirm this

'; echo ''; $ignore_ips = mysql_query("SELECT ip FROM uts_ignoreips ORDER BY ip ASC"); @@ -107,7 +107,7 @@ if($_GET['manignore'] == "true") { $trueplayerip = long2ip($playerip); $pidcount = $r_pipcheck[pidcount]; - echo "
$trueplayerip"; + echo "
$trueplayerip"; // Query for player names and ids associated to that ip during the cycle $sql_pcheck = "SELECT pi.id, pi.name, pi.country, p.pid, p.ip FROM uts_pinfo AS pi, uts_player AS p WHERE pi.id = p.pid AND p.ip = $playerip GROUP BY pi.id, pi.name, p.pid, p.ip, pi.country"; @@ -125,7 +125,7 @@ if($_GET['manignore'] == "true") { // CASE: IGNORE SUBMITTED IP'S } else if($_POST['submit'] == "ignore") { - echo "

Ignored ips

"; + echo "

Ignored ips

"; foreach($_POST as $key=>$value) { if($key !='submit') { $key = mysql_real_escape_string(str_replace("_",".",$key)); @@ -138,7 +138,7 @@ if($_GET['manignore'] == "true") { // CASE: SHOW NICKS WITH GIVEN SHARED IP } else if(substr($_POST['submit'],0,8) == "merge - ") { - echo "

Merge nicks with shared ip

"; + echo "

Merge nicks with shared ip

"; $ip = mysql_real_escape_string(str_replace("_",".",substr($_POST['submit'],8))); $sql_pipcheck = "SELECT ip, COUNT(DISTINCT pid) AS pidcount FROM uts_player WHERE ip = INET_ATON('$ip') GROUP BY ip ORDER BY ip ASC"; @@ -152,7 +152,7 @@ if($_GET['manignore'] == "true") { // If there is more than one pid associated to an IP ... IF ($pidcount > 1 ) { echo ''; - echo "
$trueplayerip"; + echo "
$trueplayerip"; // Query for player names and ids associated to that ip during the cycle $sql_pcheck = "SELECT pi.id, pi.name, pi.country, p.pid, p.ip FROM uts_pinfo AS pi, uts_player AS p WHERE pi.id = p.pid AND p.ip = $playerip GROUP BY pi.id, pi.name, p.pid, p.ip, pi.country"; @@ -170,7 +170,7 @@ if($_GET['manignore'] == "true") { // CASE: MERGE NICKS WITH SHARED IP } else if($_POST['submit'] == "Player merge") { - echo "

Merging nicks with shared ip

"; + echo "

Merging nicks with shared ip

"; $ip = mysql_real_escape_string(str_replace("_",".",$_POST['ip'])); $merge_to_pid = mysql_real_escape_string($_POST['merge_to']);
Possible aliasses