diff --git a/GameEngine/Units.php b/GameEngine/Units.php index f262e8b1..a834a7d3 100755 --- a/GameEngine/Units.php +++ b/GameEngine/Units.php @@ -124,8 +124,8 @@ class Units { if($disabled != "" && $post['c'] == 3){ $form->addError("error","You can't attack this village/oasis with normal attack"); } - if( !$post['t1'] && !$post['t2'] && !$post['t3'] && !$post['t4'] && !$post['t5'] && - !$post['t6'] && !$post['t7'] && !$post['t8'] && !$post['t9'] && !$post['t10'] && !$post['t11']){ + if(empty($post['t1']) && empty($post['t2']) && empty($post['t3']) && empty($post['t4']) && empty($post['t5']) && + empty($post['t6']) && empty($post['t7']) && empty($post['t8']) && empty($post['t9']) && empty($post['t10']) && empty($post['t11'])){ $form->addError("error","You need to mark min. one troop"); } diff --git a/Templates/a2b/attack.tpl b/Templates/a2b/attack.tpl index f5d855ee..8b2723ad 100644 --- a/Templates/a2b/attack.tpl +++ b/Templates/a2b/attack.tpl @@ -20,7 +20,7 @@ $to = array('x'=>$coor['x'], 'y'=>$coor['y']); $fastertroops = 1; } $time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops); -$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid); +$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$session->uid); if(count($foolartefact) > 0){ foreach($foolartefact as $arte){ if($arte['bad_effect'] == 1){ @@ -143,7 +143,7 @@ $end = ($tribe*10); - "> + "> @@ -157,7 +157,7 @@ $end = ($tribe*10); getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" />"; - } if ($process['t11'] != ''){ + } if (!empty($process['t11'])){ echo "\"Hero\""; }?> @@ -420,7 +420,7 @@ $end = ($tribe*10); $fastertroops = 1; } $time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops); - $foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid); + $foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$session->uid); if(count($foolartefact) > 0){ foreach($foolartefact as $arte){ if($arte['bad_effect'] == 1){ @@ -436,7 +436,7 @@ $end = ($tribe*10); - "> + ">
in getTimeFormat($time); ?>
diff --git a/Templates/a2b/search.tpl b/Templates/a2b/search.tpl index 34e4ff92..eb061e4e 100644 --- a/Templates/a2b/search.tpl +++ b/Templates/a2b/search.tpl @@ -1,11 +1,11 @@ - - + + @@ -29,7 +29,7 @@