Changeset 40 for branches/2/user.php
- Timestamp:
- Jan 24, 2009, 5:55:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2/user.php
r9 r40 20 20 var $DefaultRole = 2; 21 21 var $AnonymousUserId = 1; 22 22 23 23 function Check() 24 24 { … … 31 31 // Refresh time of last access 32 32 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('Time' => 'NOW()')); 33 } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $ AnonymousUserId, 'Time' => 'NOW()', 'IpAddress' => (gethostbyaddr(GetRemoteAddress()).' '.GetRemoteAddress())));33 } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $this->AnonymousUserId, 'Time' => 'NOW()', 'HostAddress' => (gethostbyaddr(GetRemoteAddress()).' '.GetRemoteAddress()))); 34 34 35 35 // Odeber neaktivní uživatele … … 37 37 38 38 // Zkontroluj přihlášení 39 $ Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"');40 $Row = $ Query->fetch_array();39 $DbResult = $this->Database->select('UserOnline', 'User', 'SessionId="'.$SID.'"'); 40 $Row = $DbResult->fetch_assoc(); 41 41 if($Row['User'] != $this->AnonymousUserId) 42 42 {
Note:
See TracChangeset
for help on using the changeset viewer.