summaryrefslogtreecommitdiff
path: root/html/import/import_renderer-dm.php
diff options
context:
space:
mode:
authorMatthijs Kuiper <info@matthijskuiper.nl>2018-01-08 23:47:23 +0100
committerGitHub <noreply@github.com>2018-01-08 23:47:23 +0100
commite861eafbeae0560add7956530d76de6cc285be20 (patch)
treec32e746977fde711cecd716570989014bf2d3592 /html/import/import_renderer-dm.php
parent66b162b5f01c996fd8a5cd4e570e31f8483cdffa (diff)
parent730c20dd04b5753cb372a289923e39516d1f8b87 (diff)
Merge pull request #5 from randommonk/develop4.3.0
Bumped version to 4.3. Added jpgraph stats developed by killerEye
Diffstat (limited to 'html/import/import_renderer-dm.php')
-rw-r--r--html/import/import_renderer-dm.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/html/import/import_renderer-dm.php b/html/import/import_renderer-dm.php
new file mode 100644
index 0000000..e680bbf
--- /dev/null
+++ b/html/import/import_renderer-dm.php
@@ -0,0 +1,31 @@
+
+<?php
+ include_once('includes/renderer-dm.php');
+
+
+ // Only run script if at least 5 minutes were played
+ if(($time_gameend-$time_gamestart)>300 && count(array_unique($playernames))>=2) {
+
+ try {
+ $safe_uid = mysql_real_escape_string($uid);
+
+ // Get relevant data
+ list($datafrags, $derivfrags, $topFraggers,$counter,$datafragsteam,$derivfragsteam,$topTeams) = parseDMdata($safe_uid);
+
+ if($playernumberofteams > 1 && count(array_unique($playernames)) > 3 &&($gamename == "Tournament Team Game" || $gamename == "Tournament Team Game (insta)" || $gamename == "2v2v2v2 iTDM"))
+ renderFragBarsTeams($datafragsteam,$derivfragsteam,$topTeams,$counter);
+
+ renderFragBars($datafrags, $derivfrags, $topFraggers,$counter);
+
+ if(count($playernames) == 2)
+ renderDataPickups($safe_uid,false,($playerteams[$topFraggers[0]]==0),$topFraggers);
+ else if($playernumberofteams == 2)
+ renderDataPickups($safe_uid);
+
+ } catch (Exception $e) {
+
+ // Do nothing, but simply do not block import
+
+ }
+ }
+?> \ No newline at end of file