diff --git a/Admin/Templates/config.tpl b/Admin/Templates/config.tpl index b21d69e8..14ef378f 100644 --- a/Admin/Templates/config.tpl +++ b/Admin/Templates/config.tpl @@ -155,12 +155,18 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); Error Reporting +<<<<<<< HEAD +======= + + + +>>>>>>> 743a19326cddff179e325da92167a5362a94a6a2 @@ -350,4 +356,4 @@ function define_array( $array, $keys = NULL ) } } //define_array($array); -?> \ No newline at end of file +?> diff --git a/Admin/Templates/editAdminInfo.tpl b/Admin/Templates/editAdminInfo.tpl index 98f931bd..8fc06083 100644 --- a/Admin/Templates/editAdminInfo.tpl +++ b/Admin/Templates/editAdminInfo.tpl @@ -41,14 +41,6 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - - - -
Error Reporting -

@@ -57,4 +49,4 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - \ No newline at end of file + diff --git a/Admin/Templates/editExtraSet.tpl b/Admin/Templates/editExtraSet.tpl index 8e177e18..a12d1b05 100644 --- a/Admin/Templates/editExtraSet.tpl +++ b/Admin/Templates/editExtraSet.tpl @@ -37,14 +37,7 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); Max Number of Mails 30 - - Error Reporting - - - +
@@ -53,4 +46,4 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - \ No newline at end of file + diff --git a/Admin/Templates/editLogSet.tpl b/Admin/Templates/editLogSet.tpl index d9a02e98..5fd06c9b 100644 --- a/Admin/Templates/editLogSet.tpl +++ b/Admin/Templates/editLogSet.tpl @@ -97,13 +97,7 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - Error Reporting - - - +
@@ -112,4 +106,4 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - \ No newline at end of file + diff --git a/Admin/Templates/editNewsboxSet.tpl b/Admin/Templates/editNewsboxSet.tpl index f5d523cc..2d4d31e2 100644 --- a/Admin/Templates/editNewsboxSet.tpl +++ b/Admin/Templates/editNewsboxSet.tpl @@ -52,13 +52,7 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - Error Reporting - - - +
@@ -67,4 +61,4 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); - \ No newline at end of file + diff --git a/Admin/Templates/editServerSet.tpl b/Admin/Templates/editServerSet.tpl index e71bdc8b..2f57444f 100644 --- a/Admin/Templates/editServerSet.tpl +++ b/Admin/Templates/editServerSet.tpl @@ -289,8 +289,14 @@ function refresh(tz) { Error Reporting diff --git a/GameEngine/Admin/Mods/constant_format.tpl b/GameEngine/Admin/Mods/constant_format.tpl index ed929175..04b8750d 100644 --- a/GameEngine/Admin/Mods/constant_format.tpl +++ b/GameEngine/Admin/Mods/constant_format.tpl @@ -16,6 +16,7 @@ ////////////////////////////////// // (E_ALL ^ E_NOTICE) = enabled // (0) = disabled +define("ERROR_REPORT","%ERRORREPORT%"); %ERROR% ////////////////////////////////// @@ -295,4 +296,4 @@ $requse = 0; ## ## ################################################################################# -?> \ No newline at end of file +?> diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php index f71c570b..3534abdb 100644 --- a/GameEngine/Admin/Mods/editAdminInfo.php +++ b/GameEngine/Admin/Mods/editAdminInfo.php @@ -17,7 +17,7 @@ $id = $_POST['id']; $myFile = "../../config.php"; $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\config.php"); - + $ERRORREPORT=ERROR_REPORT; $T4=(T4_COMING==false)? "false":"true"; $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; $QUEST=(QUEST==false)? "false":"true"; @@ -41,7 +41,8 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; $text = file_get_contents("constant_format.tpl"); - $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); + $text = preg_replace("'%ERROR%'", $ERRORREPORT, $text); $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); @@ -111,4 +112,4 @@ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed header("Location: ../../../Admin/admin.php?p=config"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Admin/Mods/editExtraSet.php b/GameEngine/Admin/Mods/editExtraSet.php index 15a23d6f..554e7831 100644 --- a/GameEngine/Admin/Mods/editExtraSet.php +++ b/GameEngine/Admin/Mods/editExtraSet.php @@ -17,7 +17,7 @@ $id = $_POST['id']; $myFile = "../../config.php"; $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\config.php"); - + $ERRORREPORT=ERROR_REPORT; $T4=(T4_COMING==false)? "false":"true"; $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; $QUEST=(QUEST==false)? "false":"true"; @@ -41,7 +41,8 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $text = file_get_contents("constant_format.tpl"); - $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); + $text = preg_replace("'%ERROR%'", $ERRORREPORT, $text); $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); @@ -111,4 +112,4 @@ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed header("Location: ../../../Admin/admin.php?p=config"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Admin/Mods/editLogSet.php b/GameEngine/Admin/Mods/editLogSet.php index 0bc98f6b..87ae8ce5 100644 --- a/GameEngine/Admin/Mods/editLogSet.php +++ b/GameEngine/Admin/Mods/editLogSet.php @@ -17,7 +17,7 @@ $id = $_POST['id']; $myFile = "../../config.php"; $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\config.php"); - + $ERRORREPORT=ERROR_REPORT; $T4=(T4_COMING==false)? "false":"true"; $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; $QUEST=(QUEST==false)? "false":"true"; @@ -34,7 +34,8 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $text = file_get_contents("constant_format.tpl"); - $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); + $text = preg_replace("'%ERROR%'", $ERRORREPORT, $text); $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); @@ -106,4 +107,4 @@ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed header("Location: ../../../Admin/admin.php?p=config"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Admin/Mods/editNewsboxSet.php b/GameEngine/Admin/Mods/editNewsboxSet.php index db2e35b5..b7dc9a71 100644 --- a/GameEngine/Admin/Mods/editNewsboxSet.php +++ b/GameEngine/Admin/Mods/editNewsboxSet.php @@ -17,7 +17,7 @@ $id = $_POST['id']; $myFile = "../../config.php"; $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\config.php"); - + $ERRORREPORT=ERROR_REPORT; $T4=(T4_COMING==false)? "false":"true"; $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; $QUEST=(QUEST==false)? "false":"true"; @@ -41,7 +41,8 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $text = file_get_contents("constant_format.tpl"); - $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); + $text = preg_replace("'%ERROR%'", $ERRORREPORT, $text); $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); @@ -113,4 +114,4 @@ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed header("Location: ../../../Admin/admin.php?p=config"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Admin/Mods/editServerSet.php b/GameEngine/Admin/Mods/editServerSet.php index eb7f2c58..233351de 100644 --- a/GameEngine/Admin/Mods/editServerSet.php +++ b/GameEngine/Admin/Mods/editServerSet.php @@ -105,4 +105,4 @@ $database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed header("Location: ../../../Admin/admin.php?p=config"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Database.php b/GameEngine/Database.php index edf037ea..e576daef 100644 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -9,7 +9,7 @@ ## ## ################################################################################# -include("config.php"); +include_once("config.php"); switch(DB_TYPE) { case 1: @@ -24,4 +24,4 @@ switch(DB_TYPE) { } ## Security include("Protection.php"); -?> \ No newline at end of file +?> diff --git a/GameEngine/Session.php b/GameEngine/Session.php index eecb98d5..dcb0f79c 100644 --- a/GameEngine/Session.php +++ b/GameEngine/Session.php @@ -17,30 +17,31 @@ mb_internal_encoding("UTF-8"); // Add for utf8 varriables. ## ## ################################################################################# -if(!file_exists('GameEngine/config.php') && !file_exists('../../GameEngine/config.php') && !file_exists('../../config.php')) { +if(file_exists('GameEngine/config.php') || file_exists('../../GameEngine/config.php') || file_exists('../../config.php') || file_exists('../GameEngine/config.php')) { +}else{ header("Location: install/"); } $script_name = ($_SERVER['REQUEST_URI'] == 'karte.php') ? 'karte' : $_SERVER['REQUEST_URI']; -include ("Battle.php"); -include ("Data/buidata.php"); -include ("Data/cp.php"); -include ("Data/cel.php"); -include ("Data/resdata.php"); -include ("Data/unitdata.php"); -include ("Data/hero_full.php"); -include ("config.php"); -include ("Database.php"); -include ("Mailer.php"); -include ("Form.php"); -include ("Generator.php"); -include ("Multisort.php"); -include ("Ranking.php"); -include ("Lang/" . LANG . ".php"); -include ("Logging.php"); -include ("Message.php"); -include ("Alliance.php"); -include ("Profile.php"); +include_once ("Battle.php"); +include_once ("Data/buidata.php"); +include_once ("Data/cp.php"); +include_once ("Data/cel.php"); +include_once ("Data/resdata.php"); +include_once ("Data/unitdata.php"); +include_once ("Data/hero_full.php"); +include_once ("config.php"); +include_once ("Database.php"); +include_once ("Mailer.php"); +include_once ("Form.php"); +include_once ("Generator.php"); +include_once ("Multisort.php"); +include_once ("Ranking.php"); +include_once ("Lang/" . LANG . ".php"); +include_once ("Logging.php"); +include_once ("Message.php"); +include_once ("Alliance.php"); +include_once ("Profile.php"); class Session { @@ -60,7 +61,7 @@ class Session { function Session() { $this->time = time(); - session_start(); + if (!isset($_SESSION)) session_start(); $this->logged_in = $this->checkLogin(); diff --git a/Templates/Ajax/mapscroll.tpl b/Templates/Ajax/mapscroll.tpl index 103bdb0c..e1f709eb 100644 --- a/Templates/Ajax/mapscroll.tpl +++ b/Templates/Ajax/mapscroll.tpl @@ -1,6 +1,7 @@ 0 and $neutralarray[0]['alli2']>0 and $do $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; -if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ +if($donnees['ville_user']==3 && $donnees['ville_name']==PLANVILLAGE){ $image = "o99"; } //Javascript map info + $regcount=0; if($yrow!=7){ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; if($donnees['map_occupied']){ @@ -144,4 +146,4 @@ $image = "o99"; else {$map_js .= "]";} ++$i; } -echo '[['.$map_js.']'; \ No newline at end of file +echo '[['.$map_js.']'; diff --git a/Templates/Ajax/mapscroll2.tpl b/Templates/Ajax/mapscroll2.tpl index b2645b89..82347e85 100644 --- a/Templates/Ajax/mapscroll2.tpl +++ b/Templates/Ajax/mapscroll2.tpl @@ -1,6 +1,7 @@ 0 and $neutralarray[0]['alli2']>0 and $do $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; -if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ +if($donnees['ville_user']==3 && $donnees['ville_name']==PLANVILLAGE){ $image = "o99"; } //Javascript map info + $regcount=0; if($yrow!=13){ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; if($donnees['map_occupied']){ @@ -161,4 +163,4 @@ $image = "o99"; else {$map_js .= "]";} ++$i; } -echo '[['.$map_js.']'; \ No newline at end of file +echo '[['.$map_js.']'; diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index 430e6a18..942588b7 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -16,6 +16,7 @@ ////////////////////////////////// // (E_ALL ^ E_NOTICE) = enabled // (0) = disabled +define("ERROR_REPORT","%ERRORREPORT%"); %ERROR% ////////////////////////////////// diff --git a/install/process.php b/install/process.php index 705f3532..21031210 100644 --- a/install/process.php +++ b/install/process.php @@ -90,6 +90,7 @@ class Process { $text = preg_replace("'%BOX2%'", $_POST['box2'], $text); $text = preg_replace("'%BOX3%'", $_POST['box3'], $text); $text = preg_replace("'%VILLAGE_EXPAND%'", $_POST['village_expand'], $text); + $text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text); $text = preg_replace("'%ERROR%'", $_POST['error'], $text); $text = preg_replace("'%GP_LOCATE%'", $_POST['gp_locate'], $text); $text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text);