Ejemplo n.º 1
0
 public function lblSignOut_Click()
 {
     QApplication::Logout();
 }
Ejemplo n.º 2
0
 public static function Authenticate($intModuleId = null)
 {
     // If logins have been disabled for this site, log the user out
     if (QApplication::$TracmorSettings->DisableLogins) {
         QApplication::Logout();
     }
     if (array_key_exists('intUserAccountId', $_SESSION)) {
         $objUserAccount = UserAccount::Load($_SESSION['intUserAccountId']);
         if ($objUserAccount) {
             // Assign the UserAccount object to the globally available QApplication
             QApplication::$objUserAccount = $objUserAccount;
             // If they are not in the admin panel
             if ($intModuleId) {
                 $objRoleModule = RoleModule::LoadByRoleIdModuleId($objUserAccount->RoleId, $intModuleId);
                 // If they do not have access to this module
                 if (!$objRoleModule->AccessFlag) {
                     QApplication::Redirect('../common/trespass.php');
                 } else {
                     QApplication::$objRoleModule = $objRoleModule;
                 }
             } elseif (!$objUserAccount->AdminFlag) {
                 QApplication::Redirect('../common/trespass.php');
             }
         } else {
             QApplication::Redirect('../common/trespass.php');
         }
     } else {
         QApplication::Redirect('../login.php?strReferer=' . urlencode(QApplication::$RequestUri));
     }
 }
Ejemplo n.º 3
0
Archivo: index.php Proyecto: alcf/chms
<?php

require '../../includes/prepend.inc.php';
QApplication::Logout();