loadcfg(); } } if ($_REQUEST['logoff']) { $_SESSION = array(); savecfg(); session_destroy(); $url = $self; if (!$ACCESS_PWD) { $url = '/'; } header("location: {$url}"); exit; } if (!$_SESSION['is_logged']) { print_login(); exit; } if ($_REQUEST['savecfg']) { savecfg(); } loadsess(); if ($_REQUEST['showcfg']) { print_cfg(); exit; } //get initial values $SQLq = trim($_REQUEST['q']); $page = $_REQUEST['p'] + 0; if ($_REQUEST['refresh'] && $DB['db'] && !$SQLq) { $SQLq = "show tables";
function logout() { global $hesk_settings, $hesklang; if (!hesk_token_check('GET', 0)) { print_login(); exit; } /* Delete from Who's online database */ if ($hesk_settings['online']) { require HESK_PATH . 'inc/users_online.inc.php'; hesk_setOffline($_SESSION['id']); } /* Destroy session and cookies */ hesk_session_stop(); /* If we're using the security image for admin login start a new session */ if ($hesk_settings['secimg_use'] == 2) { hesk_session_start(); } /* Show success message and reset the cookie */ hesk_process_messages($hesklang['logout_success'], 'NOREDIRECT', 'SUCCESS'); setcookie('hesk_p', ''); /* Print the login form */ print_login(); exit; }