Changeset 111 for branches/php
- Timestamp:
- Jan 19, 2014, 12:43:49 AM (11 years ago)
- Location:
- branches/php
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/php
- Property svn:ignore
-
old new 1 2 1 config.php 3 4 2 error.log 3 .project
-
- Property svn:ignore
-
branches/php/Base/User.php
r22 r111 11 11 function LoadData() 12 12 { 13 $DbResult = $this->System->Database->select('User', '*', 'Id='.$this->Id); 14 if($DbResult->num_rows > 0) 15 { 16 $this->Data = $DbResult->fetch_assoc(); 17 if($this->Data['Rank'] == '') $this->Data['Rank'] = 0; 18 } else throw new Exception('User with id '.$this->Id.' not found'); 13 if($this->Id != null) 14 { 15 $DbResult = $this->System->Database->select('User', '*', 'Id='.$this->Id); 16 if($DbResult->num_rows > 0) 17 { 18 $this->Data = $DbResult->fetch_assoc(); 19 if($this->Data['Rank'] == '') $this->Data['Rank'] = 0; 20 } else throw new Exception('User with id '.$this->Id.' not found'); 21 } else $this->Data = array(); 19 22 } 20 23 -
branches/php/Base/UserOnline.php
r22 r111 7 7 var $Id; 8 8 var $User; 9 var $AnonymousUserId;10 9 11 10 function __construct($System) 12 11 { 13 12 parent::__construct($System); 14 $this->Id = 0; 15 $this->AnonymousUserId = 98; 16 $this->User = $this->AnonymousUserId; 13 $this->Id = null; 17 14 } 18 15 … … 31 28 { 32 29 // Create new record 33 $this->System->Database->insert('UserOnline', array('User' => $this->AnonymousUserId,30 $this->System->Database->insert('UserOnline', array('User' => null, 34 31 'ActivityTime' => 'NOW()', 'SessionId' => '"'.session_id().'"', 35 32 'IpAddress' => '"'.$this->System->GetRemoteAddress().'"', … … 54 51 { 55 52 $this->System->Database->update('UserOnline', 'SessionId="'.session_id().'"', 56 array('User' => $this->AnonymousUserId));57 $this->User = $this->AnonymousUserId;53 array('User' => null)); 54 $this->User = null; 58 55 } 59 56 } -
branches/php/CustomOutput.php
r28 r111 45 45 $Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Localization->Translate('Links'), $this->System->Navigation->MakeLink('Main', 'Links')).'</li>'; 46 46 $Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Localization->Translate('Contact'), $this->System->Navigation->MakeLink('Main', 'Contact')).'</li>'; 47 if($this->System->UserOnline->User == $this->System->UserOnline->AnonymousUserId)47 if($this->System->UserOnline->User == null) 48 48 { 49 49 $Output .= '</ul>'; -
branches/php/Module/User/Controller.php
r22 r111 6 6 include_once(dirname(__FILE__).'/../../Base/HTML/ListWebObject.php'); 7 7 include_once(dirname(__FILE__).'/../../Base/HTML/Controller.php'); 8 include_once(dirname(__FILE__).'/../Lift/Controller.php');9 8 10 9 class UserLoginWebObject extends AddWebObject
Note:
See TracChangeset
for help on using the changeset viewer.