Changeset 74 for trunk/www/Application/Model
- Timestamp:
- Aug 23, 2009, 9:38:51 PM (15 years ago)
- Location:
- trunk/www/Application/Model
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/Model/Cluster.php
r69 r74 6 6 { 7 7 $this->System = $System; 8 $this->Config = $System->Config; 8 9 $this->Database = $System->Database; 9 10 … … 20 21 } 21 22 23 function MigrateRealm($RealmId) 24 { 25 } 26 27 function MigrateServer($ServerId) 28 { 29 } 22 30 } 23 31 -
trunk/www/Application/Model/Include.php
r69 r74 11 11 include('Application/Model/Platform.php'); 12 12 include('Application/Model/History.php'); 13 include('Application/Model/Shell.php');14 13 15 14 ?> -
trunk/www/Application/Model/Shell.php
r69 r74 21 21 } 22 22 23 function Show()24 {25 global $System;26 27 $Output = '';28 if(count($_SERVER['argv']) > 1)29 {30 $Command = $_SERVER['argv'][1];31 if($Command == 'ServerProcessLog')32 {33 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2]))34 {35 $MangosDebug = new MangosDebug($this->Database);36 $Output = $MangosDebug->ProcessLog($_SERVER['argv'][2]);37 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.';38 } else39 if($Command == 'ServerLock')40 {41 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2]))42 {43 $Server = new Server($this->Database, $_SERVER['argv'][2]);44 $Server->Lock();45 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.';46 } else47 23 if($Command == 'ServerUnLock') 48 24 { -
trunk/www/Application/Model/User.php
r69 r74 38 38 var $User = array(); 39 39 var $DefaultRole = 2; 40 var $AnonymousUserId = 1;41 40 var $OnlineStateTimeout = 600; // in seconds 42 41 … … 50 49 { 51 50 $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'); 53 52 $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']); 54 53 } … … 57 56 $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"'); 58 57 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'])); 60 59 //echo($this->Database->LastQuery); 61 60 … … 63 62 $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"'); 64 63 $Row = $Query->fetch_assoc(); 65 if($Row['User'] != $this-> AnonymousUserId)64 if($Row['User'] != $this->Config['Web']['UserAnonymousId']) 66 65 { 67 66 $Query = $this->Database->select('User', '*', 'Id='.$Row['User']); … … 70 69 } else 71 70 { 72 $Query = $this->Database->select('User', '*', 'Id='.$this-> AnonymousUserId);71 $Query = $this->Database->select('User', '*', 'Id='.$this->Config['Web']['UserAnonymousId']); 73 72 $this->User = $Query->fetch_assoc(); 74 73 $Result = USER_NOT_LOGGED; … … 162 161 { 163 162 $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'])); 165 164 $this->System->Modules['Log']->NewRecord('User', 'Logout', $this->User['Login']); 166 165 $this->Check();
Note:
See TracChangeset
for help on using the changeset viewer.