PageRenderTime 67ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/html/pages/report/clanbase.php

https://github.com/graywh/utstats
PHP | 526 lines | 405 code | 85 blank | 36 comment | 36 complexity | e754126391f6126105d060d4e8bf28fc MD5 | raw file
  1. <?php
  2. echo'<textarea rows="50" name="cbrep" cols="75">';
  3. $id = $_GET[id];
  4. function get_cbid($pid) {
  5. $cbid = $_GET[$pid];
  6. return $cbid;
  7. }
  8. $cbid = get_cbid;
  9. function get_cbnick($badtext) {
  10. $badstuff = array("[","]");
  11. $goodtext = str_replace($badstuff, " ", $badtext);
  12. return $goodtext;
  13. }
  14. $cbnick = get_cbnick;
  15. $warinfo = get_clans($wid);
  16. $redteam = $_GET["red"];
  17. IF($redteam == $warinfo[0][1]) {
  18. $teamaid = $warinfo[0][1];
  19. $teambid = $warinfo[1][1];
  20. $cbteama = $warinfo[0][2];
  21. $cbteamb = $warinfo[1][2];
  22. $redteam = 0;
  23. $blueteam = 1;
  24. } else {
  25. $teamaid = $warinfo[1][1];
  26. $teambid = $warinfo[0][1];
  27. $cbteama = $warinfo[1][2];
  28. $cbteamb = $warinfo[0][2];
  29. $redteam = 1;
  30. $blueteam = 0;
  31. }
  32. $teama = str_replace("<img src=", "", $cbteama);
  33. $teamb = str_replace("<img src=", "", $cbteamb);
  34. list($teama, $teamacup) = split("'", $teama, 3);
  35. list($teamb, $teambcup) = split("'", $teamb, 3);
  36. $teama = '[cl]'.$teamaid.','.$teama.'[/cl]';
  37. $teamb = '[cl]'.$teambid.','.$teamb.'[/cl]';
  38. $sql_s = small_query("SELECT mapfile, gametime FROM uts_match WHERE id = '$id'");
  39. $map = str_replace(".unr", "", "$sql_s[mapfile]");
  40. $mappic = strtolower("images/maps/".$map.".jpg");
  41. $actgamelength = $sql_s[gametime];
  42. // Lets work out what kind of game this was from the scores
  43. $q_score = small_query("SELECT t0score, t1score FROM uts_match WHERE id = $id");
  44. $t0score = $q_score[t0score];
  45. $t1score = $q_score[t1score];
  46. IF ($t0score > $t1score) {
  47. $twin = 0;
  48. $twin_team = $teama;
  49. $twin_score = $t0score;
  50. $tlose = 1;
  51. $tlose_team = $teamb;
  52. $tdraw = "0";
  53. $tdiff = $t0score+$t1score;
  54. IF ($tdiff <= 3) {
  55. $reptype = "low";
  56. } elseIF ($tdiff >= 9) {
  57. $reptype = "high";
  58. } else {
  59. $reptype = "medium";
  60. }
  61. } elseIF ($t0score < $t1score) {
  62. $twin = 1;
  63. $twin_team = $teamb;
  64. $twin_score = $t1score;
  65. $tlose = 0;
  66. $tlose_team = $teama;
  67. $tdraw = "0";
  68. $tdiff = $t1score+$t0score;
  69. IF ($tdiff <= 2) {
  70. $reptype = "low";
  71. } elseIF ($tdiff >= 9) {
  72. $reptype = "high";
  73. } else {
  74. $reptype = "medium";
  75. }
  76. } else {
  77. $twin = "0";
  78. $tlose = "1";
  79. $tdraw = "1";
  80. $tdiff = $t1score+$t0score;
  81. $twin_team = $teama;
  82. $tlose_team = $teamb;
  83. IF ($tdiff <= 4) {
  84. $reptype = "low";
  85. } elseIF ($tdiff >= 10) {
  86. $reptype = "high";
  87. } else {
  88. $reptype = "medium";
  89. }
  90. }
  91. // Queries used within the report
  92. // First blood
  93. $q_fblood = small_query("SELECT firstblood FROM uts_match WHERE id = $id");
  94. // Player id of first blood
  95. $t_fblood = small_query("SELECT name FROM uts_pinfo WHERE id = '".$q_fblood[firstblood]."'");
  96. $t_fbloodid = small_query("SELECT id FROM uts_player WHERE pid = '".$q_fblood[firstblood]."' AND matchid = $id");
  97. $r_fbloodid = $cbid($t_fbloodid[id]);
  98. $r_fbloodname = $cbnick($t_fblood[name]);
  99. // Belt count
  100. $q_t0bcount = small_query("SELECT SUM(pu_belt) AS bcount FROM uts_player WHERE matchid = $id AND team = 0 AND pu_belt >0");
  101. $q_t1bcount = small_query("SELECT SUM(pu_belt) AS bcount FROM uts_player WHERE matchid = $id AND team = 1 AND pu_belt >0");
  102. // Amp count
  103. $q_t0acount = small_query("SELECT SUM(pu_amp) AS acount FROM uts_player WHERE matchid = $id AND team = 0 AND pu_amp >0");
  104. $q_t1acount = small_query("SELECT SUM(pu_amp) AS acount FROM uts_player WHERE matchid = $id AND team = 1 AND pu_amp >0");
  105. // Cap count
  106. $q_capsa = small_query("SELECT pi.name, SUM(p.flag_capture) AS flag_caps FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 0 AND flag_capture >= 1 GROUP BY name");
  107. $q_capsb = small_query("SELECT pi.name, SUM(p.flag_capture) AS flag_caps FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 1 AND flag_capture >= 1 GROUP BY name");
  108. // Most Flag Grabs (W)
  109. $q_topgrab = small_query("SELECT p.id, pi.name, p.flag_taken FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_taken DESC LIMIT 0,1");
  110. $r_topgrabid = $cbid($q_topgrab[id]);
  111. $r_topgrabname = $cbnick($q_topgrab[name]);
  112. // Most Flag Grabs (L)
  113. $q_topgrabl = small_query("SELECT p.id, pi.name, p.flag_taken FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $tlose ORDER BY flag_taken DESC LIMIT 0,1");
  114. $r_topgrabidl = $cbid($q_topgrabl[id]);
  115. $r_topgrabnamel = $cbnick($q_topgrabl[name]);
  116. // Most Flag Grabs (D)
  117. $q_topgrabd = small_query("SELECT p.id, pi.name, p.flag_taken, team FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id ORDER BY flag_taken DESC LIMIT 0,1");
  118. $r_topgrabidd = $cbid($q_topgrabd[id]);
  119. $r_topgrabnamed = $cbnick($q_topgrabd[name]);
  120. IF ($redteam == $q_topgrabd[team]) {
  121. $r_topgrabteamd = $warinfo[0][2];
  122. $r_topgrabteamdid = $warinfo[0][1];
  123. } else {
  124. $r_topgrabteamd = $warinfo[1][2];
  125. $r_topgrabteamdid = $warinfo[1][1];
  126. }
  127. // Most Flag Covers (W)
  128. $q_topcover = small_query("SELECT p.id, pi.name, p.flag_cover FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_cover DESC LIMIT 0,1");
  129. $r_topcoverid = $cbid($q_topcover[id]);
  130. $r_topcovername = $cbnick($q_topcover[name]);
  131. // Most Flag Covers (L)
  132. $q_topcoverl = small_query("SELECT p.id, pi.name, p.flag_cover FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $tlose ORDER BY flag_cover DESC LIMIT 0,1");
  133. $r_topcoverlid = $cbid($q_topcoverl[id]);
  134. $r_topcoverlname = $cbnick($q_topcoverl[name]);
  135. // Most Flag Covers (R)
  136. $q_topcoverr = small_query("SELECT p.id, pi.name, p.flag_cover FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 0 ORDER BY flag_cover DESC LIMIT 0,1");
  137. $r_topcoverrid = $cbid($q_topcoverr[id]);
  138. $r_topcoverrname = $cbnick($q_topcoverr[name]);
  139. // Most Flag Covers (B)
  140. $q_topcoverb = small_query("SELECT p.id, pi.name, p.flag_cover FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 1 ORDER BY flag_cover DESC LIMIT 0,1");
  141. $r_topcoverbid = $cbid($q_topcoverb[id]);
  142. $r_topcoverbname = $cbnick($q_topcoverb[name]);
  143. // Most Flag Assists (D)
  144. $q_topassistd = small_query("SELECT p.id, pi.name, p.flag_assist, team FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id ORDER BY flag_cover DESC LIMIT 0,1");
  145. $r_topassistdid = $cbid($q_topassistd[id]);
  146. $r_topassistdname = $cbnick($q_topassistd[name]);
  147. IF ($q_topassistd[team] == $redteam) {
  148. $r_topassistdteam = $teamb;
  149. } else {
  150. $r_topassistdteam = $teama;
  151. }
  152. // Most Flag Seals (W)
  153. $q_topseal = small_query("SELECT p.id, pi.name, p.flag_seal FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_seal DESC LIMIT 0,1");
  154. $r_topsealid = $cbid($q_topseal[id]);
  155. $r_topsealname = $cbnick($q_topseal[name]);
  156. // Most Flag Seals (L)
  157. $q_topseall = small_query("SELECT p.id, pi.name, p.flag_seal FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $tlose ORDER BY flag_seal DESC LIMIT 0,1");
  158. $r_topseallid = $cbid($q_topseall[id]);
  159. $r_topseallname = $cbnick($q_topseall[name]);
  160. // Top Capper (W)
  161. $q_topcap = small_query("SELECT p.id, pi.name, p.flag_capture FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_capture DESC LIMIT 0,1");
  162. $r_topcapid = $cbid($q_topcap[id]);
  163. $r_topcapname = $cbnick($q_topcap[name]);
  164. // Top Capper (D)
  165. $q_topcapd = small_query("SELECT p.id, pi.name, p.flag_capture FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id ORDER BY flag_capture DESC LIMIT 0,1");
  166. $r_topcapdid = $cbid($q_topcap[id]);
  167. $r_topcapdname = $cbnick($q_topcap[name]);
  168. // Most Flag Kills (L)
  169. $q_topdefl = small_query("SELECT p.id, pi.name, p.flag_kill FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $tlose ORDER BY flag_kill DESC LIMIT 0,1");
  170. $r_topdeflid = $cbid($q_topdefl[id]);
  171. $r_topdeflname = $cbnick($q_topdefl[name]);
  172. // Most Flag Kills (W)
  173. $q_topfkill = small_query("SELECT p.id, pi.name, p.flag_kill FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_kill DESC LIMIT 0,1");
  174. $r_topfkillid = $cbid($q_topfkill[id]);
  175. $r_topfkillname = $cbnick($q_topfkill[name]);
  176. // 2nd Most Flag Kills (W)
  177. $q_topfkill2 = small_query("SELECT p.id, pi.name, p.flag_kill FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY flag_kill DESC LIMIT 1,1");
  178. $r_topfkillid2 = $cbid($q_topfkill2[id]);
  179. $r_topfkillname2 = $cbnick($q_topfkill2[name]);
  180. // Most Frags (D)
  181. $q_topfrag = small_query("SELECT p.id, pi.name, p.frags FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id ORDER BY frags DESC LIMIT 0,1");
  182. $r_topfragid = $cbid($q_topfrag[id]);
  183. $r_topfragname = $cbnick($q_topfrag[name]);
  184. // Most Frags (W)
  185. $q_topfragw = small_query("SELECT p.id, pi.name, p.frags FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $twin ORDER BY frags DESC LIMIT 0,1");
  186. $r_topfragwid = $cbid($q_topfkill2[id]);
  187. $r_topfragwname = $cbnick($q_topfkill2[name]);
  188. // Most Deaths (L)
  189. $q_topdeath = small_query("SELECT p.id, pi.name, p.deaths FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = $tlose ORDER BY deaths DESC LIMIT 0,1");
  190. $r_topdeathid = $cbid($q_topdeath[id]);
  191. $r_topdeathname = $cbnick($q_topdeath[name]);
  192. // Player of the Match
  193. $q_topstats = small_query("SELECT p.id, pi.name, p.rank AS prank FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id GROUP BY id, name ORDER BY prank DESC LIMIT 0,1");
  194. $r_topstatsid = $cbid($q_topstats[id]);
  195. $r_topstatsname = $cbnick($q_topstats[name]);
  196. // Write the top of the report (non game specific)
  197. //Player List for Red Team
  198. echo'_______________________________________________________________________<br />
  199. '.$teama.' Lineup: <br />
  200. ';
  201. $sql_rplayer = "SELECT p.id, pi.name FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 0 ORDER BY pi.name ASC";
  202. $q_rplayer = mysql_query($sql_rplayer);
  203. while ($r_rplayer = mysql_fetch_array($q_rplayer)) {
  204. echo'[pl]'.$cbid($r_rplayer[id]).','.$cbnick($r_rplayer[name]).'[/pl] ';
  205. }
  206. //Player List for Blue Team
  207. echo'<br />_______________________________________________________________________<br />
  208. '.$teamb.' Lineup: <br />
  209. ';
  210. $sql_bplayer = "SELECT p.id, pi.name FROM uts_player AS p, uts_pinfo AS pi WHERE p.pid = pi.id AND matchid = $id AND team = 1 ORDER BY pi.name ASC";
  211. $q_bplayer = mysql_query($sql_bplayer);
  212. while ($r_bplayer = mysql_fetch_array($q_bplayer)) {
  213. echo'[pl]'.$cbid($r_bplayer[id]).','.$cbnick($r_bplayer[name]).'[/pl] ';
  214. }
  215. echo '_______________________________________________________________________<br />
  216. <br />';
  217. // Firstblood and Pickup stats
  218. echo 'First Blood: [pl]'.$r_fbloodid.','.$r_fbloodname.'[/pl]<br />
  219. '.$teama.' Belts: '.$q_t0bcount[bcount].'<br />
  220. '.$teamb.' Belts: '.$q_t1bcount[bcount].'<br />
  221. '.$teama.' Amps: '.$q_t0acount[acount].'<br />
  222. '.$teamb.' Amps: '.$q_t1acount[acount].'<br />
  223. ';
  224. echo '_______________________________________________________________________<br />
  225. <br />
  226. ';
  227. // Low Scores and a Draw
  228. IF ($reptype == "low" && $tdraw == 1) {
  229. echo'Neither team were better this map, scorline is proof of this. <br />
  230. [cl]'.$r_topgrabteamdid.','.$r_topgrabteamd.'[/cl] had the most chances to cap with [pl]'.$r_topgrabidd.','.$r_topgrabnamed.'[/pl]
  231. taking the flag '.$q_topgrabd[flag_taken].' times, but unfortuantely couldnt cap as many as he took.<br />
  232. <br />
  233. Big credit to both teams defences; ';
  234. IF ($q_topdefl[flag_kill] >= $q_topfkill[flag_kill]) {
  235. echo '[pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl] defended the flag
  236. and got '.$q_topdefl[flag_kill].' flagkills while [pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl]
  237. also had a pretty nice defensive game killing '.$q_topfkill[flag_kill].' flag carriers.<br />
  238. <br />';
  239. } else {
  240. echo '[pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl] defended the flag
  241. and got '.$q_topfkill[flag_kill].' flagkills while [pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl]
  242. also had a pretty nice defensive game killing '.$q_topdefl[flag_kill].' flag carriers.<br />
  243. <br />';
  244. }
  245. echo'Seems the attackers had a frustrating game on this map, credit to ';
  246. IF ($q_topcover[flag_cover] >= $q_topcoverl[flag_cover]) {
  247. echo '[pl]'.$r_topcoverid.','.$r_topcovername.'[/pl] for covering his flag carrier
  248. '.$q_topcover[flag_cover].' times and also [pl]'.$r_topcoverlid.','.$r_topcoverlname.'[/pl]
  249. for covering '.$q_topcoverl[flag_cover].' times. <br />
  250. <br />';
  251. } else {
  252. echo '[pl]'.$r_topcoverlid.','.$r_topcoverlname.'[/pl] for covering his flag carrier
  253. '.$q_topcoverl[flag_cover].' times and also [pl]'.$r_topcoverid.','.$r_topcovername.'[/pl]
  254. for covering '.$q_topcover[flag_cover].' times. <br />
  255. <br />';
  256. }
  257. echo'Well done [pl]'.$r_topfragid.','.$r_topfragname.'[/pl] for ensuring a tight scoreline with
  258. '.$q_topfrag[frags].' frags.<br />
  259. <br />
  260. If this map would be played again between these two clans, we might see a change of strategy
  261. in the attacking play, but the defenders were strong on both sides this time.<br />
  262. <br />
  263. Good game.<br />
  264. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  265. stat points.<br />
  266. Well played both teams.';
  267. }
  268. // Medium Scores and a Draw
  269. IF ($reptype == "medium" && $tdraw == 1) {
  270. echo'An excitingly close game with neither side having the upper hand.<br />
  271. Both clans teamplay was about even and the result shows that it could have easily gone either way.<br />
  272. <br />
  273. Capping opportunities came along time after time, with [cl]'.$r_topgrabid.','.$r_topgrabname.'[/cl]
  274. taking the flag '.$q_topgrab[flag_taken].' times and at the other end [cl]'.$r_topgrabidl.','.$r_topgrabnamel.'[/cl]
  275. taking the flag '.$q_topgrabl[flag_taken].' times.
  276. Help was at hand for the flag runners with '.$teama.'\'s [pl]'.$r_topcoverrid.','.$r_topcoverrname.'[/pl]
  277. covering '.$q_topcoverr[flag_cover].' times and [pl]'.$r_topcoverbid.','.$r_topcoverbname.'[/pl]
  278. covering '.$q_topcoverb[flag_cover].' times for '.$teamb.'.<br />
  279. <br />
  280. Big credit to both teams defences; ';
  281. IF ($q_topdefl[flag_kill] >= $q_topfkill[flag_kill]) {
  282. echo '[pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl] defended the flag
  283. and got '.$q_topdefl[flag_kill].' flagkills while [pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl]
  284. also had a pretty nice defensive game killing '.$q_topfkill[flag_kill].' flag carriers.<br />
  285. <br />';
  286. } else {
  287. echo '[pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl] defended the flag
  288. and got '.$q_topfkill[flag_kill].' flagkills while [pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl]
  289. also had a pretty nice defensive game killing '.$q_topdefl[flag_kill].' flag carriers.<br />
  290. <br />';
  291. }
  292. echo'Both teams showed great teamplay and skill and the scoreline represents this.
  293. Two even lineups for this map.<br />
  294. <br />
  295. Well done [pl]'.$r_topfragid.','.$r_topfragname.'[/pl] who had '.$q_topfrag[frags].' frags.<br />
  296. <br />
  297. Good game.<br />
  298. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  299. stat points.<br />
  300. Well played both teams.';
  301. }
  302. // High Scores and a Draw
  303. IF ($reptype == "high" && $tdraw == 1) {
  304. echo' A very very exciting, close CTF game Im sure both clans will agree.<br />
  305. This high scoring draw proves that '.$teama.' and '.$teamb.' were evenly matched on this map.<br />
  306. Teamplay and strategy enabled both teams to cap quite a few times.<br />
  307. Well done to both teams attackers especially [pl]'.$r_topcapdid.','.$r_topcapdname.'[/pl]
  308. who capped '.$q_topcapd[flag_capture].' times.<br />
  309. <br />
  310. Capping opportunities came along time after time, with [cl]'.$r_topgrabid.','.$r_topgrabname.'[/cl]
  311. taking the flag '.$q_topgrab[flag_taken].' times and at the other end [cl]'.$r_topgrabidl.','.$r_topgrabnamel.'[/cl]
  312. taking the flag '.$q_topgrabl[flag_taken].' times.<br />
  313. <br />
  314. Help was at hand for the flag runners with '.$teama.'\'s [pl]'.$r_topcoverrid.','.$r_topcoverrname.'[/pl]
  315. covering '.$q_topcoverr[flag_cover].' times and [pl]'.$r_topcoverbid.','.$r_topcoverbname.'[/pl]
  316. covering '.$q_topcoverb[flag_cover].' times for '.$teamb.'.<br />
  317. <br />
  318. Although the defenders probably didnt have as good a game as the attackers on this map,
  319. credit should be awarded to ';
  320. IF ($q_topdefl[flag_kill] >= $q_topfkill[flag_kill]) {
  321. echo '[pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl] for killing '.$q_topdefl[flag_kill].'
  322. flag carriers and also to ';
  323. } else {
  324. echo '[pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl] for killing '.$q_topfkill[flag_kill].'
  325. flag carriers and also to ';
  326. }
  327. IF ($q_topseall[flag_seal] >= $q_topseal[flag_seal]) {
  328. echo '[pl]'.$r_topseallid.','.$r_topseallname.'[/pl] for sealing the base '.$q_topseall[flag_seal].'
  329. times for his flag carrier to cap.<br />
  330. <br >';
  331. } else {
  332. echo '[pl]'.$r_topsealid.','.$r_topsealname.'[/pl] for sealing the base '.$q_topseal[flag_seal].'
  333. times for his flag carrier to cap.<br />
  334. <br >';
  335. }
  336. echo' [pl]'.$r_topassistdid.','.$r_topassistdname.'[/pl] helped '.$r_topassistdteam.' get as many
  337. caps as they did by assisting '.$q_topassistd[flag_assist].' times in their caps.<br />
  338. This shows great teamplay and cover, well played.<br />
  339. <br />
  340. Both teams showed great teamplay and skill and the scoreline represents this.<br />
  341. <br />
  342. Well done [pl]'.$r_topfragid.','.$r_topfragname.'[/pl] who had '.$q_topfrag[frags].' frags.<br />
  343. <br />
  344. Good game.<br />
  345. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  346. stat points.<br />
  347. Well played both teams.';
  348. }
  349. // Low Scores and not a Draw
  350. IF ($reptype == "low" && $tdraw == 0) {
  351. echo 'Not very many caps in this close game, but '.$twin_team.' emerge victorious.<br />
  352. <br />
  353. Big credit to both teams defences; ';
  354. IF ($q_topdefl[flag_kill] >= $q_topfkill[flag_kill]) {
  355. echo '[pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl] defended the flag
  356. and got '.$q_topdefl[flag_kill].' flagkills while [pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl]
  357. also had a pretty nice defensive game killing '.$q_topfkill[flag_kill].' flag carriers.<br />
  358. <br />';
  359. } else {
  360. echo '[pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl] defended the flag
  361. and got '.$q_topfkill[flag_kill].' flagkills while [pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl]
  362. also had a pretty nice defensive game killing '.$q_topdefl[flag_kill].' flag carriers.<br />
  363. <br />';
  364. }
  365. echo 'Seems the attackers had a frustrating game on this map,
  366. especially [cl]'.$r_topgrabidl.','.$r_topgrabnamel.'[/cl] who took the flag '.$q_topgrabl[flag_taken].'
  367. and still lost the game :(<br />
  368. <br />
  369. Suportive play was made by [pl]'.$r_topcoverlid.','.$r_topcoverlname.'[/pl] having
  370. '.$q_topcoverl[flag_cover].' covers, but even with covering play,
  371. the majority of the flags got returned and the game ended with '.$tlose_team.' losing out.<br />
  372. <br />
  373. Well done to [pl]'.$r_topcapid.','.$r_topcapname.'[/pl] for capping '.$q_topcap[flag_capture].'.<br />
  374. On other days the outcome could have been different.<br />
  375. <br />
  376. Good game and congratualtions '.$twin_team.'.<br />
  377. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  378. stat points.<br />
  379. Well played both teams.';
  380. }
  381. // Medium Scores and not a Draw
  382. IF ($reptype == "medium" && $tdraw == 0) {
  383. echo 'A nice game of Capture the Flag took place this map with both teams trying
  384. hard to get flags back but only occasionally succeeding.<br />
  385. <br />
  386. '.$twin_team.' however managed to succesfully cap more than '.$tlose_team.' with big help
  387. from [pl]'.$r_topcapid.','.$r_topcapname.'[/pl] who capped '.$q_topcap[flag_capture].'.
  388. [pl]'.$r_topgrabid.','.$r_topgrabname.'[/pl] made it hard for the '.$tlose_team.' defenders taking the
  389. flag a total of '.$q_topgrab[flag_taken].' times.<br />
  390. Not to say that the defence was bad at all, [pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl]
  391. got '.$q_topdefl[flag_kill].' flag kills and this made attacking hard work for '.$twin_team.'. <br />
  392. <br />
  393. Sealing off the base for '.$twin_team.' was some nice defence including
  394. [pl]'.$r_topsealid.','.$r_topsealname.'[/pl] who sealed the base '.$q_topseal[flag_seal].' times.<br />
  395. Covering the flag carrier for '.$twin_team.' mostly was [pl]'.$r_topcoverid.','.$r_topcovername.'[/pl]
  396. with '.$q_topcover[flag_cover].' covers.<br />
  397. <br />
  398. Attacking in vain at the other end of the map was [pl]'.$r_topgrabidl.','.$r_topgrabnamel.'[/pl]
  399. who managed to take the '.$twin_team.' flag '.$q_topgrabl[flag_taken].' times,
  400. but unfortunately was unable to match the '.$twin_score.' caps made by '.$twin_team.'.<br />
  401. [pl]'.$r_topgrabidl.','.$r_topgrabnamel.'[/pl] was also up against some heavy defence including
  402. [pl]'.$r_topfkillid.','.$r_topfkillname.'[/pl] with '.$q_topfkill[flag_kill].' flag kills and
  403. [pl]'.$r_topfkillid2.','.$r_topfkillname2.'[/pl] with '.$q_topfkill2[flag_kill].' flag kills.<br />
  404. <br />
  405. Good game and congratualtions '.$twin_team.'.<br />
  406. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  407. stat points.<br />
  408. Well played both teams.';
  409. }
  410. // High Scores and not a Draw
  411. IF ($reptype == "high" && $tdraw == 0) {
  412. echo ''.$twin_team.' were victorious thanks to some nice capping by
  413. [pl]'.$r_topcapid.','.$r_topcapname.'[/pl] who capped '.$q_topcap[flag_capture].' and
  414. [pl]'.$r_topgrabid.','.$r_topgrabname.'[/pl] who took the flag'.$q_topgrab[flag_taken].' times.<br />
  415. <br />
  416. [pl]'.$r_topcapid.','.$r_topcapname.'[/pl] probably could not have done it without the help of
  417. [pl]'.$r_topcoverid.','.$r_topcovername.'[/pl] who had '.$q_topcover[flag_cover].' covers and
  418. [pl]'.$r_topsealid.','.$r_topsealname.'[/pl] for sealing the base off
  419. '.$q_topseal[flag_seal].' times.<br />
  420. <br />
  421. Although the '.$tlose_team.' defenders played well, the '.$q_topdefl[flag_kill].' flag kills by
  422. [pl]'.$r_topdeflid.','.$r_topdeflname.'[/pl] was just not enough to stop the
  423. '.$twin_team.' attackers succeeding. Extra Credit should be given to
  424. [pl]'.$r_topfragwid.','.$r_topfragwname.'[/pl] for getting '.$q_topwfrag[frags].' frags.<br />
  425. Some sympathy should be given to [pl]'.$r_topdeathid.','.$r_topdeathname.'[/pl]
  426. who died a whopping '.$q_topdeath[deaths].' times - unlucky!.<br />
  427. <br />
  428. All in all, this was a great attacking game for '.$twin_team.', but all players deserve credit for
  429. playing well.<br />
  430. <br />
  431. Good game and congratualtions '.$twin_team.'.<br />
  432. Stats player of the map was [pl]'.$r_topstatsid.','.$r_topstatsname.'[/pl] with '.$q_topstats[prank].'
  433. stat points.';
  434. }
  435. echo'<br />
  436. <br />
  437. This report was created with UTStats from the following game:<br />
  438. [el]http://'.$oururl.'?p=match&mid='.$id.',http://'.$oururl.'?p=match&mid='.$id.'[/el]
  439. </textarea>';
  440. ?>