Enable and disable display of oases

+Now during the installation (or after installation in the admin panel) you can enable or disable oasis display for villages in the player profile.

NOTE: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file:
GameEngine/config.php

/////////////////////////////////////////////////
//   ****  NEW MECHANICS AND FUNCTIONS  ****   //
/////////////////////////////////////////////////
define("NEW_FUNCTIONS_OASIS", True);

GameEngine/Admin/Modsconstant_format.tpl

/////////////////////////////////////////////////
//   ****  NEW MECHANICS AND FUNCTIONS  ****   //
/////////////////////////////////////////////////
define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%);

NOTICE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code!
This commit is contained in:
Vladyslav
2018-06-20 16:57:13 +03:00
parent 7747a301be
commit 11ae61c013
13 changed files with 306 additions and 60 deletions
+17
View File
@@ -179,7 +179,24 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
<td><b><?php echo (ERROR_REPORT=="error_reporting (0);")? "No": "Yes";?></b></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>New Mechanics and Functions <a href="admin.php?p=editNewFunctions"><img src="../img/admin/edit.gif" title="Edit New Mechanics and Functions"></a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b"><?php echo SERV_VARIABLE ?></td>
<td class="b"><?php echo SERV_VALUE ?></td>
</tr>
<tr>
<td>Display oasis in profile <em class="tooltip">?<span class="classic">Turns on or off the display of oases of each village in the player profile</span></em></td>
<td><?php echo NEW_FUNCTIONS_OASIS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
+44
View File
@@ -0,0 +1,44 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editNewFunctions.tpl ##
## Developed by: velhbxtyrj ##
## 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><?php echo SERV_CONFIG ?></center></h2>
<form action="../GameEngine/Admin/Mods/editNewFunctions.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 New Mechanics and Functions</th>
</tr>
</thead>
<tbody>
<tr>
<td width="50%">Display oasis in profile <em class="tooltip">?<span class="classic">Turns on or off the display of oases of each village in the player profile</span></em></td>
<td width="50%">
<select name="new_functions_oasis">
<option value="True" <?php if(NEW_FUNCTIONS_OASIS==true) echo "selected";?>>True</option>
<option value="False" <?php if(NEW_FUNCTIONS_OASIS==false) echo "selected";?>>False</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
<table width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=config"><< <?php echo EDIT_BACK ?></a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form>
+2
View File
@@ -48,6 +48,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$NEWSBOX2=(NEWSBOX2==false)? "false":"true";
$NEWSBOX3=(NEWSBOX3==false)? "false":"true";
$LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true";
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
@@ -123,6 +124,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
+2
View File
@@ -47,6 +47,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
@@ -120,6 +121,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
+2
View File
@@ -43,6 +43,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
@@ -120,6 +121,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
+133
View File
@@ -0,0 +1,133 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editNewFunctions.php ##
## Developed by: velhbxtyrj ##
## 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 = (int) $_POST['id'];
if (!file_exists('constant_format.tpl')) {
die(
'You seem to be running a new version of TravianZ which was installed using an old installer.<br />' .
'Please download <strong>constant_format.tpl</strong> file and copy it into the <strong>GameEngine/Admin/Mods</strong> ' .
'directory - otherwise saving configuration won\'t work.<br /><br />' .
'The constant_format.tpl file can be downloaded at ' .
'<strong>https://raw.githubusercontent.com/Shadowss/TravianZ/master/install/data/constant_format.tpl</strong>');
}
$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");
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$REG_OPEN = (REG_OPEN == false ? 'false' : 'true');
$QUEST = (QUEST == false ? 'false' : 'true');
// 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("'%NATARS_SPAWN_TIME%'", NATARS_SPAWN_TIME, $text);
$text = preg_replace("'%NATARS_WW_SPAWN_TIME%'", NATARS_WW_SPAWN_TIME, $text);
$text = preg_replace("'%NATARS_WW_BUILDING_PLAN_SPAWN_TIME%'", NATARS_WW_BUILDING_PLAN_SPAWN_TIME, $text);
$text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text);
$text = preg_replace("'%OASIS_WOOD_MULTIPLIER%'", OASIS_WOOD_MULTIPLIER, $text);
$text = preg_replace("'%OASIS_CLAY_MULTIPLIER%'", OASIS_CLAY_MULTIPLIER, $text);
$text = preg_replace("'%OASIS_IRON_MULTIPLIER%'", OASIS_IRON_MULTIPLIER, $text);
$text = preg_replace("'%OASIS_CROP_MULTIPLIER%'", OASIS_CROP_MULTIPLIER, $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 = str_replace("%SPORT%", SQL_PORT, $text);
$text = preg_replace("'%SUSER%'", SQL_USER, $text);
$text = preg_replace("'%SPASS%'", SQL_PASS, $text);
$text = preg_replace("'%SDB%'", SQL_DB, $text);
$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("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
$text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $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);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $_POST['new_functions_oasis'], $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);
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed New Mechanics and Functions Settings',".time().")");
header("Location: ../../../Admin/admin.php?p=config");
?>
+2
View File
@@ -50,6 +50,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
@@ -127,6 +128,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
+2
View File
@@ -31,6 +31,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
// SERVER SETTINGS - we need to keep these intact
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
@@ -104,6 +105,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS SETTINGS
$text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text);
+2
View File
@@ -42,6 +42,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
$ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text);
@@ -115,6 +116,7 @@ $fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: GameEngine\con
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
$text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text);
$text = preg_replace("'%SERVER%'", SERVER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text);
// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
+80 -59
View File
@@ -152,64 +152,85 @@ if($displayarray['vac_mode'] == 1) echo "<tr><th colspan='2'><font color='Maroon
</td>
</tr>
</tbody>
</table><table cellpadding="1" cellspacing="1" id="villages">
<thead>
<tr>
<th colspan="4">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Oasis</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
foreach($varray as $vil) {
$coor = $database->getCoor($vil['wref']);
echo "<tr><td class=\"nam\"><a href=\"karte.php?d=".$vil['wref']."&amp;c=".$generator->getMapCheck($vil['wref'])."\">".$vil['name']."</a>";
if($vil['capital'] == 1) echo "<span class=\"none3\"> (capital)</span>";
echo "<td class=\"hab\">";
// OASIS PART - must to be activated from install part
$oases = $database->getOasis($vil['wref']);
foreach ($oases as $oasis){
switch ($oasis['type']) {
case 1:
case 2:
echo "<img class='r100' src='img/x.gif' title='+25% Lumber'> ";
break;
case 3:
echo "<img class='r200' src='img/x.gif' title='+25% Lumber +25% Crop'> ";
break;
case 4:
case 5:
echo "<img class='r400' src='img/x.gif' title='+25% Clay'> ";
break;
case 6:
echo "<img class='r500' src='img/x.gif' title='+25% Clay +25% Crop'> ";
break;
case 7:
case 8:
echo "<img class='r700' src='img/x.gif' title='+25% Iron'> ";
break;
case 9:
echo "<img class='r800' src='img/x.gif' title='+25% Iron +25% Crop'> ";
break;
case 10:
case 11:
echo "<img class='r1000' src='img/x.gif' title='+25% Crop'> ";
break;
case 12:
echo "<img class='r1100' src='img/x.gif' title='+50% Crop'> ";
break;
}
</table>
<?php
if(NEW_FUNCTIONS_OASIS == false) {
echo "<table cellpadding=\"1\" cellspacing=\"1\" id=\"villages\">
<thead>
<tr>
<th colspan=\"3\">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead>
<tbody>";
foreach($varray as $vil) {
$coor = $database->getCoor($vil['wref']);
echo "<tr><td class=\"nam\"><a href=\"karte.php?d=".$vil['wref']."&amp;c=".$generator->getMapCheck($vil['wref'])."\">".$vil['name']."</a>";
if($vil['capital'] == 1) echo "<span class=\"none3\"> (capital)</span>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
}
echo "</td>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
echo "</tbody></table>";
} else {
echo "<table cellpadding=\"1\" cellspacing=\"1\" id=\"villages\">
<thead>
<tr>
<th colspan=\"4\">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Oasis</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead>
<tbody>";
foreach($varray as $vil) {
$coor = $database->getCoor($vil['wref']);
echo "<tr><td class=\"nam\"><a href=\"karte.php?d=".$vil['wref']."&amp;c=".$generator->getMapCheck($vil['wref'])."\">".$vil['name']."</a>";
if($vil['capital'] == 1) echo "<span class=\"none3\"> (capital)</span>";
echo "<td class=\"hab\">";
$oases = $database->getOasis($vil['wref']);
foreach ($oases as $oasis) {
switch ($oasis['type']) {
case 1:
case 2:
echo "<img class='r100' src='img/x.gif' title='+25% Lumber'> ";
break;
case 3:
echo "<img class='r200' src='img/x.gif' title='+25% Lumber +25% Crop'> ";
break;
case 4:
case 5:
echo "<img class='r400' src='img/x.gif' title='+25% Clay'> ";
break;
case 6:
echo "<img class='r500' src='img/x.gif' title='+25% Clay +25% Crop'> ";
break;
case 7:
case 8:
echo "<img class='r700' src='img/x.gif' title='+25% Iron'> ";
break;
case 9:
echo "<img class='r800' src='img/x.gif' title='+25% Iron +25% Crop'> ";
break;
case 10:
case 11:
echo "<img class='r1000' src='img/x.gif' title='+25% Crop'> ";
break;
case 12:
echo "<img class='r1100' src='img/x.gif' title='+50% Crop'> ";
break;
}
}
echo "</td>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
}
echo "</tbody></table>";
}
?>
</tbody></table>
?>
+4 -1
View File
@@ -296,7 +296,10 @@ define("ADMIN_RECEIVE_SUPPORT_MESSAGES", %ASUPPMSGS%);
// ***** Allow Admin accounts to be raided and attacked
define("ADMIN_ALLOW_INCOMING_RAIDS", %ARAIDS%);
/////////////////////////////////////////////////
// **** NEW MECHANICS AND FUNCTIONS **** //
/////////////////////////////////////////////////
define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%);
//////////////////////////////////////////
// **** DO NOT EDIT SETTINGS **** //
+3
View File
@@ -141,6 +141,9 @@ class Process {
$findReplace["%T4_COMING%"] = $_POST['t4_coming'];
$findReplace["%REG_OPEN%"] = $_POST['reg_open'];
$findReplace["%PEACE%"] = $_POST['peace'];
//New Mechanics and Functions
$findReplace["%NEW_FUNCTIONS_OASIS%"] = $_POST['new_functions_oasis'];
fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text));
+13
View File
@@ -268,7 +268,20 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">NEW MECHANICS AND FUNCTIONS RELATED</span>
<table>
<tr>
<td><span class="f9 c6">Display oasis in profile:</span></td>
<td>
<select name="new_functions_oasis">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
</table>
</p>
<p>