Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- $GLOBALS["Index"] = "/Login/";
- $GLOBALS["Landing"] = "/Landing/";
- $SessionStatus = session_status();
- if ($SessionStatus == PHP_SESSION_NONE){
- echo "None";
- Out();
- }else if ($SessionStatus == PHP_SESSION_DISABLED){
- echo "Disabled";
- Out();
- }else if($SessionStatus == PHP_SESSION_ACTIVE){
- if ((isset($_SESSION["Username"]))){
- if ($Window == 'Index'){
- header("Location: " . $GLOBALS["Landing"]);
- }
- if ($Window == "Landing" && $_SESSION["Username"] == "FileUpload"){
- out();
- }
- }else if ($Window == "Index"){
- //session_reset();
- }else{
- echo "error";
- echo var_dump($_SESSION);
- echo "out";
- out($Window);
- }
- }
- function Out($Window){
- //session_destroy();
- echo $Window;
- if ($Window != "Index"){
- header("Location: " . $GLOBALS["Index"]);
- }
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement