From 923b4b3e18cfd6db77178dc329e5fe356dd53078 Mon Sep 17 00:00:00 2001 From: Shadow Date: Wed, 26 Feb 2014 07:38:09 +0200 Subject: [PATCH] updates admin --- Admin/Templates/config.tpl | 131 ++++++---- Admin/Templates/editAdminInfo.tpl | 60 +++++ Admin/Templates/editExtraSet.tpl | 56 ++++ Admin/Templates/editLogSet.tpl | 115 ++++++++ Admin/Templates/editNewsboxSet.tpl | 70 +++++ Admin/Templates/editServerSet.tpl | 304 ++++++++++++++++++++++ GameEngine/Admin/Mods/constant_format.tpl | 298 +++++++++++++++++++++ GameEngine/Admin/Mods/editAdminInfo.php | 114 ++++++++ GameEngine/Admin/Mods/editExtraSet.php | 114 ++++++++ GameEngine/Admin/Mods/editLogSet.php | 109 ++++++++ GameEngine/Admin/Mods/editNewsboxSet.php | 116 +++++++++ GameEngine/Admin/Mods/editServerSet.php | 107 ++++++++ 12 files changed, 1545 insertions(+), 49 deletions(-) create mode 100644 Admin/Templates/editAdminInfo.tpl create mode 100644 Admin/Templates/editExtraSet.tpl create mode 100644 Admin/Templates/editLogSet.tpl create mode 100644 Admin/Templates/editNewsboxSet.tpl create mode 100644 Admin/Templates/editServerSet.tpl create mode 100644 GameEngine/Admin/Mods/constant_format.tpl create mode 100644 GameEngine/Admin/Mods/editAdminInfo.php create mode 100644 GameEngine/Admin/Mods/editExtraSet.php create mode 100644 GameEngine/Admin/Mods/editLogSet.php create mode 100644 GameEngine/Admin/Mods/editNewsboxSet.php create mode 100644 GameEngine/Admin/Mods/editServerSet.php diff --git a/Admin/Templates/config.tpl b/Admin/Templates/config.tpl index 2caac009..4851e7b4 100644 --- a/Admin/Templates/config.tpl +++ b/Admin/Templates/config.tpl @@ -4,25 +4,22 @@ ## --------------------------------------------------------------------------- ## ## Filename config.tpl ## ## Developed by: Dzoki ## -## License: TravianX Project ## -## Copyright: TravianX (c) 2010-2011. All rights reserved. ## +## Rework by: ronix ## +## License: TravianZ Project ## +## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## ## ################################################################################# +if(!isset($_SESSION)) session_start(); +if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); ?> -








Access Denied: You are not admin
"); -?> - -

Made by Dzoki / Modified by Shadow

+

Server Configuration

- +
~ Server Settings ~Server Settings
@@ -36,57 +33,53 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Server Name - - Medal Interval - days - - - Peace - - Server Started - + + + + Server Timezone + Language - + Server Speed - - Map Size - x - Troop Speed x Evasion Speed - x + - Trader capacity - x + Storage Multipler + - Cranny capacity - x + Trader Capacity + - Trapper capacity - x + Cranny Capacity + + + + Trapper Capacity + Natars Units Multiplier - x + - Nature troops regeneration time - hours + Map Size + x Village Expanding Speed @@ -96,13 +89,21 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Beginners Protection hour/s + + Register Open + true"; } else { echo "False"; } ?> + Activation Mail - Enabled"; } else if(AUTH_EMAIL == false){ echo "Disabled"; } ?> + Enabled"; } else { echo "Disabled"; } ?> Quest - Enabled"; } else if(QUEST == false) { echo "Disabled"; } ?> + Enabled"; } else { echo "Disabled"; } ?> + + + Quest Type + Travian Official"; } else { echo "TravianZ Extended"; } ?> Demolish - Level required @@ -120,12 +121,44 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





