diff options
Diffstat (limited to 'html/import')
-rw-r--r-- | html/import/import_renderer-ctf.php | 53 | ||||
-rw-r--r-- | html/import/import_renderer-dm.php | 48 | ||||
-rw-r--r-- | html/import/import_renderer-dom.php | 52 |
3 files changed, 71 insertions, 82 deletions
diff --git a/html/import/import_renderer-ctf.php b/html/import/import_renderer-ctf.php index 0c6db6f..a31c243 100644 --- a/html/import/import_renderer-ctf.php +++ b/html/import/import_renderer-ctf.php @@ -1,30 +1,27 @@ +<?php +include_once('includes/renderer-dm.php'); +include_once('includes/renderer-ctf.php'); -<?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 = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $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 - - } +// Only run script if at least 5 minutes were played +if (($time_gameend-$time_gamestart)>300 && count(array_unique($playernames))>=2) { + try { + $safe_uid = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $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 index a889865..a8a33af 100644 --- a/html/import/import_renderer-dm.php +++ b/html/import/import_renderer-dm.php @@ -1,31 +1,27 @@ +<?php +include_once('includes/renderer-dm.php'); -<?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 = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $uid); - - // Only run script if at least 5 minutes were played - if(($time_gameend-$time_gamestart)>300 && count(array_unique($playernames))>=2) { + // Get relevant data + list($datafrags, $derivfrags, $topFraggers, $counter, $datafragsteam, $derivfragsteam, $topTeams) = parseDMdata($safe_uid); - try { - $safe_uid = mysqli_real_escape_string($GLOBALS["___mysqli_link"], $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 + 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 index 4e20d1f..e7209ec 100644 --- a/html/import/import_renderer-dom.php +++ b/html/import/import_renderer-dom.php @@ -1,32 +1,28 @@ +<?php +include_once('includes/renderer-dom.php'); +include_once('includes/renderer-dm.php'); -<?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); - // Only run script if at least 5 minutes were played - if(($time_gameend-$time_gamestart)>300 && count(array_unique($playernames))>=8) { + try { + renderDataTotal($safe_uid, $tableTempIdom); + renderDataCPs($safe_uid, $tableTempIdom); - $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 - mysqli_query($GLOBALS["___mysqli_link"], "DROP TABLE $tableTempIdom") or die(mysqli_error($GLOBALS["___mysqli_link"])); + 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 } -?>
\ No newline at end of file + + // drop table + mysqli_query($GLOBALS["___mysqli_link"], "DROP TABLE $tableTempIdom") or die(mysqli_error($GLOBALS["___mysqli_link"])); +} + +?> |