diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index bf5df99fe90f954b8401f1edc99b5f5cae3d3783..353297a1efa36c20ff00ae45ef9f9c299c89195c 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -53,15 +53,15 @@ class app { $this->load('db_'.$this->_conf['db_type']); $this->db = new db; } - if($this->_conf['start_session'] == true) { + + //* Start the session + if($conf["start_session"] == true) { session_start(); - //* Initialise vars if session is not set - if( !isset($_SESSION['s']['id']) ){ - $_SESSION['s'] = array( 'id' => session_id(), - 'theme' => $this->_conf['theme'], - 'language' => $this->_conf['language'] - ); - } + + //* Initialize session variables + if(!isset($_SESSION['s']['id']) ) $_SESSION["s"]['id'] = session_id(); + if(empty($_SESSION["s"]["theme"])) $_SESSION["s"]['theme'] = $conf['theme']; + if(empty($_SESSION["s"]["language"])) $_SESSION["s"]['language'] = $conf['language']; } } diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php index 16f7557746a69b44e391d542071ab9b81fadf700..efe42f9c355f29c039fdfd137cffd975f2bc4855 100644 --- a/interface/lib/config.inc.php +++ b/interface/lib/config.inc.php @@ -27,7 +27,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -error_reporting(E_ALL|E_STRICT); +error_reporting(E_ALL|E_NOTICE); header('Pragma: no-cache'); header('Cache-Control: no-store, no-cache, max-age=0, must-revalidate'); diff --git a/interface/web/js/scrigo.js b/interface/web/js/scrigo.js index 26d270ad9dceda20829fbb1aac825ac6a35af7ea..703c6262263d3e117ff309381b1c4da30c17bcb7 100644 --- a/interface/web/js/scrigo.js +++ b/interface/web/js/scrigo.js @@ -61,7 +61,7 @@ function submitLoginForm(formname) { var userNameObj = frm.username; if(userNameObj.value == ''){ userNameObj.focus(); - return;q + return; } var passwordObj = frm.passwort; if(passwordObj.value == ''){ diff --git a/interface/web/login/index.php b/interface/web/login/index.php index b59a760db10a8fb30415025679ff9c71ca4f09a4..7e1efad3f62dbb155bb83665e9f0cb0f52546050 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -36,11 +36,12 @@ public $status = ''; private $target = ''; public function render() { + if(isset($_SESSION['s']['user']) && is_array($_SESSION['s']['user']) && is_array($_SESSION['s']['module'])) { die('HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage']); } - global $app; + global $app, $conf; $app->uses('tpl'); $app->tpl->newTemplate('form.tpl.htm'); @@ -64,14 +65,14 @@ public function render() { $_SESSION['s']['user'] = $user; $_SESSION['s']['user']['theme'] = isset($user['app_theme']) ? $user['app_theme'] : 'default'; $_SESSION['s']['language'] = $user['language']; - //print_r($_SESSION); + $_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme']; + if(is_file($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) { include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'); $_SESSION['s']['module'] = $module; } - echo 'HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage']; - //echo 'HEADER_REDIRECT:content.php?s_mod=admin&s_pg=index'; + exit; } else { $error = $app->lng(1003); diff --git a/interface/web/mail/mail_domain_list.php b/interface/web/mail/mail_domain_list.php index ffe2ecd1811a6f624df508eb63d713210a16b686..ee8d88c70cc4901e4ca0487f6137528298e6ca81 100644 --- a/interface/web/mail/mail_domain_list.php +++ b/interface/web/mail/mail_domain_list.php @@ -12,8 +12,9 @@ $list_def_file = "list/mail_domain.list.php"; * End Form configuration ******************************************/ + // Checking module permissions -if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { +if(!stristr($_SESSION["s"]["user"]["modules"],'mail')) { header("Location: ../index.php"); exit; }