+25% production duration = 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?> + + Nature Troops Regeneration Time + = 86400){ echo ''.(NATURE_REGTIME/86400).' Days'; } else if(NATURE_REGTIME < 86400){ echo ''.(NATURE_REGTIME/3600).' Hours'; } ?> + + + Medal Interval + = 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?> + + + Tourn Threshold + + + + Great Workshop + Enabled"; } else { echo "Disabled"; } ?> + + + Show Natars in Statistics + True"; } else { echo "False"; } ?> + + Peace system + + + + + + Graphic Pack + Enabled"; } else { echo "Disabled"; } ?> + - +
~ Log Settings ~Log Settings
@@ -149,7 +182,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Log Gold - Enabled"; } else if(ALOG_GOLD_FIN == false){ echo "Disabled"; } ?> + Enabled"; } else if(LOG_GOLD_FIN == false){ echo "Disabled"; } ?> Log Admin @@ -172,7 +205,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





- +
~ Newsbox Settings ~Newsbox Settings
@@ -195,7 +228,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Enabled"; } else if(NEWSBOX3 == false){ echo "Disabled"; } ?> - Home 1 + - +
~ SQL Settings ~SQL Settings
@@ -250,7 +283,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





- +
~ Extra Settings ~Extra Settings
@@ -268,16 +301,12 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Max number of mails Limit mailbox disabled"; } ?> - - Include Admin in rank - Enabled"; } else if(INCLUDE_ADMIN == false){ echo "Disabled"; } ?> - - +
~ Admin Information ~Admin Information
@@ -294,6 +323,10 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Admin Name No admin name defined!"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?> + + Include Admin in Rank + Enabled"; } else if(INCLUDE_ADMIN == false){ echo "Disabled"; } ?> + +?> \ No newline at end of file diff --git a/Admin/Templates/editAdminInfo.tpl b/Admin/Templates/editAdminInfo.tpl new file mode 100644 index 00000000..98f931bd --- /dev/null +++ b/Admin/Templates/editAdminInfo.tpl @@ -0,0 +1,60 @@ + +

Server Configuration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Edit Admin Information
Admin Name
Admin Email
Show Admin in Stats: + +
Error Reporting +
+
+ + + + +
<< back
+
\ No newline at end of file diff --git a/Admin/Templates/editExtraSet.tpl b/Admin/Templates/editExtraSet.tpl new file mode 100644 index 00000000..8e177e18 --- /dev/null +++ b/Admin/Templates/editExtraSet.tpl @@ -0,0 +1,56 @@ + +

Server Configuration

+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Edit Extra Settings
Limit Mailbox + +
Max Number of Mails30
Error Reporting +
+
+ + + + +
<< back
+
\ No newline at end of file diff --git a/Admin/Templates/editLogSet.tpl b/Admin/Templates/editLogSet.tpl new file mode 100644 index 00000000..d9a02e98 --- /dev/null +++ b/Admin/Templates/editLogSet.tpl @@ -0,0 +1,115 @@ + +

Server Configuration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Edit Log Setting
Log Building + +
Log Tech + +
Log Login + +
Log Gold + +
Log Admin + +
Log War + +
Log Market + +
Log Illegal + +
Error Reporting +
+
+ + + + +
<< back
+
\ No newline at end of file diff --git a/Admin/Templates/editNewsboxSet.tpl b/Admin/Templates/editNewsboxSet.tpl new file mode 100644 index 00000000..f5d523cc --- /dev/null +++ b/Admin/Templates/editNewsboxSet.tpl @@ -0,0 +1,70 @@ + +

Server Configuration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Edit Newsbox Settings
Newsbox 1 + +
Newsbox 2 + +
Newsbox 3 + +
Error Reporting +
+
+ + + + +
<< back
+
\ No newline at end of file diff --git a/Admin/Templates/editServerSet.tpl b/Admin/Templates/editServerSet.tpl new file mode 100644 index 00000000..1bf924aa --- /dev/null +++ b/Admin/Templates/editServerSet.tpl @@ -0,0 +1,304 @@ + + +

