mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
feat: Admin-configurable PLUS settings
This commit is contained in:
@@ -116,14 +116,6 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
<td>World Wonder - Statistics</td>
|
||||
<td><?php if(WW == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(WW == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</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><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
@@ -163,6 +155,73 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> Settings <a href="admin.php?p=editPlusSet"><img src="../img/admin/edit.gif" title="Edit PLUS Setting"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td>PayPal E-Mail Address</td>
|
||||
<td><?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Payment Currency</td>
|
||||
<td><?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "A" Amount of Gold</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "A" Amount of Price</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "B" Amount of Gold</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "B" Amount of Price</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "C" Amount of Gold</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "C" Amount of Price</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "D" Amount of Gold</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "D" Amount of Price</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "E" Amount of Gold</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Package "E" Amount of Price</td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</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><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</table>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editPlusSet.tpl ##
|
||||
## Developed by: martinambrus ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2017. 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><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> Configuration</center></h2>
|
||||
<form action="../GameEngine/Admin/Mods/editPlusSet.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 <b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> Setting</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
PayPal E-Mail
|
||||
<br /><span style="font-size: smaller">(must be Business or Premier account)</span>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="paypal-email" value="<?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : '@'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Payment Currency
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="paypal-currency" value="<?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "A" Amount of Gold
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-a-gold" value="<?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "A" Price
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-a-price" value="<?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "B" Amount of Gold
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-b-gold" value="<?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "B" Price
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-b-price" value="<?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "C" Amount of Gold
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-c-gold" value="<?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "C" Price
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-c-price" value="<?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "D" Amount of Gold
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-d-gold" value="<?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "D" Price
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-d-price" value="<?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "E" Amount of Gold
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-e-gold" value="<?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
Package "E" Price
|
||||
</td>
|
||||
<td width="50%">
|
||||
<input class="fm" name="plus-e-price" value="<?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99'); ?>" style="width: 70%;">
|
||||
</td>
|
||||
</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>
|
||||
</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>
|
||||
@@ -185,36 +185,6 @@ function refresh(tz) {
|
||||
<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>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename config.php ##
|
||||
## Version 4.8.5 ##
|
||||
## Version 8.0 ##
|
||||
## Developed by: Dzoki and Dixie Edited by Advocaite ##
|
||||
## Rework by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## Copyright: TravianZ (c) 2013-2014. All rights reserved. ##
|
||||
## Modified by: Shadow and ronix ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -26,7 +26,7 @@ define("ERROR_REPORT","%ERRORREPORT%");
|
||||
// ***** Name
|
||||
define("SERVER_NAME","%SERVERNAME%");
|
||||
|
||||
// ***** Time zone
|
||||
// ***** Time zone added by ronix
|
||||
// Defines server time zone.
|
||||
define("TIMEZONE","%STIMEZONE%");
|
||||
date_default_timezone_set(TIMEZONE);
|
||||
@@ -56,7 +56,7 @@ define("WORLD_MAX", "%MAX%");
|
||||
// ***** Graphic Pack
|
||||
// True = enabled, false = disabled
|
||||
//!!!!!!!!!!!! DO NOT ENABLE !!!!!!!!!!!!
|
||||
define("GP_ENABLE",%GP%);
|
||||
define("GP_ENABLE",false);
|
||||
// Graphic pack location (default: gpack/travian_default/)
|
||||
define("GP_LOCATE", "gpack/travian_default/");
|
||||
|
||||
@@ -96,7 +96,7 @@ define("STORAGE_BASE",800*STORAGE_MULTIPLIER);
|
||||
// Ingame quest enabled/disabled.
|
||||
define("QUEST",%QUEST%);
|
||||
//quest type : 25 = Travian Official
|
||||
// 37 = Extended
|
||||
// 37 = TravianZ Extended
|
||||
define("QTYPE",%QTYPE%);
|
||||
|
||||
// ***** Beginners Protection
|
||||
@@ -129,6 +129,30 @@ define("T4_COMING",%T4_COMING%);
|
||||
define("AUTH_EMAIL",%ACTIVATE%);
|
||||
|
||||
// ***** PLUS
|
||||
//Plus PayPal e-mail address
|
||||
define("PAYPAL_EMAIL","%PAYPAL_EMAIL%");
|
||||
//Plus PayPal currency
|
||||
define("PAYPAL_CURRENCY","%PAYPAL_CURRENCY%");
|
||||
//Plus Package A Price
|
||||
define("PLUS_PACKAGE_A_PRICE","%PLUS_PACKAGE_A_PRICE%");
|
||||
//Plus Package A Gold
|
||||
define("PLUS_PACKAGE_A_GOLD","%PLUS_PACKAGE_A_GOLD%");
|
||||
//Plus Package B Price
|
||||
define("PLUS_PACKAGE_B_PRICE","%PLUS_PACKAGE_B_PRICE%");
|
||||
//Plus Package B Gold
|
||||
define("PLUS_PACKAGE_B_GOLD","%PLUS_PACKAGE_B_GOLD%");
|
||||
//Plus Package C Price
|
||||
define("PLUS_PACKAGE_C_PRICE","%PLUS_PACKAGE_C_PRICE%");
|
||||
//Plus Package C Gold
|
||||
define("PLUS_PACKAGE_C_GOLD","%PLUS_PACKAGE_C_GOLD%");
|
||||
//Plus Package D Gold
|
||||
define("PLUS_PACKAGE_D_GOLD","%PLUS_PACKAGE_D_GOLD%");
|
||||
//Plus Package D Price
|
||||
define("PLUS_PACKAGE_D_PRICE","%PLUS_PACKAGE_D_PRICE%");
|
||||
//Plus Package E Price
|
||||
define("PLUS_PACKAGE_E_PRICE","%PLUS_PACKAGE_E_PRICE%");
|
||||
//Plus Package E Gold
|
||||
define("PLUS_PACKAGE_E_GOLD","%PLUS_PACKAGE_E_GOLD%");
|
||||
//Plus account lenght
|
||||
define("PLUS_TIME",%PLUS_TIME%);
|
||||
//+25% production lenght
|
||||
@@ -254,8 +278,10 @@ define("ADMIN_NAME", "%ANAME%");
|
||||
//////////////////////////////////////////
|
||||
define("AUTO_DEL_INACTIVE",false); // auto-delete inactive players; default = false
|
||||
define("UN_ACT_TIME", 3628800); // 6 weeks to consider a player inactive
|
||||
define("TRACK_USR","%UTRACK%");
|
||||
define("USER_TIMEOUT","%UTOUT%");
|
||||
//define("TRACK_USR","%UTRACK%");
|
||||
//define("USER_TIMEOUT","%UTOUT%");
|
||||
define("TRACK_USR",true); // track users' being active or not
|
||||
define("USER_TIMEOUT",3600); // 1 hour of no activity counts as inactivity
|
||||
define("ALLOW_BURST",false);
|
||||
define("BASIC_MAX",1);
|
||||
define("INNER_MAX",1);
|
||||
@@ -273,9 +299,7 @@ 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 **** //
|
||||
@@ -292,9 +316,8 @@ $requse = 0;
|
||||
## 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. ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editPlusSet.php ##
|
||||
## Developed by: martinambrus ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2017. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
include_once("../../Database.php");
|
||||
include_once("../../config.php");
|
||||
$id = $_POST['id'];
|
||||
|
||||
$myFile = "../../config.php";
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\config.php");
|
||||
|
||||
$text = file_get_contents("constant_format.tpl");
|
||||
|
||||
// SERVER SETTINGS - we need to keep these intact
|
||||
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
|
||||
$text = preg_replace("'%ERROR%'", ERROR_REPORT, $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%'", GP_LOCATE, $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 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%SHOW_NATARS%'", (SHOW_NATARS ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text);
|
||||
$text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text);
|
||||
$text = preg_replace("'%T4_COMING%'", (T4_COMING ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%ACTIVATE%'", (AUTH_EMAIL ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text);
|
||||
$text = preg_replace("'%GREAT_WKS%'", (GREAT_WKS ? 'true' : 'false'), $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 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGTECH%'", (LOG_TECH ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGLOGIN%'", (LOG_LOGIN ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGGOLDFIN%'", (LOG_GOLD_FIN ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGADMIN%'", (LOG_ADMIN ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGWAR%'", (LOG_WAR ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGMARKET%'", (LOG_MARKET ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%LOGILLEGAL%'", (LOG_ILLEGAL ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%BOX1%'", (NEWSBOX1 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%BOX2%'", (NEWSBOX2 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%BOX3%'", (NEWSBOX3 ? 'true' : 'false'), $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 ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text);
|
||||
$text = preg_replace("'%ARANK%'", (INCLUDE_ADMIN ? 'true' : 'false'), $text);
|
||||
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
|
||||
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
|
||||
$text = preg_replace("'%UTRACK%'", "TRACK_USR", $text); // not in use, text only in a comment
|
||||
$text = preg_replace("'%UTOUT%'", "USER_TIMEOUT", $text); // not in use, text only in a comment
|
||||
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
|
||||
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
|
||||
$text = preg_replace("'%SERVER%'", SERVER, $text);
|
||||
|
||||
// PLUS SETTINGS
|
||||
$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);
|
||||
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed PLUS setting',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=config");
|
||||
|
||||
?>
|
||||
@@ -63,8 +63,6 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$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);
|
||||
@@ -96,7 +94,23 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
|
||||
$text = preg_replace("'%UTOUT%'", "", $text);
|
||||
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
|
||||
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
|
||||
$text = preg_replace("'%SERVER%'", SERVER, $text);
|
||||
$text = preg_replace("'%SERVER%'", SERVER, $text);
|
||||
|
||||
// PLUS settings need to be kept intact
|
||||
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
|
||||
$text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text);
|
||||
$text = preg_replace("'%PAYPAL_EMAIL%'", (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'), $text);
|
||||
$text = preg_replace("'%PAYPAL_CURRENCY%'", (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_A_PRICE%'", (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_A_GOLD%'", (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : '60'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_B_PRICE%'", (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_B_GOLD%'", (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : '120'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_C_PRICE%'", (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_C_GOLD%'", (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : '360'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_D_PRICE%'", (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_D_GOLD%'", (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : '1000'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_E_PRICE%'", (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99'), $text);
|
||||
$text = preg_replace("'%PLUS_PACKAGE_E_GOLD%'", (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : '2000'), $text);
|
||||
|
||||
fwrite($fh, $text);
|
||||
fclose($fh);
|
||||
|
||||
Reference in New Issue
Block a user