Automatically redirect to logout page if session seems to be expired
[infodrom/hallinta] / index.php
index 4dbfdb6..6241918 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,34 +1,34 @@
 <?php
-require_once('config.php');
-require_once('lib/general.php');
+require_once('init.php');
+require_once('lib/menu.php');
 
 $jsfiles = array('lib/json_parse.js');
 $jscode = '';
+$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</title>
+<title><?=PAGETITLE?></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <?=load_js($jsfiles, $jscode);?>
 <link href="stylesheet.css" rel="stylesheet" type="text/css">
 <link href="style.css" rel="stylesheet" type="text/css">
+<link href="dropdown.css" rel="stylesheet" type="text/css">
+<link href="theme.php" rel="stylesheet" type="text/css">
+<?=load_style($style);?>
 </head>
 <body>
+<div id="logout_refresh" style="display: none;"><?=$refresh?></div>
 <div id="header">
-<h1>Kostenrechnung Friesoyther Wasseracht</h1>
- <div id="menu">
-  <ul id="nav">
-   <li><a href="#">Start</a></li>
-   <li><a href="#">Eingabe</a></li>
-   <li><a href="#">Abfragen</a></li>
-   <li><a href="#">FooBar</a></li>
-  </ul>
- </div>
+<h1><?=TITLE?></h1>
+<?=$menu; ?>
 </div>
 
 <div class="content">