Server Configuration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Edit Server Setting
Server Name
Server Started
Server Timezone + + +
Language + +
Server Speed
Troop Speed
Evasion Speed
Storage Multipler
Trader Capacity
Cranny Capacity
Trapper Capacity
Natars Units Multiplier
Map Sizex
Village Expanding Speed + +
Beginners Protection + +
Register Open + +
Activation Mail + +
Quest + +
Quest Type + +
Demolish - Level required + +
World Wonder - Statistics + +
Plus account duration + +
+25% production duration + +
Nature Troops Regeneration Time + +
Medal Interval + +
Tourn Threshold
Great Workshop + +
Show Natars in Statistics + +
Peace System + +
Graphic Pack + +
Error Reporting +
+
+ + + + +
<< back
+
\ No newline at end of file diff --git a/GameEngine/Admin/Mods/constant_format.tpl b/GameEngine/Admin/Mods/constant_format.tpl new file mode 100644 index 00000000..ed929175 --- /dev/null +++ b/GameEngine/Admin/Mods/constant_format.tpl @@ -0,0 +1,298 @@ + \ No newline at end of file diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php new file mode 100644 index 00000000..f71c570b --- /dev/null +++ b/GameEngine/Admin/Mods/editAdminInfo.php @@ -0,0 +1,114 @@ +

Can't open file: GameEngine\config.php"); + + + $T4=(T4_COMING==false)? "false":"true"; + $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; + $QUEST=(QUEST==false)? "false":"true"; + $WW=(WW==false)? "false":"true"; + $SHOW_NATARS=(SHOW_NATARS==false)? "false":"true"; + $AUTH_EMAIL=(AUTH_EMAIL==false)? "false":"true"; + $GREAT_WKS=(GREAT_WKS==false)? "false":"true"; + $REG_OPEN=(REG_OPEN==false)? "false":"true"; + + $LOG_BUILD=(LOG_BUILD==false)? "false":"true"; + $LOG_TECH=(LOG_TECH==false)? "false":"true"; + $LOG_LOGIN=(LOG_LOGIN==false)? "false":"true"; + $LOG_GOLD_FIN=(LOG_GOLD_FIN==false)? "false":"true"; + $LOG_ADMIN=(LOG_ADMIN==false)? "false":"true"; + $LOG_WAR=(LOG_WAR==false)? "false":"true"; + $LOG_MARKET=(LOG_MARKET==false)? "false":"true"; + $LOG_ILLEGAL=(LOG_ILLEGAL==false)? "false":"true"; + $NEWSBOX1=(NEWSBOX1==false)? "false":"true"; + $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; + $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; + $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; + + $text = file_get_contents("constant_format.tpl"); + $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); + $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", LANG, $text); + $text = preg_replace("'%SPEED%'", SPEED, $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", $GP_ENABLE, $text); + $text = preg_replace("'%GP_LOCATE%'", "gpack/travian_default/", $text); + $text = preg_replace("'%INCSPEED%'", INCREASE_SPEED, $text); + $text = preg_replace("'%EVASIONSPEED%'", EVASION_SPEED, $text); + $text = preg_replace("'%TRADERCAP%'", TRADER_CAPACITY, $text); + $text = preg_replace("'%CRANNYCAP%'", CRANNY_CAPACITY, $text); + $text = preg_replace("'%TRAPPERCAP%'", TRAPPER_CAPACITY, $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", CP, $text); + $text = preg_replace("'%DEMOLISH%'", DEMOLISH_LEVEL_REQ, $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", STORAGE_MULTIPLIER, $text); + $text = preg_replace("'%QUEST%'", $QUEST, $text); + $text = preg_replace("'%QTYPE%'", QTYPE, $text); + $text = preg_replace("'%BEGINNER%'", PROTECTION, $text); + $text = preg_replace("'%WW%'", $WW, $text); + $text = preg_replace("'%SHOW_NATARS%'", $SHOW_NATARS, $text); + $text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text); + $text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text); + $text = preg_replace("'%T4_COMING%'", $T4, $text); + $text = preg_replace("'%ACTIVATE%'", $AUTH_EMAIL, $text); + $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text); + $text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text); + $text = preg_replace("'%GREAT_WKS%'", $GREAT_WKS, $text); + $text = preg_replace("'%TS_THRESHOLD%'", TS_THRESHOLD, $text); + $text = preg_replace("'%REG_OPEN%'", $REG_OPEN, $text); + $text = preg_replace("'%PEACE%'", PEACE, $text); + $text = preg_replace("'%LOGBUILD%'", $LOG_BUILD, $text); + $text = preg_replace("'%LOGTECH%'", $LOG_TECH, $text); + $text = preg_replace("'%LOGLOGIN%'", $LOG_LOGIN, $text); + $text = preg_replace("'%LOGGOLDFIN%'", $LOG_GOLD_FIN, $text); + $text = preg_replace("'%LOGADMIN%'", $LOG_ADMIN, $text); + $text = preg_replace("'%LOGWAR%'", $LOG_WAR, $text); + $text = preg_replace("'%LOGMARKET%'", $LOG_MARKET, $text); + $text = preg_replace("'%LOGILLEGAL%'", $LOG_ILLEGAL, $text); + $text = preg_replace("'%BOX1%'", $NEWSBOX1, $text); + $text = preg_replace("'%BOX2%'", $NEWSBOX2, $text); + $text = preg_replace("'%BOX3%'", $NEWSBOX3, $text); + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", $LIMIT_MAILBOX, $text); + $text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text); + $text = preg_replace("'%ARANK%'", $_POST['admin_rank'], $text); + $text = preg_replace("'%AEMAIL%'", $_POST['aemail'], $text); + $text = preg_replace("'%ANAME%'", $_POST['aname'], $text); + $text = preg_replace("'%UTRACK%'", "", $text); + $text = preg_replace("'%UTOUT%'", "", $text); + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")"); + +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 new file mode 100644 index 00000000..15a23d6f --- /dev/null +++ b/GameEngine/Admin/Mods/editExtraSet.php @@ -0,0 +1,114 @@ +

