* Removing any of the copyright notices without purchasing a license * is expressly forbidden. To remove HESK copyright notice you must purchase * a license for this script. For more information on how to obtain * a license please visit the page below: * https://www.hesk.com/buy.php *******************************************************************************/ define('IN_SCRIPT', 1); define('HESK_PATH', '../'); /* Get all the required files and functions */ require HESK_PATH . 'hesk_settings.inc.php'; require HESK_PATH . 'inc/common.inc.php'; require HESK_PATH . 'inc/admin_functions.inc.php'; require_once HESK_PATH . 'inc/knowledgebase_functions.inc.php'; hesk_load_database_functions(); hesk_session_start(); hesk_dbConnect(); hesk_isLoggedIn(); /* Is Knowledgebase enabled? */ if (!$hesk_settings['kb_enable']) { hesk_error($hesklang['kbdis']); } /* Can this user manage Knowledgebase or just view it? */ $can_man_kb = hesk_checkPermission('can_man_kb', 0); /* Any category ID set? */ $catid = intval(hesk_GET('category', 1)); $artid = intval(hesk_GET('article', 0)); if (isset($_GET['search'])) { $query = hesk_input(hesk_GET('search')); } else { $query = 0;
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; }