source: trunk/www/Module/Realm/ModelList.php

Last change on this file was 95, checked in by chronos, 10 years ago
  • Upraveno: Soubory různých logických částí systému odděleny do aplikačních modulů.
File size: 463 bytes
Line 
1<?php
2
3include_once(dirname(__FILE__).'/../../Base/Model.php');
4include_once(dirname(__FILE__).'/Server.php');
5
6class RealmList extends Model
7{
8 function RealmCount($UserId)
9 {
10 $Total = 0;
11 $DbResult = $this->Database->query('SELECT Id FROM Server WHERE User='.$UserId);
12 while($DbRow = $DbResult->fetch_assoc())
13 {
14 $Server = new Server($this->System, $DbRow['Id']);
15 $Total += $Server->RealmCount();
16 }
17 return($Total);
18 }
19}
Note: See TracBrowser for help on using the repository browser.