herogat

Untitled

Mar 12th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. $page['dir'] = str_replace('\\','/',$page['dir']);
  2. //if(strpos($_SERVER['SERVER_SOFTWARE'],"Win") == false){ $page['dir'] = str_replace('\\','/',$page['dir']); }
  3. chdir(str_replace($page['dir'], "", getcwd()));
  4.  
  5.  
  6. if(strpos($page['dir'],'habblet') && (empty($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') && $page['no_ajax'] != true){ header('Location: ../'); exit; }
  7. var_dump($page['dir']);
  8. if(!include_once('./includes/config.php')){ if(file_exists('./install/config.php')){ echo "<h1>Please move ./install/config.php to ./includes/config.php to continue.</h1>"; }elseif(file_exists('./install/index.php')){ header('Location: ./install/'); }else{ echo "<h1>Cannot find config.php in includes folder. Cannot find the install folder either. Did you copy all the files?"; } exit; }
  9. define("PREFIX", $conn['main']['prefix']);
  10. require_once('./includes/classes.php');
  11. $db = new $conn['main']['server']($conn['main']);
  12. if($conn['server']['enabled'] == true){ $serverdb = new $conn['server']['server']($conn['server']); }else{ $serverdb = $db; }
  13. $settings = new HoloSettings;
  14. $input = new HoloInput;
  15. $lang = new HoloLocale;
  16.  
  17. session_start();
  18.  
  19. define("PATH", $settings->find("site_path"));
  20. define("SHORTNAME", $settings->find("site_shortname"));
  21. define("FULLNAME", $settings->find("site_name"));
  22. //define("DEBUG", true); //Uncomment this line to show detailed database error messages.
  23.  
  24. require('./includes/data/'.$settings->find("hotel_server").'.php');
  25. $core = new core_sql;
  26. require('./includes/functions.php');
  27. //require('./includes/version.php');
  28.  
  29. if($page['housekeeping'] != true){ if(is_object($_SESSION['user'])){ $user = $_SESSION['user']; }else{ $user = new HoloUser(null,null); } }else{ if(is_object($_SESSION['hk_user'])){ $user = $_SESSION['hk_user']; }else{ $user = new HoloUser(null,null); } }
  30.  
  31. if($user->error == 1 && $page['bypass_user_check'] != true && $_COOKIE['rememberme'] == "true" && $page['housekeeping'] != true){ $_SESSION['page'] = $_SERVER["REQUEST_URI"]; header("Location: ".PATH."/security_check_token"); }
  32.  
  33. if($settings->find("site_closed") == "1" && $page['id'] != "maintenance" && $page['housekeeping'] != true && $user->user("rank") < 5){
  34. header("Location: ".PATH."/maintenance"); ex
Advertisement
Add Comment
Please, Sign In to add comment