diff --git a/model/PFASmarty.php b/model/PFASmarty.php
index c7abf0fa..d0ce300a 100644
--- a/model/PFASmarty.php
+++ b/model/PFASmarty.php
@@ -67,6 +67,7 @@ class PFASmarty {
$CONF['theme_favicon'] = $rel_path . htmlentities($CONF['theme_favicon']);
$CONF['theme_logo'] = $rel_path . htmlentities($CONF['theme_logo']);
+ $this->assign('rel_path', $rel_path);
$this->assign('CONF', $CONF);
}
@@ -92,11 +93,10 @@ class PFASmarty {
* @param string $template
* @return void
*/
- public function display($template) {
+ public function display($template)
+ {
$CONF = Config::getInstance()->getAll();
-
- $this->assign('CONF', $CONF);
$this->assign('PALANG', $CONF['__LANG'] ?? []);
$this->assign('url_domain', '');
$this->assign('version', $CONF['version'] ?? 'unknown');
diff --git a/public/index.php b/public/index.php
index 1554a10d..bbbc5734 100644
--- a/public/index.php
+++ b/public/index.php
@@ -42,7 +42,7 @@ if ($CONF['configured']) {
Welcome to Postfix Admin
-
+
Welcome to Postfix Admin
What is it?
Postfix Admin is a web based interface to configure and manage a Postfix based email server for many users.
@@ -83,9 +83,9 @@ if ($CONF['configured']) {
Postfix Admin Web sites
For further help, or documentation please check out -
diff --git a/public/users/edit-alias.php b/public/users/edit-alias.php
index fdcfd118..731c6832 100644
--- a/public/users/edit-alias.php
+++ b/public/users/edit-alias.php
@@ -18,10 +18,10 @@
*
*/
-$rel_path = '../';
require_once('../common.php');
$smarty = PFASmarty::getInstance();
+$smarty->configureTheme('../');
$smarty->assign('smarty_template', 'users_edit-alias');
diff --git a/public/users/login.php b/public/users/login.php
index 49b73dd6..85898f8c 100644
--- a/public/users/login.php
+++ b/public/users/login.php
@@ -31,6 +31,7 @@ $rel_path = '../';
require_once("../common.php");
$smarty = PFASmarty::getInstance();
+$smarty->configureTheme('../');
check_db_version(); # check if the database layout is up to date (and error out if not)
diff --git a/public/users/main.php b/public/users/main.php
index 83275275..f982986f 100644
--- a/public/users/main.php
+++ b/public/users/main.php
@@ -28,6 +28,7 @@ authentication_require_role('user');
$USERID_USERNAME = authentication_get_username();
$smarty = PFASmarty::getInstance();
+$smarty->configureTheme('../');
$vh = new VacationHandler($USERID_USERNAME);
if ($vh->check_vacation()) {
diff --git a/public/users/password-change.php b/public/users/password-change.php
index d089e5b7..4c5479cc 100644
--- a/public/users/password-change.php
+++ b/public/users/password-change.php
@@ -25,6 +25,8 @@
* fUsername
*/
+$smarty = PFASmarty::getInstance();
+
if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
$rel_path = '../';
$context = 'users';
@@ -35,7 +37,6 @@ if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
require_once($rel_path . 'common.php');
$CONF = Config::getInstance()->getAll();
-$smarty = PFASmarty::getInstance();
$smarty->configureTheme($rel_path);
diff --git a/public/users/password.php b/public/users/password.php
index 0979a1cd..8de65457 100644
--- a/public/users/password.php
+++ b/public/users/password.php
@@ -26,16 +26,16 @@
* fPassword2
*/
-$rel_path = '../';
require_once('../common.php');
+$smarty = PFASmarty::getInstance();
+$smarty->configureTheme('../');
authentication_require_role('user');
$username = authentication_get_username();
$pPassword_password_text = "";
$pPassword_password_current_text = "";
-$smarty = PFASmarty::getInstance();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (safepost('token') != $_SESSION['PFA_token']) {
diff --git a/public/users/vacation.php b/public/users/vacation.php
index 8fb70285..f796e8dd 100644
--- a/public/users/vacation.php
+++ b/public/users/vacation.php
@@ -16,9 +16,10 @@
*
*/
-$rel_path = '../';
require_once('../common.php');
+$smarty = PFASmarty::getInstance();
+$smarty->configureTheme('../');
require_once('../vacation.php');
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
diff --git a/templates/header.tpl b/templates/header.tpl
index 0a6d9cd2..e37955a0 100644
--- a/templates/header.tpl
+++ b/templates/header.tpl
@@ -1,4 +1,3 @@
-
@@ -14,9 +13,9 @@
{/if}
-
-
-
-
+
+
+
+
diff --git a/templates/index.tpl b/templates/index.tpl
index 0784d054..f11f2395 100644
--- a/templates/index.tpl
+++ b/templates/index.tpl
@@ -1,4 +1,3 @@
-
{strip}
{include file="header.tpl"}
{if $smarty_template !== 'login' && $smarty_template !== 'password-recover' && $smarty_template !== 'password-change'}
diff --git a/templates/vacation.tpl b/templates/vacation.tpl
index 76b2dcd4..65ad8a49 100644
--- a/templates/vacation.tpl
+++ b/templates/vacation.tpl
@@ -60,12 +60,13 @@