} /*Some more include defines specific to client only */ define('CLIENTINC_DIR', INCLUDE_DIR . 'client/'); define('OSTCLIENTINC', TRUE); //Check the status of the HelpDesk. if (!is_object($cfg) || !$cfg->getId() || $cfg->isHelpDeskOffline()) { include './offline.php'; exit; } //Forced upgrade? Version mismatch. if (defined('THIS_VERSION') && strcasecmp($cfg->getVersion(), THIS_VERSION)) { die('System is offline for an upgrade.'); 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 = ''; $thisclient = null; //Make sure the user is valid..before doing anything else. if ($_SESSION['_client']['userID'] && $_SESSION['_client']['key']) { $thisclient = new ClientSession($_SESSION['_client']['userID'], $_SESSION['_client']['key']); } //print_r($_SESSION); //is the user logged in? if ($thisclient && $thisclient->getId() && $thisclient->isValid()) { $thisclient->refreshSession(); }
//Forced upgrade? Version mismatch. if (defined('THIS_VERSION') && strcasecmp($cfg->getVersion(), substr(THIS_VERSION, 0, strripos(THIS_VERSION, '.')))) { die(_('System is offline for an upgrade.')); exit; } // include what is needed on user stuff require_once INCLUDE_DIR . 'class.ticket.php'; // clear some vars $errors = array(); $msg = ''; $thisuser = null; // Has got the user a session? Then make sure the user is valid...before doing anything else. if ($_SESSION['_user']['userID'] && $_SESSION['_user']['key']) { if (!$cfg->getUserLogRequired()) { $thisuser = new UserSession($_SESSION['_user']['userID'], $_SESSION['_user']['key']); } else { $thisuser = new ClientSession($_SESSION['_user']['userID'], $_SESSION['_user']['key']); // Block blocked client if (!$thisuser->isactive()) { $errors['err'] = _('Access Disabled. Contact Admin'); $_SESSION['_user'] = array(); session_unset(); session_destroy(); } } } // print_r($_SESSION); // Is the user logged in? if ($thisuser && $thisuser->getId() && $thisuser->isValid()) { $thisuser->refreshSession(); }