blob: b5ecbb97d62cd19d096a4310fcf7627034f858e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<?php
// Get information about this match
$sql_assault = small_query("SELECT assaultid, ass_att, gametime, ass_win FROM uts_match WHERE id = $mid");
$ass_id = $sql_assault[assaultid];
$gametime = $sql_assault[gametime];
// Get information about the other match
$sql_assault2 = small_query("SELECT id, gametime, ass_win FROM uts_match WHERE assaultid = '$ass_id' AND id != $mid LIMIT 0,1");
$mid2 = $sql_assault2[id];
$gametime2 = $sql_assault2[gametime];
// Work out who was attacking which match
$ass_att = $sql_assault[ass_att];
IF($ass_att == 0) {
$ass_att = "Red";
$ass_att2 = "Blue";
} else {
$ass_att = "Blue";
$ass_att2 = "Red";
}
// Work out the end result for each match
$asswin = $sql_assault[ass_win];
$asswin2 = $sql_assault2[ass_win];
IF($asswin == 0) {
$asswin = "$ass_att2 Successfully Defended";
} else {
$asswin = "$ass_att Successfully Attacked";
}
IF($asswin2 == 0) {
$asswin2 = "$ass_att Successfully Defended";
} else {
$asswin2 = "$ass_att2 Successfully Attacked";
}
$gametime = sec2min($gametime);
$gametime2 = sec2min($gametime2);
teamstats($mid, 'Match Summary - '.$ass_att.' Team Attacking', 'ass_obj', 'Ass Obj');
echo'
<table class = "zebra box" border="0" cellpadding="0" cellspacing="0" width="700">
<tbody><tr>
<th class="smheading" colspan="15" align="center">'.$asswin.'</th>
</tr>
</tbody></table>
<br>';
// The Other Game (if it happened)
IF($mid2 != NULL) {
teamstats($mid2, 'Match Summary - '.$ass_att2.' Team Attacking', 'ass_obj', 'Ass Obj');
echo'
<table class = "zebra box" border="0" cellpadding="0" cellspacing="0" width="720">
<tbody><tr>
<th class="smheading" colspan="15" align="center">'.$asswin2.'</th>
</tr>
</tbody></table>
<br>';
}
?>
|