Ejemplo n.º 1
0
<?php

/**
 * Icinga Editor - hlavní strana
 *
 * @package    IcingaEditor
 * @subpackage WebUI
 * @author     Vitex <*****@*****.**>
 * @copyright  2012 Vitex@hippy.cz (G)
 */
require_once 'includes/IEInit.php';
require_once 'classes/IEcfg.php';
$oPage->onlyForLogged();
$oPage->addItem(new IEPageTop(_('Icinga Editor')));
IECfg::reloadIcinga();
$oPage->addItem(new IEPageBottom());
$oPage->draw();
Ejemplo n.º 2
0
            list($msg, $WarningCount) = explode(':', $line);
            if (intval(trim($WarningCount))) {
                $oUser->addStatusMessage(sprintf(_('celkem %s varování'), $WarningCount), 'warning');
            } else {
                $oUser->addStatusMessage(_('test proběhl bez varování'), 'success');
            }
        }
        if (strstr($line, 'Total Errors')) {
            list($msg, $errorCount) = explode(':', $line);
            if (intval(trim($errorCount))) {
                $oUser->addStatusMessage(sprintf(_('celkem %s chyb'), $errorCount), 'warning');
            } else {
                $oUser->addStatusMessage(_('test proběhl bez chyb'), 'success');
            }
        }
    }
    fclose($testing);
    if (!intval($errorCount) && !is_null($WarningCount)) {
        if (IECfg::reloadIcinga()) {
            $oPage->container->addItem(_('Všechny vaše konfigurační soubory byly přegenerovány'));
            $oPage->container->addItem(new EaseTWBLinkButton('main.php', _('Hotovo') . ' ' . EaseTWBPart::GlyphIcon('ok-sign'), 'success'));
            EaseShared::user()->setSettingValue('unsaved', false);
        }
    }
}
if ($oUser->getSettingValue('admin') && isset($originalUserID)) {
    EaseShared::user(new EaseUser($originalUserID));
    EaseShared::user()->loginSuccess();
}
$oPage->addItem(new IEPageBottom());
$oPage->draw();