Calculate timeout for automatic logout according to PHP configuration 2010-06-02_customer
authorJoey Schulze <joey@infodrom.org>
Wed, 2 Jun 2010 12:59:02 +0000 (14:59 +0200)
committerJoey Schulze <joey@infodrom.org>
Wed, 2 Jun 2010 12:59:02 +0000 (14:59 +0200)
index.php

index 688a57e..e9145b6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,13 +8,16 @@ $menu = menu();
 $html = process();
 $debug = debug_info();
 
+$gcml = ini_get('session.gc_maxlifetime');
+$refresh = $gcml < 8*60*60 ? $gcml + 60*60 : $gcml;
+
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de">
 <head>
 <title>Kostenleistungsrechnung Friesoyther Wasseracht</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta http-equiv="refresh" content="14400; URL=./?logout=true ">
+<meta http-equiv="refresh" content="<?=$refresh?>; URL=./?logout=true ">
 <?=load_js($jsfiles, $jscode);?>
 <link href="stylesheet.css" rel="stylesheet" type="text/css">
 <link href="style.css" rel="stylesheet" type="text/css">