Changeset 68
- Timestamp:
- Aug 9, 2009, 8:28:30 AM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r64 r68 296 296 $RealmView = new RealmView($this->Database, $this->System); 297 297 $Output .= $RealmView->Stop(); 298 } else 299 if($_GET['Action'] == 'UpdateRealmCharacters') 300 { 301 $Server = new Server($this->Database, $_GET['Id']); 302 $Output .= $Server->UpdateRealmlistAccountCount(); 298 303 } else 299 304 if($_GET['Action'] == 'Test') -
trunk/www/model/server.php
r67 r68 330 330 return($DbRow[0]); 331 331 } 332 333 function UpdateRealmlistAccountCount() 334 { 335 global $Config; 336 337 $this->Database->query('TRUNCATE TABLE server'.$this->Id.'_realmd.realmcharacters'); 338 $DbResult = $this->Database->select('Realm', '*', 'Server = '.$this->Id); 339 while($Realm = $DbResult->fetch_assoc()) 340 { 341 $this->Database->query('INSERT INTO server'.$this->Id.'_realmd.realmcharacters (SELECT '.$Realm['Id'].' AS realmid, server'.$this->Id.'_realmd.account.id AS acctid, (SELECT COUNT(*) FROM realm'.$Realm['Id'].'_characters.characters WHERE realm'.$Realm['Id'].'_characters.characters.account = server'.$this->Id.'_realmd.account.id) AS numchars FROM server'.$this->Id.'_realmd.account)'); 342 } 343 } 332 344 } 333 345 -
trunk/www/view/server.php
r63 r68 151 151 //$Output .= ' <a href="?Action=ServerDatabaseImport&Id='.$Server->Id.'">Načtení čisté databáze</a>'; 152 152 $Output .= ' <a href="?Action=RealmAdd&Id='.$Server->Id.'">Vytvořit nový svět</a>'; 153 $Output .= ' <a href="?Action=UpdateRealmCharacters&Id='.$Server->Id.'">Aktualizovat počty postav</a>'; 153 154 } 154 155 $Output .= ' <a href="?Action=GameAccountRegister&Id='.$Server->Id.'">Vytvoření herního účtu</a>';
Note:
See TracChangeset
for help on using the changeset viewer.