diff --git a/app/views/Automation.php b/app/views/Automation.php index 6b6e20d..0b1ef13 100644 --- a/app/views/Automation.php +++ b/app/views/Automation.php @@ -53,6 +53,7 @@ class Automation extends Template $template = new Template('automation'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('debugMod', DEBUGMOD); $template->prepare('title', 'Automation'); $template->prepare('langMng', $langMng); diff --git a/app/views/Log.php b/app/views/Log.php index 1f4037c..49146fe 100644 --- a/app/views/Log.php +++ b/app/views/Log.php @@ -19,6 +19,7 @@ class Log extends Template $result = $this->logFinder ('../logs/', $result); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('debugMod', DEBUGMOD); $template->prepare('logToLiveTime', LOGTIMOUT); $template->prepare('title', 'Logy'); diff --git a/app/views/Login.php b/app/views/Login.php index 72ede1c..3ca0caa 100644 --- a/app/views/Login.php +++ b/app/views/Login.php @@ -4,7 +4,7 @@ class Login extends Template function __construct() { $userManager = new UserManager(); - + if ($userManager->isLogin()){ header('Location: ' . BASEURL); @@ -12,6 +12,7 @@ class Login extends Template $template = new Template('login'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('title', 'Home'); diff --git a/app/views/Oauth.php b/app/views/Oauth.php index bee818e..a4a0d8a 100644 --- a/app/views/Oauth.php +++ b/app/views/Oauth.php @@ -8,6 +8,7 @@ class Oauth extends Template $template = new Template('oauth'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('title', 'Simple Home - Oauth'); if (isset($_GET['redirect_uri'])) { diff --git a/app/views/Plugins.php b/app/views/Plugins.php index b1b4e68..00ca2c9 100644 --- a/app/views/Plugins.php +++ b/app/views/Plugins.php @@ -22,9 +22,10 @@ class Plugins extends Template } $plugins = Utilities::sortArrayByKey($plugins, 'status', "desc"); - + $template = new Template('plugins'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('debugMod', DEBUGMOD); $template->prepare('title', 'Plugins'); $template->prepare('langMng', $langMng); diff --git a/app/views/Server.php b/app/views/Server.php index 62fdc86..2f8b973 100644 --- a/app/views/Server.php +++ b/app/views/Server.php @@ -22,7 +22,7 @@ class Server extends Template $load = round($loads[0]/($core_nums + 1)*100, 2); return $load; } - + function __construct() { $userManager = new UserManager(); @@ -36,6 +36,7 @@ class Server extends Template $template->prepare('title', 'Server'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('debugMod', DEBUGMOD); $template->prepare('langMng', $langMng); diff --git a/app/views/Setting.php b/app/views/Setting.php index 4982903..8ecf318 100644 --- a/app/views/Setting.php +++ b/app/views/Setting.php @@ -23,6 +23,7 @@ class Setting extends Template $template = new Template('setting'); $template->prepare('baseDir', BASEDIR); + $template->prepare('baseUrl', BASEURL); $template->prepare('debugMod', DEBUGMOD); $template->prepare('title', 'Automation'); $template->prepare('langMng', $langMng); diff --git a/app/views/templates/login.phtml b/app/views/templates/login.phtml index 68bbdae..b4d8f81 100644 --- a/app/views/templates/login.phtml +++ b/app/views/templates/login.phtml @@ -4,6 +4,8 @@ prepare('baseDir',$BASEDIR); + $partial->prepare('baseUrl',$BASEURL); + $partial->render(); ?>