/******* SET STAFF DEFAULTS **********/ //Set staff's timezone offset. $_SESSION['TZ_OFFSET'] = $thisstaff->getTZoffset(); $_SESSION['TZ_DST'] = $thisstaff->observeDaylight(); define('PAGE_LIMIT', $thisstaff->getPageLimit() ? $thisstaff->getPageLimit() : DEFAULT_PAGE_LIMIT); //Clear some vars. we use in all pages. $errors = array(); $msg = $warn = $sysnotice = ''; $tabs = array(); $submenu = array(); $exempt = in_array(basename($_SERVER['SCRIPT_NAME']), array('logout.php', 'ajax.php', 'logs.php', 'upgrade.php')); if ($ost->isUpgradePending() && !$exempt) { $errors['err'] = $sysnotice = 'System upgrade is pending <a href="upgrade.php">Upgrade Now</a>'; require 'upgrade.php'; exit; } elseif ($cfg->isHelpDeskOffline()) { $sysnotice = '<strong>System is set to offline mode</strong> - Client interface is disabled and ONLY admins can access staff control panel.'; $sysnotice .= ' <a href="settings.php">Enable</a>.'; } $nav = new StaffNav($thisstaff); //Check for forced password change. if ($thisstaff->forcePasswdChange() && !$exempt) { # XXX: Call staffLoginPage() for AJAX and API requests _not_ to honor # the request $sysnotice = 'Password change required to continue'; require 'profile.php'; //profile.php must request this file as require_once to avoid problems. exit; } $ost->setWarning($sysnotice); $ost->setPageTitle('osTicket :: Staff Control Panel');