if ($row) { $tower['required_fuelblock'] = ceil($row['fuelblock'] * $tower['hasSov']); $tower['required_strontium'] = ceil($row['strontium'] * $tower['hasSov']); $tower['required_charters'] = $charters_needed ? 1 : 0; $tower['fuelblockID'] = $row['fuelblockID']; $tower['total_pg'] = $row['pg']; $tower['total_cpu'] = $row['cpu']; $required_strontium = $row['strontium']; $required_charters = $charters_needed ? 1 : 0; $total_pg = $row['pg']; $total_cpu = $row['cpu']; $tower['uptimecalc'] = $posmgmt->uptimecalc($pos_id); $tower['pos_capacity'] = $tower['fuel_hangar'] = $row['fuel_hangar']; $tower['strontium_capacity'] = $row['strontium_hangar']; } $mods = $posmgmt->GetAllPosMods($pos_id); if ($mods) { $current_pg = 0; $current_cpu = 0; foreach ($mods as $row) { if ($row['online']) { $current_pg = $current_pg + $row['pg']; $current_cpu = $current_cpu + $row['cpu']; } } } else { $current_pg = 0; $current_cpu = 0; } if ($current_cpu <= 0 && $tower_cpu > 0) { $current_cpu = $tower_cpu;