* @package IcingaEditor * @subpackage WebUI * @author Vitex <*****@*****.**> * @copyright 2012 Vitex@hippy.cz (G) */ require_once 'includes/IEInit.php'; $oPage->onlyForLogged(); $script = new IEScript($oPage->getRequestValue('script_id', 'int')); switch ($oPage->getRequestValue('action')) { case 'export': $script->transfer($oPage->getRequestValue('destination')); break; default: if ($oPage->isPosted()) { $script->takeData($_POST); if (!$script->getName()) { $oUser->addStatusMessage(_('Není zadán název'), 'warning'); } $scriptID = $script->saveToMySQL(); if (is_null($scriptID)) { $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') { $script->delete(); } $oPage->addItem(new IEPageTop(_('Editace skriptu') . ' ' . $script->getName()));