Can't open file: GameEngine\config.php"); + + + $T4=(T4_COMING==false)? "false":"true"; + $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; + $QUEST=(QUEST==false)? "false":"true"; + $WW=(WW==false)? "false":"true"; + $SHOW_NATARS=(SHOW_NATARS==false)? "false":"true"; + $AUTH_EMAIL=(AUTH_EMAIL==false)? "false":"true"; + $GREAT_WKS=(GREAT_WKS==false)? "false":"true"; + $REG_OPEN=(REG_OPEN==false)? "false":"true"; + + $LOG_BUILD=(LOG_BUILD==false)? "false":"true"; + $LOG_TECH=(LOG_TECH==false)? "false":"true"; + $LOG_LOGIN=(LOG_LOGIN==false)? "false":"true"; + $LOG_GOLD_FIN=(LOG_GOLD_FIN==false)? "false":"true"; + $LOG_ADMIN=(LOG_ADMIN==false)? "false":"true"; + $LOG_WAR=(LOG_WAR==false)? "false":"true"; + $LOG_MARKET=(LOG_MARKET==false)? "false":"true"; + $LOG_ILLEGAL=(LOG_ILLEGAL==false)? "false":"true"; + $NEWSBOX1=(NEWSBOX1==false)? "false":"true"; + $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; + $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; + $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; + + $text = file_get_contents("constant_format.tpl"); + $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); + $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", LANG, $text); + $text = preg_replace("'%SPEED%'", SPEED, $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", $GP_ENABLE, $text); + $text = preg_replace("'%GP_LOCATE%'", "gpack/travian_default/", $text); + $text = preg_replace("'%INCSPEED%'", INCREASE_SPEED, $text); + $text = preg_replace("'%EVASIONSPEED%'", EVASION_SPEED, $text); + $text = preg_replace("'%TRADERCAP%'", TRADER_CAPACITY, $text); + $text = preg_replace("'%CRANNYCAP%'", CRANNY_CAPACITY, $text); + $text = preg_replace("'%TRAPPERCAP%'", TRAPPER_CAPACITY, $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", CP, $text); + $text = preg_replace("'%DEMOLISH%'", DEMOLISH_LEVEL_REQ, $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", STORAGE_MULTIPLIER, $text); + $text = preg_replace("'%QUEST%'", $QUEST, $text); + $text = preg_replace("'%QTYPE%'", QTYPE, $text); + $text = preg_replace("'%BEGINNER%'", PROTECTION, $text); + $text = preg_replace("'%WW%'", $WW, $text); + $text = preg_replace("'%SHOW_NATARS%'", $SHOW_NATARS, $text); + $text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text); + $text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text); + $text = preg_replace("'%T4_COMING%'", $T4, $text); + $text = preg_replace("'%ACTIVATE%'", $AUTH_EMAIL, $text); + $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text); + $text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text); + $text = preg_replace("'%GREAT_WKS%'", $GREAT_WKS, $text); + $text = preg_replace("'%TS_THRESHOLD%'", TS_THRESHOLD, $text); + $text = preg_replace("'%REG_OPEN%'", $REG_OPEN, $text); + $text = preg_replace("'%PEACE%'", PEACE, $text); + $text = preg_replace("'%LOGBUILD%'", $LOG_BUILD, $text); + $text = preg_replace("'%LOGTECH%'", $LOG_TECH, $text); + $text = preg_replace("'%LOGLOGIN%'", $LOG_LOGIN, $text); + $text = preg_replace("'%LOGGOLDFIN%'", $LOG_GOLD_FIN, $text); + $text = preg_replace("'%LOGADMIN%'", $LOG_ADMIN, $text); + $text = preg_replace("'%LOGWAR%'", $LOG_WAR, $text); + $text = preg_replace("'%LOGMARKET%'", $LOG_MARKET, $text); + $text = preg_replace("'%LOGILLEGAL%'", $LOG_ILLEGAL, $text); + $text = preg_replace("'%BOX1%'", $NEWSBOX1, $text); + $text = preg_replace("'%BOX2%'", $NEWSBOX2, $text); + $text = preg_replace("'%BOX3%'", $NEWSBOX3, $text); + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", $_POST['limit_mailbox'], $text); + $text = preg_replace("'%MAX_MAILS%'", 30, $text); + $text = preg_replace("'%ARANK%'", $INCLUDE_ADMIN, $text); + $text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text); + $text = preg_replace("'%ANAME%'", ADMIN_NAME, $text); + $text = preg_replace("'%UTRACK%'", "", $text); + $text = preg_replace("'%UTOUT%'", "", $text); + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")"); + +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 new file mode 100644 index 00000000..0bc98f6b --- /dev/null +++ b/GameEngine/Admin/Mods/editLogSet.php @@ -0,0 +1,109 @@ +

