<?php
-if(!isset($_SESSION['last_request']) || $_SESSION['last_request'] >= (time() - 60*60)) { //TODO predelat timeout do konstanty v nastaveni
+
+// Logout user, if idle for more then LOGOUT_IDLE_SEC seconds
+
+if (( !isset($_SESSION['last_request'] ) ||
+ ( $_SESSION['last_request'] >= (time() - LOGOUT_IDLE_SEC))) {
$_SESSION['last_request'] = time();
} else {
require_once(INCLUDE_DIR."eventz/logout.inc");
logout();
}
+
+?>
define('DAILY_K',30);
define('REGISTRATION_VOTES',2); //too small so far
+// logout after one hour
+define('LOGOUT_IDLE_SEC', 3600);
+
// An attempt to remove hard-code constants from code
define('REGISTRATION_TEXT_NODE',791946);
define('REGISTRATION_REQUEST_NODE',2091448);