} date_default_timezone_set('UTC'); $fuel['status'] = date("Y-m-d H:i:s") . " by " . $userinfo['name']; if (!is_numeric($fuel['charters'])) { $fuel['charters'] = 0; } $fuel['pos_id'] = $pos_id; //echo 'Update Fuel';exit; if ($posmgmt->UpdatePosFuel($fuel)) { $eve->SessionSetVar('statusmsg', 'Fuel Updated!'); $eve->RedirectUrl('viewpos.php?i=' . $pos_id); } break; case 'updatemods': $modstates = $eve->VarCleanFromInput('mod'); if ($posmgmt->UpdateAllPosModsState(array('pos_id' => $pos_id, 'mods' => $modstates))) { $eve->SessionSetVar('statusmsg', 'Modifications Saved!'); $eve->RedirectUrl('viewpos.php?i=' . $pos_id); } break; case 'updateminers': $modmat = $eve->VarCleanFromInput('material'); //echo '<pre>';print_r($modmat);echo '</pre>';exit; foreach ($modmat as $structure_id => $material_id) { if (!$posmgmt->ChangeMinerMat(array('structure_id' => $structure_id, 'material_id' => $material_id))) { $eve->SessionSetVar('errormsg', 'Problem Saving Material'); $eve->RedirectUrl('editpos.php?i=' . $pos_id); } } $eve->SessionSetVar('statusmsg', 'Modifications Saved!'); $eve->RedirectUrl('viewpos.php?i=' . $pos_id);