Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Network/UserHosts.php

    r738 r873  
    1515    global $Config;
    1616
    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'));
    1818    $Output = '<div align="center" style="font-size: small;"><table class="WideTable">';
    1919    $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>';
     
    2121      'LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type '.
    2222      '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())
    2424    {
    25       if($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = '';
     25      if ($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = '';
    2626      $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '.
    2727        $Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>';
    2828      $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']);
    29       while($Interface = $DbResult2->fetch_assoc())
     29      while ($Interface = $DbResult2->fetch_assoc())
    3030      {
    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 = '';
    3232        $InterfaceName = $Device['Name'];
    33         if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
     33        if ($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
    3434        $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.
    3535          $InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.
     
    3939    }
    4040    $Output .= '</table></div>';
    41     return($Output);
     41    return ($Output);
    4242  }
    4343}
Note: See TracChangeset for help on using the changeset viewer.