very big update

This commit is contained in:
unknown
2012-04-19 17:41:33 +03:00
parent e74c7a9518
commit f597c070d5
55 changed files with 1789 additions and 694 deletions
+1 -1
View File
@@ -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);
+141 -51
View File
@@ -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 = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
}
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.'';
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.',,'.$data['t11'].','.$dead11.',,';
}
else{
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.'';
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.',,'.$data['t11'].','.$dead11.',,';
}
@@ -1866,7 +1984,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
// When all troops die, sends no info.
$data_fail = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_deff[1].','.$unitsdead_deff[1].','.$ger.','.$unitssend_deff[2].','.$unitsdead_deff[2].','.$gal.','.$unitssend_deff[3].','.$unitsdead_deff[3].','.$nat.','.$unitssend_deff[4].','.$unitsdead_deff[4].','.$natar.','.$unitssend_deff[5].','.$unitsdead_deff[5].',,,';
$data_fail = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_deff[1].','.$unitsdead_deff[1].','.$ger.','.$unitssend_deff[2].','.$unitsdead_deff[2].','.$gal.','.$unitssend_deff[3].','.$unitsdead_deff[3].','.$nat.','.$unitssend_deff[4].','.$unitsdead_deff[4].','.$natar.','.$unitssend_deff[5].','.$unitsdead_deff[5].',,,'.$data['t11'].','.$dead11.',,';
//Undetected and detected in here.
if($scout){
@@ -1900,7 +2018,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
//to here
// If the dead units not equal the ammount sent they will return and report
if($unitsdead_att != $unitssend_att)
if($unitsdead_att != $unitssend_att or $dead11 != $herosend_att)
{
$endtime = $this->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();
+45 -45
View File
@@ -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;
}
+13 -14
View File
@@ -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);
?>
+47 -9
View File
@@ -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 .= "<a href=allianz.php?aid=".$alliance['id'].">".$alliance['tag']."</a><br> ";
}
}else{
while($row = mysql_fetch_array($result)){
$alliance = $this->getAlliance($row['alli2']);
$text = "";
$text .= "<a href=allianz.php?aid=".$alliance['id'].">".$alliance['tag']."</a><br> ";
}
}
if(strlen($text) == 0){
$text = "-<br>";
}
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) {
+2 -3
View File
@@ -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) {
+2 -100
View File
@@ -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 <b><span class=\"plus_g\">P</span><span class=\"plus_o\">l</span><span class=\"plus_g\">u</span><span class=\"plus_o\">s</span></span></span></b>");
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 => "&nbsp;(Level&nbsp;");
$lang['fields'] = array (
0 => '&nbsp;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 => '<b>Costs</b> for upgrading to level&nbsp;',
4 => 'The workers are already at work.',
5 => 'Not enough food. Expand cropland.',
6 => 'Upgrade Warehouse.',
7 => 'Upgrade Granary.',
8 => 'Enough resources&nbsp;',
9 => '&nbsp;at&nbsp;&nbsp;',
10 => 'Upgrade to level&nbsp;',
11 => 'today',
12 => 'yesterday');
$lang['movement'] = array (
0 => 'in&nbsp;');
$lang['troops'] = array (
0 => 'none',
1 => 'Hero');
?>
+4 -1
View File
@@ -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");
+1 -1
View File
@@ -51,7 +51,7 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</tr>
<tr>
<td>Language</td>
<td><?php if(LANG == en){echo "English";} else if(LANG == es){echo "Spanish";} else if(LANG == ru){echo "Russian";} ?></td>
<td><?php if(LANG == en){echo "English";} else if(LANG == es){echo "Spanish";} ?></td>
</tr>
<tr>
<td>Server Speed</td>
+1
View File
@@ -42,6 +42,7 @@ include_once ("GameEngine/Ranking.php");
<a href="massmessage.php">Mass message</a>
<a href="sysmsg.php">System message</a>
<a href="medals.php">Update top 10</a>
<a href="?p=natarend">Add World Wonder Villages</a>
<a href="?p=natarbuildingplan">Add WW Buildingplan Villages</a>
</p>
<p>
+17 -65
View File
@@ -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){
+15 -66
View File
@@ -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){
+1 -1
View File
@@ -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!";
}
+2 -2
View File
@@ -24,10 +24,10 @@ INDELING CATEGORIEEN:
******************************/
$geregistreerd=date('d-m-Y', ($allianceinfo['timestamp']));
$profiel = preg_replace("/\[war]/s",'At war with<br>'.$database->getAllianceDipProfile($aid,3), $profiel, 1);
$profiel = preg_replace("/\[war]/s",'At war with<br>'.$database->getAllianceWar($aid), $profiel, 1);
$profiel = preg_replace("/\[ally]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1), $profiel, 1);
$profiel = preg_replace("/\[nap]/s",'NAPs<br>'.$database->getAllianceDipProfile($aid,2), $profiel, 1);
$profiel = preg_replace("/\[diplomatie]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1).'<br>NAPs<br>'.$database->getAllianceDipProfile($aid,2).'<br>At war with<br>'.$database->getAllianceDipProfile($aid,3), $profiel, 1);
$profiel = preg_replace("/\[diplomatie]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1).'<br>NAPs<br>'.$database->getAllianceDipProfile($aid,2).'<br>At war with<br>'.$database->getAllianceWar($aid), $profiel, 1);
foreach($varmedal as $medal) {
+18 -4
View File
@@ -41,9 +41,10 @@ if($units_incoming >= 1){
<?php
if(count($village->enforcetome) > 0) {
foreach($village->enforcetome as $enforce) {
$colspan = 10+$enforce['hero'];
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
<td colspan=\"10\">";
<td colspan=\"$colspan\">";
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$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 "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($enforce['hero']!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($start+9);$i++) {
if($enforce['u'.$i] == 0) {
@@ -63,8 +67,11 @@ if($units_incoming >= 1){
}
echo $enforce['u'.$i]."</td>";
}
if($enforce['hero']!=0){
echo "<td>".$enforce['hero']."</td>";
}
echo "</tr></tbody>
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"10\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}
@@ -72,9 +79,10 @@ if($units_incoming >= 1){
if(count($village->enforcetoyou) > 0) {
echo "<h4>Troops in other village</h4>";
foreach($village->enforcetoyou as $enforce) {
$colspan = 10+$enforce['hero'];
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['vref'],"name")."</a></td>
<td colspan=\"10\">";
<td colspan=\"$colspan\">";
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$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 "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($enforce['hero']!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($start+9);$i++) {
if($enforce['u'.$i] == 0) {
@@ -94,8 +105,11 @@ if($units_incoming >= 1){
}
echo $enforce['u'.$i]."</td>";
}
if($enforce['hero']!=0){
echo "<td>".$enforce['hero']."</td>";
}
echo "</tr></tbody>
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"10\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>Send back</a></div></td></tr>";
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"$colspan\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}
+8 -6
View File
@@ -27,8 +27,7 @@ if ($units[$y]['sort_type']==3){
}
echo "</tr><tr><th>Troops</th>";
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 "<td class=\"none\">?</td>";
}else{
@@ -96,14 +95,18 @@ $to = $database->getMInfo($units[$y]['vref']);
<tr><th>Troops</th>
<?php
for($i=1;$i<($units[$y]['t11'] != 0?12:11);$i++) {
if($units[$y]['attack_type']!=2){
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">?</td>";
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>";
}
echo $units[$y]['t'.$i]."</td>";
}
}
}else{
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody>
<tbody class="infos">
@@ -130,5 +133,4 @@ $to = $database->getMInfo($units[$y]['vref']);
}
//}
?>
+60
View File
@@ -0,0 +1,60 @@
<?php
echo "<tr><td class=\"desc\">
<div class=\"tit\">
<img class=\"unit u11\" src=\"img/x.gif\" alt=\"Clubswinger\" title=\"Pikemanm\" />
<a href=\"#\" onClick=\"return Popup(11,1);\"> Clubswinger</a> <span class=\"info\">(Available: ".$village->unitarray['u41'].")</span>
</div>
<div class=\"details\">
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"Wood\" />95|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />75|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />40|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />40|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"Crop consumption\" />1|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"Duration\" />";
echo $generator->getTimeFormat(round($u11['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
echo "</div>
</td>
<td class=\"val\"><input type=\"text\" class=\"text\" name=\"t11\" value=\"0\" maxlength=\"4\"></td>
<td class=\"max\"><a href=\"#\" onClick=\"document.snd.t11.value=".$technology->maxUnit(11)."; return false;\">(".$technology->maxUnit(11).")</a></td></tr></tbody>
";
if($technology->getTech(12)) {
echo "<tr><td class=\"desc\">
<div class=\"tit\">
<img class=\"unit u12\" src=\"img/x.gif\" alt=\"Spearman\" title=\"Spearman\" />
<a href=\"#\" onClick=\"return Popup(12,1);\"> Spearman</a> <span class=\"info\">(Available: ".$village->unitarray['u12'].")</span>
</div>
<div class=\"details\">
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"Wood\" />145|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />70|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />85|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />40|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"Crop consumption\" />1|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"Duration\" />";
echo $generator->getTimeFormat(round($u12['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
echo "</div>
</td>
<td class=\"val\"><input type=\"text\" class=\"text\" name=\"t12\" value=\"0\" maxlength=\"4\"></td>
<td class=\"max\"><a href=\"#\" onClick=\"document.snd.t12.value=".$technology->maxUnit(12)."; return false;\">(".$technology->maxUnit(12).")</a></td></tr></tbody>
";
}
if($technology->getTech(13)){
echo "<tr><td class=\"desc\">
<div class=\"tit\">
<img class=\"unit u13\" src=\"img/x.gif\" alt=\"Axeman\" title=\"Axeman\" />
<a href=\"#\" onClick=\"return Popup(13,1);\"> Axeman</a> <span class=\"info\">(Available: ".$village->unitarray['u13'].")</span>
</div>
<div class=\"details\">
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"Wood\" />130|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />120|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />170|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />70|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"Crop consumption\" />1|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"Duration\" />";
echo $generator->getTimeFormat(round($u13['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
echo "</div>
</td>
<td class=\"val\"><input type=\"text\" class=\"text\" name=\"t13\" value=\"0\" maxlength=\"4\"></td>
<td class=\"max\"><a href=\"#\" onClick=\"document.snd.t13.value=".$technology->maxUnit(13)."; return false;\">(".$technology->maxUnit(13).")</a></td></tr></tbody>
";
}
if($technology->getTech(14)) {
echo "<tr><td class=\"desc\">
<div class=\"tit\">
<img class=\"unit u14\" src=\"img/x.gif\" alt=\"Scout\" title=\"Scout\" />
<a href=\"#\" onClick=\"return Popup(14,1);\"> Scout</a> <span class=\"info\">(Available: ".$village->unitarray['u14'].")</span>
</div>
<div class=\"details\">
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"Wood\" />160|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />100|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />50|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />50|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"Crop consumption\" />1|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"Duration\" />";
echo $generator->getTimeFormat(round($u14['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
echo "</div>
</td>
<td class=\"val\"><input type=\"text\" class=\"text\" name=\"t14\" value=\"0\" maxlength=\"4\"></td>
<td class=\"max\"><a href=\"#\" onClick=\"document.snd.t14.value=".$technology->maxUnit(14)."; return false;\">(".$technology->maxUnit(14).")</a></td></tr></tbody>
";
}
?>
+25
View File
@@ -0,0 +1,25 @@
<?php
$success = 0;
for($i=45;$i<=46;$i++) {
if($technology->getTech($i)) {
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u$i\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
<a href=\"#\" onClick=\"return Popup($i,1);\">".$technology->getUnitName($i)."</a> <span class=\"info\">(Avaliable: ".$village->unitarray['u'.$i].")</span></div>";
echo "<div class=\"details\">
<img class=\"r1\" src=\"img/x.gif\" alt=\"Wood\" title=\"Wood\" />".${'u'.$i}['wood']."|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".${'u'.$i}['clay']."|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".${'u'.$i}['iron']."|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".${'u'.$i}['crop']."|<img class=\"r5\" src=\"img/x.gif\" alt=\"Crop consumption\" title=\"Crop consumption\" />".${'u'.$i}['pop']."|<img class=\"clock\" src=\"img/x.gif\" alt=\"Duration\" title=\"Duration\" />";
echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED));
echo "</div></td>
<td class=\"val\">
<input type=\"text\" class=\"text\" name=\"t$i\" value=\"0\" maxlength=\"$i\">
</td>
<td class=\"max\">
<a href=\"#\" onClick=\"document.snd.t$i.value=".$technology->maxUnit($i)."; return false;\">(".$technology->maxUnit($i).")</a>
</td>
</tr>";
$success += 1;
}
}
if($success == 0) {
echo "<tr><td class=\"none\" colspan=\"3\">No units avaliable. Research at academy</td></tr>";
}
?>
+143
View File
@@ -0,0 +1,143 @@
<table cellpadding="1" cellspacing="1" class="build_details">
<thead><tr>
<td>Academy</td>
<td>Action</td>
</tr></thead>
<tbody>
<?php
$fail = $success = 0;
$acares = $technology->grabAcademyRes();
for($i=42;$i<=49;$i++) {
if($technology->meetRRequirement($i) && !$technology->getTech($i) && !$technology->isResearch($i,1)) {
echo "<tr><td class=\"desc\">
<div class=\"tit\">
<img class=\"unit u".$i."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
<a href=\"#\" onClick=\"return Popup(".$i.",1);\">".$technology->getUnitName($i)."</a>
</div>
<div class=\"details\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".${'r'.$i}['wood']."|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".${'r'.$i}['clay']."|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".${'r'.$i}['iron']."|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".${'r'.$i}['crop']."|<img class=\"clock\" src=\"img/x.gif\" alt=\"duration\" title=\"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 "|<a href=\"build.php?gid=17&t=3&r1=".${'r'.$i}['wood']."&r2=".${'r'.$i}['clay']."&r3=".${'r'.$i}['iron']."&r4=".${'r'.$i}['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
}
if(${'r'.$i}['wood'] > $village->maxstore || ${'r'.$i}['clay'] > $village->maxstore || ${'r'.$i}['iron'] > $village->maxstore) {
echo "<br><span class=\"none\">Expand warehouse</span></div></td>";
echo "<td class=\"none\">
<div class=\"none\">Expand<br>warehouse</div>
</td></tr>";
}
else if(${'r'.$i}['crop'] > $village->maxcrop) {
echo "<br><span class=\"none\">Expand granary</span></div></td>";
echo "<td class=\"none\">
<div class=\"none\">Expand<br>granary</div>
</td></tr>";
}
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 "<br><span class=\"none\">Enough resources ".$time[0]." at ".$time[1]."</span></div></td>";
echo "<td class=\"none\">
<div class=\"none\">Too few<br>resources</div>
</td></tr>";
}
else if ( count($acares) > 0 ) {
echo "</td>";
echo "<td class=\"none\">
Research in progress</td></tr>";
}
else {
echo "</td>";
echo "<td class=\"act\">
<a class=\"research\" href=\"build.php?id=$id&amp;a=$i&amp;c=".$session->mchecker."\">Research</a></td></tr>";
}
$success += 1;
}
else {
$fail += 1;
}
}
if($success == 0) {
echo "<td colspan=\"2\"><div class=\"none\" align=\"center\">There are no researches avaliable</div></td>";
}
?>
</tbody>
</table>
<?php if($fail > 0) {
echo "<p class=\"switch\"><a id=\"researchFutureLink\" href=\"#\" onclick=\"return $('researchFuture').toggle();\">show more</a></p>
<table id=\"researchFuture\" class=\"build_details hide\" cellspacing=\"1\" cellpadding=\"1\">
<thead><tr><td colspan=\"2\">Prerequisites</td></tr><tbody>";
if(!$technology->meetRRequirement(43) && !$technology->getTech(43)) {
echo"<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u43\" title=\"".U43."\" alt=\"".U33."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(43, 1);\" href=\"#\">".U43."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">Academy </a>
<span title=\"+2\">Level 3</span><br /><a href=\"#\" onclick=\"return Popup(12, 4);\">Blacksmith </a><span title=\"+1\">Level 1</span> </td></tr>";
}
if(!$technology->meetRRequirement(44) && !$technology->getTech(44)) {
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u44\" title=\"".U44."\" alt=\"".U44."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(34, 1);\" href=\"#\">".U44."</a></div></td><td class=\"cond\">
<a href=\"#\" onclick=\"return Popup(44, 5);\">Academy </a><span title=\"+2\">Level 1</span><br /><a href=\"#\" onclick=\"return Popup(15, 4);\">Main Building</a>
<span title=\"+3\">Level 5</span> </td></tr>";
}
if(!$technology->meetRRequirement(45) && !$technology->getTech(45)) {
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u45\" title=\"".U45."\" alt=\"".U45."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(45, 1);\" href=\"#\">".U45."</a></div></td><td class=\"cond\">
<a href=\"#\" onclick=\"return Popup(45, 4);\">Academy </a><span title=\"+2\">Level 5</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">Stable </a>
<span title=\"+5\">Level 5</span> </td></tr>";
}
if(!$technology->meetRRequirement(46) && !$technology->getTech(46)) {
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u46\" title=\"".U46."\" alt=\"".U46."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(46, 1);\" href=\"#\">".U46."</a></div></td><td class=\"cond\">
<a href=\"#\" onclick=\"return Popup(22, 4);\">Academy </a><span title=\"+2\">Level 15</span><br /><a href=\"#\" onclick=\"return Popup(20, 4);\">
Stable </a><span title=\"+3\">Level 10</span> </td></tr>";
}
if(!$technology->meetRRequirement(47) && !$technology->getTech(47)) {
echo "
<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u47\" title=\"".U47."\" alt=\"".U47."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(47, 1);\" href=\"#\">".U47."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(22, 4);\">Academy </a>
<span title=\"+7\">Level 10</span><br /><a href=\"#\" onclick=\"return Popup(21, 4);\">Workshop </a><span title=\"+1\">Level 1</span></td></tr>";
}
if(!$technology->meetRRequirement(48) && !$technology->getTech(48)) {
echo "<tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u48\" title=\"".U48."\" alt=\"".U48."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(48, 1);\" href=\"#\">".U48."</a></div></td><td class=\"cond\"><a href=\"#\" onclick=\"return Popup(21, 4);\">Workshop</a>
<span title=\"+10\">Level 10</span><br /><a href=\"#\" onclick=\"return Popup(22, 4);\">Academy </a><span title=\"+12\">Level 15</span> </td>
</tr>";
}
if(!$technology->meetRRequirement(49) && !$technology->getTech(49)) {
echo " <tr><td class=\"desc\"><div class=\"tit\"><img class=\"unit u49\" title=\"".U49."\" alt=\"".U43."\" src=\"img/x.gif\"/>
<a onclick=\"return Popup(49, 1);\" href=\"#\">".U49."</a></div></td><td class=\"cond\">
<a href=\"#\" onclick=\"return Popup(16, 4);\">Rally Point </a><span title=\"+4\">Level 5</span><br /><a href=\"#\" onclick=\"return Popup(22, 4);\">
Academy </a><span title=\"+17\">Level 20</span></td></tr>";
}
echo " <script type=\"text/javascript\">
//<![CDATA[
$(\"researchFuture\").toggle = (function()
{
this.toggleClass(\"hide\");
$(\"researchFutureLink\").set(\"text\",
this.hasClass(\"hide\")
? \"show more\"
: \"hide more\"
);
return false;
}).bind($(\"researchFuture\"));
//]]>
</script>";
echo "</tbody></table>";
}
//$acares = $technology->grabAcademyRes();
if(count($acares) > 0) {
echo "<table cellpadding=\"1\" cellspacing=\"1\" class=\"under_progress\"><thead><tr><td>Researching</td><td>Duration</td><td>Complete</td></tr>
</thead><tbody>";
$timer = 1;
foreach($acares as $aca) {
$unit = substr($aca['tech'],1,2);
echo "<tr><td class=\"desc\"><img class=\"unit u$unit\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($unit)."\" title=\"".$technology->getUnitName($unit)."\" />".$technology->getUnitName($unit)."</td>";
echo "<td class=\"dur\"><span id=\"timer$timer\">".$generator->getTimeFormat($aca['timestamp']-time())."</span></td>";
$date = $generator->procMtime($aca['timestamp']);
echo "<td class=\"fin\"><span>".$date[1]."</span><span> hrs</span></td>";
echo "</tr>";
$timer +=1;
}
echo "</tbody></table>";
}
?>
+65 -3
View File
@@ -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");
+156
View File
@@ -0,0 +1,156 @@
<?php
$to = $database->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']);
?>
<h1>Send units back</h1>
<form method="POST" name="snd" action="a2b.php">
<table id="short_info" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<th>Destination:</th>
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&amp;c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
</tr>
<tr>
<th>Owner:</th>
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
</tr>
</tbody>
</table>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
</tr>
</thead>
</table>
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u41" src="img/x.gif" title="Pikeman" alt="Pikeman"> <input class="text" <?php if ($enforce['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u41']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u41'].")</span></td>";
?>
<td class="line-first large"><img class="unit u44" src="img/x.gif" title="Bird of Prey" alt="Bird of Prey"> <input class="text" <?php if ($enforce['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u44']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u44'].")</span></td>";
?>
<td class="line-first regular"><img class="unit u47" src="img/x.gif" title="War Elephant" alt="War Elephant"> <input class="text" <?php if ($enforce['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u47']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u47'].")</span></td>";
?>
<td class="line-first column-last small"><img class="unit u49" src="img/x.gif" title="Natarian Emperor" alt="Natarian Emperor"> <input class="text" <?php if ($enforce['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u49']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u49'].")</span></td>";
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u42" src="img/x.gif" title="Thorned Warrior" alt="Thorned Warrior"> <input class="text" <?php if ($enforce['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u42']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u42'].")</span></td>";
?>
<td class="large"><img class="unit u45" src="img/x.gif" title="Axerider" alt="Axerider"> <input class="text" <?php if ($enforce['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u45']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u45'].")</span></td>";
?>
<td class="regular"><img class="unit u48" src="img/x.gif" title="Balista" alt="Balista"> <input class="text" <?php if ($enforce['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u48']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u48'].")</span></td>";
?>
<td class="column-last small"><img class="unit u40" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u50']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u50'].")</span></td>";
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u43" src="img/x.gif" title="Guardsman" alt="Guardsman"> <input class="text" <?php if ($enforce['u3']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u3']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u3'].")</span></td>";
?>
<td class="line-last large"><img class="unit u46" src="img/x.gif" title="Natarian Knight" alt="Natarian Knight"> <input class="text" <?php if ($enforce['u6']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u6']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['u6'].")</span></td>";
?>
<td class="line-last regular"></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
<table class="troop_details" cellpadding="1" cellspacing="1">
<tbody class="infos">
<tr>
<th>Arrived:</th>
<?php
$att_tribe = $session->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);
?>
<td colspan="10">
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
</td>
</tr>
</tbody>
</table>
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
<input name="id" value="39" type="hidden">
<input name="a" value="533374" type="hidden">
<input name="c" value="8" type="hidden">
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
</form>
</div>
+19 -19
View File
@@ -1,66 +1,66 @@
<?php
$bindicate = $building->canBuild($id,$village->resarray['f'.$id.'t']);
if($bindicate == 1) {
echo "<p><span class=\"none\">".$lang['upgrade'][0]."</span></p>";
echo "<p><span class=\"none\">Building already at max level</span></p>";
} else if($bindicate == 10) {
echo "<p><span class=\"none\">".$lang['upgrade'][1]."</span></p>";
echo "<p><span class=\"none\">Building max level under construction</span></p>";
} else if($bindicate == 11) {
echo "<p><span class=\"none\">".$lang['upgrade'][2]."</span></p>";
echo "<p><span class=\"none\">Building presently being demolished</span></p>";
} 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);
?>
<p id="contract"><?php echo $lang['upgrade'][3]; echo $village->resarray['f'.$id]+($loopsame > 0 ? 2:1)+$doublebuild; ?>:<br />
<img class="r1" src="img/x.gif" alt="<?php echo LUMBER; ?>" title="<?php echo LUMBER; ?>" />&nbsp;<span class="little_res"><?php echo $uprequire['wood']; ?></span> | <img class="r2" src="img/x.gif" alt="<?php echo CLAY; ?>" title="<?php echo CLAY; ?>" />&nbsp;<span class="little_res"><?php echo $uprequire['clay']; ?></span> | <img class="r3" src="img/x.gif" alt="<?php echo IRON; ?>" title="<?php echo IRON; ?>" />&nbsp;<span class="little_res"><?php echo $uprequire['iron']; ?></span> | <img class="r4" src="img/x.gif" alt="<?php echo CROP; ?>" title="<?php echo CROP; ?>" />&nbsp;<span class="little_res"><?php echo $uprequire['crop']; ?></span> | <img class="r5" src="img/x.gif" alt="<?php echo CROP_COM; ?>" title="<?php echo CROP_COM; ?>" />&nbsp;<?php echo $uprequire['pop']; ?> | <img class="clock" src="img/x.gif" alt="<?php echo DURATION ?>" title="<?php echo DURATION ?>" /><?php echo $generator->getTimeFormat($uprequire['time']);
<p id="contract"><b>Costs</b> for upgrading to level <?php echo $village->resarray['f'.$id]+($loopsame > 0 ? 2:1)+$doublebuild; ?>:<br />
<img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><span class="little_res"><?php echo $uprequire['wood']; ?></span> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><span class="little_res"><?php echo $uprequire['clay']; ?></span> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><span class="little_res"><?php echo $uprequire['iron']; ?></span> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><span class="little_res"><?php echo $uprequire['crop']; ?></span> | <img class="r5" src="img/x.gif" alt="Crop consumption" title="Crop consumption" /><?php echo $uprequire['pop']; ?> | <img class="clock" src="img/x.gif" alt="duration" title="duration" /><?php echo $generator->getTimeFormat($uprequire['time']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
echo "|<a href=\"build.php?gid=17&t=3&r1=".$uprequire['wood']."&r2=".$uprequire['clay']."&r3=".$uprequire['iron']."&r4=".$uprequire['crop']."\" title=\"".$lang['npc'][0]."\"><img class=\"npc\" src=\"img/x.gif\" alt=\"".$lang['npc'][0]."\" title=\"".$lang['npc'][0]."\" /></a>";
echo "|<a href=\"build.php?gid=17&t=3&r1=".$uprequire['wood']."&r2=".$uprequire['clay']."&r3=".$uprequire['iron']."&r4=".$uprequire['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
} ?><br />
<?php
if($bindicate == 2) {
echo "<span class=\"none\">".$lang['upgrade'][4]."</span>";
echo "<span class=\"none\">The workers are already at work.</span>";
}
else if($bindicate == 3) {
echo "<span class=\"none\">".$lang['upgrade'][4]."&nbsp;".WAITING_LOOP."</span>";
echo "<span class=\"none\">The workers are already at work. (waiting loop)</span>";
}
else if($bindicate == 4) {
echo "<span class=\"none\">".$lang['upgrade'][5]."</span>";
echo "<span class=\"none\">Not enough food. Expand cropland.</span>";
}
else if($bindicate == 5) {
echo "<span class=\"none\">".$lang['upgrade'][6]."</span>";
echo "<span class=\"none\">Upgrade Warehouse.</span>";
}
else if($bindicate == 6) {
echo "<span class=\"none\">".$lang['upgrade'][7]."</span>";
echo "<span class=\"none\">Upgrade Granary.</span>";
}
else if($bindicate == 7) {
$neededtime = $building->calculateAvaliable($id,$village->resarray['f'.$id.'t'],($loopsame > 0 ? 2:1));
echo "<span class=\"none\">".$lang['upgrade'][8].$neededtime[0].$lang['upgrade'][9].$neededtime[1]."</span>";
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
}
else if($bindicate == 8) {
if($session->access==BANNED){
echo "<a class=\"build\" href=\"banned.php\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"banned.php\">Upgrade to level ";
}
else if($id <= 18) {
echo "<a class=\"build\" href=\"dorf1.php?a=$id&c=$session->checker\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"dorf1.php?a=$id&c=$session->checker\">Upgrade to level ";
}
else {
echo "<a class=\"build\" href=\"dorf2.php?a=$id&c=$session->checker\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"dorf2.php?a=$id&c=$session->checker\">Upgrade to level ";
}
echo $village->resarray['f'.$id]+1;
echo ".</a>";
}
else if($bindicate == 9) {
if($session->access==BANNED){
echo "<a class=\"build\" href=\"banned.php\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"banned.php\">Upgrade to level ";
}
else if($id <= 18) {
echo "<a class=\"build\" href=\"dorf1.php?a=$id&c=$session->checker\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"dorf1.php?a=$id&c=$session->checker\">Upgrade to level ";
}
else {
echo "<a class=\"build\" href=\"dorf2.php?a=$id&c=$session->checker\">".$lang['upgrade'][10];
echo "<a class=\"build\" href=\"dorf2.php?a=$id&c=$session->checker\">Upgrade to level ";
}
echo $village->resarray['f'.$id]+($loopsame > 0 ? 2:1);
echo ".</a> <span class=\"none\">".WAITING_LOOP."</span> ";
echo ".</a> <span class=\"none\">(waiting loop)</span> ";
}
}
+6 -6
View File
@@ -16,7 +16,7 @@
<?php
if($session->gold >= 2) {
?> <a href="?buildingFinish=1" onclick="return confirm('<?php echo FINISH_GOLD; ?>');" title="<?php echo FINISH_GOLD; ?>"><img class="clock" alt="<?php echo FINISH_GOLD; ?>" src="img/x.gif"/></a>
?> <a href="?buildingFinish=1" onclick="return confirm('Finish all construction and research orders in this village immediately for 2 Gold?');" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
<?php
}
?>
@@ -40,16 +40,16 @@
$BuildingList = array();
foreach($building->buildArray as $jobs) {
echo "<tr><td class=\"ico\"><a href=\"?d=".$jobs['id']."&a=0&c=$session->checker\">";
echo "<img src=\"img/x.gif\" class=\"del\" title=\"".CANCEL."\" alt=\"".CANCEL."\" /></a></td><td>";
echo $building->procResType($jobs['type']).$lang['buildings'][44].($village->resarray['f'.$jobs['field']]+(in_array($jobs['field'],$BuildingList)?2:1 )).")";
echo "<img src=\"img/x.gif\" class=\"del\" title=\"cancel\" alt=\"cancel\" /></a></td><td>";
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 "&nbsp;".WAITING_LOOP;
echo " (waiting loop)";
}
echo "</td><td><span id=\"timer".$timer."\">";
echo $generator->getTimeFormat($jobs['timestamp']-time());
echo "</span>&nbsp;".HRS."</td>";
echo "<td>".DONE_AT."&nbsp;".date('H:i', $jobs['timestamp'])."</td></tr>";
echo "</span> hrs.</td>";
echo "<td>done at ".date('H:i', $jobs['timestamp'])."</td></tr>";
$timer +=1;
}
?>
+32 -65
View File
@@ -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.")<br>\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"|||<br>";
//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 .= "<div id='i_".$row."_".$i."' class='".$image."'></div>\r";
}
//Map create
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".$donnees['ville_name']."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' />\n";
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".htmlspecialchars($donnees['ville_name'])."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' />\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)){
<span>x </span><input id="mcx" class="text" name="xp" value="<?php echo $x ?>" maxlength="4"/>
<span>y </span><input id="mcy" class="text" name="yp" value="<?php echo $y ?>" maxlength="4"/>
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="OK" /><br />
<?php if($session->goldclub != 0){echo "<a href=\"crop_finder.php\"><img src=\"".GP_LOCATE."img/misc/cropfinder.gif\" /> Crop Finder</a>";}?>
<?php if($session->plus != 0){echo "<a href=\"crop_finder.php\"><img src=\"".GP_LOCATE."img/misc/cropfinder.gif\" /> Crop Finder</a>";}?>
</form>
</div>
<table cellpadding="1" cellspacing="1" id="map_infobox" class="default"><thead><tr><th colspan="2">Details</th></tr></thead><tbody><tr><th>Player</th><td>-</td></tr><tr><th>Population</th><td>-</td></tr><tr><th>Alliance</th><td></td></tr></tbody></table>
+28 -68
View File
@@ -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.")<br>\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"|||<br>";
//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 .= "<div id='i_".$row."_".$i."' class='".$image."'></div>\r";
}
//Map create
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".$donnees['ville_name']."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' target='_parent' />\n";
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".htmlspecialchars($donnees['ville_name'])."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' target='_parent' />\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){
+1 -1
View File
@@ -41,7 +41,7 @@ include("menu.tpl");
</script>
<div id="write_head" class="msg_head"></div>
<div id="write_content" class="msg_content">
<form method="post" action="nachrichten.php" accept-charset="utf8" name="msg">
<form method="post" action="nachrichten.php" accept-charset="UTF-8" name="msg">
<input type="hidden" name="c" value="3e9" />
<input type="hidden" name="p" value="" />
<img src="img/x.gif" id="label" class="send" alt="" />
+21 -7
View File
@@ -1,5 +1,8 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
//var_dump($dataarray);
//echo $dataarray[147];
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +24,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -32,6 +35,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -41,6 +49,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -50,37 +61,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+20 -7
View File
@@ -1,5 +1,7 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
//var_dump($dataarray);
if($dataarray[147]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -32,6 +34,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -41,6 +48,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -50,37 +60,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+12 -3
View File
@@ -5,6 +5,7 @@
## GIT HUB REV ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if($dataarray[147]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -26,7 +27,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -37,7 +38,9 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "<td><img src=\"img/x.gif\" class=\"unit hero\" title=\"Hero\" /></td>";
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -47,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -56,7 +62,10 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; ?>
</td></tr></tbody></table>
+12 -3
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -29,7 +30,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -40,7 +41,9 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "<td><img src=\"img/x.gif\" class=\"unit hero\" title=\"Hero\" /></td>";
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -50,6 +53,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -59,7 +65,10 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[147]!="" or $dataarray[147]!=0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; ?>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+19 -7
View File
@@ -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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -24,7 +25,7 @@ $dataarray = explode(",",$data);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -35,6 +36,11 @@ $start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] ==
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
@@ -44,6 +50,9 @@ for($i=3;$i<=12;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
@@ -53,37 +62,40 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table>
+403
View File
@@ -0,0 +1,403 @@
<?php
// Temp
$eigen = $database->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";
}
?>
<h1><?php echo $actionType." to ".$process[1]; ?></h1>
<form method="post" action="a2b.php">
<table id="short_info" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<th>Destination:</th>
<td><a href="karte.php?d=&amp;c="><?php echo $process[1]; ?> (<?php echo $coor['x']; ?>|<?php echo $coor['y']; ?>)</a></td>
</tr>
<tr>
<th>Owner:</th>
<td><a href="spieler.php?uid=<?php echo $process['2']; ?>"><?php echo $database->getUserField($process['2'],'username',0); ?></a></td>
</tr>
</tbody>
</table>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td><?php echo $process[1]; ?></td>
<td colspan="10"><?php echo $actionType." to ".$process['1']; ?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td></td>
<td><img src="img/x.gif" class="unit u41" title="Pikeman" alt="Pikeman"></td>
<td><img src="img/x.gif" class="unit u42" title="Thorned Warrior" alt="Thorned Warrior"></td>
<td><img src="img/x.gif" class="unit u43" title="Guardsman" alt="Guardsman></td>
<td><img src="img/x.gif" class="unit u44" title="Bird of Prey" alt="Bird of Prey"></td>
<td><img src="img/x.gif" class="unit u45" title="Axerider" alt="Axerider"></td>
<td><img src="img/x.gif" class="unit u46" title="Natarian Knight" alt="Natarian Knight"></td>
<td><img src="img/x.gif" class="unit u47" title="War Elephant" alt="War Elephant"></td>
<td><img src="img/x.gif" class="unit u48" title="Balista" alt="Balista"></td>
<td><img src="img/x.gif" class="unit u49" title="Natarian Emperor" alt="Natarian Emperor"></td>
<td><img src="img/x.gif" class="unit u50" title="Settler" alt="Settler"></td>
</tr>
<tr>
<th>Troops</th>
<td <?php if (!isset($process['t1']) || $process['t1'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t1'];} ?></td>
<td <?php if (!isset($process['t2']) || $process['t2'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t2'];} ?></td>
<td <?php if (!isset($process['t3']) || $process['t3'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t3'];} ?></td>
<td <?php if (!isset($process['t4']) || $process['t4'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t4'];} ?></td>
<td <?php if (!isset($process['t5']) || $process['t5'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t5'];} ?></td>
<td <?php if (!isset($process['t6']) || $process['t6'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t6'];} ?></td>
<td <?php if (!isset($process['t7']) || $process['t7'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t7'];} ?></td>
<td <?php if (!isset($process['t8']) || $process['t8'] == ''){ echo "class=\"none\">0"; }else{ $kata='1'; echo ">".$process['t8'];} ?></td>
<td <?php if (!isset($process['t9']) || $process['t9'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t9'];} ?></td>
<td <?php if (!isset($process['t10']) || $process['t10'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t10'];} ?></td>
</tr>
</tbody>
<?php if ($process['c']==1){
?>
<tbody class="options">
<tr>
<th>Options</th>
<td colspan="10"><input class="radio" name="spy" value="1" checked="checked" type="radio">Scout resources and troops<br>
<input class="radio" name="spy" value="2" type="radio">Scout defences and troops </td>
</tr>
</tbody>
<?php } ?>
<?php if(isset($kata) AND $process['c']!='2'){?><tr>
<?php if($process['c']=='3'){ ?><tbody class="cata">
<tr>
<th>Destination:</th>
<td colspan="10">
<?php if($building->getTypeLevel(16) == 20) { ?>
<select name="ctar2" class="dropdown">
<option value="0">Random</option>
<?php if($building->getTypeLevel(16) >= 5) { ?>
<optgroup label="Resources">
<option value="0">Woodcutter</option>
<option value="0">Clay Pit</option>
<option value="0">Iron Mine</option>
<option value="0">Cropland</option>
<option value="5">Sawmill</option>
<option value="6">Brickyard</option>
<option value="7">Iron Foundry</option>
<option value="8">Grain Mill</option>
<option value="9">Bakery</option>
</optgroup>
<?php } ?>
<?php if($building->getTypeLevel(16) >= 3) { ?>
<optgroup label="Infrastructure">
<option value="10">Warehouse</option>
<option value="11">Granary</option>
<?php if($building->getTypeLevel(16) >= 10) { ?>
<option value="15">Main building</option>
<option value="17">Marketplace</option>
<option value="18">Embassy</option>
<option value="24">Townhall</option>
<option value="25">Residence</option>
<option value="26">Palace</option>
<option value="27">Treasury</option>
<option value="28">Trade office</option>
<?php } ?>
<option value="38">Great warehouse</option>
<option value="39">Great granary</option>
</optgroup>
<?php } ?>
<?php if($building->getTypeLevel(16) >= 10) { ?>
<optgroup label="Military">
<option value="12">Blacksmith</option>
<option value="13">Armoury</option>
<option value="14">Tournament square</option>
<option value="16">Rally point</option>
<option value="19">Barracks</option>
<option value="20">Stable</option>
<option value="21">Workshop</option>
<option value="22">Academy</option>
<option value="29">Great barracks</option>
<option value="30">Great stable</option>
<option value="37">Hero's mansion</option>
</optgroup>
<?php } ?>
</select>
<?php }?>
<select name="ctar1" class="dropdown">
<option value="0">Random</option>
<?php if($building->getTypeLevel(16) >= 5) { ?>
<optgroup label="Resources">
<option value="0">Woodcutter</option>
<option value="0">Clay Pit</option>
<option value="0">Iron Mine</option>
<option value="0">Cropland</option>
<option value="5">Sawmill</option>
<option value="6">Brickyard</option>
<option value="7">Iron Foundry</option>
<option value="8">Grain Mill</option>
<option value="9">Bakery</option>
</optgroup>
<?php } ?>
<?php if($building->getTypeLevel(16) >= 3) { ?>
<optgroup label="Infrastructure">
<option value="10">Warehouse</option>
<option value="11">Granary</option>
<?php if($building->getTypeLevel(16) >= 10) { ?>
<option value="15">Main building</option>
<option value="17">Marketplace</option>
<option value="18">Embassy</option>
<option value="24">Townhall</option>
<option value="25">Residence</option>
<option value="26">Palace</option>
<option value="27">Treasury</option>
<option value="28">Trade office</option>
<?php } ?>
<option value="38">Great warehouse</option>
<option value="39">Great granary</option>
</optgroup>
<?php } ?>
<?php if($building->getTypeLevel(16) >= 10) { ?>
<optgroup label="Military">
<option value="12">Blacksmith</option>
<option value="13">Armoury</option>
<option value="14">Tournament square</option>
<option value="16">Rally point</option>
<option value="19">Barracks</option>
<option value="20">Stable</option>
<option value="21">Workshop</option>
<option value="22">Academy</option>
<option value="29">Great barracks</option>
<option value="30">Great stable</option>
<option value="37">Hero's mansion</option>
</optgroup>
<?php } ?>
</select>
<span class="info">(will be attacked by catapult(s))</span>
</td>
</tr>
</tbody><?PHP
}
else if($process['c']=='4')
{
?><tbody class="infos">
<th>Destination:</th>
<td colspan="10">
<?PHP
echo"Warning: Catapult will <b>ONLY</b> shoot with a normal attack (they dont shoot with raids!)";
?>
</td>
</tr>
<?PHP
}
?>
<?php } ?>
<tr>
<th>Arrived:</th>
<?php
$att_tribe = 3;
$start = ($att_tribe == 1)? 1 : (($att_tribe == 2)? 11: 21);
$end = ($att_tribe == 1)? 10 : (($att_tribe == 2)? 20: 30);
$speeds = array();
$scout = 1;
//find slowest unit.
for($i=1;$i<=10;$i++)
{
if (isset($process['t'.$i]))
{
if( $process['t'.$i] != '' && $process['t'.$i] > 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);
?>
<td colspan="10">
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
</td>
</tr>
</tbody>
</table>
<input name="timestamp" value="<?php echo time(); ?>" type="hidden">
<input name="timestamp_checksum" value="<?php echo $ckey; ?>" type="hidden">
<input name="ckey" value="<?php echo $id; ?>" type="hidden">
<input name="id" value="39" type="hidden">
<input name="a" value="533374" type="hidden">
<input name="c" value="3" type="hidden">
<p class="btn"><input value="ok" name="s1" id="btn_ok"
class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
</form>
</div>
+99
View File
@@ -0,0 +1,99 @@
<h1>Send Troops</h1>
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="3278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
<table id="troops" cellpadding="1" cellspacing="1">
<tbody><tr>
<td class="line-first column-first large"><img class="unit u41" src="img/x.gif" title="<?php echo U41; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U41; ?>"> <input class="text" <?php if ($village->unitarray['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u41']>0){
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u41']."; return false;\">(".$village->unitarray['u41'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first large"><img class="unit u44" src="img/x.gif" title="<?php echo U44; ?>" alt="<?php echo U44; ?>"> <input class="text" <?php if ($village->unitarray['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u44']>0){
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u44']."; return false;\">(".$village->unitarray['u44'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first regular"><img class="unit u47" src="img/x.gif" title="<?php echo U47; ?>" alt="<?php echo U47; ?>"> <input class="text" <?php if ($village->unitarray['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u47']>0){
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u47']."; return false;\">(".$village->unitarray['u47'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-first column-last small"><img class="unit u49" src="img/x.gif" title="<?php echo U49; ?>" alt="<?php echo U49; ?>"> <input class="text" <?php if ($village->unitarray['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u49']>0){
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u49']."; return false;\">(".$village->unitarray['u49'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="column-first large"><img class="unit u42" src="img/x.gif" title="<?php echo U42; ?>" alt="<?php echo U42; ?>"> <input class="text" <?php if ($village->unitarray['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u42']>0){
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u42']."; return false;\">(".$village->unitarray['u42'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="large"><img class="unit u45" src="img/x.gif" title="<?php echo U45; ?>" alt="<?php echo U45; ?>"> <input class="text" <?php if ($village->unitarray['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u45']>0){
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u45']."; return false;\">(".$village->unitarray['u45'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="regular"><img class="unit u48" src="img/x.gif" title="<?php echo U48; ?>" alt="<?php echo U48; ?>"> <input class="text" <?php if ($village->unitarray['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u48']>0){
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u48']."; return false;\">(".$village->unitarray['u48'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="column-last small"><img class="unit u50" src="img/x.gif" title="<?php echo U50; ?>" alt="<?php echo U50; ?>"> <input class="text" <?php if ($village->unitarray['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u50']>0){
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u50']."; return false;\">(".$village->unitarray['u50'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
</tr>
<tr>
<td class="line-last column-first large"><img class="unit u43" src="img/x.gif" title="<?php echo U43; ?>" alt="<?php echo U43; ?>"> <input class="text" <?php if ($village->unitarray['u43']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u43']>0){
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u43']."; return false;\">(".$village->unitarray['u43'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last large"><img class="unit u46" src="img/x.gif" title="<?php echo U46; ?>" alt="<?php echo U46; ?>"> <input class="text" <?php if ($village->unitarray['u46']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
<?php
if ($village->unitarray['u46']>0){
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u46']."; return false;\">(".$village->unitarray['u46'].")</a></td>";
}else{
echo "<span class=\"none\">(0)</span></td>";
}
?>
<td class="line-last regular"></td>
<td class="line-last column-last"></td> </tr>
</tbody></table>
+17 -17
View File
@@ -12,10 +12,10 @@
<map name="map1" id="map1">
<?php
if($building->walling()) {
$wtitle = $building->procResType($building->walling())."&nbsp;".$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)."&nbsp;".$village->resarray['f40'].$lang['fields'][0];
$wtitle = ($village->resarray['f40'] == 0)? "Outer building site" : $building->procResType($village->resarray['f40t'],0)." Level ".$village->resarray['f40'];
}
?>
<area href="build.php?id=40" title="<?php echo $wtitle; ?>" coords="325,225,180" shape="circle" alt="" />
@@ -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 "<area href=\"build.php?id=99\" title=\"".$lang['buildings'][40]."&nbsp;".$village->resarray['f99'].$lang['fields'][0]."\" coords=\"$coords[$t]\" shape=\"poly\"/>";
echo "<area href=\"build.php?id=99\" title=\"WorldWonder Level ".$village->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 "<area href=\"build.php?id=$t\" title=\"$title\" coords=\"$coords[$t]\" shape=\"poly\"/>";
@@ -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'])."&nbsp;".$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'])."&nbsp;".$village->resarray['f'.$job['field']].$lang['fields'][0];
$text = $building->procResType($job['type'])." Level ".$village->resarray['f'.$job['field']];
}
}
echo "<img src=\"img/x.gif\" class=\"building d$i $img\" alt=\"$text\" />";
@@ -81,30 +81,30 @@ for ($i=1;$i<=20;$i++) {
}
if($village->resarray['f39'] == 0) {
if($building->rallying()) {
echo "<img src=\"img/x.gif\" class=\"dx1 g16b\" alt=\"".$lang['buildings'][16]."&nbsp;".$village->resarray['f39'].$lang['fields'][0]."\" />";
echo "<img src=\"img/x.gif\" class=\"dx1 g16b\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
}
else {
echo "<img src=\"img/x.gif\" class=\"dx1 g16e\" alt=\"".$lang['fields'][7]."\" />";
echo "<img src=\"img/x.gif\" class=\"dx1 g16e\" alt=\"Rally Point building site\" />";
}
}
else {
echo "<img src=\"img/x.gif\" class=\"dx1 g16\" alt=\"".$lang['buildings'][16]."&nbsp;".$village->resarray['f39'].$lang['fields'][0]."\" />";
echo "<img src=\"img/x.gif\" class=\"dx1 g16\" alt=\"Rally Point Level ".$village->resarray['f39']."\" />";
}
?>
<?php
if($village->resarray['f99t'] == 40) {
if($village->resarray['f99'] >= 0 && $village->resarray['f99'] <= 19) {
echo '<img class="ww g40" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40" src="img/x.gif" alt="Worldwonder">'; }
if($village->resarray['f99'] >= 20 && $village->resarray['f99'] <= 39) {
echo '<img class="ww g40_1" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40_1" src="img/x.gif" alt="Worldwonder">'; }
if($village->resarray['f99'] >= 40 && $village->resarray['f99'] <= 59) {
echo '<img class="ww g40_2" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40_2" src="img/x.gif" alt="Worldwonder">'; }
if($village->resarray['f99'] >= 60 && $village->resarray['f99'] <= 79) {
echo '<img class="ww g40_3" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40_3" src="img/x.gif" alt="Worldwonder">'; }
if($village->resarray['f99'] >= 80 && $village->resarray['f99'] <= 99) {
echo '<img class="ww g40_4" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40_4" src="img/x.gif" alt="Worldwonder">'; }
if($village->resarray['f99'] == 100) {
echo '<img class="ww g40_5" src="img/x.gif" alt="'.$lang['buildings'][40].'">'; }
echo '<img class="ww g40_5" src="img/x.gif" alt="Worldwonder">'; }
}
?>
<div id="levels" <?php if(isset($_COOKIE['t3l'])) { echo "class=\"on\""; } ?> >
+6 -6
View File
@@ -16,10 +16,10 @@ $arrayVillage = $village->resarray;
?>
<map name="rx" id="rx">
<?php
for($i=1;$i<=18;$i++) {echo " <area href=\"build.php?id=$i\" coords=\"$coorarray[$i]\" shape=\"circle\" title=\"".$building->procResType($arrayVillage['f'.$i.'t'])."&nbsp;".$arrayVillage['f'.$i].$lang['fields'][0]."\"/>\r\n";
for($i=1;$i<=18;$i++) {echo " <area href=\"build.php?id=$i\" coords=\"$coorarray[$i]\" shape=\"circle\" title=\"".$building->procResType($arrayVillage['f'.$i.'t'])." Level ".$arrayVillage['f'.$i]."\"/>\r\n";
}
?>
<area href="dorf2.php" coords="144,131,36" shape="circle" title="<?php echo $lang['header'][1]; ?>" alt="" />
<area href="dorf2.php" coords="144,131,36" shape="circle" title="Village centre" alt="" />
</map>
<div id="village_map" class="f<?php echo $village->type; ?>">
@@ -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 "<img src=\"img/x.gif\" class=\"reslevel rf$i level".$arrayVillage['f'.$i]."\" alt=\"$text ".$arrayVillage['f'.$i]."\" />";
}
+7 -7
View File
@@ -11,10 +11,10 @@
?>
<div id="header">
<div id="mtop">
<a href="dorf1.php" id="n1" accesskey="1"><img src="img/x.gif" title="<?php echo $lang['header'][0]; ?>" alt="<?php echo $lang['header'][0]; ?>" /></a>
<a href="dorf2.php" id="n2" accesskey="2"><img src="img/x.gif" title="<?php echo $lang['header'][1]; ?>" alt="<?php echo $lang['header'][1]; ?>" /></a>
<a href="karte.php" id="n3" accesskey="3"><img src="img/x.gif" title="<?php echo $lang['header'][2]; ?>" alt=<?php echo $lang['header'][2]; ?>" /></a>
<a href="statistiken.php" id="n4" accesskey="4"><img src="img/x.gif" title="<?php echo $lang['header'][3]; ?>" alt="<?php echo $lang['header'][3]; ?>" /></a>
<a href="dorf1.php" id="n1" accesskey="1"><img src="img/x.gif" title="Village overview" alt="Village overview" /></a>
<a href="dorf2.php" id="n2" accesskey="2"><img src="img/x.gif" title="Village centre" alt="Village centre" /></a>
<a href="karte.php" id="n3" accesskey="3"><img src="img/x.gif" title="Map" alt="Map" /></a>
<a href="statistiken.php" id="n4" accesskey="4"><img src="img/x.gif" title="Statistics" alt="Statistics" /></a>
<?php
if($message->unread && !$message->nunread) {
$class = "i2";
@@ -30,8 +30,8 @@
}
?>
<div id="n5" class="<?php echo $class ?>">
<a href="berichte.php" accesskey="5"><img src="img/x.gif" class="l" title="<?php echo $lang['header'][4]; ?>" alt="<?php echo $lang['header'][4]; ?>"/></a>
<a href="nachrichten.php" accesskey="6"><img src="img/x.gif" class="r" title="<?php echo $lang['header'][5]; ?>" alt="<?php echo $lang['header'][5]; ?>" /></a>
<a href="berichte.php" accesskey="5"><img src="img/x.gif" class="l" title="Reports" alt="Reports"/></a>
<a href="nachrichten.php" accesskey="6"><img src="img/x.gif" class="r" title="Messages" alt="Messages" /></a>
</div>
<a href="plus.php" id="plus">
<span class="plus_text">
@@ -39,7 +39,7 @@
<span class="plus_o">l</span>
<span class="plus_g">u</span>
<span class="plus_o">s</span>
</span><img src="img/x.gif" id="btn_plus" class="<?php echo ($session->plus == 1 && strtotime("NOW") <= $session->userinfo['plus'])? 'active' : 'inactive';?>" title="<?php echo $lang['header'][6]; ?>" alt="<?php echo $lang['header'][6]; ?>" /></a>
</span><img src="img/x.gif" id="btn_plus" class="<?php echo ($session->plus == 1 && strtotime("NOW") <= $session->userinfo['plus'])? 'active' : 'inactive';?>" title="Plus menu" alt="Plus menu" /></a>
<div class="clear"></div>
</div>
-40
View File
@@ -1,40 +0,0 @@
<?php
#################################################################################
## ##
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
## ##
## --------------------------------------------------------------------------- ##
## ##
## Project: ZravianX ##
## Version: 2011.11.05 ##
## Filename: Templates/homenews.tpl ##
## Developed by: ZZJHONS ##
## License: Creative Commons BY-NC-SA 3.0 ##
## Copyright: ZravianX (c) 2011 - All rights reserved ##
## URLs: http://zravianx.zzjhons.com ##
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
## ##
#################################################################################
if (HOME1 or HOME2 or HOME3){
?>
<div id="news">
<div id="news-head"></div>
<div id="news-content">
<h3 class="news bold"><?php echo NEWS; ?></h3>
<?php
if(HOME1){echo '<div class="news-items"><div class="news">'; include("Templates/News/home/home1.tpl"); echo '</div></div>';};
if(HOME1 & HOME2 == true){echo '<div class="news-divider"></div>';}
else if(HOME1 & HOME3 == true){echo '<div class="news-divider"></div>';}
else echo '';
if(HOME2){echo '<div class="news-items"><div class="news">'; include("Templates/News/home/home2.tpl"); echo '</div></div>';};
if(HOME2 & HOME3 == true){echo '<div class="news-divider"></div>';}
else echo '';
if(HOME3){echo '<div class="news-items"><div class="news">'; include("Templates/News/home/home3.tpl"); echo '</div></div>';};
?>
</div>
<div id="news-bottom"></div>
</div>
<?php } ?>
+22 -11
View File
@@ -38,32 +38,33 @@ div.c1 {text-align: center}
<p><a href="<?php echo HOMEPAGE; ?>"><?php echo HOME; ?></a> <a href="spieler.php?uid=<?php echo $session->uid; ?>"><?php echo PROFILE; ?></a> <a href="#" onclick="return Popup(0,0,1);"><?php echo INSTRUCT; ?></a> <?php if($session->access == MULTIHUNTER) {
echo "<a href=\"Admin/admin.php\"><font color=\"Blue\">".MULTIHUNTER_PAN."</font></a>";
echo "<a href=\"Admin/admin.php\"><font color=\"Blue\">Multihunter Panel</font></a>";
} ?> <?php if($session->access == ADMIN) {
echo "<a href=\"admin.php\"><font color=\"Red\">".ADMIN_PANEL."</font></a>";
echo "<a href=\"massmessage.php\">".MASS_MESSAGE."</a>";
echo "<a href=\"medals.php\">".UPDATE_T_10."</a>";
echo "<a href=\"sysmsg.php\">".SYSTEM_MESSAGE."</a>";
echo "<a href=\"create_account.php\">".CREATE_NAT."</a>";
echo "<a href=\"admin.php\"><font color=\"Red\">Admin Panel</font></a>";
echo "<a href=\"massmessage.php\">Mass Message</a>";
echo "<a href=\"medals.php\">Update Top 10</a>";
echo "<a href=\"sysmsg.php\">System message</a>";
echo "<a href=\"create_account.php\">Create Natars</a>";
echo "<a href=\"oasis_populate.php\"><font color=\"blue\">Populate Oasis</font></a>";
} ?> <a href="logout.php"><?php echo LOGOUT; ?></a></p>
<a href="rules.php"><b><?php echo GAME_RULES; ?></b></a>
<a href="rules.php"><b>Game Rules</b></a>
<p><a href="plus.php?id=3">Travian <b><span class="plus_g">P</span><span class="plus_o">l</span><span class="plus_g">u</span><span class="plus_o">s</span></b></a>
<a href="spieler.php?uid=0"><b><?php echo SUPPORT; ?></b></a>
<a href="spieler.php?uid=0"><b>Support</b></a>
<br></p>
</div><?php
if($_SESSION['ok']=='1'){
?>
<div id="content" class="village1">
<h1><?php echo ANNOUNCEMENT; ?></h1>
<h1>Announcement</h1>
<h2>Hi <?php echo $session->username; ?>,</h2>
<br>
<?php include("Templates/text.tpl"); ?>
<div class="c1">
<h2><a href="dorf1.php?ok">&raquo; <?php echo GO2MY_VILLAGE; ?></a></h2>
<h2><a href="dorf1.php?ok">&raquo; Go to my village</a></h2>
</div>
</div>
@@ -83,9 +84,19 @@ div.c1 {text-align: center}
<div class="clear"></div><?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br>
Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div><?php
die();
+6 -6
View File
@@ -28,7 +28,7 @@ if($aantal > 0){
$NextArrival[] = $receive['endtime'];
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&raquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
@@ -51,7 +51,7 @@ if($aantal > 0){
}
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&raquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
@@ -73,7 +73,7 @@ if($aantal > 0){
}
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&raquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
@@ -96,7 +96,7 @@ if($lala > 0){
}
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&raquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$lala.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$lala.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
@@ -118,7 +118,7 @@ if($lala > 0){
}
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&raquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$lala.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$lala.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
@@ -139,7 +139,7 @@ if($aantal > 0){
$NextArrival[] = $receive['endtime'];
}
echo '<tr><td class="typ"><a href="build.php?id=39"><img src="img/x.gif" class="'.$action.'" alt="'.$title.'" title="'.$title.'" /></a><span class="'.$aclass.'">&laquo;</span></td>
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">'.$lang['movement'][0].'<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
<td><div class="mov"><span class="'.$aclass.'">'.$aantal.'&nbsp;'.$short.'</span></div><div class="dur_r">in&nbsp;<span id="timer'.$timer.'">'.$generator->getTimeFormat(min($NextArrival)-time()).'</span>&nbsp;'.HOURS.'</div></div></td></tr>';
$timer += 1;
}
?>
+3 -3
View File
@@ -24,13 +24,13 @@ for($i=1;$i<=50;$i++) {
}
}
if($troops['hero'] > 0) {
echo "<tr><td class=\"ico\"><a href=\"build.php?id=39\"><img class=\"unit uhero\" src=\"img/x.gif\" alt=\"".$lang['troops'][1]."\" title=\"".$lang['troops'][1]."\" /></a></td>";
echo "<td class=\"num\">".$troops['hero']."</td><td class=\"un\">".$lang['troops'][1]."</td></tr>";
echo "<tr><td class=\"ico\"><a href=\"build.php?id=39\"><img class=\"unit uhero\" src=\"img/x.gif\" alt=\"Hero\" title=\"Hero\" /></a></td>";
echo "<td class=\"num\">".$troops['hero']."</td><td class=\"un\">Hero</td></tr>";
$TroopsPresent = True;
}
$units = $technology->getUnitList($village->wid);
if(!$TroopsPresent) {
echo "<tr><td>".$lang['troops'][0]."</td></tr>";
echo "<tr><td>none</td></tr>";
}
?>
</tbody></table>
+12 -1
View File
@@ -141,8 +141,19 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
+13 -2
View File
@@ -203,8 +203,19 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="ce"></div>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"> </div>
</body>
</html>
+12 -1
View File
@@ -93,8 +93,19 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
<?php echo CALCULATED_IN;?> <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br /><?php echo SEVER_TIME;?> <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
+12 -2
View File
@@ -83,9 +83,19 @@ include("Templates/links.tpl");
<div class="clear"></div>
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
include("Templates/res.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
+11 -1
View File
@@ -101,8 +101,18 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
-1
View File
@@ -31,7 +31,6 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
<td><span class="f9 c6">Language:</span></td><td>
<select name="lang">
<option value="en" selected="selected">English</option>
<option value="ru">Russian</option>
</select>
</td></tr><tr></tr>
<td><span class="f9 c6">Beginners protection length:</span></td><td>
+11 -1
View File
@@ -98,8 +98,18 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
+11 -1
View File
@@ -122,8 +122,18 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>
+100
View File
@@ -0,0 +1,100 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename oasis_populate.php ##
## Developed by: mauroalt ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
include_once ("GameEngine/Account.php");
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);
if($session->access==ADMIN){
//controllo
if(isset($_GET['giveout'])){
$database->populateOasisUnitsLow();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo SERVER_NAME ?></title>
<link REL="shortcut icon" HREF="favicon.ico"/>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="mt-full.js?0ac36" type="text/javascript"></script>
<script src="unx.js?0ac36" type="text/javascript"></script>
<script src="new.js?0ac36" type="text/javascript"></script>
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" />
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" />
<?php
if($session->gpack == null || GP_ENABLE == false) {
echo "
<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' />
<link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
} else {
echo "
<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' />
<link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
}
?>
<script type="text/javascript">
window.addEvent('domready', start);
</script>
</head>
<body class="v35 ie ie8">
<div class="wrapper">
<img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
<div id="dynamic_header">
</div>
<?php include("Templates/header.tpl"); ?>
<div id="mid">
<?php include("Templates/menu.tpl"); ?>
<div id="content" class="login">
<?php
if(isset($_GET['giveout'])){?>
<h1><br/>Populated Oasis</h1><br />
Done!<br />
<?php
} else{ ?><h1><br/>Populated Oasis</h1><br />
Click <a href="?giveout">here</a>, to populate oasis <br/>WARNING: Loading next page can take some time!
<?php } ?></div>
<div id="side_info" class="outgame">
</div>
<div class="clear"></div>
</div>
<div class="footer-stopper outgame"></div>
<div class="clear"></div>
<?php include("Templates/footer.tpl"); ?>
<div id="ce"></div>
</body>
</html>
<?php @mysql_close();
}else{
header("Location: dorf1.php");
}?>
+12 -1
View File
@@ -152,8 +152,19 @@ include("Templates/links.tpl");
<?php
include("Templates/footer.tpl");
include("Templates/res.tpl");
include("Templates/serv_time.tpl");
?>
<div id="stime">
<div id="ltime">
<div id="ltimeWrap">
Calculated in <b><?php
echo round(($generator->pageLoadTimeEnd()-$start)*1000);
?></b> ms
<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
</div>
</div>
</div>
<div id="ce"></div>
</body>
</html>