$fuel['corp'] = $userinfo['corp']; $fuel['outpost_name'] = $eve->VarCleanFromInput('outpostName'); $fuel['uranium'] = $eve->VarCleanFromInput('uranium'); $fuel['oxygen'] = $eve->VarCleanFromInput('oxygen'); $fuel['mechanical_parts'] = $eve->VarCleanFromInput('mechanical_parts'); $fuel['coolant'] = $eve->VarCleanFromInput('coolant'); $fuel['robotics'] = $eve->VarCleanFromInput('robotics'); $fuel['heisotope'] = $eve->VarCleanFromInput('heisotope'); $fuel['hyisotope'] = $eve->VarCleanFromInput('hyisotope'); $fuel['oxisotope'] = $eve->VarCleanFromInput('oxisotope'); $fuel['niisotope'] = $eve->VarCleanFromInput('niisotope'); $fuel['ozone'] = $eve->VarCleanFromInput('ozone'); $fuel['heavy_water'] = $eve->VarCleanFromInput('heavy_water'); $fuel['strontium'] = $eve->VarCleanFromInput('strontium'); $fuel['charters'] = $eve->VarCleanFromInput('charters'); if ($outpost_id = $posmgmt->AddNewOutpost($fuel)) { $eve->SessionSetVar('statusmsg', 'Modifications Saved!'); $eve->RedirectUrl('viewoutpost.php?i=' . $outpost_id); } break; } //Gather Outpost Data $outpost = $posmgmt->GetOutpostInfo($outpost_id); $hoursago = $posmgmt->hoursago($outpost_id, '4'); $update = $posmgmt->GetLastOutpostUpdate($outpost_id); $outpost['hoursago'] = $hoursago; $outpost['lastupdate'] = gmdate("Y-m-d H:i:s", $update['datetime']); //Assign Outpost Data to template $eveRender->Assign('outpost', $outpost); //Display template $eveRender->Display('addoutpost.tpl');
} } else { $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;