From: cajus Date: Thu, 8 Dec 2005 12:29:35 +0000 (+0000) Subject: Added message for timed out sessions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2e8e102c10ae78344e5f07a209f6e48cbfe2b9a7;p=gosa.git Added message for timed out sessions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2256 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/index.php b/html/index.php index 623d050bc..fcfe3445b 100644 --- a/html/index.php +++ b/html/index.php @@ -122,7 +122,7 @@ if ($config->data['MAIN']['FORCESSL'] == 'true' && $ssl != ''){ } /* Got a formular answer, validate and try to log in */ -if ($_SERVER["REQUEST_METHOD"] == "POST"){ +if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){ /* Reset error messages */ $message= ""; diff --git a/html/logout.php b/html/logout.php index a5c8fd200..aae94bc87 100644 --- a/html/logout.php +++ b/html/logout.php @@ -24,9 +24,36 @@ require_once ("../include/php_setup.inc"); require_once ("functions.inc"); session_start (); +/* Language setup */ +if ($config->data['MAIN']['LANG'] == ""){ + $lang= get_browser_language(); +} else { + $lang= $config->data['MAIN']['LANG']; +} +$lang.=".UTF-8"; +putenv("LANGUAGE="); +putenv("LANG=$lang"); +setlocale(LC_ALL, $lang); +$GLOBALS['t_language']= $lang; +$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; + +/* Set the text domain as 'messages' */ +$domain = 'messages'; +bindtextdomain($domain, "$BASE_DIR/locale"); +textdomain($domain); + /* Do logout-logging and destroy session */ if (!isset($_SESSION["ui"])){ - header ("Location: index.php"); + + /* Set template compile directory */ + $smarty= new smarty(); + if (isset ($config->data['MAIN']['COMPILE'])){ + $smarty->compile_dir= $config->data['MAIN']['COMPILE']; + } else { + $smarty->compile_dir= '/var/spool/gosa/'; + } + $smarty->display (get_template_path('headers.tpl')); + $smarty->display (get_template_path('logout.tpl')); exit; } $ui= $_SESSION["ui"]; @@ -43,3 +70,4 @@ header ("Location: index.php"); // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> + diff --git a/ihtml/themes/default/logout.tpl b/ihtml/themes/default/logout.tpl new file mode 100644 index 000000000..8bd088017 --- /dev/null +++ b/ihtml/themes/default/logout.tpl @@ -0,0 +1,14 @@ + + +
+
+

{t}Your GOsa session has expired!{/t}

+

+ {t}The last interaction with the GOsa web interface has been some time ago in the past. For security reasons, the session has been closed. To continue with administrative tasks, please sign in again.{/t} +

+
+
+
+
+ +