getProfileVillages($session->uid); foreach($varray as $vil){ $vid = $vil['wref']; $vdata = $database->getVillage($vid); $totalmerchants = $building->getTypeLevel(17,$vid); $availmerchants = $totalmerchants - $database->totalMerchantUsed($vid); if($vdata['wood'] > $vdata['maxstore']) { $wood = $vdata['maxstore']; } else { $wood = $vdata['wood']; } if($vdata['clay'] > $vdata['maxstore']) { $clay = $vdata['maxstore']; } else { $clay = $vdata['clay']; } if($vdata['iron'] > $vdata['maxstore']) { $iron = $vdata['maxstore']; } else { $iron = $vdata['iron']; } if($vdata['crop'] > $vdata['maxcrop'] ) { $crop = $vdata['maxcrop']; } else { $crop = $vdata['crop']; } if($vdata['capital'] == 1){$class = 'hl';}else{$class = '';} echo ' '; $woodSUM += $wood; $claySUM += $clay; $ironSUM += $iron; $cropSUM += $crop; } ?>
Resources
VillageMerchants
'.$vdata['name'].' '.number_format(round($wood)).' '.number_format(round($clay)).' '.number_format(round($iron)).' '.number_format(round($crop)).' '.($totalmerchants>0?'':'').$availmerchants.'/'.$totalmerchants.'
Sum