updates admin

This commit is contained in:
Shadow
2014-02-26 07:38:09 +02:00
parent 6c94bb2a8b
commit 923b4b3e18
12 changed files with 1545 additions and 49 deletions
+82 -49
View File
@@ -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);
?>
<?php
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);
if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><b><font color='Red'><center>Access Denied: You are not admin</b></font></center>");
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<h2><center>Made by Dzoki / Modified by Shadow</center></h2>
<h2><center>Server Configuration</center></h2>
<table id="member">
<thead>
<tr>
<th>~ Server Settings ~</th>
<th>Server Settings <a href="admin.php?p=editServerSet"><img src="../img/admin/edit.gif" title="Edit Setting"></a></th>
</tr>
</thead>
</table>
@@ -36,57 +33,53 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td>Server Name</td>
<td><?php echo SERVER_NAME;?></td>
</tr>
<tr>
<td>Medal Interval</td>
<td><?php echo (MEDALINTERVAL/3600/24);?> days</td>
</tr>
<tr>
<td>Peace</td>
<td><?php echo PEACE;?></td>
</tr>
<tr>
<td>Server Started</td>
<td><?php echo date("d.m.y H:i",COMMENCE);?></td>
<td><?php echo "Date:".START_DATE." Time:".START_TIME; //date("d.m.y H:i",COMMENCE);?></td>
</tr>
<tr>
<td>Server Timezone</td>
<td><?php echo TIMEZONE;?></td>
</tr>
<tr>
<td>Language</td>
<td><?php if(LANG == en){ echo "English"; } ?></td>
<td><?php if(LANG == 'en'){ echo "English"; } ?></td>
</tr>
<tr>
<td>Server Speed</td>
<td><?php echo ''.SPEED.'x';?></td>
</tr>
<tr>
<td>Map Size</td>
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
</tr>
<tr>
<td>Troop Speed</td>
<td><?php echo INCREASE_SPEED;?>x</td>
</tr>
<tr>
<td>Evasion Speed</td>
<td><?php echo EVASION_SPEED;?>x</td>
<td><?php echo EVASION_SPEED;?></td>
</tr>
<tr>
<td>Trader capacity</td>
<td><?php echo TRADER_CAPACITY;?>x</td>
<td>Storage Multipler</td>
<td><?php echo STORAGE_MULTIPLIER;?></td>
</tr>
<tr>
<td>Cranny capacity</td>
<td><?php echo CRANNY_CAPACITY;?>x</td>
<td>Trader Capacity</td>
<td><?php echo TRADER_CAPACITY;?></td>
</tr>
<tr>
<td>Trapper capacity</td>
<td><?php echo TRAPPER_CAPACITY;?>x</td>
<td>Cranny Capacity</td>
<td><?php echo CRANNY_CAPACITY;?></td>
</tr>
<tr>
<td>Trapper Capacity</td>
<td><?php echo TRAPPER_CAPACITY;?></td>
</tr>
<tr>
<td>Natars Units Multiplier</td>
<td><?php echo NATARS_UNITS;?>x</td>
<td><?php echo NATARS_UNITS;?></td>
</tr>
<tr>
<td>Nature troops regeneration time </td>
<td><?php echo (NATURE_REGTIME/3600);?> hours</td>
<td>Map Size</td>
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
</tr>
<tr>
<td>Village Expanding Speed</td>
@@ -96,13 +89,21 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td>Beginners Protection</td>
<td><?php echo (PROTECTION/3600);?> hour/s</td>
</tr>
<tr>
<td>Register Open</td>
<td><?php if(REG_OPEN == true) { echo "<b><font color='blue'>true</font></b>"; } else { echo "<b><font color='Red'>False</font></b>"; } ?></td>
</tr>
<tr>
<td>Activation Mail</td>
<td><?php if(AUTH_EMAIL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(AUTH_EMAIL == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
<td><?php if(AUTH_EMAIL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td>Quest</td>
<td><?php if(QUEST == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(QUEST == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
<td><?php if(QUEST == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td>Quest Type</td>
<td><?php if(QTYPE == 25) { echo "<b><font color='Blue'>Travian Official</font></b>"; } else { echo "<b><font color='Blue'>TravianZ Extended</font></b>"; } ?></td>
</tr>
<tr>
<td>Demolish - Level required</td>
@@ -120,12 +121,44 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td>+25% production duration</td>
<td><?php if(PLUS_PRODUCTION >= 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?></td>
</tr>
<tr>
<td>Nature Troops Regeneration Time</td>
<td><?php if(NATURE_REGTIME >= 86400){ echo ''.(NATURE_REGTIME/86400).' Days'; } else if(NATURE_REGTIME < 86400){ echo ''.(NATURE_REGTIME/3600).' Hours'; } ?></td>
</tr>
<tr>
<td>Medal Interval</td>
<td><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></td>
</tr>
<tr>
<td>Tourn Threshold</td>
<td><?php echo TS_THRESHOLD;?></td>
</tr>
<tr>
<td>Great Workshop</td>
<td><?php if(GREAT_WKS == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td>Show Natars in Statistics</td>
<td><?php if(SHOW_NATARS == true) { echo "<b><font color='blue'>True</font></b>"; } else { echo "<b><font color='Red'>False</font></b>"; } ?></td>
<tr>
<td>Peace system</td>
<td>
<?php
$peace_array=array("None","Normal","Christmas","New Year","Easter");
echo $peace_array[intval(PEACE)];
?>
</td>
</tr>
<tr>
<td>Graphic Pack</td>
<td><?php if(GP_ENABLE == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Log Settings ~</th>
<th>Log Settings <a href="admin.php?p=editLogSet"><img src="../img/admin/edit.gif" title="Edit Log Setting"></a></th>
</tr>
</thead>
</table>
@@ -149,7 +182,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</tr>
<tr>
<td>Log Gold</td>
<td><?php if(LOG_GOLD_FIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(ALOG_GOLD_FIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
<td><?php if(LOG_GOLD_FIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_GOLD_FIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td>Log Admin</td>
@@ -172,7 +205,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<table id="member">
<thead>
<tr>
<th>~ Newsbox Settings ~</th>
<th>Newsbox Settings <a href="admin.php?p=editNewsboxSet"><img src="../img/admin/edit.gif" title="Edit Newsbox Setting"></a></th>
</tr>
</thead>
</table>
@@ -195,7 +228,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td><?php if(NEWSBOX3 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(NEWSBOX3 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
</tr>
<tr>
<td>Home 1</td>
<!--<td>Home 1</td>
<td><?php if(HOME1 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME1 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
</tr>
<tr>
@@ -205,13 +238,13 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<tr>
<td>Home 3</td>
<td><?php if(HOME3 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME3 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
</tr>
</tr>-->
</table>
<table id="member">
<thead>
<tr>
<th>~ SQL Settings ~</th>
<th>SQL Settings</th>
</tr>
</thead>
</table>
@@ -250,7 +283,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<table id="member">
<thead>
<tr>
<th>~ Extra Settings ~</th>
<th>Extra Settings <a href="admin.php?p=editExtraSet"><img src="../img/admin/edit.gif" title="Edit Extra Settings"></a></th>
</tr>
</thead>
</table>
@@ -268,16 +301,12 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td>Max number of mails</td>
<td><?php if(LIMIT_MAILBOX == true){ echo MAX_MAIL; } else if(LIMIT_MAILBOX == false){ echo "<font color='Gray'>Limit mailbox disabled</font>"; } ?></td>
</tr>
<tr>
<td>Include Admin in rank</td>
<td><?php if(INCLUDE_ADMIN == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Admin Information ~</th>
<th>Admin Information <a href="admin.php?p=editAdminInfo"><img src="../img/admin/edit.gif" title="Edit Admin Info"></a></th>
</tr>
</thead>
</table>
@@ -294,6 +323,10 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<td>Admin Name</td>
<td><?php if(ADMIN_NAME == ''){ echo "<b><font color='Red'>No admin name defined!</b></font>"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?></td>
</tr>
<tr>
<td>Include Admin in Rank</td>
<td><?php if(INCLUDE_ADMIN == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
</table>
<?php
@@ -309,4 +342,4 @@ function define_array( $array, $keys = NULL )
}
}
//define_array($array);
?>
?>
+60
View File
@@ -0,0 +1,60 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editAdminInfo.tpl ##
## 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);
?>
<h2><center>Server Configuration</center></h2>
<form action="../GameEngine/Admin/Mods/editAdminInfo.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_SESSION['id']; ?>">
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Admin Information</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Admin Name</td>
<td width="50%"><input class="fm" name="aname" id="aname" value="<?php echo ADMIN_NAME;?>" style="width: 90%;"></td>
</tr>
<tr>
<td width="50%">Admin Email</td>
<td width="50%"><input class="fm" name="aemail" id="aemail" value="<?php echo ADMIN_EMAIL;?>" style="width: 90%;"></td>
</tr>
<tr>
<td>Show Admin in Stats:</span></td>
<td>
<select name="admin_rank">
<option value="true" <?php if (INCLUDE_ADMIN==true) echo "selected";?>>True</option>
<option value="false" <?php if (INCLUDE_ADMIN==false) echo "selected";?>>False</option>
</select>
</td>
</tr>
<tr>
<td>Error Reporting</td>
<td><select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+56
View File
@@ -0,0 +1,56 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editExtraSet.tpl ##
## 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);
?>
<h2><center>Server Configuration</center></h2>
<form action="../GameEngine/Admin/Mods/editNewsboxSet.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_SESSION['id']; ?>">
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Extra Settings</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Limit Mailbox</td>
<td width="50%">
<select name="limit_mailbox">
<option value="true" <?php if (LIMIT_MAILBOX==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LIMIT_MAILBOX==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Max Number of Mails</td>
<td>30</td>
</tr>
<tr>
<td>Error Reporting</td>
<td><select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+115
View File
@@ -0,0 +1,115 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editLogSet.tpl ##
## 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);
?>
<h2><center>Server Configuration</center></h2>
<form action="../GameEngine/Admin/Mods/editLogSet.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_SESSION['id']; ?>">
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Log Setting</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Log Building</td>
<td width="50%">
<select name="log_build">
<option value="true" <?php if (LOG_BUILD==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_BUILD==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Tech</td>
<td>
<select name="log_tech">
<option value="true" <?php if (LOG_TECH==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_TECH==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Login</td>
<td>
<select name="log_login">
<option value="true" <?php if (LOG_LOGIN==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_LOGIN==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Gold</td>
<td>
<select name="log_gold_fin">
<option value="true" <?php if (LOG_GOLD_FIN==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_GOLD_FIN==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Admin</td>
<td>
<select name="log_admin">
<option value="true" <?php if (LOG_ADMIN==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_ADMIN==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log War</td>
<td>
<select name="log_war">
<option value="true" <?php if (LOG_WAR==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_WAR==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Market</td>
<td>
<select name="log_market">
<option value="true" <?php if (LOG_MARKET==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_MARKET==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Log Illegal</td>
<td>
<select name="log_illegal">
<option value="true" <?php if (LOG_ILLEGAL==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (LOG_ILLEGAL==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Error Reporting</td>
<td><select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+70
View File
@@ -0,0 +1,70 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editNewsboxSet.tpl ##
## 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);
?>
<h2><center>Server Configuration</center></h2>
<form action="../GameEngine/Admin/Mods/editNewsboxSet.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_SESSION['id']; ?>">
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Newsbox Settings</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Newsbox 1</td>
<td width="50%">
<select name="box1">
<option value="true" <?php if (NEWSBOX1==true) echo "selected";?>>Enable</option>
<option value="false" <?php if (NEWSBOX1==false) echo "selected";?>>Disable</option>
</select>
</td>
</tr>
<tr>
<td>Newsbox 2</td>
<td>
<select name="box2">
<option value="true" <?php if (NEWSBOX2==true) echo "selected";?>>Enable</option>
<option value="false" <?php if (NEWSBOX2==false) echo "selected";?>>Disable</option>
</select>
</td>
</tr>
<tr>
<td>Newsbox 3</td>
<td>
<select name="box3">
<option value="true" <?php if (NEWSBOX3==true) echo "selected";?>>Enable</option>
<option value="false" <?php if (NEWSBOX3==false) echo "selected";?>>Disable</option>
</select>
</td>
</tr>
<tr>
<td>Error Reporting</td>
<td><select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+304
View File
@@ -0,0 +1,304 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editServerSet.tpl ##
## 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);
?>
<script LANGUAGE="JavaScript">
function refresh(tz) {
document.getElementById('tz').innerHTML=tz;
}
</script>
<h2><center>Server Configuration</center></h2>
<form action="../GameEngine/Admin/Mods/editServerSet.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_SESSION['id']; ?>">
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Server Setting</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Server Name</td>
<td width="50%"><input class="fm" name="servername" value="<?php echo SERVER_NAME;?>" style="width: 70%;"></td>
</tr>
<tr>
<td>Server Started</td>
<td><?php echo "Date:".START_DATE." Time:".START_TIME;?></td>
</tr>
<tr>
<td>Server Timezone</td>
<td>
<select name="tzone" onChange="refresh(this.value)">
<option value="Africa/Dakar" <?php if (TIMEZONE=="Africa/Dakar") echo "selected";?>>Africa</option>
<option value="America/New_York" <?php if (TIMEZONE=="America/New_York") echo "selected";?>>America</option>
<option value="Antarctica/Casey" <?php if (TIMEZONE=="Antarctica/Casey") echo "selected";?>>Antarctica</option>
<option value="Arctic/Longyearbyen" <?php if (TIMEZONE=="Arctic/Longyearbyen") echo "selected";?>>Arctic</option>
<option value="Asia/Kuala_Lumpur" <?php if (TIMEZONE=="Asia/Kuala_Lumpur") echo "selected";?>>Asia</option>
<option value="Atlantic/Azores" <?php if (TIMEZONE=="Atlantic/Azores") echo "selected";?>>Atlantic</option>
<option value="Australia/Melbourne" <?php if (TIMEZONE=="Australia/Melbourne") echo "selected";?>>Australia</option>
<option value="Europe/Berlin" <?php if (TIMEZONE=="Europe/Berlin") echo "selected";?>>Europe</option>
<option value="Indian/Maldives" <?php if (TIMEZONE=="Indian/Maldives") echo "selected";?>>Indian</option>
<option value="Pacific/Fiji" <?php if (TIMEZONE=="Pacific/Fiji") echo "selected";?>>Pacific</option>
</select>
<span id="tz" name="tz"><?php echo TIMEZONE;?></span>
</td>
</tr>
<tr>
<td>Language</td>
<td>
<select name="lang">
<option value="en" <?php if (LANG=="en") echo "selected";?>>English</option>
<option value="es" <?php if (LANG=="es") echo "selected";?>>Spain</option>
<option value="my" <?php if (LANG=="my") echo "selected";?>>Malay</option>
<option value="ru" <?php if (TIMEZONE=="ru") echo "selected";?>>Russian</option>
<option value="zh_tw" <?php if (TIMEZONE=="zh_tw") echo "selected";?>>Taiwan</option>
</select>
</td>
</tr>
<tr>
<td>Server Speed</td>
<td><input class="fm" name="speed" value="<?php echo SPEED;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Troop Speed</td>
<td><input class="fm" name="incspeed" value="<?php echo INCREASE_SPEED;?>" style="width: 20%;"></td>
</tr>
<td>Evasion Speed</td>
<td><input class="fm" name="evasionspeed" value="<?php echo EVASION_SPEED;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Storage Multipler</td>
<td><input class="fm" name="storage_multiplier" value="<?php echo STORAGE_MULTIPLIER;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Trader Capacity</td>
<td><input class="fm" name="tradercap" value="<?php echo TRADER_CAPACITY;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Cranny Capacity</td>
<td><input class="fm" name="crannycap" value="<?php echo CRANNY_CAPACITY;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Trapper Capacity</td>
<td><input class="fm" name="trappercap" value="<?php echo TRAPPER_CAPACITY;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Natars Units Multiplier</td>
<td><input class="fm" name="natars_units" value="<?php echo NATARS_UNITS;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Map Size</td>
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
</tr>
<tr>
<td>Village Expanding Speed</td>
<td>
<select name="village_expand">
<option value="1" <?php if (CP=="1") echo "selected";?>>Slow</option>
<option value="0" <?php if (CP=="0") echo "selected";?>>Fast</option>
</select>
</td>
</tr>
<tr>
<td>Beginners Protection</td>
<td>
<select name="beginner">
<option value="7200" <?php if (PROTECTION=="7200") echo "selected";?>>2 hours</option>
<option value="10800" <?php if (PROTECTION=="10800") echo "selected";?>>3 hours</option>
<option value="18000" <?php if (PROTECTION=="18000") echo "selected";?>>5 hours</option>
<option value="28800" <?php if (PROTECTION=="28800") echo "selected";?>>8 hours</option>
<option value="36000" <?php if (PROTECTION=="36000") echo "selected";?>>10 hours</option>
<option value="43200" <?php if (PROTECTION=="43200") echo "selected";?>>12 hours</option>
<option value="86400" <?php if (PROTECTION=="86400") echo "selected";?>>24 hours (1 day)</option>
<option value="172800" <?php if (PROTECTION=="172800") echo "selected";?>>48 hours (2 days)</option>
<option value="259200" <?php if (PROTECTION=="259200") echo "selected";?>>72 hours (3 days)</option>
<option value="432000" <?php if (PROTECTION=="432000") echo "selected";?>>120 hours (5 days)</option>
</select>
</td>
</tr>
<tr>
<td>Register Open</td>
<td>
<select name="reg_open">
<option value="True" <?php if(REG_OPEN==true) echo "selected";?>>True</option>
<option value="False" <?php if(REG_OPEN==false) echo "selected";?>>False</option>
</select>
</td>
</tr>
<tr>
<td>Activation Mail</td>
<td>
<select name="activate">
<option value="true" <?php if (AUTH_EMAIL==true) echo "selected";?>>Yes</option>
<option value="false" <?php if (AUTH_EMAIL==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Quest</td>
<td>
<select name="quest">
<option value="true" <?php if(QUEST == true) echo "selected";?>>Yes</option>
<option value="false" <?php if(QUEST == false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Quest Type</td>
<td>
<select name="qtype">
<option value="25" <?php if(QTYPE == 25) echo "selected";?>>Travian Official</option>
<option value="37" <?php if(QTYPE == 37) echo "selected";?>>TravianZ Extended</option>
</select>
</td>
</tr>
<tr>
<td>Demolish - Level required</td>
<td>
<select name="demolish">
<option value="5" <?php if(DEMOLISH_LEVEL_REQ == "5") echo "selected";?>>5</option>
<option value="10" <?php if(DEMOLISH_LEVEL_REQ == "10") echo "selected";?>>10 - Default</option>
<option value="15" <?php if(DEMOLISH_LEVEL_REQ == "15") echo "selected";?>>15</option>
<option value="20"> <?php if(DEMOLISH_LEVEL_REQ == "20") echo "selected";?>20</option>
</select>
</td>
</tr>
<tr>
<td>World Wonder - Statistics</td>
<td>
<select name="ww">
<option value="True" <?php if(WW == true) echo "selected";?>>True</option>
<option value="False" <?php if(WW == false) echo "selected";?>>False</option>
</select>
</tr>
<tr>
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> account duration</td>
<td>
<select name="plus_time">
<option value="(3600*12)" <?php if(PLUS_TIME==43200) echo "selected";?>>12 hours</option>
<option value="(3600*24)" <?php if(PLUS_TIME==86400) echo "selected";?>>1 day</option>
<option value="(3600*24*2)" <?php if(PLUS_TIME==172800) echo "selected";?>>2 days</option>
<option value="(3600*24*3)" <?php if(PLUS_TIME==259200) echo "selected";?>>3 days</option>
<option value="(3600*24*4)" <?php if(PLUS_TIME==345600) echo "selected";?>>4 days</option>
<option value="(3600*24*5)" <?php if(PLUS_TIME==432000) echo "selected";?>>5 days</option>
<option value="(3600*24*6)" <?php if(PLUS_TIME==518400) echo "selected";?>>6 days</option>
<option value="(3600*24*7)" <?php if(PLUS_TIME==604800) echo "selected";?>>7 days</option>
</select>
</td>
</tr>
<tr>
<td>+25% production duration</td>
<td>
<select name="plus_production">
<option value="(3600*12)" <?php if(PLUS_TIME==43200) echo "selected";?>>12 hours</option>
<option value="(3600*24)" <?php if(PLUS_TIME==86400) echo "selected";?>>1 day</option>
<option value="(3600*24*2)" <?php if(PLUS_TIME==172800) echo "selected";?>>2 days</option>
<option value="(3600*24*3)" <?php if(PLUS_TIME==259200) echo "selected";?>>3 days</option>
<option value="(3600*24*4)" <?php if(PLUS_TIME==345600) echo "selected";?>>4 days</option>
<option value="(3600*24*5)" <?php if(PLUS_TIME==432000) echo "selected";?>>5 days</option>
<option value="(3600*24*6)" <?php if(PLUS_TIME==518400) echo "selected";?>>6 days</option>
<option value="(3600*24*7)" <?php if(PLUS_TIME==604800) echo "selected";?>>7 days</option>
</select>
</td>
</tr>
<tr>
<td>Nature Troops Regeneration Time</td>
<td>
<select name="nature_regtime">
<option value="28800" <?php if(NATURE_REGTIME==28800) echo "selected";?>>8 hours</option>
<option value="36000" <?php if(NATURE_REGTIME==36000) echo "selected";?>>10 hours</option>
<option value="43200" <?php if(NATURE_REGTIME==43200) echo "selected";?>>12 hours</option>
<option value="86400" <?php if(NATURE_REGTIME==86400) echo "selected";?>>24 hours (1 day)</option>
<option value="172800" <?php if(NATURE_REGTIME==172800) echo "selected";?>>48 hours (2 days)</option>
<option value="259200" <?php if(NATURE_REGTIME==259200) echo "selected";?>>72 hours (3 days)</option>
<option value="432000" <?php if(NATURE_REGTIME==432000) echo "selected";?>>120 hours (5 days)</option>
</select>
</td>
</tr>
<tr>
<td>Medal Interval</td>
<td>
<select name="medalinterval">
<option value="0" <?php if(MEDALINTERVAL==0) echo "selected";?>>none</option>
<option value="(3600*24)" <?php if(MEDALINTERVAL==86400) echo "selected";?>>1 day</option>
<option value="(3600*24*2)" <?php if(MEDALINTERVAL==172800) echo "selected";?>>2 days</option>
<option value="(3600*24*3)" <?php if(MEDALINTERVAL==259200) echo "selected";?>>3 days</option>
<option value="(3600*24*4)" <?php if(MEDALINTERVAL==345600) echo "selected";?>>4 days</option>
<option value="(3600*24*5)" <?php if(MEDALINTERVAL==432000) echo "selected";?>>5 days</option>
<option value="(3600*24*6)" <?php if(MEDALINTERVAL==518400) echo "selected";?>>6 days</option>
<option value="(3600*24*7)" <?php if(MEDALINTERVAL==604800) echo "selected";?>>7 days</option>
</select>
</td>
</tr>
<tr>
<td>Tourn Threshold</td>
<td><input class="fm" name="ts_threshold" value="<?php echo TS_THRESHOLD;?>" style="width: 20%;"></td>
</tr>
<tr>
<td>Great Workshop</td>
<td>
<select name="great_wks">
<option value="True" <?php if(GREAT_WKS==true) echo "selected";?>>True</option>
<option value="False" <?php if(GREAT_WKS==false) echo "selected";?>>False</option>
</select>
</td>
</tr>
<tr>
<td>Show Natars in Statistics</td>
<td>
<select name="show_natars">
<option value="True" <?php if(SHOW_NATARS==true) echo "selected";?>>True</option>
<option value="False" <?php if(SHOW_NATARS==false) echo "selected";?>>False</option>
</select>
</td>
</tr>
<tr>
<td>Peace System</td>
<td>
<select name="peace">
<option value="0" <?php if(PEACE==0) echo "selected";?>>None</option>
<option value="1" <?php if(PEACE==1) echo "selected";?>>Normal</option>
<option value="2" <?php if(PEACE==2) echo "selected";?>>Christmas</option>
<option value="3" <?php if(PEACE==3) echo "selected";?>>New Year</option>
<option value="4" <?php if(PEACE==4) echo "selected";?>>Easter</option>
</select>
</td>
</tr>
<tr>
<td>Graphic Pack</td>
<td>
<select name="gpack">
<option value="true" <?php if(GP_ENABLE==true) echo "selected";?>>Yes</option>
<option value="false" <?php if(GP_ENABLE==false) echo "selected";?>>No</option>
</select>
</td>
</tr>
<tr>
<td>Error Reporting</td>
<td><select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+298
View File
@@ -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. ##
## ##
#################################################################################
?>
+114
View File
@@ -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");
?>
+114
View File
@@ -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");
?>
+109
View File
@@ -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");
?>
+116
View File
@@ -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");
?>
+107
View File
@@ -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");
?>