Changeset 683 for trunk/inc


Ignore:
Timestamp:
Jan 23, 2010, 5:23:04 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Nové sloupce Enabled pro povolení/zakázání světů, přihlšaovacích serverů a počítačů.
Location:
trunk/inc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/realm.php

    r681 r683  
    1111    parent::__construct($System);
    1212    $this->Id = $Id;
    13     $DbResult = $this->Database->query('SELECT * FROM Realm WHERE Id='.$Id);
     13    $DbResult = $this->Database->query('SELECT * FROM Realm WHERE Id='.$Id.' AND Enabled=1');
    1414    $this->Data = $DbResult->fetch_assoc();
    1515    $this->CharactersDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseCharacters']);
  • trunk/inc/server.php

    r681 r683  
    1313    parent::__construct($System);
    1414    $this->Id = $Id;
    15     $DbResult = $this->Database->query('SELECT * FROM Logon WHERE Id='.$Id);
     15    $DbResult = $this->Database->query('SELECT * FROM Logon WHERE Id='.$Id.' AND Enabled=1' );
    1616    $this->Data = $DbResult->fetch_assoc();
    1717    $this->ServerDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseRealmd']);
     
    5353  {
    5454    $TotalCount = 0;
    55     $DbResult = $this->Database->query('SELECT Id FROM Realm');
     55    $DbResult = $this->Database->query('SELECT Id FROM Realm WHERE Enabled=1');
    5656    while($DbRow = $DbResult->fetch_assoc())
    5757    {
     
    7171  {
    7272    $TotalCount = 0;
    73     $DbResult = $this->Database->query('SELECT Id FROM Realm');
     73    $DbResult = $this->Database->query('SELECT Id FROM Realm WHERE Enabled=1');
    7474    while($DbRow = $DbResult->fetch_assoc())
    7575    {
     
    372372  {
    373373    $Output = '';
    374     $DbResult = $this->Database->query('SELECT COUNT(*) FROM Realm');
     374    $DbResult = $this->Database->query('SELECT COUNT(*) FROM Realm WHERE Enabled=1');
    375375    $DbRow = $DbResult->fetch_row();
    376376    $RealmCount = $DbRow[0];
  • trunk/inc/update_state.php

    r682 r683  
    1313// Check logon servers
    1414$System = new System($Config);
    15 $DbResult = $System->Database->query('SELECT Logon.Id, Host.Address, Logon.Port FROM Logon JOIN Host ON Host.Id=Logon.Host');
     15$DbResult = $System->Database->query('SELECT Logon.Id, Host.Address, Logon.Port FROM Logon JOIN Host ON Host.Id=Logon.Host AND Logon.Enabled=1');
    1616while($Logon = $DbResult->fetch_assoc())
    1717{
     
    2323
    2424// Check realms
    25 $DbResult = $System->Database->query('SELECT Realm.Id, Host.Address, Realm.Port FROM Realm JOIN Host ON Host.Id=Realm.Host');
     25$DbResult = $System->Database->query('SELECT Realm.Id, Host.Address, Realm.Port FROM Realm JOIN Host ON Host.Id=Realm.Host AND Realm.Enabled=1');
    2626while($Realm = $DbResult->fetch_assoc())
    2727{
Note: See TracChangeset for help on using the changeset viewer.