Пример #1
0
    CProfile::update('web.paging.lastpage', $page['file'], PROFILE_TYPE_STR);
}
if (CProfile::isModified()) {
    DBstart();
    $result = CProfile::flush();
    DBend($result);
}
// end transactions if they have not been closed already
if (isset($DB) && isset($DB['TRANSACTIONS']) && $DB['TRANSACTIONS'] != 0) {
    error(_('Transaction has not been closed. Aborting...'));
    DBend(false);
}
show_messages();
if ($page['type'] == PAGE_TYPE_HTML) {
    // end of article div
    echo '</div>' . "\n";
    if (!defined('ZBX_PAGE_NO_MENU')) {
        makePageFooter()->show();
    }
    insertPagePostJs();
    require_once 'include/views/js/common.init.js.php';
    if (in_array($page['type'], [PAGE_TYPE_HTML_BLOCK, PAGE_TYPE_HTML])) {
        if (!is_null(CWebUser::$data) && isset(CWebUser::$data['debug_mode']) && CWebUser::$data['debug_mode'] == GROUP_DEBUG_MODE_ENABLED) {
            CProfiler::getInstance()->stop();
            CProfiler::getInstance()->show();
            makeDebugButton()->show();
        }
    }
    echo '</body></html>';
}
exit;
Пример #2
0
    if (CWebUser::isGuest() && CSession::getValue('step') == 5 && hasRequest('finish')) {
        CSession::clear();
        redirect('index.php');
    } elseif (!(CWebUser::isGuest() && CSession::getValue('step') == 5)) {
        access_deny(ACCESS_DENY_PAGE);
    }
} elseif (hasRequest('cancel') || hasRequest('finish')) {
    CSession::clear();
    redirect('index.php');
}
$theme = CWebUser::$data ? getUserTheme(CWebUser::$data) : ZBX_DEFAULT_THEME;
DBclose();
/*
 * Setup wizard
 */
$ZBX_SETUP_WIZARD = new CSetupWizard();
// if init fails due to missing configuration, set user as guest with default en_GB language
if (!CWebUser::$data) {
    CWebUser::setDefault();
}
// page title
(new CPageHeader(_('Installation')))->addCssFile('styles/' . CHtml::encode($theme) . '.css')->addJsFile('js/browsers.js')->addJsFile('jsLoader.php?ver=' . ZABBIX_VERSION . '&amp;lang=' . CWebUser::$data['lang'])->display();
/*
 * Displaying
 */
$link = (new CLink('GPL v2', 'http://www.zabbix.com/license.php'))->setTarget('_blank')->addClass(ZBX_STYLE_GREY)->addClass(ZBX_STYLE_LINK_ALT);
$sub_footer = (new CDiv(['Licensed under ', $link]))->addClass(ZBX_STYLE_SIGNIN_LINKS);
(new CTag('body', true, [(new CDiv([$ZBX_SETUP_WIZARD, $sub_footer]))->addClass(ZBX_STYLE_ARTICLE), makePageFooter()]))->show();
?>
</html>
Пример #3
0
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
define('ZBX_PAGE_NO_HEADER', 1);
define('ZBX_PAGE_NO_FOOTER', 1);
$request = CHtml::encode(getRequest('request', ''));
$message = CHtml::encode(getRequest('message', ''));
// remove debug code for login form message, trimming not in regex to relay only on [ ] in debug message.
$message = trim(preg_replace('/\\[.*\\]/', '', $message));
require_once dirname(__FILE__) . '/../page_header.php';
$error = $message !== '' ? (new CDiv($message))->addClass(ZBX_STYLE_RED) : null;
$guest = CWebUser::$data['userid'] > 0 ? (new CListItem(['or ', new CLink('sign in as guest', ZBX_DEFAULT_URL)]))->addClass(ZBX_STYLE_SIGN_IN_TXT) : null;
global $ZBX_SERVER_NAME;
(new CDiv([isset($ZBX_SERVER_NAME) && $ZBX_SERVER_NAME !== '' ? (new CDiv($ZBX_SERVER_NAME))->addClass(ZBX_STYLE_SERVER_NAME) : null, (new CDiv([(new CDiv())->addClass(ZBX_STYLE_SIGNIN_LOGO), (new CForm())->addItem((new CList())->addItem([new CLabel(_('Username'), 'name'), (new CTextBox('name'))->setAttribute('autofocus', 'autofocus'), $error])->addItem([new CLabel(_('Password'), 'password'), (new CTextBox('password'))->setType('password')])->addItem(new CLabel([(new CCheckBox('autologin'))->setChecked(getRequest('autologin', 1) == 1), _('Remember me for 30 days')], 'autologin'))->addItem(new CSubmit('enter', _('Sign in')))->addItem($guest))]))->addClass(ZBX_STYLE_SIGNIN_CONTAINER), (new CDiv([(new CLink(_('Help'), 'http://www.zabbix.com/documentation/3.0/'))->setTarget('_blank')->addClass(ZBX_STYLE_GREY)->addClass(ZBX_STYLE_LINK_ALT), '&nbsp;&nbsp;•&nbsp;&nbsp;', (new CLink(_('Support'), 'http://www.zabbix.com/support.php'))->setTarget('_blank')->addClass(ZBX_STYLE_GREY)->addClass(ZBX_STYLE_LINK_ALT)]))->addClass(ZBX_STYLE_SIGNIN_LINKS)]))->addClass(ZBX_STYLE_ARTICLE)->show();
makePageFooter(false)->show();
?>
</body>