Changeset 192 for trunk/index.php
- Timestamp:
- Apr 26, 2009, 11:30:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r189 r192 104 104 $Output2 = ''; 105 105 106 $DbResult = $this->Database-> select('hosts', 'COUNT(*)', 'show_online=1');106 $DbResult = $this->Database->query('SELECT COUNT(*) FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE HostType.ShowOnline = 1'); 107 107 $DbRow = $DbResult->fetch_array(); 108 108 $TotalComputers = $DbRow[0]; 109 109 110 $DbResult = $this->Database-> select('hosts', 'COUNT(*)', 'show_online=1 AND online=1');110 $DbResult = $this->Database->query('SELECT COUNT(*) FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE (HostType.ShowOnline = 1) AND (hosts.online = 1)'); 111 111 $DbRow = $DbResult->fetch_array(); 112 112 $OnlineComputers = $DbRow[0]; … … 118 118 $TotalUser = $DbRow[0]; 119 119 120 $DbResult = $this->Database-> select('hosts', 'COUNT(DISTINCT(user))', 'show_online=1 AND online=1');120 $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'); 121 121 $DbRow = $DbResult->fetch_array(); 122 122 $OnlineUser = $DbRow[0]; … … 173 173 function OnlineHostList() 174 174 { 175 global $Database;176 177 175 $Output = '<div class="PanelTitle">Online počítače</div><span style="font-size: smaller;">'; 178 $DbResult = $ Database->select('hosts', '*', 'online=1 AND show_online=1 ORDER BYname');176 $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'); 179 177 while($Row = $DbResult->fetch_array()) 180 178 {
Note:
See TracChangeset
for help on using the changeset viewer.