gold <= 2) { header("Location: build.php?id=".(int)$_GET['id']); exit; } $level = (int)$village->resarray['f'.$id]; $totalRes = floor($village->awood + $village->aclay + $village->airon + $village->acrop); $maxstore = (int)$village->maxstore; $maxcrop = (int)$village->maxcrop; // valori prefill din GET $r = []; for ($i = 1; $i <= 4; $i++) { $r[$i] = isset($_GET['r'.$i])? max(0, (int)$_GET['r'.$i]) : ''; } $newsum = ($r[1]!=='' && $r[2]!=='' && $r[3]!=='' && $r[4]!=='')? array_sum($r) : 0; $remain = $totalRes - $newsum; $wwvillage = $database->getResourceLevel($village->wid); $isWW = ($wwvillage['f99t'] == 40); $completed = isset($_GET['c']); ?>

. 3<?php echo GOLD;?>

awood, 'r1', LUMBER], ['clay', $village->aclay, 'r2', CLAY], ['iron', $village->airon, 'r3', IRON], ['crop', $village->acrop, 'r4', CROP], ]; foreach ($resData as $idx => $rd):?>
<?php echo $rd[3];?>

userinfo['gold'] >= 3):?> (: <?php echo GOLD;?>3) (: <?php echo GOLD;?>3)