Can't open file: GameEngine\config.php"); + + + $T4=(T4_COMING==false)? "false":"true"; + $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; + $QUEST=(QUEST==false)? "false":"true"; + $WW=(WW==false)? "false":"true"; + $SHOW_NATARS=(SHOW_NATARS==false)? "false":"true"; + $AUTH_EMAIL=(AUTH_EMAIL==false)? "false":"true"; + $GREAT_WKS=(GREAT_WKS==false)? "false":"true"; + $REG_OPEN=(REG_OPEN==false)? "false":"true"; + + $NEWSBOX1=(NEWSBOX1==false)? "false":"true"; + $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; + $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; + $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; + $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; + + $text = file_get_contents("constant_format.tpl"); + $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); + $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", LANG, $text); + $text = preg_replace("'%SPEED%'", SPEED, $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", $GP_ENABLE, $text); + $text = preg_replace("'%GP_LOCATE%'", "gpack/travian_default/", $text); + $text = preg_replace("'%INCSPEED%'", INCREASE_SPEED, $text); + $text = preg_replace("'%EVASIONSPEED%'", EVASION_SPEED, $text); + $text = preg_replace("'%TRADERCAP%'", TRADER_CAPACITY, $text); + $text = preg_replace("'%CRANNYCAP%'", CRANNY_CAPACITY, $text); + $text = preg_replace("'%TRAPPERCAP%'", TRAPPER_CAPACITY, $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", CP, $text); + $text = preg_replace("'%DEMOLISH%'", DEMOLISH_LEVEL_REQ, $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", STORAGE_MULTIPLIER, $text); + $text = preg_replace("'%QUEST%'", $QUEST, $text); + $text = preg_replace("'%QTYPE%'", QTYPE, $text); + $text = preg_replace("'%BEGINNER%'", PROTECTION, $text); + $text = preg_replace("'%WW%'", $WW, $text); + $text = preg_replace("'%SHOW_NATARS%'", $SHOW_NATARS, $text); + $text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text); + $text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text); + $text = preg_replace("'%T4_COMING%'", $T4, $text); + $text = preg_replace("'%ACTIVATE%'", $AUTH_EMAIL, $text); + $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text); + $text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text); + $text = preg_replace("'%GREAT_WKS%'", $GREAT_WKS, $text); + $text = preg_replace("'%TS_THRESHOLD%'", TS_THRESHOLD, $text); + $text = preg_replace("'%REG_OPEN%'", $REG_OPEN, $text); + $text = preg_replace("'%PEACE%'", PEACE, $text); + //update + $text = preg_replace("'%LOGBUILD%'", $_POST['log_build'], $text); + $text = preg_replace("'%LOGTECH%'", $_POST['log_tech'], $text); + $text = preg_replace("'%LOGLOGIN%'", $_POST['log_login'], $text); + $text = preg_replace("'%LOGGOLDFIN%'", $_POST['log_gold_fin'], $text); + $text = preg_replace("'%LOGADMIN%'", $_POST['log_admin'], $text); + $text = preg_replace("'%LOGWAR%'", $_POST['log_war'], $text); + $text = preg_replace("'%LOGMARKET%'", $_POST['log_market'], $text); + $text = preg_replace("'%LOGILLEGAL%'", $_POST['log_illegal'], $text); + //end update + $text = preg_replace("'%BOX1%'", $NEWSBOX1, $text); + $text = preg_replace("'%BOX2%'", $NEWSBOX2, $text); + $text = preg_replace("'%BOX3%'", $NEWSBOX3, $text); + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", $LIMIT_MAILBOX, $text); + $text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text); + $text = preg_replace("'%ARANK%'", $INCLUDE_ADMIN, $text); + $text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text); + $text = preg_replace("'%ANAME%'", ADMIN_NAME, $text); + $text = preg_replace("'%UTRACK%'", "", $text); + $text = preg_replace("'%UTOUT%'", "", $text); + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")"); + +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 new file mode 100644 index 00000000..db2e35b5 --- /dev/null +++ b/GameEngine/Admin/Mods/editNewsboxSet.php @@ -0,0 +1,116 @@ +

