'); } } $auth_class = io_safe_output( get_parameter('auth_class', 'PandoraFMS\Dashboard\Manager') ); $public_hash = get_parameter('auth_hash', false); $public_login = false; // Check user. if (class_exists($auth_class) === false || $public_hash === false) { check_login(); } else { if ($auth_class::validatePublicHash($public_hash) === false) { db_pandora_audit( 'Invalid public hash', 'Trying to access public dashboard' ); include 'general/noaccess.php'; exit; } // OK. Simulated user log in. If you want to use your own auth_class // remember to set $config['force_instant_logout'] to true to avoid // persistent user login. } ob_start(); // Enterprise support. if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { include_once ENTERPRISE_DIR.'/load_enterprise.php'; } $config['remote_addr'] = $_SERVER['REMOTE_ADDR']; $page = (string) get_parameter('page'); $page = safe_url_extraclean($page); $page .= '.php'; $config['id_user'] = $_SESSION['id_usuario']; $isFunctionSkins = enterprise_include_once('include/functions_skins.php'); if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { $config['relative_path'] = enterprise_hook( 'skins_set_image_skin_path', [$config['id_user']] ); } if (is_metaconsole()) { // Backward compatibility. define('METACONSOLE', true); } if (file_exists($page)) { include_once $page; } else { echo '
Sorry! I can\'t find the page '.$page.'!'; } if (__PAN_XHPROF__ === 1) { pandora_xhprof_display_result('ajax', 'console'); } if ($config['force_instant_logout'] === true) { // Force user logout. if (session_status() !== PHP_SESSION_ACTIVE) { session_start(); } $iduser = $_SESSION['id_usuario']; $_SESSION = []; session_destroy(); header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); if ($config['auth'] == 'saml') { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout(); } } while (@ob_end_flush()) { // Dumping... continue; }