Changeset 669


Ignore:
Timestamp:
Jul 15, 2014, 9:50:40 PM (10 years ago)
Author:
chronos
Message:
  • Přidáno: Zobrazení veřejné IP v seznamu počítačů.
File:
1 edited

Legend:

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

    r558 r669  
    1414      else $Where = '';
    1515    $Output = '<div align="center" style="font-size: small;"><table class="WideTable">';
    16     $Output .= '<tr><th>Jméno počítače</th><th>IP adresa</th><th>Typ</th><th>Naposledy online</th><th>Správce</th></tr>';
     16    $Output .= '<tr><th>Jméno počítače</th><th>IP adresa</th><th>Veřejná IP</th><th>Typ</th><th>Naposledy online</th><th>Správce</th></tr>';
    1717    $DbResult = $this->Database->query('SELECT NetworkDevice.*, User.Name as UserName, NetworkDeviceType.Name AS HostType FROM NetworkDevice '.
    1818      'LEFT JOIN Member ON Member.Id = NetworkDevice.Member '.
     
    2828        $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']);
    2929        $Interface = $DbResult2->fetch_assoc();
     30        if($Interface['ExternalIP'] == '') $Interface['ExternalIP'] = '&nbsp;';
    3031        if($Interface['LocalIP'] == '') $Interface['LocalIP'] = '&nbsp;';
    3132        if($Interface['Online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = '';
    3233        $InterfaceName = $Device['Name'];
    3334        if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
    34         $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$InterfaceName.'</td><td>'.$Interface['LocalIP'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td><td style="text-align: right;">'.$Device['UserName'].'</td></tr>';
     35        $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$InterfaceName.'</td><td>'.$Interface['LocalIP'].'</td><td>'.$Interface['ExternalIP'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td><td style="text-align: right;">'.$Device['UserName'].'</td></tr>';
    3536      } else
    3637      {
Note: See TracChangeset for help on using the changeset viewer.