Can't open file: GameEngine\config.php"); + + + $T4=(T4_COMING==false)? "false":"true"; + $GP_ENABLE=(GP_ENABLE==false)? "false":"true"; + $QUEST=(QUEST==false)? "false":"true"; + $WW=(WW==false)? "false":"true"; + $SHOW_NATARS=(SHOW_NATARS==false)? "false":"true"; + $AUTH_EMAIL=(AUTH_EMAIL==false)? "false":"true"; + $GREAT_WKS=(GREAT_WKS==false)? "false":"true"; + $REG_OPEN=(REG_OPEN==false)? "false":"true"; + + $LOG_BUILD=(LOG_BUILD==false)? "false":"true"; + $LOG_TECH=(LOG_TECH==false)? "false":"true"; + $LOG_LOGIN=(LOG_LOGIN==false)? "false":"true"; + $LOG_GOLD_FIN=(LOG_GOLD_FIN==false)? "false":"true"; + $LOG_ADMIN=(LOG_ADMIN==false)? "false":"true"; + $LOG_WAR=(LOG_WAR==false)? "false":"true"; + $LOG_MARKET=(LOG_MARKET==false)? "false":"true"; + $LOG_ILLEGAL=(LOG_ILLEGAL==false)? "false":"true"; + + + $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; + $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; + + $text = file_get_contents("constant_format.tpl"); + $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); + $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", LANG, $text); + $text = preg_replace("'%SPEED%'", SPEED, $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", $GP_ENABLE, $text); + $text = preg_replace("'%GP_LOCATE%'", "gpack/travian_default/", $text); + $text = preg_replace("'%INCSPEED%'", INCREASE_SPEED, $text); + $text = preg_replace("'%EVASIONSPEED%'", EVASION_SPEED, $text); + $text = preg_replace("'%TRADERCAP%'", TRADER_CAPACITY, $text); + $text = preg_replace("'%CRANNYCAP%'", CRANNY_CAPACITY, $text); + $text = preg_replace("'%TRAPPERCAP%'", TRAPPER_CAPACITY, $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", CP, $text); + $text = preg_replace("'%DEMOLISH%'", DEMOLISH_LEVEL_REQ, $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", STORAGE_MULTIPLIER, $text); + $text = preg_replace("'%QUEST%'", $QUEST, $text); + $text = preg_replace("'%QTYPE%'", QTYPE, $text); + $text = preg_replace("'%BEGINNER%'", PROTECTION, $text); + $text = preg_replace("'%WW%'", $WW, $text); + $text = preg_replace("'%SHOW_NATARS%'", $SHOW_NATARS, $text); + $text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text); + $text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text); + $text = preg_replace("'%T4_COMING%'", $T4, $text); + $text = preg_replace("'%ACTIVATE%'", $AUTH_EMAIL, $text); + $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text); + $text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text); + $text = preg_replace("'%GREAT_WKS%'", $GREAT_WKS, $text); + $text = preg_replace("'%TS_THRESHOLD%'", TS_THRESHOLD, $text); + $text = preg_replace("'%REG_OPEN%'", $REG_OPEN, $text); + $text = preg_replace("'%PEACE%'", PEACE, $text); + $text = preg_replace("'%LOGBUILD%'", $LOG_BUILD, $text); + $text = preg_replace("'%LOGTECH%'", $LOG_TECH, $text); + $text = preg_replace("'%LOGLOGIN%'", $LOG_LOGIN, $text); + $text = preg_replace("'%LOGGOLDFIN%'", $LOG_GOLD_FIN, $text); + $text = preg_replace("'%LOGADMIN%'", $LOG_ADMIN, $text); + $text = preg_replace("'%LOGWAR%'", $LOG_WAR, $text); + $text = preg_replace("'%LOGMARKET%'", $LOG_MARKET, $text); + $text = preg_replace("'%LOGILLEGAL%'", $LOG_ILLEGAL, $text); + //update + $text = preg_replace("'%BOX1%'", $_POST['box1'], $text); + $text = preg_replace("'%BOX2%'", $_POST['box2'], $text); + $text = preg_replace("'%BOX3%'", $_POST['box3'], $text); + //end update + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", $LIMIT_MAILBOX, $text); + $text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text); + $text = preg_replace("'%ARANK%'", $INCLUDE_ADMIN, $text); + $text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text); + $text = preg_replace("'%ANAME%'", ADMIN_NAME, $text); + $text = preg_replace("'%UTRACK%'", "", $text); + $text = preg_replace("'%UTOUT%'", "", $text); + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")"); + +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 new file mode 100644 index 00000000..c5cd6869 --- /dev/null +++ b/GameEngine/Admin/Mods/editServerSet.php @@ -0,0 +1,107 @@ +

