summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6bbd38d)
raw | patch | inline | side by side (parent: 6bbd38d)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Dec 2005 12:29:35 +0000 (12:29 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Dec 2005 12:29:35 +0000 (12:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2256 594d385d-05f5-0310-b6e9-bd551577e9d8
html/index.php | patch | blob | history | |
html/logout.php | patch | blob | history | |
ihtml/themes/default/logout.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/html/index.php b/html/index.php
index 623d050bc29fa6287d3e47c759bc0f850f77d32e..fcfe3445bbe75a9809a6779621bc9b9dd07d3af1 100644 (file)
--- a/html/index.php
+++ b/html/index.php
}
/* 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 a5c8fd200cd9e5c5c93b295f39085067a93d35d0..aae94bc87896b9e950725fc1f0ba0b31ae494671 100644 (file)
--- a/html/logout.php
+++ b/html/logout.php
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"];
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
+</html>
diff --git a/ihtml/themes/default/logout.tpl b/ihtml/themes/default/logout.tpl
--- /dev/null
@@ -0,0 +1,14 @@
+<body style="background-color: white;background-image:none;">
+
+<form action='index.php' method='post' name='mainform' onSubmit='js_check(this);return true;'>
+<div style="margin-left:10%; margin-right:10%; margin-top:5%; border:2px solid red;padding-left:10px;padding-right:10px;padding-top:5px;padding-bottom:20px;">
+ <h1>{t}Your GOsa session has expired!{/t}</h1>
+ <p>
+ {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}
+ </p>
+ <br>
+ <center><input type="submit" name="dummy" value="{t}Sign in again{/t}"></center>
+</div>
+</form>
+
+</body>