Changeset 873 for trunk/Modules/Network/UserHosts.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Network/UserHosts.php
r738 r873 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 if ($this->System->User->User['Id'] == '') return ($this->SystemMessage('Nepovolený přístup', 'Nemáte oprávnění pro tuto operaci')); 18 18 $Output = '<div align="center" style="font-size: small;"><table class="WideTable">'; 19 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>'; … … 21 21 'LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type '. 22 22 'WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->User->User['Id'].') ORDER BY NetworkDevice.Name'); 23 while ($Device = $DbResult->fetch_assoc())23 while ($Device = $DbResult->fetch_assoc()) 24 24 { 25 if ($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = '';25 if ($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = ''; 26 26 $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '. 27 27 $Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>'; 28 28 $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']); 29 while ($Interface = $DbResult2->fetch_assoc())29 while ($Interface = $DbResult2->fetch_assoc()) 30 30 { 31 if ($Interface['Online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = '';31 if ($Interface['Online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = ''; 32 32 $InterfaceName = $Device['Name']; 33 if ($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];33 if ($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name']; 34 34 $Output .= '<tr><td style="text-align: left; '.$Style.'"> '. 35 35 $InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'. … … 39 39 } 40 40 $Output .= '</table></div>'; 41 return ($Output);41 return ($Output); 42 42 } 43 43 }
Note:
See TracChangeset
for help on using the changeset viewer.