mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
+4
-1
@@ -28,4 +28,7 @@ GameEngine/Notes/*
|
||||
.settings
|
||||
|
||||
# PHPStorm
|
||||
.idea
|
||||
.idea
|
||||
|
||||
# additional constant_format.tpl file, copied over from the installation folder
|
||||
GameEngine/Admin/Mods/constant_format.tpl
|
||||
@@ -325,6 +325,10 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
<td>Hostname</td>
|
||||
<td><?php echo SQL_SERVER;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Port</td>
|
||||
<td><?php echo SQL_PORT;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DB Username</td>
|
||||
<td><?php echo SQL_USER;?></td>
|
||||
|
||||
@@ -89,6 +89,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX2%'", $NEWSBOX2, $text);
|
||||
$text = preg_replace("'%BOX3%'", $NEWSBOX3, $text);
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -86,6 +86,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX2%'", (NEWSBOX2 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%BOX3%'", (NEWSBOX3 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -86,6 +86,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX2%'", $NEWSBOX2, $text);
|
||||
$text = preg_replace("'%BOX3%'", $NEWSBOX3, $text);
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -93,6 +93,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX3%'", $_POST['box3'], $text);
|
||||
//end update
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -70,6 +70,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX2%'", (NEWSBOX2 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%BOX3%'", (NEWSBOX3 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -81,6 +81,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%BOX2%'", $NEWSBOX2, $text);
|
||||
$text = preg_replace("'%BOX3%'", $NEWSBOX3, $text);
|
||||
$text = preg_replace("'%SSERVER%'", SQL_SERVER, $text);
|
||||
$text = str_replace("%SPORT%", SQL_PORT, $text);
|
||||
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
|
||||
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
|
||||
$text = preg_replace("'%SDB%'", SQL_DB, $text);
|
||||
|
||||
@@ -5350,7 +5350,7 @@ References:
|
||||
// database is not needed if we're displaying static pages
|
||||
$req_file = basename($_SERVER['PHP_SELF']);
|
||||
if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
|
||||
$database = new MYSQLi_DB(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB);
|
||||
$database = new MYSQLi_DB(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB, SQL_PORT);
|
||||
$link = $database->return_link();
|
||||
$GLOBALS['db'] = $database;
|
||||
$GLOBALS['link'] = $database->return_link();
|
||||
|
||||
@@ -10,6 +10,28 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
global $autoprefix;
|
||||
|
||||
// even with autoloader created, we can't use it here yet, as it's not been created
|
||||
// ... so, let's see where it is and include it
|
||||
$autoloader_found = false;
|
||||
// go max 5 levels up - we don't have folders that go deeper than that
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$autoprefix = str_repeat('../', $i);
|
||||
if (file_exists($autoprefix.'autoloader.php')) {
|
||||
$autoloader_found = true;
|
||||
include_once $autoprefix.'autoloader.php';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$autoloader_found) {
|
||||
die('Could not find autoloading class.');
|
||||
}
|
||||
|
||||
// this is needed for installation, since the lang file would not be included yet
|
||||
include_once($autoprefix."GameEngine/lang/en.php");
|
||||
|
||||
class Technology {
|
||||
|
||||
public $unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
|
||||
@@ -54,7 +54,7 @@ define("SPEED", "%SPEED%");
|
||||
define("WORLD_MAX", "%MAX%");
|
||||
|
||||
// ***** Graphic Pack
|
||||
// True = enabled, false = disabled
|
||||
// true = enabled, false = disabled
|
||||
//!!!!!!!!!!!! DO NOT ENABLE !!!!!!!!!!!!
|
||||
define("GP_ENABLE",false);
|
||||
// Graphic pack location (default: gpack/travian_default/)
|
||||
@@ -213,11 +213,15 @@ define("NEWSBOX3",%BOX3%);
|
||||
//////////////////////////////////
|
||||
|
||||
// ***** SQL Hostname
|
||||
// example. sql106.000space.com / localhost
|
||||
// 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%");
|
||||
|
||||
// ***** SQL Port
|
||||
// default: 3306
|
||||
define("SQL_PORT", %SPORT%);
|
||||
|
||||
// ***** Database Username
|
||||
define("SQL_USER", "%SUSER%");
|
||||
|
||||
|
||||
+104
-88
@@ -32,104 +32,120 @@ class Process {
|
||||
}
|
||||
|
||||
private function constForm() {
|
||||
$myFile = "../GameEngine/config.php";
|
||||
$fh = @fopen($myFile, 'w') or die("<br/><br/><br/>Can't create or update file: GameEngine\config.php");
|
||||
$configFile = "../GameEngine/config.php";
|
||||
$configTemplateFile = "../GameEngine/Admin/Mods/constant_format.tpl";
|
||||
|
||||
$gameConfig = @fopen($configFile, 'w') or die("<br/><br/><br/>Can't create or update file: GameEngine\config.php");
|
||||
|
||||
// copy the contents of the config template file into a new location, used when editing
|
||||
// game configuration from the in-game Admin (since the install folder would be deleted at that point)
|
||||
$templateFile = @fopen($configTemplateFile, 'w') or die("<br/><br/><br/>Can't create or update file: GameEngine\Admin\Mods\constant_format.tpl");
|
||||
fclose($templateFile);
|
||||
|
||||
$text = file_get_contents("data/constant_format.tpl");
|
||||
$text = preg_replace("'%SERVERNAME%'", $_POST['servername'], $text);
|
||||
$text = preg_replace("'%SSTARTDATE%'", $_POST['start_date'], $text);
|
||||
$text = preg_replace("'%SSTARTTIME%'", $_POST['start_time'], $text);
|
||||
|
||||
// make template copy
|
||||
file_put_contents($configTemplateFile, $text);
|
||||
|
||||
// continue with text replacements
|
||||
$findReplace = [];
|
||||
|
||||
$findReplace["%SERVERNAME%"] = $_POST['servername'];
|
||||
$findReplace["%SSTARTDATE%"] = $_POST['start_date'];
|
||||
$findReplace["%SSTARTTIME%"] = $_POST['start_time'];
|
||||
|
||||
$tz = explode(",",$_POST['tzone']);
|
||||
$text = preg_replace("'%STIMEZONE%'", $tz[1], $text);
|
||||
$text = preg_replace("'%LANG%'", $_POST['lang'], $text);
|
||||
$text = preg_replace("'%SPEED%'", $_POST['speed'], $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("'%STORAGE_MULTIPLIER%'", $_POST['storage_multiplier'], $text);
|
||||
//$text = preg_replace("'%UTRACK%'", $_POST['trackusers'], $text);
|
||||
//$text = preg_replace("'%UTOUT%'", $_POST['timeout'], $text);
|
||||
//$text = preg_replace("'%AUTOD%'", $_POST['autodel'], $text);
|
||||
//$text = preg_replace("'%AUTODT%'", $_POST['autodeltime'], $text);
|
||||
$text = preg_replace("'%MAX%'", $_POST['wmax'], $text);
|
||||
//$text = preg_replace("'%GP%'", $_POST['gpack'], $text);
|
||||
$text = preg_replace("'%SSERVER%'", $_POST['sserver'], $text);
|
||||
$text = preg_replace("'%SUSER%'", $_POST['suser'], $text);
|
||||
$text = preg_replace("'%SPASS%'", $_POST['spass'], $text);
|
||||
$text = preg_replace("'%SDB%'", $_POST['sdb'], $text);
|
||||
$text = preg_replace("'%PREFIX%'", $_POST['prefix'], $text);
|
||||
$text = preg_replace("'%CONNECTT%'", $_POST['connectt'], $text);
|
||||
$text = preg_replace("'%AEMAIL%'", $_POST['aemail'], $text);
|
||||
$text = preg_replace("'%ANAME%'", $_POST['aname'], $text);
|
||||
$text = preg_replace("'%ASUPPMSGS%'", ($_POST['admin_support_msgs'] == 'True' ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%ARAIDS%'", ($_POST['admin_raidable'] == 'True' ? 'true' : 'false'), $text);
|
||||
//$text = preg_replace("'%SUBDOM%'", $_POST['subdom'], $text);
|
||||
$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);
|
||||
//$text = preg_replace("'%MINUSERLENGTH%'", $_POST['userlength'], $text);
|
||||
//$text = preg_replace("'%MINPASSLENGTH%'", $_POST['passlength'], $text);
|
||||
//$text = preg_replace("'%SPECIALCHARS%'", $_POST['specialchars'], $text);
|
||||
$text = preg_replace("'%ACTIVATE%'", $_POST['activate'], $text);
|
||||
$text = preg_replace("'%ARANK%'", $_POST['admin_rank'], $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("'%STARTTIME%'", time(), $text);
|
||||
$text = preg_replace("'%DOMAIN%'", $_POST['domain'], $text);
|
||||
$text = preg_replace("'%HOMEPAGE%'", $_POST['homepage'], $text);
|
||||
$text = preg_replace("'%SERVER%'", $_POST['server'], $text);
|
||||
$text = preg_replace("'%LIMIT_MAILBOX%'", $_POST['limit_mailbox'], $text);
|
||||
$text = preg_replace("'%MAX_MAILS%'", $_POST['max_mails'], $text);
|
||||
$text = preg_replace("'%DEMOLISH%'", $_POST['demolish'], $text);
|
||||
$text = preg_replace("'%BOX1%'", $_POST['box1'], $text);
|
||||
$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);
|
||||
$text = preg_replace("'%PLUS_PRODUCTION%'", $_POST['plus_production'], $text);
|
||||
$text = preg_replace("'%PAYPAL_EMAIL%'", $_POST['paypal-email'], $text);
|
||||
$text = preg_replace("'%PAYPAL_CURRENCY%'", $_POST['paypal-currency'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_A_GOLD%'", $_POST['plus-a-gold'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_A_PRICE%'", $_POST['plus-a-price'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_B_GOLD%'", $_POST['plus-b-gold'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_B_PRICE%'", $_POST['plus-b-price'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_C_GOLD%'", $_POST['plus-c-gold'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_C_PRICE%'", $_POST['plus-c-price'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_D_GOLD%'", $_POST['plus-d-gold'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_D_PRICE%'", $_POST['plus-d-price'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_E_GOLD%'", $_POST['plus-e-gold'], $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_E_PRICE%'", $_POST['plus-e-price'], $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("'%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%'", $_POST['t4_coming'], $text);
|
||||
$text = preg_replace("'%REG_OPEN%'", $_POST['reg_open'], $text);
|
||||
$text = preg_replace("'%PEACE%'", $_POST['peace'], $text);
|
||||
$findReplace["%STIMEZONE%"] = $tz[1];
|
||||
$findReplace["%LANG%"] = $_POST['lang'];
|
||||
$findReplace["%SPEED%"] = $_POST['speed'];
|
||||
$findReplace["%INCSPEED%"] = $_POST['incspeed'];
|
||||
$findReplace["%EVASIONSPEED%"] = $_POST['evasionspeed'];
|
||||
$findReplace["%TRADERCAP%"] = $_POST['tradercap'];
|
||||
$findReplace["%CRANNYCAP%"] = $_POST['crannycap'];
|
||||
$findReplace["%TRAPPERCAP%"] = $_POST['trappercap'];
|
||||
$findReplace["%STORAGE_MULTIPLIER%"] = $_POST['storage_multiplier'];
|
||||
//$findReplace["%UTRACK%"] = $_POST['trackusers'];
|
||||
//$findReplace["%UTOUT%"] = $_POST['timeout'];
|
||||
//$findReplace["%AUTOD%"] = $_POST['autodel'];
|
||||
//$findReplace["%AUTODT%"] = $_POST['autodeltime'];
|
||||
$findReplace["%MAX%"] = $_POST['wmax'];
|
||||
//$findReplace["%GP%"] = $_POST['gpack'];
|
||||
$findReplace["%SSERVER%"] = $_POST['sserver'];
|
||||
$findReplace["%SPORT%"] = $_POST['sport'];
|
||||
$findReplace["%SUSER%"] = $_POST['suser'];
|
||||
$findReplace["%SPASS%"] = $_POST['spass'];
|
||||
$findReplace["%SDB%"] = $_POST['sdb'];
|
||||
$findReplace["%PREFIX%"] = $_POST['prefix'];
|
||||
$findReplace["%CONNECTT%"] = $_POST['connectt'];
|
||||
$findReplace["%AEMAIL%"] = $_POST['aemail'];
|
||||
$findReplace["%ANAME%"] = $_POST['aname'];
|
||||
$findReplace["%ASUPPMSGS%"] = ($_POST['admin_support_msgs'] == 'true' ? 'true' : 'false');
|
||||
$findReplace["%ARAIDS%"] = ($_POST['admin_raidable'] == 'true' ? 'true' : 'false');
|
||||
//$findReplace["%SUBDOM%"] = $_POST['subdom'];
|
||||
$findReplace["%LOGBUILD%"] = $_POST['log_build'];
|
||||
$findReplace["%LOGTECH%"] = $_POST['log_tech'];
|
||||
$findReplace["%LOGLOGIN%"] = $_POST['log_login'];
|
||||
$findReplace["%LOGGOLDFIN%"] = $_POST['log_gold_fin'];
|
||||
$findReplace["%LOGADMIN%"] = $_POST['log_admin'];
|
||||
$findReplace["%LOGWAR%"] = $_POST['log_war'];
|
||||
$findReplace["%LOGMARKET%"] = $_POST['log_market'];
|
||||
$findReplace["%LOGILLEGAL%"] = $_POST['log_illegal'];
|
||||
//$findReplace["%MINUSERLENGTH%"] = $_POST['userlength'];
|
||||
//$findReplace["%MINPASSLENGTH%"] = $_POST['passlength'];
|
||||
//$findReplace["%SPECIALCHARS%"] = $_POST['specialchars'];
|
||||
$findReplace["%ACTIVATE%"] = $_POST['activate'];
|
||||
$findReplace["%ARANK%"] = $_POST['admin_rank'];
|
||||
$findReplace["%QUEST%"] = $_POST['quest'];
|
||||
$findReplace["%QTYPE%"] = $_POST['qtype'];
|
||||
$findReplace["%BEGINNER%"] = $_POST['beginner'];
|
||||
$findReplace["%STARTTIME%"] = time();
|
||||
$findReplace["%DOMAIN%"] = $_POST['domain'];
|
||||
$findReplace["%HOMEPAGE%"] = $_POST['homepage'];
|
||||
$findReplace["%SERVER%"] = $_POST['server'];
|
||||
$findReplace["%LIMIT_MAILBOX%"] = $_POST['limit_mailbox'];
|
||||
$findReplace["%MAX_MAILS%"] = $_POST['max_mails'];
|
||||
$findReplace["%DEMOLISH%"] = $_POST['demolish'];
|
||||
$findReplace["%BOX1%"] = $_POST['box1'];
|
||||
$findReplace["%BOX2%"] = $_POST['box2'];
|
||||
$findReplace["%BOX3%"] = $_POST['box3'];
|
||||
$findReplace["%VILLAGE_EXPAND%"] = $_POST['village_expand'];
|
||||
$findReplace["%ERRORREPORT%"] = $_POST['error'];
|
||||
$findReplace["%ERROR%"] = $_POST['error'];
|
||||
//$findReplace["%GP_LOCATE%"] = $_POST['gp_locate'];
|
||||
$findReplace["%PLUS_TIME%"] = $_POST['plus_time'];
|
||||
$findReplace["%PLUS_PRODUCTION%"] = $_POST['plus_production'];
|
||||
$findReplace["%PAYPAL_EMAIL%"] = $_POST['paypal-email'];
|
||||
$findReplace["%PAYPAL_CURRENCY%"] = $_POST['paypal-currency'];
|
||||
$findReplace["%PLUS_PACKAGE_A_GOLD%"] = $_POST['plus-a-gold'];
|
||||
$findReplace["%PLUS_PACKAGE_A_PRICE%"] = $_POST['plus-a-price'];
|
||||
$findReplace["%PLUS_PACKAGE_B_GOLD%"] = $_POST['plus-b-gold'];
|
||||
$findReplace["%PLUS_PACKAGE_B_PRICE%"] = $_POST['plus-b-price'];
|
||||
$findReplace["%PLUS_PACKAGE_C_GOLD%"] = $_POST['plus-c-gold'];
|
||||
$findReplace["%PLUS_PACKAGE_C_PRICE%"] = $_POST['plus-c-price'];
|
||||
$findReplace["%PLUS_PACKAGE_D_GOLD%"] = $_POST['plus-d-gold'];
|
||||
$findReplace["%PLUS_PACKAGE_D_PRICE%"] = $_POST['plus-d-price'];
|
||||
$findReplace["%PLUS_PACKAGE_E_GOLD%"] = $_POST['plus-e-gold'];
|
||||
$findReplace["%PLUS_PACKAGE_E_PRICE%"] = $_POST['plus-e-price'];
|
||||
$findReplace["%MEDALINTERVAL%"] = $_POST['medalinterval'];
|
||||
$findReplace["%GREAT_WKS%"] = $_POST['great_wks'];
|
||||
$findReplace["%TS_THRESHOLD%"] = $_POST['ts_threshold'];
|
||||
$findReplace["%WW%"] = $_POST['ww'];
|
||||
$findReplace["%SHOW_NATARS%"] = $_POST['show_natars'];
|
||||
$findReplace["%NATARS_UNITS%"] = $_POST['natars_units'];
|
||||
$findReplace["%NATURE_REGTIME%"] = $_POST['nature_regtime'];
|
||||
$findReplace["%T4_COMING%"] = $_POST['t4_coming'];
|
||||
$findReplace["%REG_OPEN%"] = $_POST['reg_open'];
|
||||
$findReplace["%PEACE%"] = $_POST['peace'];
|
||||
|
||||
fwrite($fh, $text);
|
||||
fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text));
|
||||
|
||||
if(file_exists("../GameEngine/config.php")) {
|
||||
if (file_exists($configFile) && file_exists($configTemplateFile)) {
|
||||
header("Location: index.php?s=2");
|
||||
} else {
|
||||
header("Location: index.php?s=1&c=1");
|
||||
}
|
||||
|
||||
fclose($fh);
|
||||
fclose($gameConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -118,8 +118,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Register Open:</span></td>
|
||||
<td>
|
||||
<select name="reg_open">
|
||||
<option value="True" selected="selected">True</option>
|
||||
<option value="False">False</option>
|
||||
<option value="true" selected="selected">true</option>
|
||||
<option value="false">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -202,8 +202,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Great Workshop:</span></td>
|
||||
<td>
|
||||
<select name="great_wks">
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
<option value="true">true</option>
|
||||
<option value="false" selected="selected">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -211,8 +211,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">ww:</span></td>
|
||||
<td>
|
||||
<select name="ww">
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
<option value="true">true</option>
|
||||
<option value="false" selected="selected">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -220,8 +220,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Show Natars in Statistics:</span></td>
|
||||
<td>
|
||||
<select name="show_natars">
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
<option value="true">true</option>
|
||||
<option value="false" selected="selected">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -255,8 +255,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Show admin in stats:</span></td>
|
||||
<td>
|
||||
<select name="admin_rank">
|
||||
<option value="True">True</option>
|
||||
<option value="False" selected="selected">False</option>
|
||||
<option value="true">true</option>
|
||||
<option value="false" selected="selected">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -264,8 +264,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Include Support Messages in Admin Mailbox:</span></td>
|
||||
<td>
|
||||
<select name="admin_support_msgs">
|
||||
<option value="True" selected="selected">True</option>
|
||||
<option value="False">False</option>
|
||||
<option value="true" selected="selected">true</option>
|
||||
<option value="false">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -273,8 +273,8 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Allow Administrative Accounts to be Raided and Attacked:</span></td>
|
||||
<td>
|
||||
<select name="admin_raidable">
|
||||
<option value="True" selected="selected">True</option>
|
||||
<option value="False">False</option>
|
||||
<option value="true" selected="selected">true</option>
|
||||
<option value="false">false</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -287,6 +287,10 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
|
||||
<td><span class="f9 c6">Hostname:</span></td>
|
||||
<td><input name="sserver" type="text" id="sserver" value="localhost"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="f9 c6">Port:</span></td>
|
||||
<td><input name="sport" type="text" id="sport" value="3306"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="f9 c6">Username:</span></td>
|
||||
<td><input name="suser" type="text" id="suser" value=""></td>
|
||||
|
||||
@@ -49,9 +49,9 @@ touch('../var/installed');
|
||||
</br>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
<input type="hidden" name="hosted_button_id" value="LWVKB9LSJNL3C">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
<input type="hidden" name="hosted_button_id" value="QHUTVY5MLECFQ">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
|
||||
</form>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user