Changeset 208 for trunk/index.php


Ignore:
Timestamp:
May 6, 2009, 8:21:23 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Tabulka hosts rozdělena na NetworkDevice, NetworkInterface, NetworkInterfaceType a NetworkLink. Jeden počítač může mít více rozhraní. Nově se již nepočítá pouze s stromovou topologií, ale s celkovou sítí s okruhy. Sloupce Parent byl proto nahrazen tabulkou NetworkLink, ve které jsou uchovány informace o tom, co kam je připojeno. Každé rozhraní má definovaný typ dle NetworkInterfaceType.
  • Upraveno: Tabulka HostType přejmenována na NetworkDeviceType.
  • Smazáno: Původní složka komunikačního programu sunrisechat. Nově nahrazena složkou chat pro podporu IRC.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r203 r208  
    107107    $Output2 = '';
    108108
    109     $DbResult = $this->Database->query('SELECT COUNT(*) FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE HostType.ShowOnline = 1');
     109    $DbResult = $this->Database->query('SELECT COUNT(*) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDeviceType.ShowOnline = 1');
    110110    $DbRow = $DbResult->fetch_array();
    111111    $TotalComputers = $DbRow[0];
    112112
    113     $DbResult = $this->Database->query('SELECT COUNT(*) FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE (HostType.ShowOnline = 1) AND (hosts.online = 1)');
     113    $DbResult = $this->Database->query('SELECT COUNT(*) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1)');
    114114    $DbRow = $DbResult->fetch_array();
    115115    $OnlineComputers = $DbRow[0];
     
    121121    $TotalUser = $DbRow[0];
    122122
    123     $DbResult = $this->Database->query('SELECT COUNT(DISTINCT(user)) FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE HostType.ShowOnline = 1 AND hosts.online = 1');
     123    $DbResult = $this->Database->query('SELECT COUNT(DISTINCT(Member)) FROM NetworkDevice LEFT JOIN HostType ON HostType.Id = NetworkDevice.Type WHERE HostType.ShowOnline = 1 AND NetworkDevice.Online = 1');
    124124    $DbRow = $DbResult->fetch_array();
    125125    $OnlineUser = $DbRow[0];
     
    177177  {
    178178    $Output = '<div class="PanelTitle">Online počítače</div><span style="font-size: smaller;">';
    179     $DbResult = $this->Database->query('SELECT hosts.name FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE (HostType.ShowOnline = 1) AND (hosts.online = 1) ORDER BY hosts.name');
    180     while($Row = $DbResult->fetch_array())
    181     {
    182       $Output .= $Row['name'].'<br />';
     179    $DbResult = $this->Database->query('SELECT NetworkDevice.Name FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1) ORDER BY NetworkDevice.Name');
     180    while($Device = $DbResult->fetch_array())
     181    {
     182      $Output .= $Device['Name'].'<br />';
    183183    }
    184184    $Output .= '</span>';
Note: See TracChangeset for help on using the changeset viewer.