Can't open file: GameEngine\config.php"); + + $T4=(T4_COMING==false)? "false":"true"; + $LOG_BUILD=(LOG_BUILD==false)? "false":"true"; + $LOG_TECH=(LOG_TECH==false)? "false":"true"; + $LOG_LOGIN=(LOG_LOGIN==false)? "false":"true"; + $LOG_GOLD_FIN=(LOG_GOLD_FIN==false)? "false":"true"; + $LOG_ADMIN=(LOG_ADMIN==false)? "false":"true"; + $LOG_WAR=(LOG_WAR==false)? "false":"true"; + $LOG_MARKET=(LOG_MARKET==false)? "false":"true"; + $LOG_ILLEGAL=(LOG_ILLEGAL==false)? "false":"true"; + $NEWSBOX1=(NEWSBOX1==false)? "false":"true"; + $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; + $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; + $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; + $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; + + + $text = file_get_contents("constant_format.tpl"); + $text = preg_replace("'%ERROR%'", $_POST['error'], $text); + $text = preg_replace("'%SERVERNAME%'", $_POST['servername'], $text); + $text = preg_replace("'%STIMEZONE%'", $_POST['tzone'], $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", $_POST['lang'], $text); + $text = preg_replace("'%SPEED%'", $_POST['speed'], $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", $_POST['gpack'], $text); + $text = preg_replace("'%GP_LOCATE%'", "gpack/travian_default/", $text); + $text = preg_replace("'%INCSPEED%'", $_POST['incspeed'], $text); + $text = preg_replace("'%EVASIONSPEED%'", $_POST['evasionspeed'], $text); + $text = preg_replace("'%TRADERCAP%'", $_POST['tradercap'], $text); + $text = preg_replace("'%CRANNYCAP%'", $_POST['crannycap'], $text); + $text = preg_replace("'%TRAPPERCAP%'", $_POST['trappercap'], $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", $_POST['village_expand'], $text); + $text = preg_replace("'%DEMOLISH%'", $_POST['demolish'], $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", $_POST['storage_multiplier'], $text); + $text = preg_replace("'%QUEST%'", $_POST['quest'], $text); + $text = preg_replace("'%QTYPE%'", $_POST['qtype'], $text); + $text = preg_replace("'%BEGINNER%'", $_POST['beginner'], $text); + $text = preg_replace("'%WW%'", $_POST['ww'], $text); + $text = preg_replace("'%SHOW_NATARS%'", $_POST['show_natars'], $text); + $text = preg_replace("'%NATARS_UNITS%'", $_POST['natars_units'], $text); + $text = preg_replace("'%NATURE_REGTIME%'", $_POST['nature_regtime'], $text); + $text = preg_replace("'%T4_COMING%'", $T4, $text); + $text = preg_replace("'%ACTIVATE%'", $_POST['activate'], $text); + $text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", $_POST['plus_production'], $text); + $text = preg_replace("'%MEDALINTERVAL%'", $_POST['medalinterval'], $text); + $text = preg_replace("'%GREAT_WKS%'", $_POST['great_wks'], $text); + $text = preg_replace("'%TS_THRESHOLD%'", $_POST['ts_threshold'], $text); + $text = preg_replace("'%REG_OPEN%'", $_POST['reg_open'], $text); + $text = preg_replace("'%PEACE%'", $_POST['peace'], $text); + $text = preg_replace("'%LOGBUILD%'", $LOG_BUILD, $text); + $text = preg_replace("'%LOGTECH%'", $LOG_TECH, $text); + $text = preg_replace("'%LOGLOGIN%'", $LOG_LOGIN, $text); + $text = preg_replace("'%LOGGOLDFIN%'", $LOG_GOLD_FIN, $text); + $text = preg_replace("'%LOGADMIN%'", $LOG_ADMIN, $text); + $text = preg_replace("'%LOGWAR%'", $LOG_WAR, $text); + $text = preg_replace("'%LOGMARKET%'", $LOG_MARKET, $text); + $text = preg_replace("'%LOGILLEGAL%'", $LOG_ILLEGAL, $text); + $text = preg_replace("'%BOX1%'", $NEWSBOX1, $text); + $text = preg_replace("'%BOX2%'", $NEWSBOX2, $text); + $text = preg_replace("'%BOX3%'", $NEWSBOX3, $text); + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", $LIMIT_MAILBOX, $text); + $text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text); + $text = preg_replace("'%ARANK%'", $INCLUDE_ADMIN, $text); + $text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text); + $text = preg_replace("'%ANAME%'", ADMIN_NAME, $text); + $text = preg_replace("'%UTRACK%'", "", $text); + $text = preg_replace("'%UTOUT%'", "", $text); + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed server setting',".time().")"); + +header("Location: ../../../Admin/admin.php?p=config"); + +?> \ No newline at end of file