mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-12 07:36:07 +00:00
updates admin
This commit is contained in:
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
############################### S T A R T ################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename config.php ##
|
||||
## Version 4.8.5 ##
|
||||
## Developed by: Dzoki and Dixie Edited by Advocaite ##
|
||||
## Rework by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
//////////////////////////////////
|
||||
// ***** ERROR REPORTING *****//
|
||||
//////////////////////////////////
|
||||
// (E_ALL ^ E_NOTICE) = enabled
|
||||
// (0) = disabled
|
||||
%ERROR%
|
||||
|
||||
//////////////////////////////////
|
||||
// ***** SERVER SETTINGS *****//
|
||||
//////////////////////////////////
|
||||
|
||||
// ***** Name
|
||||
define("SERVER_NAME","%SERVERNAME%");
|
||||
|
||||
// ***** Time zone
|
||||
// Defines server time zone.
|
||||
define("TIMEZONE","%STIMEZONE%");
|
||||
date_default_timezone_set(TIMEZONE);
|
||||
|
||||
// ***** Started
|
||||
// Defines when has server started.
|
||||
define("COMMENCE","%STARTTIME%");
|
||||
|
||||
// ***** Server Start Date / Time
|
||||
define("START_DATE", "%SSTARTDATE%");
|
||||
define("START_TIME", "%SSTARTTIME%");
|
||||
|
||||
// ***** Language
|
||||
// Choose your server language.
|
||||
define("LANG","%LANG%");
|
||||
|
||||
// ***** Speed
|
||||
// Choose your server speed. NOTICE: Higher speed, more likely
|
||||
// to have some bugs. Lower speed, most likely no major bugs.
|
||||
// Values: 1 (normal), 3 (3x speed) etc...
|
||||
define("SPEED", "%SPEED%");
|
||||
|
||||
// ***** World size
|
||||
// Defines world size. NOTICE: DO NOT EDIT!!
|
||||
define("WORLD_MAX", "%MAX%");
|
||||
|
||||
// ***** Graphic Pack
|
||||
// True = enabled, false = disabled
|
||||
//!!!!!!!!!!!! DO NOT ENABLE !!!!!!!!!!!!
|
||||
define("GP_ENABLE",%GP%);
|
||||
// Graphic pack location (default: gpack/travian_default/)
|
||||
define("GP_LOCATE", "gpack/travian_default/");
|
||||
|
||||
// ***** Troop Speed
|
||||
// Values: 1 (normal), 3 (3x speed) etc...
|
||||
define("INCREASE_SPEED","%INCSPEED%");
|
||||
|
||||
// ***** Evasion Speed
|
||||
define("EVASION_SPEED","%EVASIONSPEED%");
|
||||
|
||||
// ***** Trader capacity
|
||||
// Values: 1 (normal), 3 (3x speed) etc...
|
||||
define("TRADER_CAPACITY","%TRADERCAP%");
|
||||
|
||||
// ***** Cranny capacity
|
||||
define("CRANNY_CAPACITY","%CRANNYCAP%");
|
||||
|
||||
// ***** Trapper capacity
|
||||
define("TRAPPER_CAPACITY","%TRAPPERCAP%");
|
||||
|
||||
// ***** Village Expand
|
||||
// 1 = slow village expanding - more Cultural Points needed for every new village
|
||||
// 0 = fast village expanding - less Cultural Points needed for every new village
|
||||
define("CP", %VILLAGE_EXPAND%);
|
||||
|
||||
// ***** Demolish Level Required
|
||||
// Defines which level of Main building is required to be able to
|
||||
// demolish. Min value = 1, max value = 20
|
||||
// Default: 10
|
||||
define("DEMOLISH_LEVEL_REQ","%DEMOLISH%");
|
||||
|
||||
// ***** Change storage capacity
|
||||
define("STORAGE_MULTIPLIER","%STORAGE_MULTIPLIER%");
|
||||
define("STORAGE_BASE",800*STORAGE_MULTIPLIER);
|
||||
|
||||
// ***** Quest
|
||||
// Ingame quest enabled/disabled.
|
||||
define("QUEST",%QUEST%);
|
||||
//quest type : 25 = Travian Official
|
||||
// 37 = Extended
|
||||
define("QTYPE",%QTYPE%);
|
||||
|
||||
// ***** Beginners Protection
|
||||
// 3600 = 1 hour
|
||||
// 3600*12 = 12 hours
|
||||
// 3600*24 = 1 day
|
||||
// 3600*24*3 = 3 days
|
||||
// You can choose any value you want!
|
||||
define("PROTECTION","%BEGINNER%");
|
||||
|
||||
// ***** Enable WW Statistics
|
||||
define("WW",%WW%);
|
||||
|
||||
// ***** Show Natars in Statistics
|
||||
define("SHOW_NATARS",%SHOW_NATARS%);
|
||||
|
||||
// ***** Natars Units Multiplier
|
||||
define("NATARS_UNITS",%NATARS_UNITS%);
|
||||
|
||||
// ***** Nature troops regeneration time
|
||||
define("NATURE_REGTIME",%NATURE_REGTIME%);
|
||||
|
||||
// ***** Enable T4 is Coming screen
|
||||
define("T4_COMING",%T4_COMING%);
|
||||
|
||||
// ***** Activation Mail
|
||||
// true = activation mail will be sent, users will have to finish registration
|
||||
// by clicking on link recieved in mail.
|
||||
// false = users can register with any mail. Not needed to be real one.
|
||||
define("AUTH_EMAIL",%ACTIVATE%);
|
||||
|
||||
// ***** PLUS
|
||||
//Plus account lenght
|
||||
define("PLUS_TIME",%PLUS_TIME%);
|
||||
//+25% production lenght
|
||||
define("PLUS_PRODUCTION",%PLUS_PRODUCTION%);
|
||||
// ***** Medal Interval check
|
||||
define("MEDALINTERVAL",%MEDALINTERVAL%);
|
||||
// ***** Great Workshop
|
||||
define("GREAT_WKS",%GREAT_WKS%);
|
||||
// ***** Tourn threshold
|
||||
define("TS_THRESHOLD",%TS_THRESHOLD%);
|
||||
|
||||
// ***** Register open/close
|
||||
define("REG_OPEN",%REG_OPEN%);
|
||||
|
||||
// ***** Peace system
|
||||
// 0 = None
|
||||
// 1 = Normal
|
||||
// 2 = Christmas
|
||||
// 3 = New Year
|
||||
// 4 = Easter
|
||||
define("PEACE",%PEACE%);
|
||||
|
||||
//////////////////////////////////
|
||||
// **** LOG SETTINGS **** //
|
||||
//////////////////////////////////
|
||||
// LOG BUILDING/UPGRADING
|
||||
define("LOG_BUILD",%LOGBUILD%);
|
||||
// LOG RESEARCHES
|
||||
define("LOG_TECH",%LOGTECH%);
|
||||
// LOG USER LOGIN (IP's)
|
||||
define("LOG_LOGIN",%LOGLOGIN%);
|
||||
// LOG GOLD
|
||||
define("LOG_GOLD_FIN",%LOGGOLDFIN%);
|
||||
// LOG ADMIN
|
||||
define("LOG_ADMIN",%LOGADMIN%);
|
||||
// LOG ATTACK REPORTS
|
||||
define("LOG_WAR",%LOGWAR%);
|
||||
// LOG MARKET REPORTS
|
||||
define("LOG_MARKET",%LOGMARKET%);
|
||||
// LOG ILLEGAL ACTIONS
|
||||
define("LOG_ILLEGAL",%LOGILLEGAL%);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// **** NEWSBOX SETTINGS **** //
|
||||
//////////////////////////////////
|
||||
//true = enabled
|
||||
//false = disabled
|
||||
define("NEWSBOX1",%BOX1%);
|
||||
define("NEWSBOX2",%BOX2%);
|
||||
define("NEWSBOX3",%BOX3%);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// **** SQL SETTINGS **** //
|
||||
//////////////////////////////////
|
||||
|
||||
// ***** SQL Hostname
|
||||
// example. sql106.000space.com / localhost
|
||||
// If you host server on own PC than this value is: localhost
|
||||
// If you use online hosting, value must be written in host cpanel
|
||||
define("SQL_SERVER", "%SSERVER%");
|
||||
|
||||
// ***** Database Username
|
||||
define("SQL_USER", "%SUSER%");
|
||||
|
||||
// ***** Database Password
|
||||
define("SQL_PASS", "%SPASS%");
|
||||
|
||||
// ***** Database Name
|
||||
define("SQL_DB", "%SDB%");
|
||||
|
||||
// ***** Database - Table Prefix
|
||||
define("TB_PREFIX", "%PREFIX%");
|
||||
|
||||
// ***** Database type
|
||||
// 0 = MYSQL
|
||||
// 1 = MYSQLi
|
||||
// default: 1
|
||||
define("DB_TYPE", %CONNECTT%);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
// **** EXTRA SETTINGS **** //
|
||||
////////////////////////////////////
|
||||
|
||||
// ***** Censore words
|
||||
//define("WORD_CENSOR", "%ACTCEN%");
|
||||
|
||||
// ***** Words (censore)
|
||||
// Choose which words do you want to be censored
|
||||
//define("CENSORED","%CENWORDS%");
|
||||
|
||||
|
||||
// ***** Limit Mailbox
|
||||
// Limits mailbox to defined number of mails. (IGM's)
|
||||
define("LIMIT_MAILBOX",%LIMIT_MAILBOX%);
|
||||
// If enabled, define number of maximum mails.
|
||||
define("MAX_MAIL","%MAX_MAILS%");
|
||||
|
||||
// ***** Include administrator in statistics/rank
|
||||
define("INCLUDE_ADMIN", %ARANK%);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
// **** ADMIN SETTINGS **** //
|
||||
////////////////////////////////////
|
||||
|
||||
// ***** Admin Email
|
||||
define("ADMIN_EMAIL", "%AEMAIL%");
|
||||
|
||||
// ***** Admin Name
|
||||
define("ADMIN_NAME", "%ANAME%");
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
// **** DO NOT EDIT SETTINGS **** //
|
||||
//////////////////////////////////////////
|
||||
define("TRACK_USR","%UTRACK%");
|
||||
define("USER_TIMEOUT","%UTOUT%");
|
||||
define("ALLOW_BURST",false);
|
||||
define("BASIC_MAX",1);
|
||||
define("INNER_MAX",1);
|
||||
define("PLUS_MAX",1);
|
||||
define("ALLOW_ALL_TRIBE",false);
|
||||
define("CFM_ADMIN_ACT",true);
|
||||
define("SERVER_WEB_ROOT",false);
|
||||
define("USRNM_SPECIAL",true);
|
||||
define("USRNM_MIN_LENGTH",3);
|
||||
define("PW_MIN_LENGTH",4);
|
||||
define("BANNED",0);
|
||||
define("AUTH",1);
|
||||
define("USER",2);
|
||||
define("MULTIHUNTER",8);
|
||||
define("ADMIN",9);
|
||||
define("COOKIE_EXPIRE", 60*60*24*7);
|
||||
define("COOKIE_PATH", "/");
|
||||
define("MODERATOR",4);
|
||||
define("AUTO_DEL_INACTIVE",false);
|
||||
define("UN_ACT_TIME",3600);
|
||||
|
||||
////////////////////////////////////////////
|
||||
// **** DOMAIN/SERVER SETTINGS **** //
|
||||
////////////////////////////////////////////
|
||||
define("DOMAIN", "%DOMAIN%");
|
||||
define("HOMEPAGE", "%HOMEPAGE%");
|
||||
define("SERVER", "%SERVER%");
|
||||
|
||||
$requse = 0;
|
||||
|
||||
############################### E N D ##################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename config.php ##
|
||||
## Version 4.8.5 ##
|
||||
## Developed by: Dzoki and Dixie Edited by Advocaite ##
|
||||
## Rework by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editAdminInfo.php ##
|
||||
## Developed 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);
|
||||
include_once("../../Database.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>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");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editExtraSet.php ##
|
||||
## Developed 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);
|
||||
include_once("../../Database.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>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");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editLogSet.php ##
|
||||
## Developed 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);
|
||||
include_once("../../Database.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>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");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editNewsboxSet.php ##
|
||||
## Developed 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);
|
||||
include_once("../../Database.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>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");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editServerSet.php ##
|
||||
## Developed 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);
|
||||
include_once("../../Database.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>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");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user