From 606a2d96f218abda206d2ae0d705649ea226bdd0 Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Thu, 21 Jan 2016 04:06:29 -0500
Subject: [PATCH] DNSSEC-Switch: Implementation finished, tested And found a small bug (privkeys were not deleted on zone deletion) which is now fixed Testing successful. Doing last test then if everything goes well this will be the new merge request
---
interface/web/index.php | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/interface/web/index.php b/interface/web/index.php
index af91b26..6340467 100644
--- a/interface/web/index.php
+++ b/interface/web/index.php
@@ -31,7 +31,13 @@
require_once '../lib/config.inc.php';
require_once '../lib/app.inc.php';
-if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'login';
+// Check if we have an active users ession and redirect to login if thats not the case.
+if($_SESSION['s']['user']['active'] != 1) {
+ header('Location: /login/');
+ die();
+}
+
+if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'dashboard';
$app->uses('tpl');
$app->tpl->newTemplate('main.tpl.htm');
@@ -97,10 +103,13 @@
}
$tmp_base64 = explode(',', $base64_logo_txt, 2);
$logo_dimensions = $app->functions->getimagesizefromstring(base64_decode($tmp_base64[1]));
-$app->tpl->setVar('base64_logo_width', $logo_dimensions[0]);
-$app->tpl->setVar('base64_logo_height', $logo_dimensions[1]);
+$app->tpl->setVar('base64_logo_width', $logo_dimensions[0].'px');
+$app->tpl->setVar('base64_logo_height', $logo_dimensions[1].'px');
$app->tpl->setVar('base64_logo_txt', $base64_logo_txt);
+// Title
+$app->tpl->setVar('company_name', $sys_config['company_name']. ' :: ');
+
$app->tpl_defaults();
$app->tpl->pparse();
?>
--
Gitblit v1.9.1