summaryrefslogtreecommitdiff
path: root/html/import
diff options
context:
space:
mode:
Diffstat (limited to 'html/import')
-rw-r--r--html/import/import_renderer-ctf.php30
-rw-r--r--html/import/import_renderer-dm.php31
-rw-r--r--html/import/import_renderer-dom.php32
-rw-r--r--html/import/import_renderer-preconfig.php17
4 files changed, 110 insertions, 0 deletions
diff --git a/html/import/import_renderer-ctf.php b/html/import/import_renderer-ctf.php
new file mode 100644
index 0000000..3e49bf5
--- /dev/null
+++ b/html/import/import_renderer-ctf.php
@@ -0,0 +1,30 @@
+
+<?php
+ include_once('includes/renderer-dm.php');
+ include_once('includes/renderer-ctf.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);
+
+ prepCTFdata($safe_uid);
+
+ renderScoreGraph($safe_uid);
+
+ // Get relevant data
+ list($datafrags, $derivfrags, $topFraggers,$counter,$datafragsteam,$derivfragsteam,$topTeams) = parseDMdata($safe_uid);
+
+ renderFragBarsTeams($datafragsteam,$derivfragsteam,$topTeams,$counter);
+
+ if($playernumberofteams == 2)
+ renderDataPickups($safe_uid);
+
+ } catch (Exception $e) {
+
+ // Do nothing, but simply do not block import
+
+ }
+ }
+?> \ No newline at end of file
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
diff --git a/html/import/import_renderer-dom.php b/html/import/import_renderer-dom.php
new file mode 100644
index 0000000..d680d49
--- /dev/null
+++ b/html/import/import_renderer-dom.php
@@ -0,0 +1,32 @@
+
+<?php
+ include_once('includes/renderer-dom.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))>=8) {
+
+ $tableTempIdom = generateTempTable($safe_uid);
+ $ampTimes = generateAmpTimes($safe_uid);
+
+ try {
+
+ renderDataTotal($safe_uid,$tableTempIdom);
+ renderDataCPs($safe_uid,$tableTempIdom);
+
+ renderDataPickups($safe_uid);
+ renderAmpBars($safe_uid,$tableTempIdom);
+
+ list($datafrags, $derivfrags, $topFraggers,$counter,$datafragsteam,$derivfragsteam,$topTeams) = parseDMdata($safe_uid);
+ renderFragBarsTeams($datafragsteam,$derivfragsteam,$topTeams,$counter);
+
+ } catch (Exception $e) {
+
+ // Do nothing, but simply do not block import
+
+ }
+
+ // drop table
+ mysql_query("DROP TABLE $tableTempIdom") or die(mysql_error());
+ }
+?> \ No newline at end of file
diff --git a/html/import/import_renderer-preconfig.php b/html/import/import_renderer-preconfig.php
new file mode 100644
index 0000000..bb83526
--- /dev/null
+++ b/html/import/import_renderer-preconfig.php
@@ -0,0 +1,17 @@
+<?php
+ require_once 'includes/renderer-general-import.php';
+
+ $safe_uid = mysql_real_escape_string($uid);
+
+ // Get relevant info
+ $playerinfo = getPlayerTeam($uid);
+ $playernames = $playerinfo[0];
+ $playerteams = $playerinfo[1];
+ $playernumberofteams = $playerinfo[2];
+
+ $time_gameinfo = getGameStartEndRatio($uid);
+ $time_gamestart = $time_gameinfo[0];
+ $time_gameend = $time_gameinfo[1];
+ $time_ratio_correction = $time_gameinfo[2];
+
+?> \ No newline at end of file