mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-11 15:16:08 +00:00
General fixes
+Fixed a bug that permitted to see troops movement with a 0 level rally point +Fixed a bug that permitted to send attacks, enforcements, etc. with a 0 level rally point +Fixed a bug that counted the moral bonus for attacks against WW villages +Fixed a bug that didn't permit to finish all buildings/researches, etc. without a plus account +Recoded part of Natars timer for being more generic +Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are now based on the start date of the server and not on the installation date +Better indentation of some code
This commit is contained in:
@@ -1377,7 +1377,7 @@ class Automation {
|
||||
//filter_input_array($battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab1,$att_ab2,$att_ab3,$att_ab4,$att_ab5,$att_ab6,$att_ab7,$att_ab8,$tblevel,$stonemason,$walllevel,0,0,0,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref,$conqureby));
|
||||
if (!isset($walllevel)) $walllevel = 0;
|
||||
|
||||
$battlepart = $battle->calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab1,$att_ab2,$att_ab3,$att_ab4,$att_ab5,$att_ab6,$att_ab7,$att_ab8,$tblevel,$stonemason,$walllevel,0,0,0,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref,$conqureby, $enforcementarray);
|
||||
$battlepart = $battle->calculateBattle($Attacker, $Defender, $def_wall, $att_tribe, $def_tribe, $residence, $attpop, $defpop, $type, $def_ab, $att_ab1, $att_ab2, $att_ab3, $att_ab4, $att_ab5, $att_ab6, $att_ab7, $att_ab8, $tblevel, $stonemason, $walllevel, 0, 0, 0, $AttackerID, $DefenderID, $AttackerWref, $DefenderWref, $conqureby, $enforcementarray);
|
||||
|
||||
//units attack string for battleraport
|
||||
$unitssend_att = ''.$data['t1'].','.$data['t2'].','.$data['t3'].','.$data['t4'].','.$data['t5'].','.$data['t6'].','.$data['t7'].','.$data['t8'].','.$data['t9'].','.$data['t10'].'';
|
||||
@@ -3119,7 +3119,7 @@ class Automation {
|
||||
|
||||
//Check if Natars account is already created and if the time
|
||||
//is come and we have to create Natars and spawn their artifacts
|
||||
if($database->areArtifactsSpawned() || COMMENCE + (NATARS_SPAWN_TIME * 86400) > time()) return;
|
||||
if($database->areArtifactsSpawned() || strtotime(START_DATE) + (NATARS_SPAWN_TIME * 86400) > time()) return;
|
||||
|
||||
$ourFileHandle = fopen($autoprefix."GameEngine/Prevention/spawnNatars.txt", 'w');
|
||||
fclose($ourFileHandle);
|
||||
@@ -3183,7 +3183,7 @@ class Automation {
|
||||
|
||||
//Check if Natars account has already been created, if WW villages have already been spawned
|
||||
//and if it's the time to spawn them or not
|
||||
if(!$database->areArtifactsSpawned() || $database->areWWVillagesSpawned() || COMMENCE + (NATARS_WW_SPAWN_TIME * 86400) > time()) return;
|
||||
if(!$database->areArtifactsSpawned() || $database->areWWVillagesSpawned() || strtotime(START_DATE) + (NATARS_WW_SPAWN_TIME * 86400) > time()) return;
|
||||
|
||||
$ourFileHandle = fopen($autoprefix."GameEngine/Prevention/spawnWWVillages.txt", 'w');
|
||||
fclose($ourFileHandle);
|
||||
@@ -3239,7 +3239,7 @@ class Automation {
|
||||
|
||||
//Check if Natars account is already spawned, if WW building plans have already been spawned
|
||||
//and if it's the time to spawn them or not
|
||||
if(!$database->areArtifactsSpawned() || $database->areArtifactsSpawned(true) || COMMENCE + (NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400) > time()) return;
|
||||
if(!$database->areArtifactsSpawned() || $database->areArtifactsSpawned(true) || strtotime(START_DATE) + (NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400) > time()) return;
|
||||
|
||||
$ourFileHandle = fopen($autoprefix."GameEngine/Prevention/spawnWWBuildingPlans.txt", 'w');
|
||||
fclose($ourFileHandle);
|
||||
|
||||
+34
-41
@@ -26,30 +26,24 @@ class Battle {
|
||||
// receive form and process
|
||||
if(isset($post['a1_v']) && (isset($post['a2_v1']) || isset($post['a2_v2']) || isset($post['a2_v3']) || isset($post['a2_v4']))) {
|
||||
$_POST['mytribe'] = $post['a1_v'];
|
||||
$target = array();
|
||||
if(isset($post['a2_v1'])) {
|
||||
array_push($target,1);
|
||||
}
|
||||
if(isset($post['a2_v2'])) {
|
||||
array_push($target,2);
|
||||
}
|
||||
if(isset($post['a2_v3'])) {
|
||||
array_push($target,3);
|
||||
}
|
||||
if(isset($post['a2_v4'])) {
|
||||
array_push($target,4);
|
||||
}
|
||||
if(isset($post['a2_v5'])) {
|
||||
array_push($target,5);
|
||||
}
|
||||
|
||||
$target = [];
|
||||
if(isset($post['a2_v1'])) array_push($target, 1);
|
||||
if(isset($post['a2_v2'])) array_push($target, 2);
|
||||
if(isset($post['a2_v3'])) array_push($target, 3);
|
||||
if(isset($post['a2_v4'])) array_push($target, 4);
|
||||
if(isset($post['a2_v5'])) array_push($target, 5);
|
||||
|
||||
$_POST['target'] = $target;
|
||||
if(isset($post['h_off_bonus'])) {
|
||||
if (intval($post['h_off_bonus'])>20) {$post['h_off_bonus']=20;}
|
||||
}else $post['h_off_bonus']=0;
|
||||
if (intval($post['h_off_bonus']) > 20) $post['h_off_bonus'] = 20;
|
||||
}
|
||||
else $post['h_off_bonus']=0;
|
||||
|
||||
if(isset($post['h_def_bonus'])) {
|
||||
if (intval($post['h_def_bonus'])>20) {$post['h_def_bonus']=20;}
|
||||
}else $post['h_def_bonus']=0;
|
||||
if (intval($post['h_def_bonus']) > 20) $post['h_def_bonus'] = 20;
|
||||
}
|
||||
else $post['h_def_bonus']=0;
|
||||
|
||||
if(isset($post['a1_1'])) {
|
||||
$sum = $sum2 = $post['walllevel'] = 0;
|
||||
@@ -110,17 +104,18 @@ class Battle {
|
||||
}
|
||||
|
||||
private function getBattleHeroSim($attbonus) {
|
||||
global $database;
|
||||
$h_atk =0;
|
||||
$h_atk = 0;
|
||||
$h_ob = 1 + 0.010 * $attbonus;
|
||||
|
||||
return array('unit'=>16,'atk'=>$h_atk,'ob'=>$h_ob);
|
||||
return ['unit' => 16,'atk' => $h_atk,'ob' => $h_ob];
|
||||
}
|
||||
|
||||
private function simulate($post) {
|
||||
//set the arrays with attacking and defending units
|
||||
$attacker = ['u1' => 0,'u2' =>0 ,'u3' =>0 ,'u4'=>0,'u5'=>0,'u6'=>0,'u7'=>0,'u8'=>0,'u9'=>0,'u10'=>0,'u11'=>0,'u12'=>0,'u13'=>0,'u14'=>0,'u15'=>0,'u16'=>0,'u17'=>0,'u18'=>0,'u19'=>0,'u20'=>0,'u21'=>0,'u22'=>0,'u23'=>0,'u24'=>0,'u25'=>0,'u26'=>0,'u27'=>0,'u28'=>0,'u29'=>0,'u30'=>0,'u31'=>0,'u32'=>0,'u33'=>0,'u34'=>0,'u35'=>0,'u36'=>0,'u37'=>0,'u38'=>0,'u39'=>0,'u40'=>0,'u41'=>0,'u42'=>0,'u43'=>0,'u44'=>0,'u45'=>0,'u46'=>0,'u47'=>0,'u48'=>0,'u49'=>0,'u50'=>0];
|
||||
$start = ($post['a1_v']-1)*10+1;
|
||||
$attacker = ['u1' => 0, 'u2' => 0, 'u3' => 0, 'u4' => 0, 'u5' => 0, 'u6' => 0, 'u7' => 0, 'u8' => 0, 'u9' => 0, 'u10' => 0, 'u11' => 0, 'u12' => 0, 'u13' => 0, 'u14' => 0, 'u15' => 0, 'u16' => 0, 'u17' => 0, 'u18' => 0, 'u19' => 0, 'u20' => 0, 'u21' => 0, 'u22' => 0, 'u23' => 0, 'u24' => 0,
|
||||
'u25' => 0, 'u26' => 0, 'u27' => 0, 'u28' => 0, 'u29' => 0, 'u30' => 0, 'u31' => 0, 'u32' => 0, 'u33' => 0, 'u34' => 0, 'u35' => 0, 'u36' => 0, 'u37' => 0, 'u38' => 0, 'u39' => 0, 'u40' => 0, 'u41' => 0, 'u42' => 0, 'u43' => 0, 'u44' => 0, 'u45' => 0, 'u46' => 0, 'u47' => 0, 'u48' => 0,
|
||||
'u49' => 0, 'u50' => 0];
|
||||
$start = ($post['a1_v'] - 1) * 10 + 1;
|
||||
$offhero = intval($post['h_off_bonus']);
|
||||
$hero_strenght = intval($post['h_off']);
|
||||
$deffhero = intval($post['h_def_bonus']);
|
||||
@@ -188,10 +183,10 @@ class Battle {
|
||||
public function getTypeLevel($tid,$vid) {
|
||||
global $village,$database;
|
||||
|
||||
$keyholder = array();
|
||||
$keyholder = [];
|
||||
$resourcearray = $database->getResourceLevel($vid);
|
||||
|
||||
foreach(array_keys($resourcearray,$tid) as $key) {
|
||||
foreach(array_keys($resourcearray, $tid) as $key) {
|
||||
if(strpos($key,'t')) {
|
||||
$key = preg_replace("/[^0-9]/", '', $key);
|
||||
array_push($keyholder, $key);
|
||||
@@ -201,9 +196,9 @@ class Battle {
|
||||
$element = count($keyholder);
|
||||
if($element >= 2) {
|
||||
if($tid <= 4) {
|
||||
$temparray = array();
|
||||
for($i=0;$i<=$element-1;$i++) {
|
||||
array_push($temparray,$resourcearray['f'.$keyholder[$i]]);
|
||||
$temparray = [];
|
||||
for($i = 0; $i <= $element - 1; $i++){
|
||||
array_push($temparray, $resourcearray['f'.$keyholder[$i]]);
|
||||
}
|
||||
foreach ($temparray as $key => $val) {
|
||||
if ($val == max($temparray))
|
||||
@@ -228,7 +223,7 @@ class Battle {
|
||||
}
|
||||
|
||||
//1 raid 0 normal
|
||||
function calculateBattle($Attacker,$Defender,$def_wall,$att_tribe,$def_tribe,$residence,$attpop,$defpop,$type,$def_ab,$att_ab1,$att_ab2,$att_ab3,$att_ab4,$att_ab5,$att_ab6,$att_ab7,$att_ab8,$tblevel,$stonemason,$walllevel,$offhero,$hero_strenght,$deffhero,$AttackerID,$DefenderID,$AttackerWref,$DefenderWref,$conqureby, $defReinforcements = null) {
|
||||
function calculateBattle($Attacker, $Defender, $def_wall, $att_tribe, $def_tribe, $residence, $attpop, $defpop, $type, $def_ab, $att_ab1, $att_ab2, $att_ab3, $att_ab4, $att_ab5, $att_ab6, $att_ab7, $att_ab8, $tblevel, $stonemason, $walllevel, $offhero, $hero_strenght, $deffhero, $AttackerID, $DefenderID, $AttackerWref, $DefenderWref, $conqureby, $defReinforcements = null) {
|
||||
global $bid34, $bid35, $database;
|
||||
|
||||
// Define the array, with the units
|
||||
@@ -258,11 +253,12 @@ class Battle {
|
||||
$attacker_artefact = $database->getArtifactsValueInfluence($AttackerID, $AttackerWref, 3, 1, false);
|
||||
$defender_artefact = $database->getArtifactsValueInfluence($DefenderID, $DefenderWref, 3, 1, false);
|
||||
$strongerbuildings = $database->getArtifactsValueInfluence($DefenderID, $DefenderWref, 1, 1, false);
|
||||
$isWWVillage = $database->getVillageField($DefenderWref, 'natar');
|
||||
|
||||
if(isset($Attacker['uhero']) && $Attacker['uhero'] != 0){
|
||||
if(isset($Attacker['uhero']) && $Attacker['uhero'] > 0){
|
||||
$atkhero = $this->getBattleHero($AttackerID);
|
||||
}
|
||||
if(isset($Defender['hero']) && $Defender['hero'] != 0){
|
||||
if(isset($Defender['hero']) && $Defender['hero'] > 0){
|
||||
$defenderhero = $this->getBattleHero($DefenderID);
|
||||
}
|
||||
//own defender units
|
||||
@@ -397,13 +393,13 @@ class Battle {
|
||||
$ap += $atkhero['atk'];
|
||||
}
|
||||
|
||||
if ($offhero !=0 || $hero_strenght !=0) {
|
||||
if ($offhero > 0 || $hero_strenght > 0) {
|
||||
$atkhero= $this->getBattleHeroSim($offhero);
|
||||
$ap *= $atkhero['ob'];
|
||||
$cap *= $atkhero['ob'];
|
||||
$ap += $hero_strenght;
|
||||
}
|
||||
if ($deffhero != 0) {
|
||||
if ($deffhero > 0) {
|
||||
$dfdhero = $this->getBattleHeroSim($deffhero);
|
||||
$dp *= $dfdhero['ob'];
|
||||
$cdp *= $dfdhero['ob'];
|
||||
@@ -468,14 +464,13 @@ class Battle {
|
||||
$winner = ($rap > $rdp);
|
||||
|
||||
// Formula for calculating the Moral
|
||||
if($attpop > $defpop) {
|
||||
// WW villages aren't affected by this moral bonus
|
||||
if($attpop > $defpop && !$isWWVillage) {
|
||||
$moralbonus = 1 / round(max(0.667, pow($defpop / $attpop, 0.2 * min(1, $rap / ($rdp > 0 ? $rdp : 1)))), 3);
|
||||
}
|
||||
else $moralbonus = 1.0;
|
||||
|
||||
if($involve >= 1000 && $type != 1) {
|
||||
$Mfactor = 2 * round((1.8592 - pow($involve, 0.015)), 4);
|
||||
}
|
||||
if($involve >= 1000 && $type != 1) $Mfactor = 2 * round((1.8592 - pow($involve, 0.015)), 4);
|
||||
else $Mfactor = 1.5;
|
||||
|
||||
if ($Mfactor < 1.2578) $Mfactor = 1.2578;
|
||||
@@ -496,8 +491,6 @@ class Battle {
|
||||
|
||||
//Defender result
|
||||
$result[2] = 0;
|
||||
}else if($type == 2){
|
||||
|
||||
}else if($type == 4) {
|
||||
$holder = ($winner) ? pow((($rdp * $moralbonus) / $rap), $Mfactor) : pow(($rap / ($rdp * $moralbonus)), $Mfactor);
|
||||
$holder = $holder / (1 + $holder);
|
||||
|
||||
@@ -200,7 +200,7 @@ class Building {
|
||||
$this->constructBuilding($get['id'], $get['a']);
|
||||
}
|
||||
}
|
||||
elseif(isset($get['buildingFinish']) && $session->plus && intval($session->gold) >= 2 && $session->sit == 0) $this->finishAll();
|
||||
elseif(isset($get['buildingFinish']) && $session->gold >= 2 && $session->sit == 0) $this->finishAll();
|
||||
}
|
||||
|
||||
public function canBuild($id, $tid) {
|
||||
@@ -762,9 +762,9 @@ class Building {
|
||||
}
|
||||
|
||||
public function finishAll($redirect_url = '') {
|
||||
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
|
||||
global $database, $session, $logging, $village, $bid18, $bid10, $bid11, $technology, $_SESSION;
|
||||
|
||||
if ($session->access!=BANNED) {
|
||||
if ($session->access != BANNED) {
|
||||
// will be true if we should decrease player's gold by 2
|
||||
// for the immediate completion action
|
||||
$countPlus2Gold = false;
|
||||
@@ -779,7 +779,7 @@ class Building {
|
||||
$deletIDs = [];
|
||||
|
||||
foreach ($this->buildArray as $jobs) {
|
||||
if ($jobs['wid']==$village->wid) {
|
||||
if ($jobs['wid'] == $village->wid) {
|
||||
$wwvillage = $database->getResourceLevel($jobs['wid']);
|
||||
if ($wwvillage['f99t'] != 40) {
|
||||
$level = $jobs['level'];
|
||||
|
||||
@@ -825,6 +825,7 @@ define("DEMOLITION_OF","Demolition of ");
|
||||
define("MAINBUILDING_DESC","In the main building the village's master builders live. The higher its level the faster your master builders complete the construction of new buildings.");
|
||||
|
||||
define("RALLYPOINT","Rally Point");
|
||||
define("RALLYPOINT_COMMENCE","Troops movement will be displayed when the ".RALLYPOINT." is completed");
|
||||
define("OVERVIEW","Overview");
|
||||
define("REINFORCEMENT","Reinforcement");
|
||||
define("EVASION_SETTINGS","evasion settings");
|
||||
|
||||
+223
-221
@@ -12,29 +12,29 @@ if(isset($_GET['refresh'])){
|
||||
<p class="build_desc"><?php echo RALLYPOINT_DESC;?></p>
|
||||
|
||||
<?php
|
||||
include_once ("16_menu.tpl");
|
||||
$units_type = $database->getMovement("34", $village->wid, 1);
|
||||
$settlers = $database->getMovement("7", $village->wid, 1);
|
||||
$oasis_incoming = 0;
|
||||
$array = $database->getOasis($village->wid);
|
||||
foreach($array as $conqured){
|
||||
$oasis_incoming += count($database->getMovement(6, $conqured['wref'], 0));
|
||||
}
|
||||
$units_incoming = count($units_type);
|
||||
$settlers_incoming = count($settlers);
|
||||
for($i = 0; $i < $units_incoming; $i++){
|
||||
if($units_type[$i]['attack_type'] == 1 && $units_type[$i]['sort_type'] == 3) $units_incoming -= 1;
|
||||
}
|
||||
if($units_incoming > 0 || $settlers_incoming > 0 || $oasis_incoming > 0){
|
||||
?>
|
||||
<h4><?php echo INCOMING_TROOPS;?> (<?php echo $units_incoming+$settlers_incoming+$oasis_incoming; ?>)</h4>
|
||||
<?php
|
||||
if($village->resarray['f39'] > 0){
|
||||
include_once ("16_menu.tpl");
|
||||
$units_type = $database->getMovement(34, $village->wid, 1);
|
||||
$settlers = $database->getMovement(7, $village->wid, 1);
|
||||
$oasis_incoming = 0;
|
||||
$array = $database->getOasis($village->wid);
|
||||
foreach($array as $conqured) $oasis_incoming += count($database->getMovement(6, $conqured['wref'], 0));
|
||||
|
||||
include ("16_incomming.tpl");
|
||||
}
|
||||
?>
|
||||
$units_incoming = count($units_type);
|
||||
$settlers_incoming = count($settlers);
|
||||
for($i = 0; $i < $units_incoming; $i++){
|
||||
if($units_type[$i]['attack_type'] == 1 && $units_type[$i]['sort_type'] == 3) $units_incoming -= 1;
|
||||
}
|
||||
if($units_incoming > 0 || $settlers_incoming > 0 || $oasis_incoming > 0){
|
||||
?>
|
||||
<h4><?php echo INCOMING_TROOPS;?> (<?php echo $units_incoming+$settlers_incoming+$oasis_incoming; ?>)</h4>
|
||||
<?php
|
||||
|
||||
include ("16_incomming.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
<h4><?php echo TROOPS_IN_THE_VILLAGE;?></h4>
|
||||
<h4><?php echo TROOPS_IN_THE_VILLAGE;?></h4>
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -48,23 +48,151 @@ include ("16_incomming.tpl");
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
<?php
|
||||
|
||||
include ("16_troops.tpl");
|
||||
?>
|
||||
|
||||
include ("16_troops.tpl");
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
if(count($village->enforcetome) > 0){
|
||||
foreach($village->enforcetome as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
if($enforce['from'] != 0){
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<?php
|
||||
if(count($village->enforcetome) > 0){
|
||||
foreach($village->enforcetome as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
if($enforce['from'] != 0){
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
if(LANG == "es"){
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." </a>";
|
||||
if(LANG == "es"){
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." </a>";
|
||||
}else{
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." ".TROOPSFROM."</a>";
|
||||
}
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}else{
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." ".TROOPSFROM."</a>";
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a>".TASKMASTER."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a> ".VILLAGE_OF_THE_ELDERS_TROOPS."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = 4;
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><span class=none><b>".SEND_BACK."</b></span></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$enforcevill = array();
|
||||
$enforceoasis = array();
|
||||
$allenforce = $village->enforcetoyou;
|
||||
$enforcemeoasis = $village->enforceoasis;
|
||||
if(count($allenforce) > 0){
|
||||
foreach($allenforce as $enforce){
|
||||
$conquredvid = $database->getOasisField($enforce['vref'], "conqured");
|
||||
if($conquredvid > 0){
|
||||
$enforce['conqured'] = $conquredvid;
|
||||
array_push($enforceoasis, $enforce);
|
||||
}else{
|
||||
array_push($enforcevill, $enforce);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0){
|
||||
foreach($enforcemeoasis as $enforce){
|
||||
array_push($enforceoasis, $enforce);
|
||||
}
|
||||
}
|
||||
if(count($enforcevill) > 0){
|
||||
echo "<h4>".TROOPS_IN_OTHER_VILLAGE."</h4>";
|
||||
foreach($enforcevill as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".REINFORCEMENTFOR." ".$database->getVillageField($enforce['vref'], "name")." </a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($enforceoasis) > 0){
|
||||
echo "<h4>".TROOPS_IN_OASIS."</h4>";
|
||||
foreach($enforceoasis as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['conqured'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
if(LANG == "es"){
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." </a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a>";
|
||||
}else{
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." ".TROOPSFROM."</a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a>";
|
||||
}
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'], "owner"), "tribe", 0);
|
||||
@@ -90,222 +218,96 @@ if(count($village->enforcetome) > 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}else{
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners3($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners3($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a>".TASKMASTER."</a></td>
|
||||
<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".$database->getVillageField($prisoners['wref'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a> ".VILLAGE_OF_THE_ELDERS_TROOPS."</a>";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".PRISONERSIN." ".$database->getVillageField($prisoners['wref'], "name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = 4;
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
if($prisoners['t11'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
for($i = 1; $i <= 10; $i++){
|
||||
if($prisoners['t'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
}else
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11'] > 0) echo "<td>".$prisoners['t11']."</td>";
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><span class=none><b>".SEND_BACK."</b></span></div></td></tr>";
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan2\"><div class='sup'>".$technology->getUpkeep($prisoners, $tribe, 0, 1)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>".KILL."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$enforcevill = array();
|
||||
$enforceoasis = array();
|
||||
$allenforce = $village->enforcetoyou;
|
||||
$enforcemeoasis = $village->enforceoasis;
|
||||
if(count($allenforce) > 0){
|
||||
foreach($allenforce as $enforce){
|
||||
$conquredvid = $database->getOasisField($enforce['vref'], "conqured");
|
||||
if($conquredvid > 0){
|
||||
$enforce['conqured'] = $conquredvid;
|
||||
array_push($enforceoasis, $enforce);
|
||||
}else{
|
||||
array_push($enforcevill, $enforce);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($enforcemeoasis) > 0){
|
||||
foreach($enforcemeoasis as $enforce){
|
||||
array_push($enforceoasis, $enforce);
|
||||
}
|
||||
}
|
||||
if(count($enforcevill) > 0){
|
||||
echo "<h4>".TROOPS_IN_OTHER_VILLAGE."</h4>";
|
||||
foreach($enforcevill as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".REINFORCEMENTFOR." ".$database->getVillageField($enforce['vref'], "name")." </a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($enforceoasis) > 0){
|
||||
echo "<h4>".TROOPS_IN_OASIS."</h4>";
|
||||
foreach($enforceoasis as $enforce){
|
||||
$colspan = 10 + $enforce['hero'];
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['conqured'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
if(LANG == "es"){
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".TROOPSFROM." ".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." </a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a>";
|
||||
}else{
|
||||
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'], "owner")."\">".$database->getUserField($database->getVillageField($enforce['from'], "owner"), "username", 0)." ".TROOPSFROM."</a> ".FROM." <a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'], "name")."</a>";
|
||||
}
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($enforce['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = $start; $i <= ($start + 9); $i++){
|
||||
if($enforce['u'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else{
|
||||
echo "<td>";
|
||||
}
|
||||
echo $enforce['u'.$i]."</td>";
|
||||
}
|
||||
if($enforce['hero'] != 0){
|
||||
echo "<td>".$enforce['hero']."</td>";
|
||||
}
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce, $tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners3($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners3($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".$database->getVillageField($prisoners['wref'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['wref']."&c=".$generator->getMapCheck($prisoners['wref'])."\">".PRISONERSIN." ".$database->getVillageField($prisoners['wref'], "name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($prisoners['t11'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = 1; $i <= 10; $i++){
|
||||
if($prisoners['t'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}
|
||||
else echo "<td>";
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11'] > 0) echo "<td>".$prisoners['t11']."</td>";
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><th>".UPKEEP."</th><td colspan=\"$colspan2\"><div class='sup'>".$technology->getUpkeep($prisoners, $tribe, 0, 1)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />".PER_HR."</div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>".KILL."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
if(count($database->getPrisoners($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
if(count($database->getPrisoners($village->wid)) > 0){
|
||||
echo "<h4>".PRISONERS."</h4>";
|
||||
foreach($database->getPrisoners($village->wid) as $prisoners){
|
||||
$colspan = 10 + $prisoners['t11'];
|
||||
$colspan2 = $colspan + 1;
|
||||
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
|
||||
<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".$database->getVillageField($prisoners['from'], "name")."</a></td>
|
||||
<td colspan=\"$colspan\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".PRISONERSFROM." ".$database->getVillageField($prisoners['from'], "name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($prisoners['t11'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = 1; $i <= 10; $i++){
|
||||
if($prisoners['t'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
echo "<a href=\"karte.php?d=".$prisoners['from']."&c=".$generator->getMapCheck($prisoners['from'])."\">".PRISONERSFROM." ".$database->getVillageField($prisoners['from'], "name")."</a>";
|
||||
echo "</td></tr></thead><tbody class=\"units\">";
|
||||
$tribe = $database->getUserField($database->getVillageField($prisoners['from'], "owner"), "tribe", 0);
|
||||
$start = ($tribe - 1) * 10 + 1;
|
||||
$end = ($tribe * 10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i = $start; $i <= ($end); $i++){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
else echo "<td>";
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11'] > 0) echo "<td>".$prisoners['t11']."</td>";
|
||||
|
||||
echo "</tr></tbody>
|
||||
if($prisoners['t11'] != 0){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
echo "</tr><tr><th>".TROOPS."</th>";
|
||||
for($i = 1; $i <= 10; $i++){
|
||||
if($prisoners['t'.$i] == 0){
|
||||
echo "<td class=\"none\">";
|
||||
}else
|
||||
echo "<td>";
|
||||
echo $prisoners['t'.$i]."</td>";
|
||||
}
|
||||
if($prisoners['t11'] > 0) echo "<td>".$prisoners['t11']."</td>";
|
||||
|
||||
echo "</tr></tbody>
|
||||
<tbody class=\"infos\"><tr><td colspan=\"$colspan2\"><div class='sup'><img class=\"r6\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" /></div><div class='sback'><a href='a2b.php?delprisoners=".$prisoners['id']."'>".SEND_BACK."</a></div></td></tr>";
|
||||
echo "</tbody></table>";
|
||||
echo "</tbody></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php
|
||||
$units_type = $database->getMovement(3, $village->wid, 0);
|
||||
$settlers = $database->getMovement(5, $village->wid, 0);
|
||||
$units_incoming = count($units_type);
|
||||
for($i = 0; $i < $units_incoming; $i++){
|
||||
if($units_type[$i]['vref'] != $village->wid) $units_incoming -= 1;
|
||||
}
|
||||
$units_incoming += count($settlers);
|
||||
|
||||
if($units_incoming >= 1){
|
||||
echo "<h4>".TROOPS_ON_THEIR_WAY."</h4>";
|
||||
include ("16_walking.tpl");
|
||||
$units_type = $database->getMovement(3, $village->wid, 0);
|
||||
$settlers = $database->getMovement(5, $village->wid, 0);
|
||||
$units_incoming = count($units_type);
|
||||
for($i = 0; $i < $units_incoming; $i++){
|
||||
if($units_type[$i]['vref'] != $village->wid) $units_incoming -= 1;
|
||||
}
|
||||
$units_incoming += count($settlers);
|
||||
|
||||
if($units_incoming >= 1){
|
||||
echo "<h4>".TROOPS_ON_THEIR_WAY."</h4>";
|
||||
include ("16_walking.tpl");
|
||||
}
|
||||
}
|
||||
else echo '<b>'.RALLYPOINT_COMMENCE.'</b><br>';
|
||||
|
||||
include ("upgrade.tpl");
|
||||
?>
|
||||
|
||||
+32
-48
@@ -127,30 +127,23 @@ if($oasis['owner'] == 2){
|
||||
<?php
|
||||
$unit = $database->getUnit($_GET['d']);
|
||||
$unarray = array(31 => U31, U32, U33, U34, U35, U36, U37, U38, U39, U40);
|
||||
$a = 0;
|
||||
$troopsPresent = false;
|
||||
for ($i = 31; $i <= 40; $i++) {
|
||||
if($unit['u'.$i]){
|
||||
// assemble oasis warsim link
|
||||
if ($basearray['fieldtype'] == 0) {
|
||||
if (!$oasislink) {
|
||||
$oasislink = rtrim(HOMEPAGE, '/').'/warsim.php?target=4';
|
||||
}
|
||||
$oasislink .= '&u'.$i.'='.$unit['u'.$i];
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td class="ico"><img class="unit u'.$i.'" src="img/x.gif" alt="'.$unarray[$i].'" title="'.$unarray[$i].'" /></td>';
|
||||
echo '<td class="val">'.$unit['u'.$i].'</td>';
|
||||
echo '<td class="desc">'.$unarray[$i].'</td>';
|
||||
echo '</tr>';
|
||||
}else{
|
||||
$a = $a+1;
|
||||
}
|
||||
if($unit['u'.$i] > 0){
|
||||
// assemble oasis warsim link
|
||||
if ($basearray['fieldtype'] == 0) {
|
||||
if (!$oasislink) $oasislink = rtrim(HOMEPAGE, '/').'/warsim.php?target=4';
|
||||
$oasislink .= '&u'.$i.'='.$unit['u'.$i];
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td class="ico"><img class="unit u'.$i.'" src="img/x.gif" alt="'.$unarray[$i].'" title="'.$unarray[$i].'" /></td>';
|
||||
echo '<td class="val">'.$unit['u'.$i].'</td>';
|
||||
echo '<td class="desc">'.$unarray[$i].'</td>';
|
||||
echo '</tr>';
|
||||
$troopsPresent = true;
|
||||
}
|
||||
}
|
||||
if($a == 10){
|
||||
echo '<tr><td>'.NOTROOP.'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
if(!$troopsPresent) echo '<tr><td>'.NOTROOP.'</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -459,33 +452,25 @@ if($type >= 18 && $type <= 21){
|
||||
<td class="none"><?php
|
||||
$mode = CP;
|
||||
$total = count($database->getProfileVillages($session->uid));
|
||||
$need_cps = ${'cp'.$mode}[$total+1];
|
||||
$cps = floor($database->getUserField($session->uid, 'cp',0));
|
||||
|
||||
if($cps >= $need_cps) {
|
||||
$enough_cp = true;
|
||||
} else {
|
||||
$enough_cp = false;
|
||||
}
|
||||
$need_cps = ${'cp'.$mode}[$total + 1];
|
||||
$cps = floor($database->getUserField($session->uid, 'cp',0));
|
||||
$enough_cp = $cps >= $need_cps;
|
||||
|
||||
|
||||
if($village->unitarray['u'.$session->tribe.'0'] >= 3 AND $enough_cp AND $village->resarray['f39']) {
|
||||
$test = "<a href=\"a2b.php?id=".$_GET['d']."&s=1\">» ".FNEWVILLAGE."</a>";
|
||||
} elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 AND !$enough_cp) {
|
||||
$test = "» ".FNEWVILLAGE." ($cps/$need_cps ".CULTUREPOINT.")";
|
||||
if($village->unitarray['u'.$session->tribe.'0'] >= 3 && $enough_cp && $village->resarray['f39'] > 0) {
|
||||
$text = "<a href=\"a2b.php?id=".$_GET['d']."&s=1\">» ".FNEWVILLAGE."</a>";
|
||||
} elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 && !$enough_cp) {
|
||||
$text = "» ".FNEWVILLAGE." ($cps/$need_cps ".CULTUREPOINT.")";
|
||||
} elseif(!$village->resarray['f39']) {
|
||||
$test = "» ".FNEWVILLAGE." (".BUILDRALLY.")";
|
||||
$text = "» ".FNEWVILLAGE." (".BUILDRALLY.")";
|
||||
} else {
|
||||
$test = "» ".FNEWVILLAGE." (".$village->unitarray['u'.$session->tribe.'0']."/3 ".SETTLERSAVAIL.")";
|
||||
$text = "» ".FNEWVILLAGE." (".$village->unitarray['u'.$session->tribe.'0']."/3 ".SETTLERSAVAIL.")";
|
||||
}
|
||||
|
||||
if ($basearray['fieldtype']==0) {
|
||||
if ($village->resarray['f39']==0) {
|
||||
if ($basearray['owner'] == $session->uid) {
|
||||
echo "<a href=\"build.php?id=39\">» ".RAID." $otext (".BUILDRALLY.")</a>";
|
||||
} else {
|
||||
echo "» ".RAID." $otext (".BUILDRALLY.")";
|
||||
}
|
||||
if ($basearray['fieldtype'] == 0) {
|
||||
if ($village->resarray['f39'] == 0) {
|
||||
if ($basearray['owner'] == $session->uid) echo "<a href=\"build.php?id=39\">» ".RAID." $otext (".BUILDRALLY.")</a>";
|
||||
else echo "» ".RAID." $otext (".BUILDRALLY.")";
|
||||
} else {
|
||||
echo "<a href=\"a2b.php?z=".$_GET['d']."&o\">» ".RAID." $otext</a>";
|
||||
}
|
||||
@@ -499,9 +484,8 @@ if($type >= 18 && $type <= 21){
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "$test";
|
||||
}
|
||||
else echo $text;
|
||||
?>
|
||||
</tr>
|
||||
<?php }
|
||||
@@ -517,12 +501,12 @@ if($type >= 18 && $type <= 21){
|
||||
$data1 = mysqli_fetch_assoc($query1);
|
||||
$query2 = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$data2 = mysqli_fetch_assoc($query2);
|
||||
if($data2['access']=='0' or ($data2['access']== MULTIHUNTER && $data2['id'] == 5) or (!ADMIN_ALLOW_INCOMING_RAIDS && $data2['access']=='9')) {
|
||||
if($data2['access'] == 0 || ($data2['access']== MULTIHUNTER && $data2['id'] == 5) || (!ADMIN_ALLOW_INCOMING_RAIDS && $data2['access'] == 9)) {
|
||||
echo "» ".SENDTROOP." (".BAN.")";
|
||||
} else if($data2['vac_mode']=='1') {
|
||||
echo "» Send troops. (Vacation mode on)";
|
||||
} else if($data2['protect'] < time()) {
|
||||
echo $village->resarray['f39']? "<a href=\"a2b.php?s=2&z=".$_GET['d']."\">» ".SENDTROOP : "» ".SENDTROOP." (".BUILDRALLY.")";
|
||||
echo $village->resarray['f39'] > 0 ? "<a href=\"a2b.php?s=2&z=".$_GET['d']."\">» ".SENDTROOP : "» ".SENDTROOP." (".BUILDRALLY.")";
|
||||
} else {
|
||||
echo "» ".SENDTROOP." (".BEGINPRO.")";
|
||||
}
|
||||
@@ -532,7 +516,7 @@ if($type >= 18 && $type <= 21){
|
||||
<tr>
|
||||
<td class="none">
|
||||
<?php
|
||||
if($data2['access']=='0' or ($data2['access']== MULTIHUNTER && $data2['id'] == 5) or (!ADMIN_ALLOW_INCOMING_RAIDS && $data2['access']=='9')) {
|
||||
if($data2['access']== 0 || ($data2['access'] == MULTIHUNTER && $data2['id'] == 5) || (!ADMIN_ALLOW_INCOMING_RAIDS && $data2['access'] == 9)) {
|
||||
echo "» ".SENDMERC." (".BAN.")";
|
||||
} else if($data2['vac_mode']=='1') {
|
||||
echo "» Send merchant(s). (Vacation mode on)";
|
||||
|
||||
+119
-117
@@ -1,148 +1,150 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename dorf2.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
<?php
|
||||
// ################################################################################
|
||||
// # -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
// # --------------------------------------------------------------------------- ##
|
||||
// # Filename dorf2.tpl ##
|
||||
// # Developed by: Dzoki ##
|
||||
// # License: TravianX Project ##
|
||||
// # Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
// # ##
|
||||
// ################################################################################
|
||||
?>
|
||||
<map name="map1" id="map1">
|
||||
<?php
|
||||
if($building->walling()) {
|
||||
if($building->walling()){
|
||||
$wtitle = Building::procResType($building->walling())." Level ".$village->resarray['f40'];
|
||||
}
|
||||
else {
|
||||
$wtitle = ($village->resarray['f40'] == 0)? "Outer building site" : Building::procResType($village->resarray['f40t'],0)." Level ".$village->resarray['f40'];
|
||||
}else{
|
||||
$wtitle = ($village->resarray['f40'] == 0) ? "Outer building site" : Building::procResType($village->resarray['f40t'], 0)." Level ".$village->resarray['f40'];
|
||||
}
|
||||
?>
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="325,225,180" shape="circle" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="220,230,185" shape="circle" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>"
|
||||
coords="325,225,180" shape="circle" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>"
|
||||
coords="220,230,185" shape="circle" alt="" />
|
||||
|
||||
</map>
|
||||
<map name="map2" id="map2">
|
||||
<?php
|
||||
$coords = array(19=>"53,91,91,71,127,91,91,112","136,66,174,46,210,66,174,87","196,56,234,36,270,56,234,77","270,69,308,49,344,69,308,90","327,117,365,97,401,117,365,138","14,129,52,109,88,129,52,150","97,137,135,117,171,137,135,158","182,119,182,65,257,65,257,119,220,140","337,156,375,136,411,156,375,177","2,199,40,179,76,199,40,220","129,164,167,144,203,164,167,185","92,189,130,169,166,189,130,210","342,216,380,196,416,216,380,237","22,238,60,218,96,238,60,259","167,232,205,212,241,232,205,253","290,251,328,231,364,251,328,272","95,273,133,253,169,273,133,294","222,284,260,264,296,284,260,305","80,306,118,286,154,306,118,327","199,316,237,296,273,316,237,337","270,158,303,135,316,155,318,178,304,211,288,227,263,238,250,215");
|
||||
for($t=19;$t<=39;$t++) {
|
||||
if ($village->natar==1 && ( $t== 25 || $t == 26 || $t == 29 || $t == 30 || $t == 33 )) {
|
||||
if ($t==33) {
|
||||
if($village->resarray['f99'] != 0) {
|
||||
$title = Building::procResType(40). " Level ".$village->resarray['f99'];
|
||||
}else $title = Building::procResType(40);
|
||||
|
||||
echo "<area href=\"build.php?id=99\" title=\"$title\" coords=\"190,170,80\" shape=\"circle\"/>";
|
||||
}
|
||||
} else {
|
||||
if($village->resarray['f'.$t.'t'] != 0) {
|
||||
$title = Building::procResType($village->resarray['f'.$t.'t']). " Level ".$village->resarray['f'.$t];
|
||||
}else{
|
||||
$title = "Building site";
|
||||
if(($t == 39) && ($village->resarray['f'.$t] == 0)) {
|
||||
$title = "Rally Point building site";
|
||||
}
|
||||
}
|
||||
echo "<area href=\"build.php?id=$t\" title=\"$title\" coords=\"$coords[$t]\" shape=\"poly\"/>";
|
||||
}
|
||||
$coords = [19 => "53,91,91,71,127,91,91,112", "136,66,174,46,210,66,174,87", "196,56,234,36,270,56,234,77", "270,69,308,49,344,69,308,90", "327,117,365,97,401,117,365,138", "14,129,52,109,88,129,52,150", "97,137,135,117,171,137,135,158", "182,119,182,65,257,65,257,119,220,140",
|
||||
"337,156,375,136,411,156,375,177", "2,199,40,179,76,199,40,220", "129,164,167,144,203,164,167,185", "92,189,130,169,166,189,130,210", "342,216,380,196,416,216,380,237", "22,238,60,218,96,238,60,259", "167,232,205,212,241,232,205,253", "290,251,328,231,364,251,328,272",
|
||||
"95,273,133,253,169,273,133,294", "222,284,260,264,296,284,260,305", "80,306,118,286,154,306,118,327", "199,316,237,296,273,316,237,337", "270,158,303,135,316,155,318,178,304,211,288,227,263,238,250,215"];
|
||||
for($t = 19; $t <= 39; $t++){
|
||||
if($village->natar == 1 && in_array($t, [25, 26, 29, 30, 33])){
|
||||
if($t == 33){
|
||||
if($village->resarray['f99'] > 0) $title = Building::procResType(40)." Level ".$village->resarray['f99'];
|
||||
else $title = Building::procResType(40);
|
||||
echo "<area href=\"build.php?id=99\" title=\"$title\" coords=\"190,170,80\" shape=\"circle\"/>";
|
||||
}
|
||||
}else{
|
||||
if($village->resarray['f'.$t.'t'] > 0){
|
||||
$title = Building::procResType($village->resarray['f'.$t.'t'])." Level ".$village->resarray['f'.$t];
|
||||
}else{
|
||||
$title = "Building site";
|
||||
if(($t == 39) && ($village->resarray['f'.$t] == 0)) $title = "Rally Point building site";
|
||||
}
|
||||
echo "<area href=\"build.php?id=$t\" title=\"$title\" coords=\"$coords[$t]\" shape=\"poly\"/>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="312,338,347,338,377,320,406,288,421,262,421,222,396,275,360,311" shape="poly" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="49,338,0,274,0,240,33,286,88,338" shape="poly" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="0,144,34,88,93,39,181,15,252,15,305,31,358,63,402,106,421,151,421,93,378,47,280,0,175,0,78,28,0,92" shape="poly" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>"
|
||||
coords="312,338,347,338,377,320,406,288,421,262,421,222,396,275,360,311"
|
||||
shape="poly" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>"
|
||||
coords="49,338,0,274,0,240,33,286,88,338" shape="poly" alt="" />
|
||||
<area href="build.php?id=40" title="<?php echo $wtitle; ?>"
|
||||
coords="0,144,34,88,93,39,181,15,252,15,305,31,358,63,402,106,421,151,421,93,378,47,280,0,175,0,78,28,0,92"
|
||||
shape="poly" alt="" />
|
||||
</map>
|
||||
<?php
|
||||
if($session->tribe == 3){
|
||||
$session->tribe = '';
|
||||
}
|
||||
|
||||
if($building->walling()) {
|
||||
$vmapc = "d2_1".$session->tribe;
|
||||
}
|
||||
else {
|
||||
$vmapc = ($village->resarray['f40'] == 0)? "d2_0" : "d2_1".$session->tribe;
|
||||
}
|
||||
if($session->tribe == 3) $session->tribe = '';
|
||||
|
||||
if($building->walling()) $vmapc = "d2_1".$session->tribe;
|
||||
else $vmapc = ($village->resarray['f40'] == 0) ? "d2_0" : "d2_1".$session->tribe;
|
||||
?>
|
||||
<div id="village_map" class="<?php echo $vmapc; ?>">
|
||||
<?php
|
||||
for ($i=1;$i<=20;$i++) {
|
||||
if($village->natar==1 AND (($i+18)=='25' || ($i+18)=='26' || ($i+18)=='29' || ($i+18)=='30' || ($i+18)=='33')) {
|
||||
} else {
|
||||
$text = "Building site";
|
||||
$img = "iso";
|
||||
if($village->resarray['f'.($i+18).'t'] != 0) {
|
||||
$text = Building::procResType($village->resarray['f'.($i+18).'t'])." Level ".$village->resarray['f'.($i+18)];
|
||||
$img = "g".$village->resarray['f'.($i+18).'t'];
|
||||
}
|
||||
foreach($building->buildArray as $job) {
|
||||
if($job['field'] == ($i+18)) {
|
||||
$img = 'g'.$job['type'].'b';
|
||||
$text = Building::procResType($job['type'])." Level ".$village->resarray['f'.$job['field']];
|
||||
}
|
||||
}
|
||||
echo "<img src=\"img/x.gif\" class=\"building d$i $img\" alt=\"$text\" />";
|
||||
//set event last quest
|
||||
if (($_SESSION['qst']==38 && QTYPE==37) || ($_SESSION['qst']==31 && QTYPE==25)){
|
||||
if ($i<8) {
|
||||
$dte=array("tur","purp","yell","oran","green","red","dark");
|
||||
$im=$dte[$i-1];
|
||||
echo "<img src=\"img/x.gif\" class=\"building e$i rocket $im\" alt=\"$text\" />";
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 1; $i <= 20; $i++){
|
||||
if($village->natar == 1 and (($i + 18) == '25' || ($i + 18) == '26' || ($i + 18) == '29' || ($i + 18) == '30' || ($i + 18) == '33')){
|
||||
}else{
|
||||
$text = "Building site";
|
||||
$img = "iso";
|
||||
if($village->resarray['f'.($i + 18).'t'] != 0){
|
||||
$text = Building::procResType($village->resarray['f'.($i + 18).'t'])." Level ".$village->resarray['f'.($i + 18)];
|
||||
$img = "g".$village->resarray['f'.($i + 18).'t'];
|
||||
}
|
||||
foreach($building->buildArray as $job){
|
||||
if($job['field'] == ($i + 18)){
|
||||
$img = 'g'.$job['type'].'b';
|
||||
$text = Building::procResType($job['type'])." Level ".$village->resarray['f'.$job['field']];
|
||||
}
|
||||
}
|
||||
echo "<img src=\"img/x.gif\" class=\"building d$i $img\" alt=\"$text\" />";
|
||||
// set event last quest
|
||||
if(($_SESSION['qst'] == 38 && QTYPE == 37) || ($_SESSION['qst'] == 31 && QTYPE == 25)){
|
||||
if($i < 8){
|
||||
$dte = ["tur", "purp", "yell", "oran", "green", "red", "dark"];
|
||||
$im = $dte[$i - 1];
|
||||
echo "<img src=\"img/x.gif\" class=\"building e$i rocket $im\" alt=\"$text\" />";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($_SESSION['qst']==38 && QTYPE==37) || ($_SESSION['qst']==31 && QTYPE==25)){
|
||||
$database->updateUserField($_SESSION['username'],'quest','40',0);
|
||||
$_SESSION['qst']=40;
|
||||
}
|
||||
if($village->resarray['f39'] == 0) {
|
||||
if($building->rallying()) {
|
||||
echo "<img src=\"img/x.gif\" class=\"dx1 g16b\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
|
||||
}
|
||||
else {
|
||||
echo "<img src=\"img/x.gif\" class=\"dx1 g16e\" alt=\"Rally Point building site\" />";
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<img src=\"img/x.gif\" class=\"dx1 g16\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
|
||||
}
|
||||
if(($_SESSION['qst'] == 38 && QTYPE == 37) || ($_SESSION['qst'] == 31 && QTYPE == 25)){
|
||||
$database->updateUserField($_SESSION['username'], 'quest', '40', 0);
|
||||
$_SESSION['qst'] = 40;
|
||||
}
|
||||
if($village->resarray['f39'] == 0){
|
||||
if($building->rallying()) echo "<img src=\"img/x.gif\" class=\"dx1 g16b\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
|
||||
else echo "<img src=\"img/x.gif\" class=\"dx1 g16e\" alt=\"Rally Point building site\" />";
|
||||
}
|
||||
else echo "<img src=\"img/x.gif\" class=\"dx1 g16\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
|
||||
|
||||
?>
|
||||
<?php
|
||||
if($village->resarray['f99t'] == 40) {
|
||||
if($village->resarray['f99'] >= 0 && $village->resarray['f99'] <= 19) {
|
||||
echo '<img class="ww g40" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99'] >= 20 && $village->resarray['f99'] <= 39) {
|
||||
echo '<img class="ww g40_1" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99'] >= 40 && $village->resarray['f99'] <= 59) {
|
||||
echo '<img class="ww g40_2" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99'] >= 60 && $village->resarray['f99'] <= 79) {
|
||||
echo '<img class="ww g40_3" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99'] >= 80 && $village->resarray['f99'] <= 99) {
|
||||
echo '<img class="ww g40_4" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99'] == 100) {
|
||||
echo '<img class="ww g40_5" src="img/x.gif" alt="Worldwonder">'; }
|
||||
if($village->resarray['f99t'] == 40){
|
||||
if($village->resarray['f99'] >= 0 && $village->resarray['f99'] <= 19){
|
||||
echo '<img class="ww g40" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
if($village->resarray['f99'] >= 20 && $village->resarray['f99'] <= 39){
|
||||
echo '<img class="ww g40_1" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
if($village->resarray['f99'] >= 40 && $village->resarray['f99'] <= 59){
|
||||
echo '<img class="ww g40_2" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
if($village->resarray['f99'] >= 60 && $village->resarray['f99'] <= 79){
|
||||
echo '<img class="ww g40_3" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
if($village->resarray['f99'] >= 80 && $village->resarray['f99'] <= 99){
|
||||
echo '<img class="ww g40_4" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
if($village->resarray['f99'] == 100){
|
||||
echo '<img class="ww g40_5" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div id="levels" <?php if(isset($_COOKIE['t3l'])) { echo "class=\"on\""; } ?> >
|
||||
<div id="levels"
|
||||
<?php if(isset($_COOKIE['t3l'])) { echo "class=\"on\""; } ?>>
|
||||
<?php
|
||||
for($i=1;$i<=20;$i++) {
|
||||
if ($village->resarray['f'.($i+18).'t'] != 0) {
|
||||
echo "<div class=\"d$i\">".$village->resarray['f'.($i+18)]."</div>";
|
||||
for($i = 1; $i <= 20; $i++){
|
||||
if($village->resarray['f'.($i + 18).'t'] != 0){
|
||||
echo "<div class=\"d$i\">".$village->resarray['f'.($i + 18)]."</div>";
|
||||
}
|
||||
}
|
||||
if($village->resarray['f39t'] != 0){
|
||||
echo "<div class=\"l39\">".$village->resarray['f39']."</div>";
|
||||
}
|
||||
if($village->resarray['f39t'] != 0) {
|
||||
echo "<div class=\"l39\">".$village->resarray['f39']."</div>";
|
||||
if($village->resarray['f40t'] != 0){
|
||||
echo "<div class=\"l40\">".$village->resarray['f40']."</div>";
|
||||
}
|
||||
if($village->resarray['f40t'] != 0) {
|
||||
echo "<div class=\"l40\">".$village->resarray['f40']."</div>";
|
||||
if($village->resarray['f99t'] != 0){
|
||||
echo "<div class=\"d40\">".$village->resarray['f99']."</div>";
|
||||
}
|
||||
if($village->resarray['f99t'] != 0) {
|
||||
echo "<div class=\"d40\">".$village->resarray['f99']."</div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<img class="map1" usemap="#map1" src="img/x.gif" alt="" />
|
||||
<img class="map2" usemap="#map2" src="img/x.gif" alt="" />
|
||||
<img class="map1" usemap="#map1" src="img/x.gif" alt="" /> <img
|
||||
class="map2" usemap="#map2" src="img/x.gif" alt="" />
|
||||
</div>
|
||||
<img src="img/x.gif" id="lswitch" <?php if(isset($_COOKIE['t3l'])) { echo "class=\"on\""; } ?> onclick="vil_levels_toggle()" />
|
||||
<img src="img/x.gif" id="lswitch"
|
||||
<?php if(isset($_COOKIE['t3l'])) { echo "class=\"on\""; } ?>
|
||||
onclick="vil_levels_toggle()" />
|
||||
|
||||
+10
-25
@@ -1,32 +1,17 @@
|
||||
<?php
|
||||
$time = time();
|
||||
$artifactsSpawn = (COMMENCE + NATARS_SPAWN_TIME * 86400) - $time;
|
||||
$wwSpawn = (COMMENCE + NATARS_WW_SPAWN_TIME * 86400) - $time;
|
||||
$wwBuildingPlansSpawn = (COMMENCE + NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400) - $time;
|
||||
$time = time(); //The actual time
|
||||
$startDate = strtotime(START_DATE); //When the server has started
|
||||
$daysToDisplay = 432000 / SPEED; //5 days / SPEED of the server
|
||||
$spawnTimeArray = ["Artifacts" => ($startDate + NATARS_SPAWN_TIME * 86400) - $time,
|
||||
"WW villages" => ($startDate + NATARS_WW_SPAWN_TIME * 86400) - $time,
|
||||
"WW building plans" => ($startDate + NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400) - $time];
|
||||
|
||||
if($artifactsSpawn <= $daysToDisplay && $artifactsSpawn > 0){
|
||||
foreach($spawnTimeArray as $text => $spawnTime){
|
||||
if($spawnTime <= $daysToDisplay && $spawnTime > 0){
|
||||
?>
|
||||
<br /><br />
|
||||
<div>
|
||||
<span><b>Artifacts</b> will spawn in: </span>
|
||||
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat($artifactsSpawn); ?></span>
|
||||
<span><b><?php echo $text; ?></b> will spawn in: </span>
|
||||
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat($spawnTime); ?></span>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if($wwSpawn <= $daysToDisplay && $wwSpawn > 0){
|
||||
?>
|
||||
<br /><br />
|
||||
<div>
|
||||
<span><b>WW villages</b> will spawn in: </span>
|
||||
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat($wwSpawn); ?></span>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if($wwBuildingPlansSpawn <= $daysToDisplay && $wwBuildingPlansSpawn > 0){ ?>
|
||||
<br /><br />
|
||||
<div>
|
||||
<span><b>WW building plans</b> will spawn in: </span>
|
||||
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat($wwBuildingPlansSpawn); ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php }} ?>
|
||||
@@ -1,232 +1,221 @@
|
||||
<?php
|
||||
include_once("GameEngine/Generator.php");
|
||||
include_once ("GameEngine/Generator.php");
|
||||
$start_timer = $generator->pageLoadTimeStart();
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename a2b.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
// ################################################################################
|
||||
// # -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
// # --------------------------------------------------------------------------- ##
|
||||
// # Filename a2b.php ##
|
||||
// # Developed by: Dzoki ##
|
||||
// # License: TravianX Project ##
|
||||
// # Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
// # ##
|
||||
// ################################################################################
|
||||
|
||||
use App\Utils\AccessLogger;
|
||||
|
||||
include_once("GameEngine/Village.php");
|
||||
include_once ("GameEngine/Village.php");
|
||||
AccessLogger::logRequest();
|
||||
|
||||
if(isset($_GET['newdid'])) {
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
if(isset($_GET['w'])) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?w=".$_GET['w']);
|
||||
exit;
|
||||
}
|
||||
else if(isset($_GET['r'])) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?r=".$_GET['r']);
|
||||
exit;
|
||||
}
|
||||
else if(isset($_GET['o'])) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?o=".$_GET['o']);
|
||||
exit;
|
||||
}
|
||||
else if(isset($_GET['z'])) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?z=".$_GET['z']);
|
||||
exit;
|
||||
}
|
||||
else if($_GET['id']!=0){
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$building->procBuild($_GET);
|
||||
//Check if a rally point has already been built
|
||||
if($village->resarray['f39'] == 0){
|
||||
header("Location: dorf2.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET['id'])) {
|
||||
$id = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['id']);
|
||||
if(isset($_GET['newdid'])){
|
||||
$_SESSION['wid'] = $_GET['newdid'];
|
||||
if(isset($_GET['w'])){
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?w=".$_GET['w']);
|
||||
exit();
|
||||
}else if(isset($_GET['r'])){
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?r=".$_GET['r']);
|
||||
exit();
|
||||
}else if(isset($_GET['o'])){
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?o=".$_GET['o']);
|
||||
exit();
|
||||
}else if(isset($_GET['z'])){
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?z=".$_GET['z']);
|
||||
exit();
|
||||
}else if($_GET['id'] > 0){
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
if(isset($_GET['w'])) {
|
||||
$w = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['w']);
|
||||
else $building->procBuild($_GET);
|
||||
|
||||
if(isset($_GET['id'])) $id = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['id']);
|
||||
if(isset($_GET['w'])) $w = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['w']);
|
||||
if(isset($_GET['r'])) $r = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['r']);
|
||||
if(isset($_GET['delprisoners'])){
|
||||
$delprisoners = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['delprisoners']);
|
||||
}
|
||||
if(isset($_GET['r'])) {
|
||||
$r = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['r']);
|
||||
}
|
||||
if(isset($_GET['delprisoners'])) {
|
||||
$delprisoners = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['delprisoners']);
|
||||
}
|
||||
if(isset($_GET['o'])) {
|
||||
$o = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['o']);
|
||||
$oid = preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['z']);
|
||||
$too = $database->getOasisField($oid,"conqured");
|
||||
if($too == 0){$disabledr ="disabled=disabled"; $disabled ="disabled=disabled";}else{
|
||||
$disabledr ="";
|
||||
if($session->sit == 0){
|
||||
$disabled ="";
|
||||
if(isset($_GET['o'])){
|
||||
$o = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['o']);
|
||||
$oid = preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['z']);
|
||||
$too = $database->getOasisField($oid, "conqured");
|
||||
if($too == 0){
|
||||
$disabledr = "disabled=disabled";
|
||||
$disabled = "disabled=disabled";
|
||||
}else{
|
||||
$disabled ="disabled=disabled";
|
||||
$disabledr = "";
|
||||
if($session->sit == 0) $disabled = "";
|
||||
else $disabled = "disabled=disabled";
|
||||
}
|
||||
}
|
||||
$checked ="checked=checked";
|
||||
$checked = "checked=checked";
|
||||
}else{
|
||||
if($session->sit == 0){
|
||||
$disabled ="";
|
||||
}else{
|
||||
$disabled ="disabled=disabled";
|
||||
}
|
||||
if($session->sit == 0) $disabled = "";
|
||||
else $disabled = "disabled=disabled";
|
||||
}
|
||||
$process = $units->procUnits($_POST);
|
||||
$automation->isWinner();
|
||||
$process = $units->procUnits($_POST);
|
||||
$automation->isWinner();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><?php
|
||||
<title><?php
|
||||
|
||||
echo SERVER_NAME . ' - Send Troops'
|
||||
echo SERVER_NAME.' - Send Troops'?>
|
||||
</title>
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="mt-full.js?0faab" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7h" type="text/javascript"></script>
|
||||
<script src="new.js?0faab" type="text/javascript"></script>
|
||||
<link href="<?php
|
||||
|
||||
?></title>
|
||||
<link rel="shortcut icon" href="favicon.ico"/>
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="mt-full.js?0faab" type="text/javascript"></script>
|
||||
<script src="unx.js?f4b7h" type="text/javascript"></script>
|
||||
<script src="new.js?0faab" type="text/javascript"></script>
|
||||
<link href="<?php
|
||||
echo GP_LOCATE;
|
||||
|
||||
echo GP_LOCATE;
|
||||
?>lang/en/lang.css?f4b7d"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<link href="<?php
|
||||
|
||||
?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php
|
||||
echo GP_LOCATE;
|
||||
|
||||
echo GP_LOCATE;
|
||||
|
||||
?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css" />
|
||||
?>lang/en/compact.css?f4b7i"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<?php
|
||||
|
||||
if($session->gpack == null || GP_ENABLE == false) {
|
||||
echo "
|
||||
<link href='" . GP_LOCATE . "travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
<link href='" . GP_LOCATE . "lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
} else {
|
||||
echo "
|
||||
<link href='" . $session->gpack . "travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
<link href='" . $session->gpack . "lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
if($session->gpack == null || GP_ENABLE == false){
|
||||
echo "
|
||||
<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
<link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
}else{
|
||||
echo "
|
||||
<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
<link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
window.addEvent('domready', start);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="v35 ie ie8">
|
||||
<div class="wrapper">
|
||||
<img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
|
||||
<div id="dynamic_header">
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<img style="filter: chroma();" src="img/x.gif" id="msfilter" alt="" />
|
||||
<div id="dynamic_header"></div>
|
||||
<?php
|
||||
|
||||
include ("Templates/header.tpl");
|
||||
include("Templates/header.tpl");
|
||||
|
||||
?>
|
||||
<div id="mid">
|
||||
<?php
|
||||
|
||||
include ("Templates/menu.tpl");
|
||||
include("Templates/menu.tpl");
|
||||
|
||||
?>
|
||||
<div id="content" class="a2b">
|
||||
<div id="content" class="a2b">
|
||||
<?php
|
||||
|
||||
if(!empty($id)) {
|
||||
include ("Templates/a2b/newdorf.tpl");
|
||||
} else
|
||||
if(isset($w)) {
|
||||
$enforce = $database->getEnforceArray($w, 0);
|
||||
if($enforce['vref'] == $village->wid) {
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$ckey = $w;
|
||||
include ("Templates/a2b/sendback.tpl");
|
||||
} else {
|
||||
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
|
||||
include ("Templates/a2b/search.tpl");
|
||||
}
|
||||
} else
|
||||
if(isset($r)) {
|
||||
$enforce = $database->getEnforceArray($r, 0);
|
||||
$enforceoasis=$database->getOasisEnforceArray($r, 0);
|
||||
if($enforce['from'] == $village->wid || $enforceoasis['conqured'] == $village->wid) {
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$ckey = $r;
|
||||
include ("Templates/a2b/sendback.tpl");
|
||||
} else {
|
||||
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
|
||||
include ("Templates/a2b/search.tpl");
|
||||
}
|
||||
}
|
||||
else if(isset($delprisoners) && !empty($delprisoners)) $units->deletePrisoners($delprisoners);
|
||||
else
|
||||
{
|
||||
if(isset($process['0'])) {
|
||||
$coor = $database->getCoor($process['0']);
|
||||
include ("Templates/a2b/attack.tpl");
|
||||
} else {
|
||||
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
|
||||
include ("Templates/a2b/search.tpl");
|
||||
}
|
||||
}
|
||||
if(!empty($id)){
|
||||
include ("Templates/a2b/newdorf.tpl");
|
||||
}else if(isset($w)){
|
||||
$enforce = $database->getEnforceArray($w, 0);
|
||||
if($enforce['vref'] == $village->wid){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$ckey = $w;
|
||||
include("Templates/a2b/sendback.tpl");
|
||||
}else{
|
||||
include("Templates/a2b/units_".$session->tribe.".tpl");
|
||||
include("Templates/a2b/search.tpl");
|
||||
}
|
||||
}else if(isset($r)){
|
||||
$enforce = $database->getEnforceArray($r, 0);
|
||||
$enforceoasis = $database->getOasisEnforceArray($r, 0);
|
||||
if($enforce['from'] == $village->wid || $enforceoasis['conqured'] == $village->wid){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$ckey = $r;
|
||||
include("Templates/a2b/sendback.tpl");
|
||||
}else{
|
||||
include ("Templates/a2b/units_".$session->tribe.".tpl");
|
||||
include("Templates/a2b/search.tpl");
|
||||
}
|
||||
}else if(isset($delprisoners) && !empty($delprisoners)) $units->deletePrisoners($delprisoners);
|
||||
else{
|
||||
if(isset($process['0'])){
|
||||
$coor = $database->getCoor($process['0']);
|
||||
include("Templates/a2b/attack.tpl");
|
||||
}else{
|
||||
include("Templates/a2b/units_".$session->tribe.".tpl");
|
||||
include("Templates/a2b/search.tpl");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<br /><br /><br /><br /><div id="side_info">
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div id="side_info">
|
||||
<?php
|
||||
include("Templates/multivillage.tpl");
|
||||
include("Templates/quest.tpl");
|
||||
include("Templates/news.tpl");
|
||||
?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="footer-stopper"></div>
|
||||
<div class="clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="footer-stopper"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
|
||||
include ("Templates/footer.tpl");
|
||||
include ("Templates/res.tpl");
|
||||
include("Templates/footer.tpl");
|
||||
include("Templates/res.tpl");
|
||||
|
||||
?>
|
||||
<div id="stime">
|
||||
<div id="ltime">
|
||||
<div id="ltimeWrap">
|
||||
<div id="ltime">
|
||||
<div id="ltimeWrap">
|
||||
<?php
|
||||
|
||||
echo CALCULATED;
|
||||
echo CALCULATED;
|
||||
|
||||
?> <b><?php
|
||||
|
||||
echo round(($generator->pageLoadTimeEnd() - $start_timer) * 1000);
|
||||
echo round(($generator->pageLoadTimeEnd() - $start_timer) * 1000);
|
||||
|
||||
?></b> ms
|
||||
?></b> ms <br /><?php
|
||||
|
||||
<br /><?php
|
||||
|
||||
echo SERVER_TIME;
|
||||
echo SERVER_TIME;
|
||||
|
||||
?> <span id="tp1" class="b"><?php
|
||||
|
||||
echo date('H:i:s');
|
||||
echo date('H:i:s');
|
||||
|
||||
?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ce"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ce"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -344,8 +344,8 @@ if(isset($_GET['id']) || isset($_GET['gid']) || $route == 1 || isset($_POST['rou
|
||||
|
||||
if((isset($_GET['buildingFinish'])) && $_GET['buildingFinish'] == 1) {
|
||||
if($session->gold >= 2) {
|
||||
$building->finishAll("build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
|
||||
exit;
|
||||
$building->finishAll("build.php?gid=".$_GET['id']."&ty=".$_GET['ty']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user