Changeset 647 for trunk/include/user.inc.php
- Timestamp:
- Dec 18, 2004, 11:05:30 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/user.inc.php
r593 r647 60 60 $page['session_id'] = $session_id; 61 61 $query = ' 62 SELECT user_id,expiration, ip62 SELECT user_id,expiration,NOW() AS now 63 63 FROM '.SESSIONS_TABLE.' 64 64 WHERE id = \''.$page['session_id'].'\' … … 68 68 { 69 69 $row = mysql_fetch_array($result); 70 if ( !$user['has_cookie'])70 if (strnatcmp($row['expiration'], $row['now']) < 0) 71 71 { 72 if ($row['expiration'] < time()) 73 { 74 // deletion of the session from the database, 75 // because it is out-of-date 76 $delete_query = 'DELETE FROM '.SESSIONS_TABLE; 77 $delete_query.= " WHERE id = '".$page['session_id']."'"; 78 $delete_query.= ';'; 79 pwg_query($delete_query); 80 } 81 else if ($_SERVER['REMOTE_ADDR'] == $row['ip']) 82 { 83 $query_user .= ' WHERE id = '.$row['user_id']; 84 $query_done = true; 85 } 72 // deletion of the session from the database, because it is 73 // out-of-date 74 $delete_query = ' 75 DELETE FROM '.SESSIONS_TABLE.' 76 WHERE id = \''.$page['session_id'].'\' 77 ;'; 78 pwg_query($delete_query); 86 79 } 87 80 else
Note: See TracChangeset
for help on using the changeset viewer.