Marius Burkard
2016-05-04 c3189ce6c7301c3ec17878fd3918f31d0d3cb18a
interface/web/index.php
old mode 100755 new mode 100644
@@ -31,10 +31,17 @@
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');
$app->tpl->setVar('startpage', isset($_SESSION['s']['module']['startpage']) ? $_SESSION['s']['module']['startpage'] : '');
$app->tpl->setVar('logged_in', ($_SESSION['s']['user']['active'] != 1 ? 'n' : 'y'));
// tab change warning?
@@ -102,8 +109,9 @@
$app->tpl->setVar('base64_logo_txt', $base64_logo_txt);
// Title
$server_config = $app->getconf->get_server_config(1, 'server');
$app->tpl->setVar('server_name', $server_config['hostname']);
if (!empty($sys_config['company_name'])) {
   $app->tpl->setVar('company_name', $sys_config['company_name']. ' :: ');
}
$app->tpl_defaults();
$app->tpl->pparse();