Ignore:
Timestamp:
Aug 23, 2009, 9:38:51 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Zobrazení počítačů ve skupině.
  • Opraveno: Různé opravy změny struktury tříd.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Application/Model/User.php

    r69 r74  
    3838  var $User = array();
    3939  var $DefaultRole = 2;
    40   var $AnonymousUserId = 1;
    4140  var $OnlineStateTimeout = 600; // in seconds
    4241
     
    5049    {
    5150      $this->System->Modules['User']->User['Id'] = $DbRow['User'];
    52       if($DbRow['User'] != $this->AnonymousUserId) $this->System->Modules['Log']->NewRecord('User', 'Logout');
     51      if($DbRow['User'] != $this->Config['Web']['UserAnonymousId']) $this->System->Modules['Log']->NewRecord('User', 'Logout');
    5352      $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']);
    5453    }
     
    5756    $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"');
    5857    if($Query->num_rows == 0)
    59       $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $this->AnonymousUserId, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 'ScriptName' => $_SERVER['PHP_SELF']));
     58      $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $this->Config['Web']['UserAnonymousId'], 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 'ScriptName' => $_SERVER['PHP_SELF']));
    6059    //echo($this->Database->LastQuery);
    6160
     
    6362    $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"');
    6463    $Row = $Query->fetch_assoc();
    65     if($Row['User'] != $this->AnonymousUserId)
     64    if($Row['User'] != $this->Config['Web']['UserAnonymousId'])
    6665    {
    6766      $Query = $this->Database->select('User', '*', 'Id='.$Row['User']);
     
    7069    } else
    7170    {
    72       $Query = $this->Database->select('User', '*', 'Id='.$this->AnonymousUserId);
     71      $Query = $this->Database->select('User', '*', 'Id='.$this->Config['Web']['UserAnonymousId']);
    7372      $this->User = $Query->fetch_assoc();
    7473      $Result = USER_NOT_LOGGED;
     
    162161  {
    163162    $SID = session_id();
    164     $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $this->AnonymousUserId));
     163    $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $this->Config['Web']['UserAnonymousId']));
    165164    $this->System->Modules['Log']->NewRecord('User', 'Logout', $this->User['Login']);
    166165    $this->Check();
Note: See TracChangeset for help on using the changeset viewer.