$current_pg = 0; $current_cpu = 0; } if ($current_cpu <= 0 && $tower_cpu > 0) { $current_cpu = $tower_cpu; } if ($current_pg <= 0 && $tower_pg > 0) { $current_pg = $tower_pg; } $tower['current_pg'] = $current_pg; $tower['current_cpu'] = $current_cpu; $row2 = $posmgmt->GetLastPosUpdate($pos_id); $last_update = gmdate("Y-m-d H:i:s", $row2['datetime']); $hoursago = $posmgmt->hoursago($pos_id, 1); $optimal = $posmgmt->posoptimaluptime($tower); $optimalDiff = $posmgmt->getOptimalDifference($optimal, $tower); $avail_fuelblock = $current_fuelblock; $avail_strontium = $current_strontium; $avail_charters = $current_charters; if ($avail_charters <= 0 && $required_charters) { $avail_charters = $current_charters - $required_charters * floor($current_charters / $required_charters); } $tower['avail_fuelblock'] = $avail_fuelblock; $tower['avail_strontium'] = $avail_strontium; $tower['avail_charters'] = $avail_charters; $res0 = $posmgmt->GetPosSilos($pos_id); $silocap = array(1 => 30000, 2 => 20000, 3 => 40000, 4 => 20000, 5 => 20000, 6 => 30000, 7 => 30000, 8 => 20000, 9 => 20000, 10 => 20000, 11 => 30000, 12 => 40000, 13 => 40000, 14 => 30000); $x = 0; $display_silo = false; foreach ($res0 as $row0) { //$silo = array();