Esempio n. 1
0
         $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);
     break;
 case 'updatesilos':
     $material = $eve->VarCleanFromInput('material');
     $direction = $eve->VarCleanFromInput('direction');
     $new_amount = $eve->VarCleanFromInput('new_amount');
     $connection = $eve->VarCleanFromInput('connection');
     $links = $eve->VarCleanFromInput('links');
     $silos = array();
     foreach ($material as $siloid => $mat_id) {