* * @package IcingaEditor * @subpackage WebUI * @author Vitex <*****@*****.**> * @copyright 2012 Vitex@hippy.cz (G) */ require_once 'includes/IEInit.php'; $oPage->onlyForLogged(); $command = new IECommand($oPage->getRequestValue('command_id', 'int')); switch ($oPage->getRequestValue('action')) { case 'export': $command->transfer($oPage->getRequestValue('destination')); break; default: if ($oPage->isPosted()) { $command->takeData($_POST); if (!$command->getName()) { $oUser->addStatusMessage(_('Není zadán název'), 'warning'); } $commandID = $command->saveToMySQL(); if (is_null($commandID)) { $oUser->addStatusMessage(_('Příkaz nebyl uložen'), 'warning'); } else { $oUser->addStatusMessage(_('Příkaz byl uložen'), 'success'); } } } $delete = $oPage->getGetValue('delete', 'bool'); if ($delete == 'true') { $command->delete(); }