Game Summary |
Team: Red |
Player |
Time |
Score |
Flag Captures |
Fastest Capture |
Suicides |
Team |
Player |
';
$sql_msred = "SELECT p.playerid, pi.name, pi.banned, p.country, p.pid, p.gamescore, p.gametime, p.flag_capture, p.suicides, p.rank, MIN(e.col3) AS captime
FROM uts_pinfo AS pi, uts_player AS p
LEFT JOIN uts_events AS e
ON p.playerid = e.playerid AND p.matchid = e.matchid AND e.col1 = 'btcap'
WHERE p.pid = pi.id AND p.matchid = $mid AND team = 0
GROUP BY p.playerid
ORDER BY e.col1 DESC, (0 + e.col3) ASC, gamescore DESC";
$q_msred = mysqli_query($GLOBALS["___mysqli_link"], $sql_msred) or die(mysqli_error($GLOBALS["___mysqli_link"]));
$i = 0;
while ($r_msred = zero_out(mysqli_fetch_array($q_msred))) {
if (!$r_msred['playerid']) {
$r_msred['playerid'] = 0;
}
$i++;
$class = ($i % 2) ? 'grey' : 'grey2';
$redpname = $r_msred[name];
$myurl = urlencode($r_msred[name]);
echo'';
if ($r_msred['banned'] != 'Y') {
echo ''.FormatPlayerName($r_msred[country], $r_msred['pid'], $redpname, $gid, $gamename, true, $r_msred['rank']).' | ';
} else {
$r_msred ['gamescore'] = '-';
$r_msred ['suicides'] = '-';
$r_msred ['flag_capture'] = '-';
echo ''.FormatPlayerName($r_msred[country], $r_msred['pid'], $redpname, $gid, $gamename, true, $r_msred['rank']).' | ';
}
echo '
'.GetMinutes($r_msred[gametime]).' |
|
'.$r_msred[gamescore].' |
'.$r_msred[flag_capture].' |
'.btcaptime($r_msred[captime]).' |
'.$r_msred[suicides].' |
';
}
$teamscore = small_query("SELECT t0score AS teamscore FROM uts_match WHERE id = $mid");
$msredtot = small_query("SELECT SUM(gamescore) AS gamescore, SUM(suicides) AS suicides, SUM(flag_capture) AS flag_capture FROM uts_player WHERE matchid = $mid AND team = 0 ORDER BY gamescore DESC");
echo'
Totals |
|
'.$teamscore[teamscore].' |
'.$msredtot[gamescore].' |
'.$msredtot[flag_capture].' |
|
'.$msredtot[suicides].' |
';
echo'
Team: Blue |
Player |
Time |
Score |
Flag Captures |
Fastest Capture |
Suicides |
Team |
Player |
';
$sql_msblue = "SELECT p.playerid, pi.name, pi.banned, p.country, p.pid, p.gamescore, p.gametime, p.flag_capture, p.suicides, p.rank, MIN(e.col3) AS captime
FROM uts_pinfo AS pi, uts_player AS p
LEFT JOIN uts_events AS e
ON p.playerid = e.playerid AND p.matchid = e.matchid AND e.col1 = 'btcap'
WHERE p.pid = pi.id AND p.matchid = $mid AND team = 1
GROUP BY p.playerid
ORDER BY e.col1 DESC, (0 + e.col3) ASC, gamescore DESC";
$q_msblue = mysqli_query($GLOBALS["___mysqli_link"], $sql_msblue) or die(mysqli_error($GLOBALS["___mysqli_link"]));
$i = 0;
while ($r_msblue = zero_out(mysqli_fetch_array($q_msblue))) {
if (!$r_msblue['playerid']) {
$r_msblue['playerid'] = 0;
}
$i++;
$class = ($i % 2) ? 'grey' : 'grey2';
$bluepname = $r_msblue[name];
$myurl = urlencode($r_msblue[name]);
echo'';
if ($r_msblue['banned'] != 'Y') {
echo ''.FormatPlayerName($r_msblue[country], $r_msblue['pid'], $bluepname, $gid, $gamename, true, $r_msblue['rank']).' | ';
} else {
$r_msblue ['gamescore'] = '-';
$r_msblue ['suicides'] = '-';
$r_msblue ['flag_capture'] = '-';
echo ''.FormatPlayerName($r_msblue[country], $r_msblue['pid'], $bluepname, $gid, $gamename, true, $r_msblue['rank']).' | ';
}
echo '
'.GetMinutes($r_msblue[gametime]).' |
|
'.$r_msblue[gamescore].' |
'.$r_msblue[flag_capture].' |
'.btcaptime($r_msblue[captime]).' |
'.$r_msblue[suicides].' |
';
}
$teamscore = small_query("SELECT t1score AS teamscore FROM uts_match WHERE id = $mid");
$msbluetot = small_query("SELECT SUM(gamescore) AS gamescore, SUM(suicides) AS suicides, SUM(flag_capture) AS flag_capture FROM uts_player WHERE matchid = $mid AND team = 1 ORDER BY gamescore DESC");
echo'
Totals |
|
'.$teamscore[teamscore].' |
'.$msbluetot[gamescore].' |
'.$msbluetot[flag_capture].' |
|
'.$msbluetot[suicides].' |
';
echo'