+//============================================================================
+//
+//
+function login_timeout()
+{
+ // skip timeout on logout page
+ if ($_SESSION["wa_current_user"]->logged
+ && !strpos($_SERVER['PHP_SELF'], 'logout.php')) {
+ $tout = $_SESSION["wa_current_user"]->timeout;
+ if ($tout && (time() > $_SESSION["wa_current_user"]->last_act + $tout))
+ {
+ $_SESSION["wa_current_user"]->logged = false;
+ }
+ $_SESSION["wa_current_user"]->last_act = time();
+ }
+}