comparison Includes/Loginsys.class.php @ 9:eb5bff360deb

TIME_SESSION_EXPIRES: now class const
author Meillo r e t u r n s <meillo@marmaro.de>
date Thu, 14 Dec 2006 21:51:44 +0100
parents a3a651f0cac6
children 144bc36a6c27
comparison
equal deleted inserted replaced
8:2672cd855fa2 9:eb5bff360deb
10 /// Consts 10 /// Consts
11 11
12 /** 12 /**
13 * time in seconds till the session expires 13 * time in seconds till the session expires
14 */ 14 */
15 define('TIME_SESSION_EXPIRES', 1800); 15 const TIME_SESSION_EXPIRES = 1800;
16 16
17 17
18 18
19 /// Constructors 19 /// Constructors
20 20
61 * proves if the user is logged in and if he wan't to long inactive 61 * proves if the user is logged in and if he wan't to long inactive
62 * 62 *
63 * @return bool 'true' if user is logged in, else 'false' 63 * @return bool 'true' if user is logged in, else 'false'
64 */ 64 */
65 public function loggedIn() { // return login-status --------------------------------------------- 65 public function loggedIn() { // return login-status ---------------------------------------------
66 return (isset($_SESSION[login][id]) && $_SESSION[login][logintime] > time()-TIME_SESSION_EXPIRES); 66 return (isset($_SESSION[login][id]) && $_SESSION[login][logintime] > time()-self::TIME_SESSION_EXPIRES);
67 } 67 }
68 68
69 69
70 /** 70 /**
71 * writes the current timestamp into the session 71 * writes the current timestamp into the session