diff --git a/GameEngine/Admin/Mods/natarbuildingplan.php b/GameEngine/Admin/Mods/natarbuildingplan.php index bae93a9b..74e972c2 100644 --- a/GameEngine/Admin/Mods/natarbuildingplan.php +++ b/GameEngine/Admin/Mods/natarbuildingplan.php @@ -26,7 +26,7 @@ for($i=1;$i<=$amt;$i++) { $time = time(); $q = "insert into `s1_vdata`(`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','WW Buildingplan',0,233,232,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)"; mysql_query($q) or die(mysql_error()); - $q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,'World Wonder')"; + $q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,0,0,20,10,10,22,10,25,0,0,20,15,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,'World Wonder')"; mysql_query($q); $database->addUnits($wid); $database->addTech($wid); diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index bcd66568..6127949b 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -155,9 +155,6 @@ class Automation { if(!file_exists("GameEngine/Prevention/settlers.txt") or time()-filemtime("GameEngine/Prevention/settlers.txt")>10) { $this->sendSettlersComplete(); } - if(!file_exists("GameEngine/Prevention/starvation.txt") or time()-filemtime("GameEngine/Prevention/starvation.txt")>50) { - $this->starvation(); - } if(!file_exists("GameEngine/Prevention/celebration.txt") or time()-filemtime("GameEngine/Prevention/celebration.txt")>10) { $this->celebrationComplete(); } @@ -167,7 +164,117 @@ class Automation { } $this->updateStore(); } + function activeCropDead(){ + global $session,$village,$database,$_SESSION, $allcrop; + // var_dump($session); + // var_dump($village); + // echo"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";' + //echo $session->villages; + $this->updateRes($_SESSION['wid'],$session->uid); + $allcrop=$this->bountyproduction['crop']; + $allUnitInTown=$database->getUnit($_SESSION['wid']); + $allEnforceInTown=$database->getEnforceVillage($_SESSION['wid'],0); + $checkcrop=$database->getVillageField($_SESSION['wid'],'crop'); + $cropProd=$this->bountyGetCropProd(); + +// $time = time(); +// var_dump($session); +// echo $checkcrop; +// echo $allcrop; + +if ($allcrop<0&&$checkcrop<0){ + $loops=0; + while ($loops<1){ + if ($checkcrop < 0){ + + // array_shift($allUnitInTown); + // rsort($allUnitInTown); + //rsort($allEnforceIntown); + // echo $numEnforce=count($allEnforceInTown); + + if (!empty($allEnforceInTown)){ + arsort($allEnforceInTown); + $unitarr=array(); + foreach ($allEnforceInTown as $enforceInTown){ + //var_dump($enforceInTown); + // array_shift($enforceInTown);array_pop($enforceInTown);array_pop($enforceInTown); + // array_splice($enforceInTown,count($enforceInTown)+1,2); + // $enforceInTown=rsort($enforceInTown); + for ($i=1;$i<51;$i++){ + $unitarr['u'.$i]=$enforceInTown['u'.$i]; + } + $unitarr['hero']=$enforceInTown['hero']; + +//var_dump($enforceInTown); +if (array_sum($unitarr)>0){ + arsort($unitarr); + $keydel=key($unitarr); + $keydel2=substr($keydel,1); +// echo $keydel."|||".$keydel2."|||"; + global ${$keydel}; + // echo ${$keydel}['crop']; + // $newtroop=$unitarr[$keydel]-1; + + $database->modifyEnforce($enforceInTown['id'],$keydel2,1,0); +// $cropupdate=$checkcrop+${$keydel}['crop']; + $q = "UPDATE ".TB_PREFIX."vdata set `crop` = `crop` +".${$keydel}['crop']." WHERE wref =".$_SESSION['wid']; + $database->query($q); +// echo$q; +}else{ + $database->deleteReinf($enforceInTown["id"]); +} + // var_dump($enforceInTown); + // var_dump($unitarr); + + /* $allkey=array_keys($enforceInTown)); + $checkar=array(); + foreach ($allkey as $value){ + if ($enforceInTown[$value]>0){ + $checkar[]=$value; + } + }*/ + } + }else{ + $unitarr=array(); + for ($i=1;$i<51;$i++){ + $unitarr['u'.$i]=$allUnitInTown['u'.$i]; + } + $unitarr['hero']=$allUnitInTown['hero']; + arsort($unitarr); +if (array_sum($unitarr)>0){ + $keydel=key($unitarr); + $keydel2=substr($keydel,1); + global ${$keydel}; + $database->modifyUnit($allUnitInTown['vref'],$keydel2,1,0); + + $q = "UPDATE ".TB_PREFIX."vdata set `crop` = `crop`+".${$keydel}['crop']." WHERE wref =".$_SESSION['wid']; + $database->query($q); +// echo$q; +} + } + $this->updateRes($_SESSION['wid'],$session->uid); + $allcrop=$this->bountyproduction['crop']; + $allUnitInTown=$database->getUnit($_SESSION['wid']); + $allEnforceInTown=$database->getEnforceVillage($_SESSION['wid'],0); + $checkcrop=$database->getVillageField($_SESSION['wid'],'crop'); +//echo $allcrop."|||".$checkcrop; + if ($allcrop>=0){ + $q = "UPDATE ".TB_PREFIX."vdata set `crop` = 0 WHERE wref =".$_SESSION['wid']; + $database->query($q); + $loops++; + }elseif ($checkcrop>0){ + $loops++; + } + } + +} +// var_dump($allUnitInTown); + //var_dump($allEnforceIntown); +// echo $allcrop; + } + + } private function loyaltyRegeneration() { global $database; $array = array(); @@ -904,7 +1011,12 @@ private function loyaltyRegeneration() { //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'].''; - + $herosend_att = $data['t11']; + if ($herosend_att>0){ + $unitssend_att_check=$unitssend_att.','.$data['t11']; + }else{ + $unitssend_att_check=$unitssend_att; + } //units defence string for battleraport $unitssend_def[1] = ''.$Defender['u1'].','.$Defender['u2'].','.$Defender['u3'].','.$Defender['u4'].','.$Defender['u5'].','.$Defender['u6'].','.$Defender['u7'].','.$Defender['u8'].','.$Defender['u9'].','.$Defender['u10'].''; $unitssend_def[2] = ''.$Defender['u11'].','.$Defender['u12'].','.$Defender['u13'].','.$Defender['u14'].','.$Defender['u15'].','.$Defender['u16'].','.$Defender['u17'].','.$Defender['u18'].','.$Defender['u19'].','.$Defender['u20'].''; @@ -925,19 +1037,13 @@ private function loyaltyRegeneration() { $unitssend_deff[3] = '?,?,?,?,?,?,?,?,?,?,'; $unitssend_deff[4] = '?,?,?,?,?,?,?,?,?,?,'; $unitssend_deff[5] = '?,?,?,?,?,?,?,?,?,?,'; - //how many troops died? for battleraport - if($battlepart['casualties_attacker'][1] == 0) { $dead1 = 0; } else { $dead1 = $battlepart['casualties_attacker'][1]; } - if($battlepart['casualties_attacker'][2] == 0) { $dead2 = 0; } else { $dead2 = $battlepart['casualties_attacker'][2]; } - if($battlepart['casualties_attacker'][3] == 0) { $dead3 = 0; } else { $dead3 = $battlepart['casualties_attacker'][3]; } - if($battlepart['casualties_attacker'][4] == 0) { $dead4 = 0; } else { $dead4 = $battlepart['casualties_attacker'][4]; } - if($battlepart['casualties_attacker'][5] == 0) { $dead5 = 0; } else { $dead5 = $battlepart['casualties_attacker'][5]; } - if($battlepart['casualties_attacker'][6] == 0) { $dead6 = 0; } else { $dead6 = $battlepart['casualties_attacker'][6]; } - if($battlepart['casualties_attacker'][7] == 0) { $dead7 = 0; } else { $dead7 = $battlepart['casualties_attacker'][7]; } - if($battlepart['casualties_attacker'][8] == 0) { $dead8 = 0; } else { $dead8 = $battlepart['casualties_attacker'][8]; } - if($battlepart['casualties_attacker'][9] == 0) { $dead9 = 0; } else { $dead9 = $battlepart['casualties_attacker'][9]; } - if($battlepart['casualties_attacker'][10] == 0) { $dead10 = 0; } else { $dead10 = $battlepart['casualties_attacker'][10]; } - - + //how many troops died? for battleraport +for($i=1;$i<=11;$i++){ +if($battlepart['casualties_attacker'][$i] <= 0) { ${dead.$i} = 0; }elseif($battlepart['casualties_attacker'][$i] > $data['t'.$i]){ +${dead.$i}=$data['t'.$i]; +}else { ${dead.$i} = $battlepart['casualties_attacker'][$i]; } +} + $heroAttackDead=$dead11; //kill own defence $q = "SELECT * FROM ".TB_PREFIX."units WHERE vref='".$data['to']."'"; $unitlist = $database->query_return($q); @@ -1029,9 +1135,14 @@ private function loyaltyRegeneration() { $database->modifyAttack($data['ref'],8,$dead8); $database->modifyAttack($data['ref'],9,$dead9); $database->modifyAttack($data['ref'],10,$dead10); - + $database->modifyAttack($data['ref'],11,$dead11); $unitsdead_att = ''.$dead1.','.$dead2.','.$dead3.','.$dead4.','.$dead5.','.$dead6.','.$dead7.','.$dead8.','.$dead9.','.$dead10.''; + if ($herosend_att>0){ + $unitsdead_att_check = $unitsdead_att.','.$dead11; + }else{ + $unitsdead_att_check = $unitsdead_att; + } //$unitsdead_def = ''.$dead11.','.$dead12.','.$dead13.','.$dead14.','.$dead15.','.$dead16.','.$dead17.','.$dead18.','.$dead19.','.$dead20.''; @@ -1187,7 +1298,14 @@ private function loyaltyRegeneration() { $speeds[] = $unitarray['speed']; } } - + if ($herosend_att>0){ + $qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$from['owner'].""; + $resulth = mysql_query($qh); + $hero_f=mysql_fetch_array($resulth); + $hero_unit=$hero_f['unit']; + //echo "///".$GLOBALS['u'.$hero_unit]['speed']."///"; + $speeds[] = $GLOBALS['u'.$hero_unit]['speed']; + } // Data for when troops return. @@ -1855,10 +1973,10 @@ $crannyimg = "procDistanceTime($from,$to,min($speeds),1) + $AttackArrivalTime; //$endtime = $this->procDistanceTime($from,$to,min($speeds),1) + time(); @@ -2628,34 +2746,6 @@ private function demolitionComplete() { } } -private function starvation() { - global $database,$technology; - $TroopStarvesEvery = 100; - $q = "SELECT * FROM ".TB_PREFIX."vdata WHERE crop<0"; - $array = $database->query_return($q); - if(!empty($array)) { - foreach($array as $village) { - $TroopsStarved = floor($village['crop'] / $TroopStarvesEvery) + 1; - $ownunit = $database->getUnit($base); - $TopUnit = $TopUnitCount = 0; - for($i=1;$i<=50;$i++) { - if($ownunit['u'.$i] > $TopUnitCount) { $TopUnit = $i; $TopUnitCount = $ownunit['u'.$i]; } - } - if($TopUnitCount > 0) { - // Remove TroopsStarved from TopUnit - } else { - // Repeat check for reinforcements - } - $q = "UPDATE ".TB_PREFIX."vdata set `crop` = 100 WHERE wref=".$village['wref']; - $database->query($q); - } - } - - if(file_exists("GameEngine/Prevention/starvation.txt")) { - @unlink("GameEngine/Prevention/starvation.txt"); - } - } - private function updateHero() { global $database,$hero_levels; $harray = $database->getHero(); diff --git a/GameEngine/Building.php b/GameEngine/Building.php index cad9f64b..f7effadb 100644 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -9,7 +9,7 @@ ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# -include ("./GameEngine/Lang/".LANG.".php"); + class Building { @@ -178,51 +178,51 @@ class Building { } public function procResType($ref) { - global $session, $lang; + global $session; switch($ref) { - case 1: $build = $lang['buildings'][1]; break; - case 2: $build = $lang['buildings'][2]; break; - case 3: $build = $lang['buildings'][3]; break; - case 4: $build = $lang['buildings'][4]; break; - case 5: $build = $lang['buildings'][5]; break; - case 6: $build = $lang['buildings'][6]; break; - case 7: $build = $lang['buildings'][7]; break; - case 8: $build = $lang['buildings'][8]; break; - case 9: $build = $lang['buildings'][9]; break; - case 10: $build = $lang['buildings'][10]; break; - case 11: $build = $lang['buildings'][11]; break; - case 12: $build = $lang['buildings'][12]; break; - case 13: $build = $lang['buildings'][13]; break; - case 14: $build = $lang['buildings'][14]; break; - case 15: $build = $lang['buildings'][15]; break; - case 16: $build = $lang['buildings'][16]; break; - case 17: $build = $lang['buildings'][17]; break; - case 18: $build = $lang['buildings'][18]; break; - case 19: $build = $lang['buildings'][19]; break; - case 20: $build = $lang['buildings'][20]; break; - case 21: $build = $lang['buildings'][21]; break; - case 22: $build = $lang['buildings'][22]; break; - case 23: $build = $lang['buildings'][23]; break; - case 24: $build = $lang['buildings'][24]; break; - case 25: $build = $lang['buildings'][25]; break; - case 26: $build = $lang['buildings'][26]; break; - case 27: $build = $lang['buildings'][27]; break; - case 28: $build = $lang['buildings'][28]; break; - case 29: $build = $lang['buildings'][29]; break; - case 30: $build = $lang['buildings'][30]; break; - case 31: $build = $lang['buildings'][31]; break; - case 32: $build = $lang['buildings'][32]; break; - case 33: $build = $lang['buildings'][33]; break; - case 34: $build = $lang['buildings'][34]; break; - case 35: $build = $lang['buildings'][35]; break; - case 36: $build = $lang['buildings'][36]; break; - case 37: $build = $lang['buildings'][37]; break; - case 38: $build = $lang['buildings'][38]; break; - case 39: $build = $lang['buildings'][39]; break; - case 40: $build = $lang['buildings'][40]; break; - case 41: $build = $lang['buildings'][41]; break; - case 42: $build = $lang['buildings'][42]; break; - default: $build = $lang['buildings'][43]; break; + case 1: $build = "Woodcutter"; break; + case 2: $build = "Clay Pit"; break; + case 3: $build = "Iron Mine"; break; + case 4: $build = "Cropland"; break; + case 5: $build = "Sawmill"; break; + case 6: $build = "Brickyard"; break; + case 7: $build = "Iron Foundry"; break; + case 8: $build = "Grain Mill"; break; + case 9: $build = "Bakery"; break; + case 10: $build = "Warehouse"; break; + case 11: $build = "Granary"; break; + case 12: $build = "Blacksmith"; break; + case 13: $build = "Armoury"; break; + case 14: $build = "Tournament Square"; break; + case 15: $build = "Main Building"; break; + case 16: $build = "Rally Point"; break; + case 17: $build = "Marketplace"; break; + case 18: $build = "Embassy"; break; + case 19: $build = "Barracks"; break; + case 20: $build = "Stable"; break; + case 21: $build = "Workshop"; break; + case 22: $build = "Academy"; break; + case 23: $build = "Cranny"; break; + case 24: $build = "Town Hall"; break; + case 25: $build = "Residence"; break; + case 26: $build = "Palace"; break; + case 27: $build = "Treasury"; break; + case 28: $build = "Trade Office"; break; + case 29: $build = "Great Barracks"; break; + case 30: $build = "Great Stable"; break; + case 31: $build = "City Wall"; break; + case 32: $build = "Earth Wall"; break; + case 33: $build = "Palisade"; break; + case 34: $build = "Stonemason's Lodge"; break; + case 35: $build = "Brewery"; break; + case 36: $build = "Trapper"; break; + case 37: $build = "Hero's Mansion"; break; + case 38: $build = "Great Warehouse"; break; + case 39: $build = "Great Granary"; break; + case 40: $build = "Wonder of the World"; break; + case 41: $build = "Horse Drinking Trough"; break; + case 42: $build = "Great Workshop"; break; + default: $build = "Error"; break; } return $build; } diff --git a/GameEngine/Data/unitdata.php b/GameEngine/Data/unitdata.php index 986313b7..30886694 100644 --- a/GameEngine/Data/unitdata.php +++ b/GameEngine/Data/unitdata.php @@ -14,9 +14,9 @@ $unitsbytype=array('infantry'=>array(1,2,3,11,12,13,14,21,22,31,32,33,34,41,42,4 $u1=array('atk'=>40,'di'=>35,'dc'=>50,'wood'=>120,'clay'=>100,'iron'=>150,'crop'=>30,'pop'=>1,'speed'=>6,'time'=>1600,'cap'=>50); $u2=array('atk'=>30,'di'=>65,'dc'=>35,'wood'=>100,'clay'=>130,'iron'=>160,'crop'=>70,'pop'=>1,'speed'=>5,'time'=>1760,'cap'=>20); $u3=array('atk'=>70,'di'=>40,'dc'=>25,'wood'=>150,'clay'=>160,'iron'=>210,'crop'=>80,'pop'=>1,'speed'=>7,'time'=>1920,'cap'=>50); -$u4=array('atk'=>0,'di'=>20,'dc'=>10,'wood'=>140,'clay'=>160,'iron'=>20,'crop'=>40,'pop'=>2,'speed'=>16,'time'=>1360,'cap'=>0,'drinking'=>10); -$u5=array('atk'=>120,'di'=>65,'dc'=>50,'wood'=>550,'clay'=>440,'iron'=>320,'crop'=>100,'pop'=>3,'speed'=>14,'time'=>2640,'cap'=>100,'drinking'=>15); -$u6=array('atk'=>180,'di'=>80,'dc'=>105,'wood'=>550,'clay'=>640,'iron'=>800,'crop'=>180,'pop'=>4,'speed'=>10,'time'=>3520,'cap'=>70,'drinking'=>20); +$u4=array('atk'=>0,'di'=>20,'dc'=>10,'wood'=>140,'clay'=>160,'iron'=>20,'crop'=>40,'pop'=>2,'speed'=>16,'time'=>1360,'cap'=>0); +$u5=array('atk'=>120,'di'=>65,'dc'=>50,'wood'=>550,'clay'=>440,'iron'=>320,'crop'=>100,'pop'=>3,'speed'=>14,'time'=>2640,'cap'=>100); +$u6=array('atk'=>180,'di'=>80,'dc'=>105,'wood'=>550,'clay'=>640,'iron'=>800,'crop'=>180,'pop'=>4,'speed'=>10,'time'=>3520,'cap'=>70); $u7=array('atk'=>60,'di'=>30,'dc'=>75,'wood'=>900,'clay'=>360,'iron'=>500,'crop'=>70,'pop'=>3,'speed'=>4,'time'=>4600,'cap'=>0); $u8=array('atk'=>75,'di'=>60,'dc'=>10,'wood'=>950,'clay'=>1350,'iron'=>600,'crop'=>90,'pop'=>6,'speed'=>3,'time'=>9000,'cap'=>0); $u9=array('atk'=>50,'di'=>40,'dc'=>30,'wood'=>30750,'clay'=>27200,'iron'=>45000,'crop'=>37500,'pop'=>5,'speed'=>5,'time'=>90700,'cap'=>0); @@ -51,16 +51,16 @@ $u37=array('atk'=>250,'di'=>140,'dc'=>200,'wood'=>250,'clay'=>220,'iron'=>135,'c $u38=array('atk'=>450,'di'=>380,'dc'=>240,'wood'=>125,'clay'=>250,'iron'=>300,'crop'=>65,'speed'=>3,'pop'=>3,'time'=>2000,'cap'=>0); $u39=array('atk'=>200,'di'=>170,'dc'=>250,'wood'=>350,'clay'=>350,'iron'=>125,'crop'=>80,'speed'=>5,'pop'=>3,'time'=>70500,'cap'=>0); $u40=array('atk'=>600,'di'=>440,'dc'=>520,'wood'=>350,'clay'=>250,'iron'=>135,'crop'=>100,'speed'=>5,'pop'=>5,'time'=>31000,'cap'=>3000); -$u41=array('atk'=>20,'di'=>35,'dc'=>50,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u42=array('atk'=>65,'di'=>30,'dc'=>10,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u43=array('atk'=>100,'di'=>90,'dc'=>75,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u44=array('atk'=>0,'di'=>10,'dc'=>0,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u45=array('atk'=>155,'di'=>80,'dc'=>50,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u46=array('atk'=>170,'di'=>140,'dc'=>80,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u47=array('atk'=>250,'di'=>120,'dc'=>150,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u48=array('atk'=>60,'di'=>45,'dc'=>10,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u49=array('atk'=>80,'di'=>50,'dc'=>50,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); -$u50=array('atk'=>30,'di'=>40,'dc'=>40,'wood'=>0,'clay'=>0,'iron'=>0,'crop'=>0,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); +$u41=array('atk'=>20,'di'=>35,'dc'=>50,'wood'=>105,'clay'=>110,'iron'=>85,'crop'=>50,'pop'=>1,'speed'=>10,'time'=>1100,'cap'=>25); +$u42=array('atk'=>65,'di'=>30,'dc'=>10,'wood'=>95,'clay'=>145,'iron'=>100,'crop'=>55,'pop'=>1,'speed'=>9,'time'=>1300,'cap'=>55); +$u43=array('atk'=>100,'di'=>90,'dc'=>75,'wood'=>125,'clay'=>165,'iron'=>130,'crop'=>75,'pop'=>1,'speed'=>15,'time'=>1500,'cap'=>60); +$u44=array('atk'=>0,'di'=>10,'dc'=>0,'wood'=>50,'clay'=>25,'iron'=>20,'crop'=>5,'pop'=>2,'speed'=>20,'time'=>2200,'cap'=>0); +$u45=array('atk'=>155,'di'=>80,'dc'=>50,'wood'=>150,'clay'=>205,'iron'=>135,'crop'=>85,'pop'=>2,'speed'=>22,'time'=>3000,'cap'=>80); +$u46=array('atk'=>170,'di'=>140,'dc'=>80,'wood'=>175,'clay'=>230,'iron'=>200,'crop'=>100,'pop'=>2,'speed'=>20,'time'=>3450,'cap'=>45); +$u47=array('atk'=>250,'di'=>120,'dc'=>150,'wood'=>225,'clay'=>255,'iron'=>230,'crop'=>125,'pop'=>3,'speed'=>17,'time'=>4000,'cap'=>55); +$u48=array('atk'=>60,'di'=>45,'dc'=>10,'wood'=>1500,'clay'=>760,'iron'=>890,'crop'=>390,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); +$u49=array('atk'=>80,'di'=>50,'dc'=>50,'wood'=>37000,'clay'=>30000,'iron'=>32000,'crop'=>33500,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); +$u50=array('atk'=>30,'di'=>40,'dc'=>40,'wood'=>8000,'clay'=>8250,'iron'=>8500,'crop'=>5505,'pop'=>0,'speed'=>0,'time'=>0,'cap'=>0); $u51=array('atk'=>10,'di'=>25,'dc'=>20,'wood'=>85,'clay'=>75,'iron'=>120,'crop'=>25,'speed'=>7,'pop'=>1,'time'=>1600,'cap'=>45); $u52=array('atk'=>20,'di'=>35,'dc'=>40,'wood'=>125,'clay'=>130,'iron'=>60,'crop'=>40,'speed'=>7,'pop'=>1,'time'=>1800,'cap'=>65); $u53=array('atk'=>60,'di'=>40,'dc'=>60,'wood'=>140,'clay'=>150,'iron'=>40,'crop'=>60,'speed'=>6,'pop'=>1,'time'=>1900,'cap'=>80); @@ -87,5 +87,4 @@ $h22=array('atk'=>80,'atkp'=>71,'di'=>60,'dip'=>54,'dc'=>35,'dcp'=>38); $h24=array('atk'=>115,'atkp'=>87.5,'di'=>40,'dip'=>42,'dc'=>65,'dcp'=>57); $h25=array('atk'=>55,'atkp'=>57.5,'di'=>190,'dip'=>108.5,'dc'=>90,'dcp'=>60.5); $h26=array('atk'=>175,'atkp'=>121,'di'=>85,'dip'=>55,'dc'=>275,'dcp'=>145); - ?> diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index 4f7c460f..6a7bdf12 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -466,10 +466,10 @@ } function populateOasisUnitsLow() { - $q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0"; + $q2 = "SELECT * FROM " . TB_PREFIX . "odata where conqured == 0"; $result2 = mysql_query($q2, $this->connection); while($row = mysql_fetch_array($result2)) { - $wid = $row['id']; + $wid = $row['wref']; $basearray = $this->getMInfo($wid); //each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less switch($basearray['oasistype']) { @@ -522,10 +522,10 @@ } function populateOasisUnitsHigh() { - $q2 = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0"; + $q2 = "SELECT * FROM " . TB_PREFIX . "odata where conqured == 0"; $result2 = mysql_query($q2, $this->connection); while($row = mysql_fetch_array($result2)) { - $wid = $row['id']; + $wid = $row['wref']; $basearray = $this->getMInfo($wid); //each Troop is a Set for oasis type like mountains have rats spiders and snakes fields tigers elphants clay wolves so on stonger one more not so less switch($basearray['oasistype']) { @@ -1202,7 +1202,42 @@ } return $text; } - + + function getAllianceWar($aid){ + $q = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = '$aid' AND type = '3'"; + $result = mysql_query($q, $this->connection); + if(mysql_num_rows($result) == 0){ + $q2 = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli2 = '$aid' AND type = '3' AND accepted = '1'"; + $result2 = mysql_query($q2, $this->connection); + while($row = mysql_fetch_array($result2)){ + $alliance = $this->getAlliance($row['alli1']); + $text = ""; + $text .= "".$alliance['tag']."
"; + } + }else{ + while($row = mysql_fetch_array($result)){ + $alliance = $this->getAlliance($row['alli2']); + $text = ""; + $text .= "".$alliance['tag']."
"; + } + } + if(strlen($text) == 0){ + $text = "-
"; + } + return $text; + } + + function getAllianceAlly($aid, $type){ + $q = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE (alli1 = '$aid' or alli2 = '$aid') AND (type = '$type' AND accepted = '1')"; + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); + } + + function getAllianceWar2($aid){ + $q = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli2 = '$aid' or alli1 = '$aid' AND accepted = '1'"; + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); + } function diplomacyExistingRelationships($session_alliance) { $q = "SELECT * FROM " . TB_PREFIX . "diplomacy WHERE alli2 = $session_alliance AND accepted = 1"; $result = mysql_query($q, $this->connection); @@ -1280,10 +1315,13 @@ } - function setVillageName($vid, $name) { - $q = "UPDATE " . TB_PREFIX . "vdata set name = '$name' where wref = $vid"; - return mysql_query($q, $this->connection); - } + function setVillageName($vid, $name) { + if(!empty($name)) + { + $q = "UPDATE " . TB_PREFIX . "vdata set name = '$name' where wref = $vid"; + return mysql_query($q, $this->connection); + } + } function modifyPop($vid, $pop, $mode) { if(!$mode) { diff --git a/GameEngine/Generator.php b/GameEngine/Generator.php index 28edaadb..766be2b0 100644 --- a/GameEngine/Generator.php +++ b/GameEngine/Generator.php @@ -98,7 +98,6 @@ class Generator { } public function procMtime($time, $pref = 3) { - global $lang; /* $timezone = 7; switch($timezone) { @@ -112,9 +111,9 @@ public function procMtime($time, $pref = 3) { $today = date('d',time())-1; if (date('Ymd',time()) == date('Ymd',$time)) { - $day = $lang['upgrade'][11]; //today + $day = "today"; }elseif($today == date('d',$time)){ - $day = $lang['upgrade'][12]; //yesterday + $day = "yesterday"; } else { switch($pref) { diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index fdf8d11e..b3edbf4d 100644 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -23,8 +23,6 @@ define("TRIBE6","Monsters"); define("HOME","Homepage"); define("INSTRUCT","Instructions"); define("ADMIN_PANEL","Admin Panel"); -define("MULTIHUNTER_PAN","Multihunter Panel"); -define("CREATE_NAT","Create Natars"); define("MASS_MESSAGE","Mass Message"); define("LOGOUT","Logout"); define("PROFILE","Profile"); @@ -33,7 +31,6 @@ define("UPDATE_T_10","Update Top 10"); define("SYSTEM_MESSAGE","System message"); define("TRAVIAN_PLUS","Travian Plus"); define("CONTACT","Contact us!"); -define("GAME_RULES","Game Rules"); //MENU define("REG","Register"); @@ -96,7 +93,6 @@ define("IRON","Iron"); define("CROP","Crop"); define("LEVEL","Level"); define("CROP_COM",CROP." consumption"); -define("DURATION","duration"); define("PER_HR","per hour"); define("PROD_HEADER","Production"); define("MULTI_V_HEADER","Villages"); @@ -105,13 +101,12 @@ define("GO2MY_VILLAGE","Go to my village"); define("VILLAGE_CENTER","Village centre"); define("FINISH_GOLD","Finish all construction and research orders in this village immediately for 2 Gold?"); define("WAITING_LOOP","(waiting loop)"); -define("HRS","hrs."); +define("HRS","(hrs.)"); define("DONE_AT","done at"); define("CANCEL","cancel"); define("LOYALTY","Loyalty:"); define("CALCULATED_IN","Calculated in"); define("SEVER_TIME","Server time:"); -define("MILISECS","ms"); //QUEST define("Q_CONTINUE","Continue with the next task."); @@ -357,98 +352,5 @@ define("MASS_SENT","Mass IGM was sent"); $lang['register'] = "Register"; $lang['login'] = "Login"; -/* -|-------------------------------------------------------------------------- -| top_menu -|-------------------------------------------------------------------------- -*/ - $lang['header'] = array ( - 0 => 'Village overview', - 1 => 'Vilage centre', - 2 => 'Map', - 3 => 'Statistics', - 4 => 'Reports', - 5 => 'Messages', - 6 => 'Plus menu'); - - $lang['buildings'] = array ( - 1 => "Woodcutter", - 2 => "Clay Pit", - 3 => "Iron Mine", - 4 => "Cropland", - 5 => "Sawmill", - 6 => "Brickyard", - 7 => "Iron Foundry", - 8 => "Grain Mill", - 9 => "Bakery", - 10 => "Warehouse", - 11 => "Granary", - 12 => "Blacksmith", - 13 => "Armoury", - 14 => "Tournament Square", - 15 => "Main Building", - 16 => "Rally Point", - 17 => "Marketplace", - 18 => "Embassy", - 19 => "Barracks", - 20 => "Stable", - 21 => "Workshop", - 22 => "Academy", - 23 => "Cranny", - 24 => "Town Hall", - 25 => "Residence", - 26 => "Palace", - 27 => "Treasury", - 28 => "Trade Office", - 29 => "Great Barracks", - 30 => "Great Stable", - 31 => "City Wall", - 32 => "Earth Wall", - 33 => "Palisade", - 34 => "Stonemason's Lodge", - 35 => "Brewery", - 36 => "Trapper", - 37 => "Hero's Mansion", - 38 => "Great Warehouse", - 39 => "Great Granary", - 40 => "Wonder of the World", - 41 => "Horse Drinking Trough", - 42 => "Great Workshop", - 43 => "Error", - 44 => " (Level "); - - $lang['fields'] = array ( - 0 => ' Level', - 1 => 'Woodcutter Level', - 2 => 'Clay Pit Level', - 3 => 'Iron Mine Level', - 4 => 'Cropland Level', - 5 => 'Outer building site', - 6 => 'Building site', - 7 => 'Rally Point building site'); - - $lang['npc'] = array ( - 0 => 'NPC trade'); - - $lang['upgrade'] = array ( - 0 => 'Building already at max level', - 1 => 'Building max level under construction', - 2 => 'Building presently being demolished', - 3 => 'Costs for upgrading to level ', - 4 => 'The workers are already at work.', - 5 => 'Not enough food. Expand cropland.', - 6 => 'Upgrade Warehouse.', - 7 => 'Upgrade Granary.', - 8 => 'Enough resources ', - 9 => ' at  ', - 10 => 'Upgrade to level ', - 11 => 'today', - 12 => 'yesterday'); - - $lang['movement'] = array ( - 0 => 'in '); - - $lang['troops'] = array ( - 0 => 'none', - 1 => 'Hero'); + ?> diff --git a/GameEngine/Message.php b/GameEngine/Message.php index d4434c9a..aa9cc132 100644 --- a/GameEngine/Message.php +++ b/GameEngine/Message.php @@ -92,7 +92,7 @@ global $session, $database; if(isset($get['t'])) { if($get['t'] == 1) { - $type = array(8, 15); + $type = array(8, 15, 16, 17); } if($get['t'] == 2) { $type = array(10, 11, 12, 13); @@ -100,6 +100,9 @@ if($get['t'] == 3) { $type = array(1, 2, 3, 4, 5, 6, 7); } + if($get['t'] == 4) { + $type = array(0, 18, 19, 20, 21); + } if($get['t'] == 5) { if(!$session->plus){ header("Location: berichte.php"); diff --git a/Templates/Admin/config.tpl b/Templates/Admin/config.tpl index b4e43dcc..ad01b272 100644 --- a/Templates/Admin/config.tpl +++ b/Templates/Admin/config.tpl @@ -51,7 +51,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("





Language - + Server Speed diff --git a/Templates/Admin/menu.tpl b/Templates/Admin/menu.tpl index bd1d43d7..d24cc9ef 100644 --- a/Templates/Admin/menu.tpl +++ b/Templates/Admin/menu.tpl @@ -42,6 +42,7 @@ include_once ("GameEngine/Ranking.php"); Mass message System message Update top 10 + Add World Wonder Villages Add WW Buildingplan Villages

diff --git a/Templates/Ajax/mapscroll.tpl b/Templates/Ajax/mapscroll.tpl index ffaa1018..5e609c32 100644 --- a/Templates/Ajax/mapscroll.tpl +++ b/Templates/Ajax/mapscroll.tpl @@ -4,6 +4,7 @@ include('GameEngine/config.php'); mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error()); mysql_select_db(SQL_DB) or die(mysql_error()); include("GameEngine/Generator.php"); +include("GameEngine/Database/db_MYSQL.php"); //include("GameEngine/Session.php"); @@ -85,6 +86,7 @@ $query2 = "SELECT LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance ) where ".TB_PREFIX."wdata.id IN ($maparray) ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')"; + $result2 = mysql_query($query2) or die(mysql_error()); $i=0; @@ -92,77 +94,27 @@ $i=0; $yrow = 0; $map_js =''; -while ($donnees = mysql_fetch_assoc($result2)){ -$targetalliance = $donnees['user_alliance']; - if(count($database->diplomacyExistingRelationships($targetalliance))){ - foreach($database->diplomacyExistingRelationships($targetalliance) as $key => $row9){ - if($row9['alli1'] == $_SESSION['alliance_user']){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }elseif(count($database->diplomacyExistingRelationships2($targetalliance))){ - foreach($database->diplomacyExistingRelationships2($targetalliance) as $key => $row9){ - if($row9['alli2'] == $_SESSION['alliance_user']){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } -$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (($friendarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (($enemyarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (($neutralarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; +while ($donnees = mysql_fetch_assoc($result2)){ +$targetalliance=$donnees["aliance_id"]; +$friendarray=$database->getAllianceAlly($donnees["aliance_id"],1); +$neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2); +$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); + +$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$_SESSION['alliance_user'] or $friendarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; + +$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$_SESSION['alliance_user'] or $enemyarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; + +$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$_SESSION['alliance_user'] or $neutralarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; + + +$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; //Javascript map info if($yrow!=7){ - if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ - $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"o99\""; - }else{ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; - } if($donnees['map_occupied']){ if($donnees['map_fieldtype'] != 0){ - $map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n"; + $map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n"; } } elseif($donnees['map_oasis'] != 0){ diff --git a/Templates/Ajax/mapscroll2.tpl b/Templates/Ajax/mapscroll2.tpl index e4362f5c..1f3ab40b 100644 --- a/Templates/Ajax/mapscroll2.tpl +++ b/Templates/Ajax/mapscroll2.tpl @@ -4,6 +4,7 @@ include('GameEngine/config.php'); mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error()); mysql_select_db(SQL_DB) or die(mysql_error()); include("GameEngine/Generator.php"); +include("GameEngine/Database/db_MYSQL.php"); header("Content-Type: application/json;"); //include("GameEngine/Session.php"); @@ -99,6 +100,7 @@ $query2 = "SELECT LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance ) where ".TB_PREFIX."wdata.id IN ($maparray) ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')"; + //echo $query2; $result2 = mysql_query($query2) or die(mysql_error()); @@ -110,79 +112,26 @@ $coorindex = 0; $map_js =''; while ($donnees = mysql_fetch_assoc($result2)){ -$targetalliance = $donnees['user_alliance']; -$targetalliance = $donnees['user_alliance']; - if(count($database->diplomacyExistingRelationships($targetalliance))){ - foreach($database->diplomacyExistingRelationships($targetalliance) as $key => $row9){ - if($row9['alli1'] == $_SESSION['alliance_user']){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }elseif(count($database->diplomacyExistingRelationships2($targetalliance))){ - foreach($database->diplomacyExistingRelationships2($targetalliance) as $key => $row9){ - if($row9['alli2'] == $_SESSION['alliance_user']){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } -$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (($friendarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (($enemyarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (($neutralarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; - + +$targetalliance=$donnees["aliance_id"]; +$friendarray=$database->getAllianceAlly($donnees["aliance_id"],1); +$neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2); +$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); + +$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$_SESSION['alliance_user'] or $friendarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; + +$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$_SESSION['alliance_user'] or $enemyarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; + +$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$_SESSION['alliance_user'] or $neutralarray[0]['alli2']==$_SESSION['alliance_user']) and ($_SESSION['alliance_user'] != $targetalliance and $_SESSION['alliance_user'] and $targetalliance)) ? '1':'0'; +$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; //Javascript map info if($yrow!=13){ - if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ - $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"o99\""; - }else{ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; - } if($donnees['map_occupied']){ if($donnees['map_fieldtype'] != 0){ - $map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n"; + $map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n"; } } elseif($donnees['map_oasis'] != 0){ diff --git a/Templates/Ajax/quest_core.tpl b/Templates/Ajax/quest_core.tpl index ea35b4c8..cf6ca697 100644 --- a/Templates/Ajax/quest_core.tpl +++ b/Templates/Ajax/quest_core.tpl @@ -99,7 +99,7 @@ if (isset($qact)){ //Get 200 Crop $database->modifyResource($session->villages[0],0,0,0,-200,1); //Give Reward - $database->modifyUnit($village->wid,array($unit),array(3),array(0)); + $database->modifyUnit($session->villages[0],array(31),array(1),array(1)); } else{ $NoCrop="No Enough Crop!"; } diff --git a/Templates/Alliance/medal.php b/Templates/Alliance/medal.php index eef77a1d..2f7f068b 100644 --- a/Templates/Alliance/medal.php +++ b/Templates/Alliance/medal.php @@ -24,10 +24,10 @@ INDELING CATEGORIEEN: ******************************/ $geregistreerd=date('d-m-Y', ($allianceinfo['timestamp'])); -$profiel = preg_replace("/\[war]/s",'At war with
'.$database->getAllianceDipProfile($aid,3), $profiel, 1); +$profiel = preg_replace("/\[war]/s",'At war with
'.$database->getAllianceWar($aid), $profiel, 1); $profiel = preg_replace("/\[ally]/s",'Confederacies
'.$database->getAllianceDipProfile($aid,1), $profiel, 1); $profiel = preg_replace("/\[nap]/s",'NAPs
'.$database->getAllianceDipProfile($aid,2), $profiel, 1); -$profiel = preg_replace("/\[diplomatie]/s",'Confederacies
'.$database->getAllianceDipProfile($aid,1).'
NAPs
'.$database->getAllianceDipProfile($aid,2).'
At war with
'.$database->getAllianceDipProfile($aid,3), $profiel, 1); +$profiel = preg_replace("/\[diplomatie]/s",'Confederacies
'.$database->getAllianceDipProfile($aid,1).'
NAPs
'.$database->getAllianceDipProfile($aid,2).'
At war with
'.$database->getAllianceWar($aid), $profiel, 1); foreach($varmedal as $medal) { diff --git a/Templates/Build/16.tpl b/Templates/Build/16.tpl index b29444db..0776aef2 100644 --- a/Templates/Build/16.tpl +++ b/Templates/Build/16.tpl @@ -41,9 +41,10 @@ if($units_incoming >= 1){ enforcetome) > 0) { foreach($village->enforcetome as $enforce) { + $colspan = 10+$enforce['hero']; echo " - "; $tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0); @@ -53,6 +54,9 @@ if($units_incoming >= 1){ for($i=$start;$i<=($end);$i++) { echo ""; } + if($enforce['hero']!=0){ + echo ""; + } echo ""; for($i=$start;$i<=($start+9);$i++) { if($enforce['u'.$i] == 0) { @@ -63,8 +67,11 @@ if($units_incoming >= 1){ } echo $enforce['u'.$i].""; } + if($enforce['hero']!=0){ + echo ""; + } echo " - "; + "; echo "
getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name").""; + "; echo "getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops"; echo "
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$enforce['hero']."
Upkeep
".$technology->getUpkeep($enforce,$tribe)."\"Crop\"per hour
Upkeep
".$technology->getUpkeep($enforce,$tribe)."\"Crop\"per hour
"; } @@ -72,9 +79,10 @@ if($units_incoming >= 1){ if(count($village->enforcetoyou) > 0) { echo "

Troops in other village

"; foreach($village->enforcetoyou as $enforce) { + $colspan = 10+$enforce['hero']; echo " - "; $tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0); @@ -84,6 +92,9 @@ if($units_incoming >= 1){ for($i=$start;$i<=($end);$i++) { echo ""; } + if($enforce['hero']!=0){ + echo ""; + } echo ""; for($i=$start;$i<=($start+9);$i++) { if($enforce['u'.$i] == 0) { @@ -94,8 +105,11 @@ if($units_incoming >= 1){ } echo $enforce['u'.$i].""; } + if($enforce['hero']!=0){ + echo ""; + } echo " - "; + "; echo "
getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['vref'],"name").""; + "; echo "getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops"; echo "
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$enforce['hero']."
Upkeep
".$technology->getUpkeep($enforce,$tribe)."\"Crop\"per hour
Upkeep
".$technology->getUpkeep($enforce,$tribe)."\"Crop\"per hour
"; } diff --git a/Templates/Build/16_incomming.tpl b/Templates/Build/16_incomming.tpl index e8e76959..6fee6ec0 100644 --- a/Templates/Build/16_incomming.tpl +++ b/Templates/Build/16_incomming.tpl @@ -27,8 +27,7 @@ if ($units[$y]['sort_type']==3){ } echo "Troops"; for($i=$start;$i<=($end);$i++) { - $tribe1 = $tribe-1; - $totalunits = $units[$y]['t'.$tribe1*10+1]+$units[$y]['t'.$tribe1*10+2]+$units[$y]['t'.$tribe1*10+3]+$units[$y]['t'.$tribe1*10+4]+$units[$y]['t'.$tribe1*10+5]+$units[$y]['t'.$tribe1*10+6]+$units[$y]['t'.$tribe1*10+7]+$units[$y]['t'.$tribe1*10+8]+$units[$y]['t'.$tribe1*10+9]+$units[$y]['t'.$tribe1*10+10]; + $totalunits = $units[$y]['t1']+$units[$y]['2']+$units[$y]['3']+$units[$y]['4']+$units[$y]['5']+$units[$y]['6']+$units[$y]['7']+$units[$y]['8']+$units[$y]['9']+$units[$y]['10']+$units[$y]['t11']; if($totalunits > $building->getTypeLevel(16)){ echo "?"; }else{ @@ -96,14 +95,18 @@ $to = $database->getMInfo($units[$y]['vref']); Troops ?"; + echo "0"; } else { echo ""; - } echo $units[$y]['t'.$i].""; - } + } + }else{ + echo "?"; + } + } ?> @@ -130,5 +133,4 @@ $to = $database->getMInfo($units[$y]['vref']); } -//} ?> diff --git a/Templates/Build/19_5.tpl b/Templates/Build/19_5.tpl new file mode 100644 index 00000000..46ad4138 --- /dev/null +++ b/Templates/Build/19_5.tpl @@ -0,0 +1,60 @@ + +
+ \"Clubswinger\" + Clubswinger (Available: ".$village->unitarray['u41'].") +
+
+ \"Wood\"95|\"Clay\"75|\"Iron\"40|\"Crop\"40|\"Crop1|\"Duration\""; + echo $generator->getTimeFormat(round($u11['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo "
+ + + maxUnit(11)."; return false;\">(".$technology->maxUnit(11).") + "; + if($technology->getTech(12)) { + echo " +
+ \"Spearman\" + Spearman (Available: ".$village->unitarray['u12'].") +
+
+ \"Wood\"145|\"Clay\"70|\"Iron\"85|\"Crop\"40|\"Crop1|\"Duration\""; + echo $generator->getTimeFormat(round($u12['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo "
+ + + maxUnit(12)."; return false;\">(".$technology->maxUnit(12).") + "; + } + if($technology->getTech(13)){ + echo " +
+ \"Axeman\" + Axeman (Available: ".$village->unitarray['u13'].") +
+
+ \"Wood\"130|\"Clay\"120|\"Iron\"170|\"Crop\"70|\"Crop1|\"Duration\""; + echo $generator->getTimeFormat(round($u13['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo "
+ + + maxUnit(13)."; return false;\">(".$technology->maxUnit(13).") + "; + } + if($technology->getTech(14)) { + echo " +
+ \"Scout\" + Scout (Available: ".$village->unitarray['u14'].") +
+
+ \"Wood\"160|\"Clay\"100|\"Iron\"50|\"Crop\"50|\"Crop1|\"Duration\""; + echo $generator->getTimeFormat(round($u14['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo "
+ + + maxUnit(14)."; return false;\">(".$technology->maxUnit(14).") + "; +} +?> \ No newline at end of file diff --git a/Templates/Build/20_5.tpl b/Templates/Build/20_5.tpl new file mode 100644 index 00000000..72a55b8a --- /dev/null +++ b/Templates/Build/20_5.tpl @@ -0,0 +1,25 @@ +getTech($i)) { + echo "
\"".$technology-getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" /> + ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; + echo "
+ \"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; + echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo "
+ + + + + + maxUnit($i)."; return false;\">(".$technology->maxUnit($i).") + + "; + $success += 1; + } +} +if($success == 0) { + echo "No units avaliable. Research at academy"; +} +?> \ No newline at end of file diff --git a/Templates/Build/22_5.tpl b/Templates/Build/22_5.tpl new file mode 100644 index 00000000..7f632f8f --- /dev/null +++ b/Templates/Build/22_5.tpl @@ -0,0 +1,143 @@ + + + + + + + +grabAcademyRes(); +for($i=42;$i<=49;$i++) { + if($technology->meetRRequirement($i) && !$technology->getTech($i) && !$technology->isResearch($i,1)) { + echo ""; + echo ""; + } + else if(${'r'.$i}['crop'] > $village->maxcrop) { + echo "
Expand granary"; + echo ""; + } + else if(${'r'.$i}['wood'] > $village->awood || ${'r'.$i}['clay'] > $village->aclay || ${'r'.$i}['iron'] > $village->airon || ${'r'.$i}['crop'] > $village->acrop) { + $time = $technology->calculateAvaliable($i); + echo "
Enough resources ".$time[0]." at ".$time[1].""; + echo ""; + } + else if ( count($acares) > 0 ) { + echo ""; + echo ""; + } + else { + echo ""; + echo ""; + } + $success += 1; + } + else { + $fail += 1; + } +} +if($success == 0) { +echo ""; +} +?> + +
AcademyAction
+
+ \"".$technology-getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" /> + ".$technology->getUnitName($i)." +
+
\"Lumber\"".${'r'.$i}['wood']."|\"Clay\"".${'r'.$i}['clay']."|\"Iron\"".${'r'.$i}['iron']."|\"Crop\"".${'r'.$i}['crop']."|\"duration\""; + echo $generator->getTimeFormat(round(${'r'.$i}['time'] * ($bid22[$village->resarray['f'.$id]]['attri'] / 100)/SPEED)); + if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) > 1) { + echo "|\"NPC"; + } + if(${'r'.$i}['wood'] > $village->maxstore || ${'r'.$i}['clay'] > $village->maxstore || ${'r'.$i}['iron'] > $village->maxstore) { + echo "
Expand warehouse
+
Expand
warehouse
+
+
Expand
granary
+
+
Too few
resources
+
+ Research in progress
+ mchecker."\">Research
There are no researches avaliable
+ 0) { + echo "

show more

+ + "; + if(!$technology->meetRRequirement(43) && !$technology->getTech(43)) { + echo""; + } + if(!$technology->meetRRequirement(44) && !$technology->getTech(44)) { + echo ""; + } + if(!$technology->meetRRequirement(45) && !$technology->getTech(45)) { + echo ""; + } + if(!$technology->meetRRequirement(46) && !$technology->getTech(46)) { + echo ""; + } + if(!$technology->meetRRequirement(47) && !$technology->getTech(47)) { + echo " + "; + } + if(!$technology->meetRRequirement(48) && !$technology->getTech(48)) { + echo " + "; + } + if(!$technology->meetRRequirement(49) && !$technology->getTech(49)) { + echo " "; + } + echo " "; + echo "
Prerequisites
Academy + Level 3
Blacksmith Level 1
+ Academy Level 1
Main Building + Level 5
+ Academy Level 5
Stable + Level 5
+ Academy Level 15
+ Stable Level 10
Academy + Level 10
Workshop Level 1
Workshop + Level 10
Academy Level 15
+ Rally Point Level 5
+ Academy Level 20
"; +} +//$acares = $technology->grabAcademyRes(); +if(count($acares) > 0) { + echo " + "; + $timer = 1; + foreach($acares as $aca) { + $unit = substr($aca['tech'],1,2); + echo ""; + echo ""; + $date = $generator->procMtime($aca['timestamp']); + echo ""; + echo ""; + $timer +=1; + } + echo "
ResearchingDurationComplete
\"".$technology-getUnitName($unit)."\" title=\"".$technology->getUnitName($unit)."\" />".$technology->getUnitName($unit)."".$generator->getTimeFormat($aca['timestamp']-time())."".$date[1]." hrs
"; +} +?> diff --git a/Templates/Build/avaliable.tpl b/Templates/Build/avaliable.tpl index f1178307..81936d6a 100644 --- a/Templates/Build/avaliable.tpl +++ b/Templates/Build/avaliable.tpl @@ -122,8 +122,39 @@ if($academy == 0 && $mainbuilding >= 3 && $barrack >= 3 && $id != 39 && $id != 4 include("avaliable/academy.tpl"); } //fix palace -if($palace == 0 && $embassy >= 1 && $mainbuilding >= 5 && $$UnderConstruction <> -1 && $id != 39 && $id != 40 && $residence == 0) { -include("avaliable/palace.tpl"); +if($palace == 0 && $embassy >= 1 && $mainbuilding >= 5 && $id != 39 && $id != 40 && $residence == 0) { + +//Fix Castle +//id user +$user = $session->uid; + +//connect to DB +mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS); +mysql_select_db(SQL_DB); + +//loop search village user +$query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user.""); +while($villaggi_array = mysql_fetch_array($query)){ + + //loop structure village + $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); + $strutture= mysql_fetch_array($query1); + +//search Castle in array structure village +$test = in_array(26,$strutture); +if ($test){ + break; + } + +} + + +//if Castle no ready include palace.tpl +if (!$test){ + include("avaliable/palace.tpl"); +} + +//end Fix } if($blacksmith == 0 && $academy >= 3 && $mainbuilding >= 3 && $id != 39 && $id != 40) { include("avaliable/blacksmith.tpl"); @@ -213,7 +244,38 @@ if($academy == 0 && ($mainbuilding <= 2 || $barrack <= 2)) { include("soon/academy.tpl"); } if($embassy == 0 || $mainbuilding >= 2 && $mainbuilding <= 4) { - include("soon/palace.tpl"); + +//Fix Castle +//id user +$user = $session->uid; + +//connect to DB +mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS); +mysql_select_db(SQL_DB); + +//loop search village user +$query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user.""); +while($villaggi_array = mysql_fetch_array($query)){ + + //loop structure village + $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); + $strutture= mysql_fetch_array($query1); + +//search Castle in array structure village +$test = in_array(26,$strutture); +if ($test){ + break; + } + +} + + +//if Castle no ready include palace.tpl +if (!$test){ + include("soon/palace.tpl"); +} + + //end Fix } if($blacksmith == 0 && ($academy <= 2 || $mainbuilding <= 2)) { include("soon/blacksmith.tpl"); diff --git a/Templates/Build/sendback_5.tpl b/Templates/Build/sendback_5.tpl new file mode 100644 index 00000000..cd9bfe83 --- /dev/null +++ b/Templates/Build/sendback_5.tpl @@ -0,0 +1,156 @@ +getVillage($enforce['from']); +$fromcoor = $database->getCoor($enforce['from']); +$tocoor = $database->getCoor($enforce['vref']); + + $fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']); + $toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']); +?> + +

Send units back

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Destination: (|)
Owner:getUserField($to['owner'],'username',0); ?>
+ + + + + + + + + + +
Send units back to
+ + + "; + + ?> + + "; + + ?> + "; + + ?> + + + "; + + ?> + + + "; + + ?> + + "; + + ?> + "; + + ?> + "; + + ?> + + + "; + + ?> + "; + ?> + + +
Pikeman name="t1" value="" maxlength="6" type="text"> + (".$enforce['u41'].")Bird of Prey name="t4" value="" maxlength="6" type="text"> + (".$enforce['u44'].")War Elephant name="t7" value="" maxlength="6" type="text"> + (".$enforce['u47'].")Natarian Emperor name="t9" value="" maxlength="6" type="text"> + (".$enforce['u49'].")
Thorned Warrior name="t2" value="" maxlength="6" type="text"> + (".$enforce['u42'].")Axerider name="t5" value="" maxlength="6" type="text"> + (".$enforce['u45'].")Balista name="t8" value="" maxlength="6" type="text"> + (".$enforce['u48'].")Settler name="t10" value="" maxlength="6" type="text"> + (".$enforce['u50'].")
Guardsman name="t3" value="" maxlength="6" type="text"> + (".$enforce['u3'].")Natarian Knight name="t6" value="" maxlength="6" type="text"> + (".$enforce['u6'].")
+ + + + + + + tribe; + $start = ($att_tribe-1)*10+1; + $end = ($att_tribe*10); + $speeds = array(); + //find slowest unit. + for($i=$start;$i<=$end;$i++) + { + if (isset($enforce['u'.$i])) + { + if($enforce['u'.$i]!='' && $enforce['u'.$i]>0) + { + //$speeds[] = $unitspeeds[$i-2]; + $speeds[] = ${'u'.$i}['speed']; + } + } + } + $time = $generator->procDistanceTime($fromCor,$toCor,min($speeds),1); + + ?> + + + + +
Arrived: +
in getTimeFormat($time); ?>
+
at hours
+
+ + + + + + + + +

+ +
+ + \ No newline at end of file diff --git a/Templates/Build/upgrade.tpl b/Templates/Build/upgrade.tpl index 8452785b..7ae6489d 100644 --- a/Templates/Build/upgrade.tpl +++ b/Templates/Build/upgrade.tpl @@ -1,66 +1,66 @@ canBuild($id,$village->resarray['f'.$id.'t']); if($bindicate == 1) { - echo "

".$lang['upgrade'][0]."

"; + echo "

Building already at max level

"; } else if($bindicate == 10) { - echo "

".$lang['upgrade'][1]."

"; + echo "

Building max level under construction

"; } else if($bindicate == 11) { - echo "

".$lang['upgrade'][2]."

"; + echo "

Building presently being demolished

"; } else { $loopsame = ($building->isCurrent($id) || $building->isLoop($id))?1:0; $doublebuild = ($building->isCurrent($id) && $building->isLoop($id))?1:0; $uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],($loopsame > 0 ? 2:1)+$doublebuild); ?> -

resarray['f'.$id]+($loopsame > 0 ? 2:1)+$doublebuild; ?>:
-<?php echo LUMBER; ?>  | <?php echo CLAY; ?>  | <?php echo IRON; ?>  | <?php echo CROP; ?>  | <?php echo CROP_COM; ?>  | <?php echo DURATION ?>getTimeFormat($uprequire['time']); +

Costs for upgrading to level resarray['f'.$id]+($loopsame > 0 ? 2:1)+$doublebuild; ?>:
+Lumber | Clay | Iron | Crop | Crop consumption | durationgetTimeFormat($uprequire['time']); if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { - echo "|\"".$lang['npc'][0]."\""; + echo "|\"NPC"; } ?>
".$lang['upgrade'][4].""; + echo "The workers are already at work."; } else if($bindicate == 3) { - echo "".$lang['upgrade'][4]." ".WAITING_LOOP.""; + echo "The workers are already at work. (waiting loop)"; } else if($bindicate == 4) { - echo "".$lang['upgrade'][5].""; + echo "Not enough food. Expand cropland."; } else if($bindicate == 5) { - echo "".$lang['upgrade'][6].""; + echo "Upgrade Warehouse."; } else if($bindicate == 6) { - echo "".$lang['upgrade'][7].""; + echo "Upgrade Granary."; } else if($bindicate == 7) { $neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],($loopsame > 0 ? 2:1)); - echo "".$lang['upgrade'][8].$neededtime[0].$lang['upgrade'][9].$neededtime[1].""; + echo "Enough resources ".$neededtime[0]." at ".$neededtime[1].""; } else if($bindicate == 8) { if($session->access==BANNED){ - echo "".$lang['upgrade'][10]; + echo "Upgrade to level "; } else if($id <= 18) { - echo "checker\">".$lang['upgrade'][10]; + echo "checker\">Upgrade to level "; } else { - echo "checker\">".$lang['upgrade'][10]; + echo "checker\">Upgrade to level "; } echo $village->resarray['f'.$id]+1; echo "."; } else if($bindicate == 9) { if($session->access==BANNED){ - echo "".$lang['upgrade'][10]; + echo "Upgrade to level "; } else if($id <= 18) { - echo "checker\">".$lang['upgrade'][10]; + echo "checker\">Upgrade to level "; } else { - echo "checker\">".$lang['upgrade'][10]; + echo "checker\">Upgrade to level "; } echo $village->resarray['f'.$id]+($loopsame > 0 ? 2:1); - echo ". ".WAITING_LOOP." "; + echo ". (waiting loop) "; } } diff --git a/Templates/Building.tpl b/Templates/Building.tpl index d31504d6..fb91e317 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -16,7 +16,7 @@ gold >= 2) { - ?> <?php echo FINISH_GOLD; ?> + ?> Finish all construction and research orders in this village immediately for 2 Gold? @@ -40,16 +40,16 @@ $BuildingList = array(); foreach($building->buildArray as $jobs) { echo "checker\">"; - echo "\"".CANCEL."\""; - echo $building->procResType($jobs['type']).$lang['buildings'][44].($village->resarray['f'.$jobs['field']]+(in_array($jobs['field'],$BuildingList)?2:1 )).")"; + echo "\"cancel\""; + echo $building->procResType($jobs['type'])." (Level ".($village->resarray['f'.$jobs['field']]+(in_array($jobs['field'],$BuildingList)?2:1 )).")"; if($jobs['loopcon'] == 0) { $BuildingList[] = $jobs['field']; } if($jobs['loopcon'] == 1) { - echo " ".WAITING_LOOP; + echo " (waiting loop)"; } echo ""; echo $generator->getTimeFormat($jobs['timestamp']-time()); - echo " ".HRS.""; - echo "".DONE_AT." ".date('H:i', $jobs['timestamp']).""; + echo " hrs."; + echo "done at ".date('H:i', $jobs['timestamp']).""; $timer +=1; } ?> diff --git a/Templates/Map/mapview.tpl b/Templates/Map/mapview.tpl index baa406d7..86ad2cd2 100644 --- a/Templates/Map/mapview.tpl +++ b/Templates/Map/mapview.tpl @@ -90,9 +90,15 @@ $query2 = "SELECT LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance ) where ".TB_PREFIX."wdata.id IN ($maparray) ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')"; -//echo $query2; + +//$query2; + $result2 = mysql_query($query2) or die(mysql_error()); +$targetalliance = array(); +$neutralarray = array(); +$friendarray = array(); +$enemyarray = array(); $i=0; //Load coor array $coorarray = array("53, 137, 90, 157, 53, 177, 16, 157","89, 117, 126, 137, 89, 157, 52, 137","125, 97, 162, 117, 125, 137, 88, 117","161, 77, 198, 97, 161, 117, 124, 97","197, 57, 234, 77, 197, 97, 160, 77","233, 37, 270, 57, 233, 77, 196, 57","269, 17, 306, 37, 269, 57, 232, 37","90, 157, 127, 177, 90, 197, 53, 177","126, 137, 163, 157, 126, 177, 89, 157","162, 117, 199, 137, 162, 157, 125, 137","198, 97, 235, 117, 198, 137, 161, 117","234, 77, 271, 97, 234, 117, 197, 97","270, 57, 307, 77, 270, 97, 233, 77","306, 37, 343, 57, 306, 77, 269, 57","127, 177, 164, 197, 127, 217, 90, 197","163, 157, 200, 177, 163, 197, 126, 177","199, 137, 236, 157, 199, 177, 162, 157","235, 117, 272, 137, 235, 157, 198, 137","271, 97, 308, 117, 271, 137, 234, 117","307, 77, 344, 97, 307, 117, 270, 97","343, 57, 380, 77, 343, 97, 306, 77","164, 197, 201, 217, 164, 237, 127, 217","200, 177, 237, 197, 200, 217, 163, 197","236, 157, 273, 177, 236, 197, 199, 177","272, 137, 309, 157, 272, 177, 235, 157","308, 117, 345, 137, 308, 157, 271, 137","344, 97, 381, 117, 344, 137, 307, 117","380, 77, 417, 97, 380, 117, 343, 97","201, 217, 238, 237, 201, 257, 164, 237","237, 197, 274, 217, 237, 237, 200, 217","273, 177, 310, 197, 273, 217, 236, 197","309, 157, 346, 177, 309, 197, 272, 177","345, 137, 382, 157, 345, 177, 308, 157","381, 117, 418, 137, 381, 157, 344, 137","417, 97, 454, 117, 417, 137, 380, 117","238, 237, 275, 257, 238, 277, 201, 257","274, 217, 311, 237, 274, 257, 237, 237","310, 197, 347, 217, 310, 237, 273, 217","346, 177, 383, 197, 346, 217, 309, 197","382, 157, 419, 177, 382, 197, 345, 177","418, 137, 455, 157, 418, 177, 381, 157","454, 117, 491, 137, 454, 157, 417, 137","275, 257, 312, 277, 275, 297, 238, 277","311, 237, 348, 257, 311, 277, 274, 257","347, 217, 384, 237, 347, 257, 310, 237","383, 197, 420, 217, 383, 237, 346, 217","419, 177, 456, 197, 419, 217, 382, 197","455, 157, 492, 177, 455, 197, 418, 177","491, 137, 528, 157, 491, 177, 454, 157"); @@ -101,67 +107,28 @@ $yrow = 0; $row = 0; $coorindex = 0; $map_js =''; -while ($donnees = mysql_fetch_assoc($result2)){ - $targetalliance = $donnees['user_alliance']; - if(count($database->diplomacyExistingRelationships($targetalliance))){ - foreach($database->diplomacyExistingRelationships($targetalliance) as $key => $row9){ - if($row9['alli1'] == $session->alliance){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }elseif(count($database->diplomacyExistingRelationships2($targetalliance))){ - foreach($database->diplomacyExistingRelationships2($targetalliance) as $key => $row9){ - if($row9['alli2'] == $session->alliance){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - - $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (($friendarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (($enemyarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (($neutralarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; + +while ($donnees = mysql_fetch_assoc($result2)){ + +$targetalliance=$donnees["aliance_id"]; +$friendarray=$database->getAllianceAlly($donnees["aliance_id"],1); +$neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2); +$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); +//var_dump($friendarray); +//echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")
\n"; + +$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +//echo $targetalliance.">>"; +//var_dump($friendarray); +//echo"|||
"; +//var_dump($arraydiplo); +//echo in_array($targetalliance,$friendarray); + $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; // Map content if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ @@ -170,14 +137,14 @@ while ($donnees = mysql_fetch_assoc($result2)){ $map_content .= "

\r"; } //Map create - $map_gen .= "\n"; + $map_gen .= "\n"; //Javascript map info if($yrow!=7){ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; if($donnees['map_occupied']){ if($donnees['map_fieldtype'] != 0){ - $map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n"; + $map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n"; } } elseif($donnees['map_oasis'] != 0){ @@ -266,7 +233,7 @@ while ($donnees = mysql_fetch_assoc($result2)){ x y
- goldclub != 0){echo " Crop Finder";}?> + plus != 0){echo " Crop Finder";}?>
Details
Player-
Population-
Alliance
diff --git a/Templates/Map/mapviewlarge.tpl b/Templates/Map/mapviewlarge.tpl index 7c5a9953..9267ccb3 100644 --- a/Templates/Map/mapviewlarge.tpl +++ b/Templates/Map/mapviewlarge.tpl @@ -52,7 +52,7 @@ $xcount = 0; $maparray = ''; $maparray2 = ''; for($i=0; $i<=12; $i++){ - if($xcount != 13){ + if($xcount != 13){ $maparray .= '\''.$generator->getBaseID($xarray[$xcount],$yarray[$i]).'\','; $maparray2 .= $generator->getBaseID($xarray[$xcount],$yarray[$i]).','; if($i==12){ @@ -103,9 +103,14 @@ $query2 = "SELECT LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance ) where ".TB_PREFIX."wdata.id IN ($maparray) ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')"; + //echo $query2; $result2 = mysql_query($query2) or die(mysql_error()); +$targetalliance = array(); +$neutralarray = array(); +$friendarray = array(); +$enemyarray = array(); $i=0; $i2=0; $yrow = 0; @@ -177,71 +182,26 @@ $coorarray = array( ); while ($donnees = mysql_fetch_assoc($result2)){ - $targetalliance = $donnees['user_alliance']; - if(count($database->diplomacyExistingRelationships($targetalliance))){ - foreach($database->diplomacyExistingRelationships($targetalliance) as $key => $row9){ - if($row9['alli1'] == $session->alliance){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }elseif(count($database->diplomacyExistingRelationships2($targetalliance))){ - foreach($database->diplomacyExistingRelationships2($targetalliance) as $key => $row9){ - if($row9['alli1'] == $session->alliance){ - if($row9['type'] == 1){ - $neutralarray = 0; - $friendarray = 1; - $enemyarray = 0; - - } else if($row9['type'] == 2){ - $neutralarray = 1; - $friendarray = 0; - $enemyarray = 0; - - } else if($row9['type'] == 3){ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 1; - - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - } - }else{ - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - - } - - if ($targetalliance == 1) { - $neutralarray = 0; - $friendarray = 0; - $enemyarray = 0; - } - $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (($friendarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (($enemyarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (($neutralarray == 1)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; + +$targetalliance=$donnees["aliance_id"]; +$friendarray=$database->getAllianceAlly($donnees["aliance_id"],1); +$neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2); +$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); +//var_dump($friendarray); +//echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")
\n"; + +$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; + +//echo $targetalliance.">>"; +//var_dump($friendarray); +//echo"|||
"; +//var_dump($arraydiplo); +//echo in_array($targetalliance,$friendarray); + $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; // Map content if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ @@ -250,14 +210,14 @@ while ($donnees = mysql_fetch_assoc($result2)){ $map_content .= "
\r"; } //Map create - $map_gen .= "\n"; + $map_gen .= "\n"; //Javascript map info if($yrow!=13){ $map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\""; if($donnees['map_occupied']){ if($donnees['map_fieldtype'] != 0){ - $map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n"; + $map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n"; } } elseif($donnees['map_oasis'] != 0){ diff --git a/Templates/Message/write.tpl b/Templates/Message/write.tpl index f4c2e4a0..b4bdaa70 100644 --- a/Templates/Message/write.tpl +++ b/Templates/Message/write.tpl @@ -41,7 +41,7 @@ include("menu.tpl");
-
+ diff --git a/Templates/Notice/1.tpl b/Templates/Notice/1.tpl index b61bfc9f..681ca3ef 100644 --- a/Templates/Notice/1.tpl +++ b/Templates/Notice/1.tpl @@ -1,5 +1,8 @@ readingNotice['data']); +//var_dump($dataarray); +//echo $dataarray[147]; +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -21,7 +24,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -32,6 +35,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -41,6 +49,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -50,37 +61,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/1x.tpl b/Templates/Notice/1x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/1x.tpl +++ b/Templates/Notice/1x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/2.tpl b/Templates/Notice/2.tpl index b61bfc9f..6443834c 100644 --- a/Templates/Notice/2.tpl +++ b/Templates/Notice/2.tpl @@ -1,5 +1,7 @@ readingNotice['data']); +//var_dump($dataarray); +if($dataarray[147]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";} ?> @@ -21,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -32,6 +34,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -41,6 +48,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -50,37 +60,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if ($dataarray[147]!="" or $dataarray[147]!=0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/2x.tpl b/Templates/Notice/2x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/2x.tpl +++ b/Templates/Notice/2x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/3.tpl b/Templates/Notice/3.tpl index dff8a9e5..251a8110 100644 --- a/Templates/Notice/3.tpl +++ b/Templates/Notice/3.tpl @@ -5,6 +5,7 @@ ## GIT HUB REV ## ############################################################ $dataarray = explode(",",$message->readingNotice['data']); +if($dataarray[147]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";} ?> @@ -26,7 +27,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
- + @@ -37,7 +38,9 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } -echo ""; +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -47,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -56,7 +62,10 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if ($dataarray[147]!="" or $dataarray[147]!=0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; ?>
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
diff --git a/Templates/Notice/3x.tpl b/Templates/Notice/3x.tpl index ea27148d..deb01baa 100644 --- a/Templates/Notice/3x.tpl +++ b/Templates/Notice/3x.tpl @@ -8,6 +8,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if($dataarray[147]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";} ?> @@ -29,7 +30,7 @@ $dataarray = explode(",",$data);
- + @@ -40,7 +41,9 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } -echo ""; +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -50,6 +53,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if ($dataarray[147]!="" or $dataarray[147]!=0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -59,7 +65,10 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if ($dataarray[147]!="" or $dataarray[147]!=0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; ?>
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
diff --git a/Templates/Notice/4x.tpl b/Templates/Notice/4x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/4x.tpl +++ b/Templates/Notice/4x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/5x.tpl b/Templates/Notice/5x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/5x.tpl +++ b/Templates/Notice/5x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/6x.tpl b/Templates/Notice/6x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/6x.tpl +++ b/Templates/Notice/6x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/Notice/7x.tpl b/Templates/Notice/7x.tpl index 3f1d5503..6eaf060e 100644 --- a/Templates/Notice/7x.tpl +++ b/Templates/Notice/7x.tpl @@ -3,6 +3,7 @@ $topic = $database->getNotice2($_GET['id'], 'topic'); $time = $database->getNotice2($_GET['id'], 'time'); $data = $database->getNotice2($_GET['id'], 'data'); $dataarray = explode(",",$data); +if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";} ?> @@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
- + @@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == for($i=$start;$i<=($start+9);$i++) { echo ""; } + +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} + echo ""; for($i=3;$i<=12;$i++) { if($dataarray[$i] == 0) { @@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) { echo ""; } } +if (isset($dataarray[147]) and $dataarray[147] != 0){ + echo ""; +} echo ""; for($i=13;$i<=22;$i++) { if($dataarray[$i] == 0) { @@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) { echo ""; } } - +if (isset($dataarray[147]) and $dataarray[147] != 0){ + if ($dataarray[148]==0){$tdclass='class="none"';} + echo ""; +} echo ""; if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram ?> - - - - -
Attacker">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>">getUserField($dataarray[0],"username",0); ?> from the village getVillageField($dataarray[1],"name"); ?>
getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />\"Hero\"
Troops".$dataarray[$i]."$dataarray[147]
Casualties".$dataarray[$i]."$dataarray[148]
Information +
Information Ram
Information +
Information Catapult
Information +
Information Chief
Information +
Information
Bounty +
Bounty
Lumber | Clay | Iron | Crop
carry
diff --git a/Templates/a2b/attack_5.tpl b/Templates/a2b/attack_5.tpl new file mode 100644 index 00000000..aee439c7 --- /dev/null +++ b/Templates/a2b/attack_5.tpl @@ -0,0 +1,403 @@ +getCoor($village->wid); + +$from = array('x'=>$eigen['x'], 'y'=>$eigen['y']); + +$to = array('x'=>$coor['x'], 'y'=>$coor['y']); + +$time = $generator->procDistanceTime($from,$to,300,0); + +// Temp + +$ckey= $generator->generateRandStr(6); + + + if (!isset($process['t1']) || $process['t1'] == ''){ $t1='0'; }else{ $t1=$process['t1']; } + if (!isset($process['t2']) || $process['t2'] == ''){ $t2='0'; }else{ $t2=$process['t2']; } + if (!isset($process['t3']) || $process['t3'] == ''){ $t3='0'; }else{ $t3=$process['t3']; $scout=1; } + if (!isset($process['t4']) || $process['t4'] == ''){ $t4='0'; }else{ $t4=$process['t4']; } + if (!isset($process['t5']) || $process['t5'] == ''){ $t5='0'; }else{ $t5=$process['t5']; } + if (!isset($process['t6']) || $process['t6'] == ''){ $t6='0'; }else{ $t6=$process['t6']; } + if (!isset($process['t7']) || $process['t7'] == ''){ $t7='0'; }else{ $t7=$process['t7']; } + if (!isset($process['t8']) || $process['t8'] == ''){ $t8='0'; }else{ $t8=$process['t8']; } + if (!isset($process['t9']) || $process['t9'] == ''){ $t9='0'; }else{ $t9=$process['t9']; } + if (!isset($process['t10']) || $process['t10'] == ''){ $t10='0'; }else{ $t10=$process['t10']; } + if (!isset($process['t11']) || $process['t11'] == ''){ $t11='0'; }else{ $t11=$process['t11']; } + $totalunits =$process['t1']+$process['t2']+$process['t4']+$process['t5']+$process['t6']+$process['t7']+$process['t8']+$process['t9']+$process['t10']+$process['t11']; + if ($scout==1 && $totalunits==0) { + +$process['c'] = 1; + +} + $id = $database->addA2b($ckey,time(),$process['0'],$t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,$process['c']); + + + +if ($process['c']==1){ + +$actionType = "Scout"; + +}else if ($process['c']==2){ + + +$actionType = "Normal attack"; + +}else{ + +$actionType = "Raid"; + +} + +?> + +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Destination: (|)
Owner:getUserField($process['2'],'username',0); ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) + + { + + $speeds[] = ${'u'.(($session->tribe-5)*10+$i)}['speed']; + + if($i != 4) + + $scout = 0; + + } + + + + } + + } + + + + if($scout) + + $process['c'] = 1; + + + $time = $generator->procDistanceTime($from,$to,min($speeds),1); + + ?> + + + + + + + + + +
PikemanThorned WarriorGuardsman></td>
+
+                        <td><img src=AxeriderNatarian KnightWar ElephantBalistaNatarian EmperorSettler
Troops0"; }else{ echo ">".$process['t1'];} ?>0"; }else{ echo ">".$process['t2'];} ?>0"; }else{ echo ">".$process['t3'];} ?>0"; }else{ echo ">".$process['t4'];} ?>0"; }else{ echo ">".$process['t5'];} ?>0"; }else{ echo ">".$process['t6'];} ?>0"; }else{ echo ">".$process['t7'];} ?>0"; }else{ $kata='1'; echo ">".$process['t8'];} ?>0"; }else{ echo ">".$process['t9'];} ?>0"; }else{ echo ">".$process['t10'];} ?>
OptionsScout resources and troops
+ Scout defences and troops
Destination: + getTypeLevel(16) == 20) { ?> + + + + (will be attacked by catapult(s)) +
Destination: + ONLY shoot with a normal attack (they dont shoot with raids!)"; + ?> +
Arrived: + +
in getTimeFormat($time); ?>
+ +
at hours
+ +
+ + + + + + + + + + + + +

+ + +
+ +
\ No newline at end of file diff --git a/Templates/a2b/units_5.tpl b/Templates/a2b/units_5.tpl new file mode 100644 index 00000000..4e3d0c6f --- /dev/null +++ b/Templates/a2b/units_5.tpl @@ -0,0 +1,99 @@ +

Send Troops

+ +
+ + + + + "; + }else{ + echo "(0)"; + } + ?> + + "; + }else{ + echo "(0)"; + } + ?> + "; + }else{ + echo "(0)"; + } + ?> + + + "; + }else{ + echo "(0)"; + } + ?> + + + "; + }else{ + echo "(0)"; + } + ?> + + "; + }else{ + echo "(0)"; + } + ?> + "; + }else{ + echo "(0)"; + } + ?> + "; + }else{ + echo "(0)"; + } + ?> + + + "; + }else{ + echo "(0)"; + } + ?> + "; + }else{ + echo "(0)"; + } + ?> + + +
<?php echo U41; ?> unitarray['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text"> + unitarray['u41']>0){ + echo "unitarray['u41']."; return false;\">(".$village->unitarray['u41'].")<?php echo U44; ?> unitarray['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text"> + unitarray['u44']>0){ + echo "unitarray['u44']."; return false;\">(".$village->unitarray['u44'].")<?php echo U47; ?> unitarray['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text"> + unitarray['u47']>0){ + echo "unitarray['u47']."; return false;\">(".$village->unitarray['u47'].")<?php echo U49; ?> unitarray['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text"> + unitarray['u49']>0){ + echo "unitarray['u49']."; return false;\">(".$village->unitarray['u49'].")
<?php echo U42; ?> unitarray['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text"> + unitarray['u42']>0){ + echo "unitarray['u42']."; return false;\">(".$village->unitarray['u42'].")<?php echo U45; ?> unitarray['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text"> + unitarray['u45']>0){ + echo "unitarray['u45']."; return false;\">(".$village->unitarray['u45'].")<?php echo U48; ?> unitarray['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text"> + unitarray['u48']>0){ + echo "unitarray['u48']."; return false;\">(".$village->unitarray['u48'].")<?php echo U50; ?> unitarray['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text"> + unitarray['u50']>0){ + echo "unitarray['u50']."; return false;\">(".$village->unitarray['u50'].")
<?php echo U43; ?> unitarray['u43']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text"> + unitarray['u43']>0){ + echo "unitarray['u43']."; return false;\">(".$village->unitarray['u43'].")<?php echo U46; ?> unitarray['u46']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text"> + unitarray['u46']>0){ + echo "unitarray['u46']."; return false;\">(".$village->unitarray['u46'].")
+ diff --git a/Templates/dorf2.tpl b/Templates/dorf2.tpl index ab83baec..47749711 100644 --- a/Templates/dorf2.tpl +++ b/Templates/dorf2.tpl @@ -12,10 +12,10 @@ walling()) { - $wtitle = $building->procResType($building->walling())." ".$village->resarray['f40'].$lang['fields'][0]; + $wtitle = $building->procResType($building->walling())." Level ".$village->resarray['f40']; } else { - $wtitle = ($village->resarray['f40'] == 0)? $lang['fields'][5] : $building->procResType($village->resarray['f40t'],0)." ".$village->resarray['f40'].$lang['fields'][0]; + $wtitle = ($village->resarray['f40'] == 0)? "Outer building site" : $building->procResType($village->resarray['f40t'],0)." Level ".$village->resarray['f40']; } ?> @@ -27,15 +27,15 @@ else { $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->resarray['f99t'] == 40 AND ($t)=='25') or ($village->resarray['f99t'] == 40 AND ($t)=='26') or ($village->resarray['f99t'] == 40 AND ($t)=='29') or ($village->resarray['f99t'] == 40 AND ($t)=='30') or ($village->resarray['f99t'] == 40 AND ($t)=='33')) { - echo "resarray['f99'].$lang['fields'][0]."\" coords=\"$coords[$t]\" shape=\"poly\"/>"; + echo "resarray['f99']."\" coords=\"$coords[$t]\" shape=\"poly\"/>"; } else { if($village->resarray['f'.$t.'t'] != 0) { $title = $building->procResType($village->resarray['f'.$t.'t']). " Level ".$village->resarray['f'.$t]; } else { - $title = $lang['fields'][6]; + $title = "Building site"; if(($t == 39) && ($village->resarray['f'.$t] == 0)) { - $title = $lang['fields'][7]; + $title = "Rally Point building site"; } } echo ""; @@ -64,16 +64,16 @@ $vmapc = ($village->resarray['f40'] == 0)? "d2_0" : "d2_1".$session->tribe; for ($i=1;$i<=20;$i++) { if(($village->resarray['f99t'] == 40 AND ($i+18)=='25') or ($village->resarray['f99t'] == 40 AND ($i+18)=='26') or ($village->resarray['f99t'] == 40 AND ($i+18)=='29') or ($village->resarray['f99t'] == 40 AND ($i+18)=='30') or ($village->resarray['f99t'] == 40 AND ($i+18)=='33')) { } else { - $text = $lang['fields'][6]; + $text = "Building site"; $img = "iso"; if($village->resarray['f'.($i+18).'t'] != 0) { - $text = $building->procResType($village->resarray['f'.($i+18).'t'])." ".$village->resarray['f'.($i+18)].$lang['fields'][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'])." ".$village->resarray['f'.$job['field']].$lang['fields'][0]; + $text = $building->procResType($job['type'])." Level ".$village->resarray['f'.$job['field']]; } } echo "\"$text\""; @@ -81,30 +81,30 @@ for ($i=1;$i<=20;$i++) { } if($village->resarray['f39'] == 0) { if($building->rallying()) { - echo "\"".$lang['buildings'][16]." ".$village-resarray['f39'].$lang['fields'][0]."\" />"; + echo "\"Rallyresarray['f39']."\" />"; } else { - echo "\"".$lang['fields'][7]."\""; + echo "\"Rally"; } } else { - echo "\"".$lang['buildings'][16]." ".$village-resarray['f39'].$lang['fields'][0]."\" />"; + echo "\"Rallyresarray['f39']."\" />"; } ?> resarray['f99t'] == 40) { if($village->resarray['f99'] >= 0 && $village->resarray['f99'] <= 19) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } if($village->resarray['f99'] >= 20 && $village->resarray['f99'] <= 39) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } if($village->resarray['f99'] >= 40 && $village->resarray['f99'] <= 59) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } if($village->resarray['f99'] >= 60 && $village->resarray['f99'] <= 79) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } if($village->resarray['f99'] >= 80 && $village->resarray['f99'] <= 99) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } if($village->resarray['f99'] == 100) { -echo ''.$lang['buildings'][40].''; } +echo 'Worldwonder'; } } ?>
> diff --git a/Templates/field.tpl b/Templates/field.tpl index d0f24fdc..551dce63 100644 --- a/Templates/field.tpl +++ b/Templates/field.tpl @@ -16,10 +16,10 @@ $arrayVillage = $village->resarray; ?> procResType($arrayVillage['f'.$i.'t'])." ".$arrayVillage['f'.$i].$lang['fields'][0]."\"/>\r\n"; +for($i=1;$i<=18;$i++) {echo " procResType($arrayVillage['f'.$i.'t'])." Level ".$arrayVillage['f'.$i]."\"/>\r\n"; } ?> - +
@@ -28,10 +28,10 @@ for($i=1;$i<=18;$i++) { if($arrayVillage['f'.$i.'t'] != 0) { $text = ""; switch($i){ - case 1:$text = $lang['fields'][1];break; - case 2:$text = $lang['fields'][2];break; - case 3:$text = $lang['fields'][3];break; - case 4:$text = $lang['fields'][4];break; + case 1:$text = "Woodcutter Level";break; + case 2:$text = "Clay Pit Level";break; + case 3:$text = "Iron Mine Level";break; + case 4:$text = "Cropland Level";break; } echo "\"$text"; } diff --git a/Templates/header.tpl b/Templates/header.tpl index 75d7b8db..a9ec8e50 100644 --- a/Templates/header.tpl +++ b/Templates/header.tpl @@ -11,10 +11,10 @@ ?> - \ No newline at end of file diff --git a/Templates/menu.tpl b/Templates/menu.tpl index bb58e902..660170d0 100644 --- a/Templates/menu.tpl +++ b/Templates/menu.tpl @@ -38,32 +38,33 @@ div.c1 {text-align: center}

access == MULTIHUNTER) { - echo "".MULTIHUNTER_PAN.""; + echo "Multihunter Panel"; } ?> access == ADMIN) { - echo "".ADMIN_PANEL.""; - echo "".MASS_MESSAGE.""; - echo "".UPDATE_T_10.""; - echo "".SYSTEM_MESSAGE.""; - echo "".CREATE_NAT.""; + echo "Admin Panel"; + echo "Mass Message"; + echo "Update Top 10"; + echo "System message"; + echo "Create Natars"; + echo "Populate Oasis"; } ?>

- + Game Rules

Travian Plus - + Support

-

+

Announcement

Hi username; ?>,


@@ -83,9 +84,19 @@ div.c1 {text-align: center}
+
+
+
+ Calculated in pageLoadTimeEnd()-$start)*1000); + ?> ms +
+ Server time: +
+
+
0){ $NextArrival[] = $receive['endtime']; } echo ''.$title.'» -
'.$aantal.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$aantal.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } @@ -51,7 +51,7 @@ if($aantal > 0){ } } echo ''.$title.'» -
'.$aantal.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$aantal.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } @@ -73,7 +73,7 @@ if($aantal > 0){ } } echo ''.$title.'» -
'.$aantal.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$aantal.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } @@ -96,7 +96,7 @@ if($lala > 0){ } } echo ''.$title.'» -
'.$lala.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$lala.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } @@ -118,7 +118,7 @@ if($lala > 0){ } } echo ''.$title.'» -
'.$lala.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$lala.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } @@ -139,7 +139,7 @@ if($aantal > 0){ $NextArrival[] = $receive['endtime']; } echo ''.$title.'« -
'.$aantal.' '.$short.'
'.$lang['movement'][0].''.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; +
'.$aantal.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival)-time()).' '.HOURS.'
'; $timer += 1; } ?> diff --git a/Templates/troops.tpl b/Templates/troops.tpl index 2e32179d..207917f9 100644 --- a/Templates/troops.tpl +++ b/Templates/troops.tpl @@ -24,13 +24,13 @@ for($i=1;$i<=50;$i++) { } } if($troops['hero'] > 0) { - echo "\"".$lang['troops'][1]."\""; - echo "".$troops['hero']."".$lang['troops'][1].""; + echo "\"Hero\""; + echo "".$troops['hero']."Hero"; $TroopsPresent = True; } $units = $technology->getUnitList($village->wid); if(!$TroopsPresent) { - echo "".$lang['troops'][0].""; + echo "none"; } ?> diff --git a/berichte.php b/berichte.php index d1a8ab9b..12d99ed5 100644 --- a/berichte.php +++ b/berichte.php @@ -141,8 +141,19 @@ include("Templates/links.tpl"); +
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
+
\ No newline at end of file diff --git a/build.php b/build.php index 327442ee..34b5a6e4 100644 --- a/build.php +++ b/build.php @@ -203,8 +203,19 @@ include("Templates/links.tpl"); -
+
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
+ +
diff --git a/dorf1.php b/dorf1.php index fb101eea..1bdead59 100644 --- a/dorf1.php +++ b/dorf1.php @@ -93,8 +93,19 @@ include("Templates/links.tpl"); +
+
+
+ pageLoadTimeEnd()-$start)*1000); +?> ms + +
+
+
+
+
diff --git a/dorf2.php b/dorf2.php index 2dcb1c15..6da4bdbd 100644 --- a/dorf2.php +++ b/dorf2.php @@ -83,9 +83,19 @@ include("Templates/links.tpl");
+
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
\ No newline at end of file diff --git a/dorf3.php b/dorf3.php index e97b605f..b16e0eb4 100644 --- a/dorf3.php +++ b/dorf3.php @@ -101,8 +101,18 @@ include("Templates/links.tpl"); +
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
diff --git a/install/templates/config.tpl b/install/templates/config.tpl index 131afcb9..8f0dc8c1 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -31,7 +31,6 @@ echo "
Error creating constant.php Language: Beginners protection length: diff --git a/karte.php b/karte.php index 295be8e5..d57575d7 100644 --- a/karte.php +++ b/karte.php @@ -98,8 +98,18 @@ include("Templates/links.tpl"); +
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
\ No newline at end of file diff --git a/nachrichten.php b/nachrichten.php index cbdc9862..48f5227e 100644 --- a/nachrichten.php +++ b/nachrichten.php @@ -122,8 +122,18 @@ include("Templates/links.tpl"); +
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
\ No newline at end of file diff --git a/oasis_populate.php b/oasis_populate.php new file mode 100644 index 00000000..9a0f89ee --- /dev/null +++ b/oasis_populate.php @@ -0,0 +1,100 @@ +access==ADMIN){ + +//controllo + if(isset($_GET['giveout'])){ + + $database->populateOasisUnitsLow(); + + } + + + +?> + + + + + <?php echo SERVER_NAME ?> + + + + + + + + + + + + + gpack == null || GP_ENABLE == false) { + echo " + + "; + } else { + echo " + + "; + } + ?> + + + +
+ +
+
+ +
+ + + +
+
+ +
+
+ + +
+ + +
+ + + diff --git a/statistiken.php b/statistiken.php index 8cb38806..49b63cdc 100644 --- a/statistiken.php +++ b/statistiken.php @@ -152,8 +152,19 @@ include("Templates/links.tpl"); +
+
+
+Calculated in pageLoadTimeEnd()-$start)*1000); +?> ms + +
Server time: +
+
+
+