getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
".$technology->getUnitName($i)." (Level ".$abdata['a'.$j];
$ups = 0;
if($totalUps > 0){
foreach($ABups as $upgrade){
if(in_array(("a".$j), $upgrade)) $ups++;
}
if($ups > 0) echo "+".$ups;
}
echo ") ".${'ab'.$i}[$abdata['a'.$j]+1+$ups]['wood']."| ".${'ab'.$i}[$abdata['a'.$j]+1+$ups]['clay']."| ".${'ab'.$i}[$abdata['a'.$j]+1+$ups]['iron']."| ".${'ab'.$i}[$abdata['a'.$j]+1+$ups]['crop']."| ";
echo $generator->getTimeFormat(round(${'ab'.$i}[$abdata['a'.$j]+1+$ups]['time']*($bid13[$building->getTypeLevel(13)]['attri'] / 100)/SPEED));
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)(${'ab'.$i}[$abdata['a'.$j]+1+$ups]['wood'] + ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['clay'] + ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['iron'] + ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
echo "| ";
}
}
if($abdata['a'.$j] == 20) {
echo "".MAXIMUM_LEVEL." | ".UPGRADE_ARMOURY." | ";
}
else if(${'ab'.$i}[$abdata['a'.$j]+1+$ups]['wood'] > $village->maxstore || ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['clay'] > $village->maxstore || ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['iron'] > $village->maxstore) {
echo "".EXPAND_WAREHOUSE." | ";
}
else if (${'ab'.$i}[$abdata['a'.$j]+1+$ups]['crop'] > $village->maxcrop) {
echo "".EXPAND_GRANARY." | ";
}
else if (${'ab'.$i}[$abdata['a'.$j]+1+$ups]['wood'] > $village->awood || ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['clay'] > $village->aclay || ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['iron'] > $village->airon || ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['crop'] > $village->acrop) {
if($village->getProd("crop")>0 || $village->acrop > ${'ab'.$i}[$abdata['a'.$j]+1+$ups]['crop']){
$time = $technology->calculateAvaliable(13,${'ab'.$i}[$abdata['a'.$j]+1+$ups]);
echo "".TOO_FEW_RESOURCES." | ";
}
else if ($totalUps == 1 && !$session->plus || $totalUps > 1) {
echo "".UPGRADE_IN_PROGRESS." | ";
}
else if($session->access != BANNED){
echo "mchecker."\">".UPGRADE.""; if($totalUps != 0) echo " ".WAITING.""; echo" | "; }else{ echo "".UPGRADE.""; if($totalUps != 0) echo " ".WAITING.""; echo" | "; } } } ?>
| ".UPGRADING." | ".DURATION." | ".COMPLETE." |
getUnitName($unit)."\" title=\"".$technology->getUnitName($unit)."\" />".$technology->getUnitName($unit);
echo " (".LEVEL." ".$abdata['a'.$ABUnit].")";
if($count > 1) echo " ".WAITING."";
echo " | ";
echo "timer."\">".$generator->getTimeFormat($arms['timestamp']-time())." | "; $date = $generator->procMtime($arms['timestamp']); echo "".$date[1]." hrs | "; echo "