mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
refactor: page generation time considers real time
Because in environments with $_SERVER["REQUEST_TIME_FLOAT"] unavailable the time actually only started after Village.php got loaded (which was AFTER Automation.php kicked in and everything was already DB-loaded), the start timer was moved more towards the top of each template.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
/** --------------------------------------------------- **\
|
||||
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
@@ -14,7 +17,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
if(isset($_GET['w'])) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$amount = $_SESSION['amount'];
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
+3
-1
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
//fix by ronix
|
||||
use App\Utils\AccessLogger;
|
||||
|
||||
@@ -7,7 +10,6 @@ include_once("GameEngine/Village.php");
|
||||
include_once("GameEngine/Chat.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$alliance->procAlliance($_GET);
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -14,7 +16,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if($session->access == BANNED){
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -15,7 +17,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$message->noticeType($_GET);
|
||||
$message->procNotice($_POST);
|
||||
if(isset($_GET['newdid'])) {
|
||||
|
||||
+2
-2
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -45,8 +47,6 @@ AccessLogger::logRequest();
|
||||
die("Access Denied: You are not Admin!");
|
||||
}else{
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
/*-------------------------------------------------------*\
|
||||
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -14,7 +16,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['ok'])){
|
||||
$database->updateUserField($session->uid,'ok','0','1'); $_SESSION['ok'] = '0';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -14,7 +16,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ if(isset($_GET['z']) && !is_numeric($_GET['z'])) die('Hacking Attempt');
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
if(isset($_GET['d']) && isset($_GET['c'])){
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ use App\Utils\AccessLogger;
|
||||
include("GameEngine/Account.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ use App\Utils\AccessLogger;
|
||||
include_once( "GameEngine/Village.php" );
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$message->procMessage( $_POST );
|
||||
if ( isset( $_GET['t'] ) && $_GET['t'] == 1 ) {
|
||||
$automation->isWinner();
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -14,7 +16,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$id = $_GET['id'];
|
||||
if($session->access != BANNED){
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
use App\Utils\AccessLogger;
|
||||
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -16,7 +18,6 @@ use App\Utils\AccessLogger;
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -15,7 +17,6 @@ ob_start();
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$profile->procProfile($_POST);
|
||||
$profile->procSpecial($_GET);
|
||||
if(isset($_GET['newdid'])) {
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -15,7 +17,6 @@ include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$amount = $_SESSION['amount'];
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
+2
-2
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -10,14 +12,12 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
use App\Utils\AccessLogger;
|
||||
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$amount = $_SESSION['amount'];
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
+2
-2
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -10,13 +12,11 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
use App\Utils\AccessLogger;
|
||||
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
$battle->procSim($_POST);
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
+2
-1
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
@@ -31,7 +33,6 @@ if (!function_exists('mysqli_result')) {
|
||||
include_once("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
|
||||
Reference in New Issue
Block a user