diff --git a/public_html/index.php b/public_html/index.php
index 0fde11e..cffc38d 100755
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -121,17 +121,14 @@
// session timeout
echo "\n\t},\n";
echo "\tsession: {\n";
- echo "\t\ttimeout: '".( (ini_get('session.gc_maxlifetime')+$session_warn*60) * 1000 )."'\n";
+ echo "\t\ttimeout: '".( (ini_get('session.gc_maxlifetime')-$session_warn*60) * 1000 )."'\n";
echo "\n\t}\n";
echo "};\n\n";
// {3} Function that reloads or logout the user
echo "var KEEP_SESSION = function(keep){\n";
- echo "\tif( keep )\n";
- echo "\t\tdocument.location = '';\n";
- echo "\telse\n";
- echo "\t\tdocument.location = '/logout';\n";
+ echo "\tdocument.location = ( keep ) ? '' : '/logout';\n";
echo "};\n\n";
// {4} Function called at session timeout
@@ -141,7 +138,7 @@
echo "\tvar popup = new Popup();\n";
echo "\tvar popup_content = {\n";
echo "\t\ttitle: 'Expiration de connexion',\n";
- echo "\t\tcontent: 'Vous n\'avez rien fait depuis un moment. Vous serez déconnecté dans 5 minutes. Vous pouvez recharger la page pour garder votre connexion.',\n";
+ echo "\t\tcontent: 'Vous n\'avez rien fait depuis un moment. Vous serez déconnecté dans ".round(.5+$session_warn)." minutes. Vous pouvez recharger la page pour garder votre connexion.',\n";
echo "\t\ttype: 'search',\n";
echo "\t\taction: 'Recharger la page'\n";
echo "\t}\n";
@@ -150,7 +147,7 @@
echo "\tpopup.ask(popup_content, KEEP_SESSION);\n";
// {4.3} Logout by default 5min if no popup response
- echo "\tsetTimeout(function(){ KEEP_SESSION(false); }, $session_warn*60*1000);\n";
+ echo "\tsetTimeout(function(){ KEEP_SESSION(false); }, (.5+$session_warn)*60*1000);\n";
echo "};\n\n";
diff --git a/public_html/view/warehouse.php b/public_html/view/warehouse.php
index 6625b82..be8243c 100755
--- a/public_html/view/warehouse.php
+++ b/public_html/view/warehouse.php
@@ -22,6 +22,8 @@
+
+