Esempio n. 1
0
     unset($_SESSION['CATS']);
     unset($_SESSION['modules']);
     $URI = 'm=login';
     /* Local demo account doesn't relogin. */
     if (!empty($unixName) && $unixName != 'demo') {
         $URI .= '&s=' . $unixName;
     }
     if (isset($_GET['message'])) {
         $URI .= '&message=' . urlencode($_GET['message']);
     }
     if (isset($_GET['messageSuccess'])) {
         $URI .= '&messageSuccess=' . urlencode($_GET['messageSuccess']);
     }
     /* catsone.com demo domain doesn't relogin. */
     if (strpos(CATSUtility::getIndexName(), '://demo.catsone.com') !== false) {
         CATSUtility::transferURL('http://www.catsone.com');
     } else {
         CATSUtility::transferRelativeURI($URI);
     }
 } else {
     if (!ModuleUtility::moduleRequiresAuthentication($_GET['m'])) {
         /* No authentication required; load the module. */
         ModuleUtility::loadModule($_GET['m']);
     } else {
         if (!$_SESSION['CATS']->isLoggedIn()) {
             /* User isn't logged in and authentication is required; send the user
              * to the login page.
              */
             ModuleUtility::loadModule('login');
         } else {
             /* Everything's good; load the requested module. */