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/pages/match_player.php | 165 ++++++++++++++++++++++++-------------------- 1 file changed, 89 insertions(+), 76 deletions(-) (limited to 'html/pages/match_player.php') diff --git a/html/pages/match_player.php b/html/pages/match_player.php index 63a3787..55c1892 100755 --- a/html/pages/match_player.php +++ b/html/pages/match_player.php @@ -4,9 +4,7 @@ $pid = preg_replace('/\D/', '', $_GET[pid]); $r_infos = small_query("SELECT p.playerid, p.country, pi.name, pi.banned, p.gid, g.name AS gamename FROM uts_player p, uts_pinfo pi, uts_games g - WHERE p.gid = g.id AND p.pid = pi.id AND p.pid = '$pid' - AND matchid = '$mid' - LIMIT 0,1;"); + WHERE p.gid = g.id AND p.pid = pi.id AND p.pid = '$pid' AND matchid = '$mid' LIMIT 0,1;"); if (!$r_infos) { echo "Unable to retrieve data!"; @@ -30,76 +28,90 @@ $country = $r_infos['country']; $gamename = $r_infos['gamename']; $gid = $r_infos['gid']; -echo' - - - +echo ' +
Individual Match Stats for - '.FlagImage($country) .' '. htmlentities($playername) .' - '. RankImageOrText($pid, $playername, NULL, $gid, $gamename, true, '(%IT% in %GN% with %RP% ranking points)') .' -
+ + + -
Individual Match Stats for
-
'; + + '.FlagImage($country) .' '. htmlentities($playername) .' + '. RankImageOrText($pid, $playername, NULL, $gid, $gamename, true, '(%IT% in %GN% with %RP% ranking points)') .' +
+ Player page + '; + + if (PlayerOnWatchlist($pid)) { + echo 'Remove from Watchlist'; + } else { + echo 'Add to Watchlist'; + }; + +echo ' + + +
'; // Get Summary Info include("pages/match_info_server.php"); echo '
- - - +
Game Summary
+ + + - - - - - - - - + + + + + + + + '; -$r_gsumm = zero_out(small_query("SELECT gamescore, frags, SUM(frags+suicides) AS kills, deaths, suicides, teamkills, eff, accuracy, ttl, gametime, spree_kill, spree_rampage, spree_dom, spree_uns, spree_god - FROM uts_player - WHERE matchid = $mid AND pid = '$pid' - GROUP BY pid, gamescore, frags, deaths, suicides, teamkills, eff, accuracy, ttl, gametime, spree_kill, spree_rampage, spree_dom, spree_uns, spree_god")); + $r_gsumm = zero_out(small_query("SELECT gamescore, frags, SUM(frags+suicides) AS kills, deaths, suicides, teamkills, eff, accuracy, ttl, gametime, spree_kill, spree_rampage, spree_dom, spree_uns, spree_god + FROM uts_player + WHERE matchid = $mid AND pid = '$pid' + GROUP BY pid, gamescore, frags, deaths, suicides, teamkills, eff, accuracy, ttl, gametime, spree_kill, spree_rampage, spree_dom, spree_uns, spree_god")); - echo' +echo ' - - - - - - - - - '; - -echo' -
Game Summary
FragsKillsDeathsSuicidesEfficiencyAccuracyAvg TTLTimeFragsKillsDeathsSuicidesEfficiencyAccuracyAvg TTLTime
'.$r_gsumm[frags].''.$r_gsumm[kills].''.$r_gsumm[deaths].''.$r_gsumm[suicides].''.$r_gsumm[eff].''.$r_gsumm[accuracy].''.$r_gsumm[ttl].''.GetMinutes($r_gsumm[gametime]).'
+ '.$r_gsumm[frags].' + '.$r_gsumm[kills].' + '.$r_gsumm[deaths].' + '.$r_gsumm[suicides].' + '.$r_gsumm[eff].' + '.$r_gsumm[accuracy].' + '.$r_gsumm[ttl].' + '.GetMinutes($r_gsumm[gametime]).' + + +
- - - +
Special Events
+ + + - - - + + + - - - - - - - - - + + + + + + + + + '; $r_gsumm = zero_out(small_query("SELECT spree_double, spree_multi, spree_ultra, spree_monster, spree_kill, spree_rampage, spree_dom, spree_uns, spree_god @@ -117,40 +129,41 @@ if ($sql_firstblood[firstblood] == $pid) { echo' - - - - - - - - - - + + + + + + + + + + -
Special Events
First BloodMultisSpreesFirst BloodMultisSprees
DblMultiUltraMonsKillRamDomUnsGodDblMultiUltraMonsKillRamDomUnsGod
'.$firstblood.''.$r_gsumm[spree_double].''.$r_gsumm[spree_multi].''.$r_gsumm[spree_ultra].''.$r_gsumm[spree_monster].''.$r_gsumm[spree_kill].''.$r_gsumm[spree_rampage].''.$r_gsumm[spree_dom].''.$r_gsumm[spree_uns].''.$r_gsumm[spree_god].''.$firstblood.''.$r_gsumm[spree_double].''.$r_gsumm[spree_multi].''.$r_gsumm[spree_ultra].''.$r_gsumm[spree_monster].''.$r_gsumm[spree_kill].''.$r_gsumm[spree_rampage].''.$r_gsumm[spree_dom].''.$r_gsumm[spree_uns].''.$r_gsumm[spree_god].'
+ +
'; include('includes/weaponstats.php'); weaponstats($mid, $pid); $r_pings = small_query("SELECT lowping, avgping, highping FROM uts_player WHERE pid = $pid and matchid = $mid and lowping > 0"); + if ($r_pings and $r_pings['lowping']) { - echo ' -
- + echo '
+
- + - - - + + + - - - + + +
PingsPings
MinAvgMaxMinAvgMax
'.ceil($r_pings['lowping']).''.ceil($r_pings['avgping']).''.ceil($r_pings['highping']).''.ceil($r_pings['lowping']).''.ceil($r_pings['avgping']).''.ceil($r_pings['highping']).'
'; } -- cgit