Changeset 57 for trunk/www/model/user.php
- Timestamp:
- Aug 4, 2009, 5:32:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/model/user.php
r54 r57 148 148 else 149 149 { 150 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()', 'LastIpAddress' => GetRemoteAddress())); 150 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()', 'LastIpAddress' => GetRemoteAddress())); 151 151 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $Row['Id'])); 152 152 // načtení stavu stromu … … 216 216 function CheckPermission($Module, $Operation, $ItemType = '', $ItemIndex = 0) 217 217 { 218 218 $DbResult = $this->Database->select('PermissionOperation', 'Id', '`Module`="'.$Module.'" AND `Item`="'.$ItemType.'" AND `ItemId`='.$ItemIndex.' AND `Operation`="'.$Operation.'"'); 219 219 if($DbResult->num_rows > 0) 220 220 { … … 272 272 return($Output); 273 273 } 274 275 function ServerCount() 276 { 277 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->User['Id']); 278 $DbRow = $DbResult->fetch_row(); 279 return($DbRow[0]); 280 } 281 282 function RealmCount() 283 { 284 $Total = 0; 285 $DbResult = $this->Database->query('SELECT Id FROM Server WHERE User='.$this->User['Id']); 286 while($DbRow = $DbResult->fetch_assoc()) 287 { 288 $Server = new Server($this->Database, $DbRow['Id']); 289 $Total += $Server->RealmCount(); 290 } 291 return($Total); 292 } 274 293 } 275 294
Note:
See TracChangeset
for help on using the changeset viewer.