function check_authorisation() { global $USER_DETAILS; $sessionid = get_cookie('zbx_sessionid'); $user = array('sessionid' => $sessionid); if (!($auth = CUser::checkAuthentication($user))) { include_once 'include/locales/en_gb.inc.php'; process_locales(); include 'index.php'; exit; } return $auth; }
require_once 'include/perm.inc.php'; global $USER_DETAILS; global $ZBX_LOCALNODEID, $ZBX_LOCMASTERID, $ZBX_VIEWED_NODES, $ZBX_AVAILABLE_NODES; global $ZBX_CURMASTERID; global $page; if (!isset($page['type'])) { $page['type'] = PAGE_TYPE_HTML; } if (!isset($page['file'])) { $page['file'] = basename($_SERVER['PHP_SELF']); } if ($_REQUEST['fullscreen'] = get_request('fullscreen', 0)) { define('ZBX_PAGE_NO_MENU', 1); } include_once 'include/locales/en_gb.inc.php'; process_locales(); set_zbx_locales(); require_once 'include/menu.inc.php'; zbx_define_menu_restrictions(); /* Init CURRENT NODE ID */ init_nodes(); /* switch($page["type"]) */ switch ($page['type']) { case PAGE_TYPE_IMAGE: set_image_header(); define('ZBX_PAGE_NO_MENU', 1); break; case PAGE_TYPE_XML: header('Content-Type: text/xml'); header('Content-Disposition: attachment; filename="' . $page['file'] . '"'); if (!defined('ZBX_PAGE_NO_MENU')) {