Base Directory Fix #1

This commit is contained in:
JonatanRek
2019-10-11 16:32:05 +02:00
parent 5501805c71
commit a82cf90d12
14 changed files with 19 additions and 19 deletions

View File

@@ -13,12 +13,12 @@ class Ajax extends Template
global $lang;
if (!$userManager->isLogin()){
header('Location: ./');
header('Location: ' . BASEDIR);
}
$is_ajax = 'XMLHttpRequest' == ( $_SERVER['HTTP_X_REQUESTED_WITH'] ?? '' );
if (!$is_ajax){
header('Location: ./');
header('Location: ' . BASEDIR);
}
if (

View File

@@ -13,7 +13,7 @@ class Automation extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$automations = [];

View File

@@ -7,7 +7,7 @@ class Dashboard extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$template = new Template('dashboard');

View File

@@ -9,7 +9,7 @@ class Home extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$template = new Template('home');

View File

@@ -9,7 +9,7 @@ class Log extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$template = new Template('log');

View File

@@ -7,7 +7,7 @@ class Login extends Template
global $lang;
if ($userManager->isLogin()){
header('Location: ./');
header('Location: ' . BASEDIR);
}
$template = new Template('login');

View File

@@ -5,7 +5,7 @@ class Logout extends Template
{
global $userManager;
$userManager->logout();
header('Location: /vasek/home/login', TRUE);
header('Location: ' . BASEDIR . 'login');
die();
}
}

View File

@@ -9,7 +9,7 @@ class Rooms extends Template
global $lang;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$template = new Template('rooms');

View File

@@ -7,7 +7,7 @@ class Scene extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./');
header('Location: ' . BASEDIR . 'login');
}
$template = new Template('scene');

View File

@@ -7,7 +7,7 @@ class Setting extends Template
global $langMng;
if (!$userManager->isLogin()){
header('Location: ./login');
header('Location: ' . BASEDIR . 'login');
}
$automations = [];