Changeset 208 for trunk/index.php
- Timestamp:
- May 6, 2009, 8:21:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r203 r208 107 107 $Output2 = ''; 108 108 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'); 110 110 $DbRow = $DbResult->fetch_array(); 111 111 $TotalComputers = $DbRow[0]; 112 112 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)'); 114 114 $DbRow = $DbResult->fetch_array(); 115 115 $OnlineComputers = $DbRow[0]; … … 121 121 $TotalUser = $DbRow[0]; 122 122 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'); 124 124 $DbRow = $DbResult->fetch_array(); 125 125 $OnlineUser = $DbRow[0]; … … 177 177 { 178 178 $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 />'; 183 183 } 184 184 $Output .= '</span>';
Note:
See TracChangeset
for help on using the changeset viewer.