Changeset 558 for trunk/Modules/Network/UserHosts.php
- Timestamp:
- Jul 21, 2013, 10:55:49 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/UserHosts.php
r548 r558 15 15 global $Config; 16 16 17 if($this->System->User->User['Id'] == '') return($this->SystemMessage('Nepovolený přístup', 'Nemáte oprávnění pro tuto operaci')); 17 18 $Output = '<div align="center" style="font-size: small;"><table class="WideTable">'; 18 19 $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>'; 19 $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id'].') ORDER BY NetworkDevice.Name'); 20 $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice '. 21 'LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type '. 22 'WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id'].') ORDER BY NetworkDevice.Name'); 20 23 while($Device = $DbResult->fetch_assoc()) 21 24 { 22 25 if($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = ''; 23 $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '.$Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>'; 26 $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '. 27 $Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>'; 24 28 $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']); 25 29 while($Interface = $DbResult2->fetch_assoc())
Note:
See TracChangeset
for help on using the changeset viewer.