define('ASSETS_PATH', ROOT_PATH . 'assets/default/'); //Check the status of the HelpDesk. if (!in_array(strtolower(basename($_SERVER['SCRIPT_NAME'])), array('logo.php', 'file.php')) && !(is_object($ost) && $ost->isSystemOnline())) { include ROOT_DIR . 'offline.php'; exit; } /* include what is needed on client stuff */ require_once INCLUDE_DIR . 'class.client.php'; require_once INCLUDE_DIR . 'class.ticket.php'; require_once INCLUDE_DIR . 'class.dept.php'; //clear some vars $errors = array(); $msg = ''; $nav = null; //Make sure the user is valid..before doing anything else. $thisclient = UserAuthenticationBackend::getUser(); if (isset($_GET['lang']) && $_GET['lang']) { if (Internationalization::getLanguageInfo($_GET['lang'])) { $_SESSION['client:lang'] = $_GET['lang']; } } // Bootstrap gettext translations as early as possible, but after attempting // to sign on the agent TextDomain::configureForUser($thisclient); //is the user logged in? if ($thisclient && $thisclient->getId() && $thisclient->isValid()) { $thisclient->refreshSession(); } else { $thisclient = null; } /******* CSRF Protectin *************/