예제 #1
0
 public function HandlePage()
 {
     // Should we redirect to the setup script?
     if (GetConfig('isSetup') == false) {
         header("Location: index.php");
         die;
     }
     if (isset($_REQUEST['ToDo'])) {
         $ToDo = $_REQUEST['ToDo'];
     } else {
         $ToDo = "";
     }
     if (isset($_COOKIE['RememberToken']) && !isset($_GET['ToDo']) && !isset($_COOKIE['logout'])) {
         $_POST['remember'] = "1";
         $GLOBALS['ISC_CLASS_ADMIN_AUTH']->ProcessLogin();
         die;
     } else {
         if (!isset($_COOKIE["STORESUITE_CP_TOKEN"]) && $ToDo != "processLogin" && $ToDo != "forgotPass" && $ToDo != "sendPassEmail" && $ToDo != "confirmPasswordChange" && $ToDo != "firstTimeLogin" && $ToDo != "drawLogo") {
             unset($_COOKIE['logout']);
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->DoLogin();
             die;
         }
     }
     // Get the permissions for this user
     $arrPermissions = $GLOBALS["ISC_CLASS_ADMIN_AUTH"]->GetPermissions();
     switch ($ToDo) {
         case 'processLogin':
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->ProcessLogin();
             break;
         case 'forgotPass':
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->ForgotPass();
             break;
         case 'confirmPasswordChange':
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->ConfirmPass();
             break;
         case 'sendPassEmail':
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->SendForgotPassEmail();
             break;
         case 'logOut':
             $GLOBALS['ISC_CLASS_ADMIN_AUTH']->LogOut();
             break;
         case 'HelpRSS':
             $this->LoadHelpRSS();
             break;
         default:
             if (!in_arrays($ToDo)) {
                 // No permissions? Log them out and throw them to the login page
                 if (empty($arrPermissions)) {
                     $GLOBALS['ISC_CLASS_ADMIN_AUTH']->LogOut();
                     die;
                 }
                 if (!empty($ToDo)) {
                     $GLOBALS['ISC_CLASS_ADMIN_AUTH']->HandleSTSToDo($ToDo);
                 } else {
                     $class = GetClass('ISC_ADMIN_INDEX');
                     $class->HandleToDo();
                 }
             }
     }
 }
예제 #2
0
		public function HandlePage()
		{
			// Should we redirect to the setup script?
			if (GetConfig('isSetup') == false) {
				header("Location: index.php");
				die();
			}

			if (isset($_REQUEST['ToDo'])) {
				$ToDo = $_REQUEST['ToDo'];
			} else {
				$ToDo = "";
			}

			if (!isset($_COOKIE['STORESUITE_CP_TOKEN']) &&
				$ToDo != 'processLogin' &&
				$ToDo != 'forgotPass' &&
				$ToDo != 'unblock' &&
				$ToDo != 'firstTimeLogin' &&
				$ToDo != 'drawLogo'
			) {
				if (isset($_COOKIE['RememberToken']) && !isset($_COOKIE['logout']) && (int)GetConfig('PCILoginIdleTimeMin') == 0) {
					// process auto login
					// if 'remember my details' was checked
					// if user somehow lost CP token and idle timer is off
					$_POST['remember'] = '1';
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->ProcessLogin($ToDo);
					die;
				}

				unset($_COOKIE['logout']);
				$GLOBALS['ISC_CLASS_ADMIN_AUTH']->displayLoginForm();
				die();
			}

			// Get the permissions for this user
			$arrPermissions = $GLOBALS["ISC_CLASS_ADMIN_AUTH"]->GetPermissions();

			switch ($ToDo) {
				case 'login':
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->displayLoginForm();
					break;
				case 'processLogin':
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->ProcessLogin();
					break;
				case 'forgotPass':
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->displayResetPasswordRequestForm();
					break;
				case 'unblock':
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->displayUnblockScreen();
					break;
				case 'logOut':
					$GLOBALS['ISC_CLASS_ADMIN_AUTH']->LogOut();
					break;
				case 'HelpRSS':
					$this->LoadHelpRSS();
					break;
				default:
				{
					if (!in_arrays($ToDo)) {
						// No permissions? Log them out and throw them to the login page
						if (empty($arrPermissions)) {
							$GLOBALS['ISC_CLASS_ADMIN_AUTH']->LogOut();
							die();
						}

						$this->template->assign('taskManagerScript', Interspire_TaskManager::getTriggerHtml('json'));

						if (!empty($ToDo)) {
							$GLOBALS['ISC_CLASS_ADMIN_AUTH']->HandleSTSToDo($ToDo);
						}
						else {
							$class = GetClass('ISC_ADMIN_INDEX');
							$class->HandleToDo();
						}
					}
				}
			}
		}
예제 #3
0
<?php

error_reporting(1);
ini_set('error_reporting', E_ALL ^ E_NOTICE);
//ini_set('display_errors',1);
echo 'display_errors = ' . ini_get('display_errors') . "\n";
echo $test;
if (in_arrays($arrr)) {
}