Changeset 194 for trunk/hostlist.php


Ignore:
Timestamp:
Apr 27, 2009, 12:09:45 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Sloupec Typ v tabulce seznamu počítačů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hostlist.php

    r193 r194  
    99  function Show()
    1010  {
    11     $Output = '<div align="center" style="font-size: small;"><table class="WideTable"><tr><th>Jméno počítače</th><th>IP adresa</th><th>Naposledy</th><th>Správce</th></tr>';
    12     $DbResult = $this->Database->query('SELECT hosts.*, User.Name as UserName FROM hosts LEFT JOIN Member ON Member.Id = hosts.user LEFT JOIN User ON Member.ResponsibleUser = User.Id ORDER BY hosts.name');
     11    $Output = '<div align="center" style="font-size: small;"><table class="WideTable"><tr><th>Jméno počítače</th><th>IP adresa</th><th>Typ</th><th>Naposledy online</th><th>Správce</th></tr>';
     12    $DbResult = $this->Database->query('SELECT hosts.*, User.Name as UserName, HostType.Name as HostType FROM hosts LEFT JOIN Member ON Member.Id = hosts.user LEFT JOIN User ON Member.ResponsibleUser = User.Id LEFT JOIN HostType ON HostType.Id = hosts.type WHERE hosts.used = 1 ORDER BY hosts.name');
    1313    while($Host = $DbResult->fetch_array())
    1414    {
    1515      if($Host['online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = '';
    1616      if($Host['IP'] == '') $Host['IP'] = '&nbsp;';
    17       $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td style="text-align: right;">'.HumanDate($Host['last_online']).'</td><td style="text-align: right;">'.$Host['UserName'].'</td></tr>';
     17      $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td>'.$Host['HostType'].'</td><td style="text-align: right;">'.HumanDate($Host['last_online']).'</td><td style="text-align: right;">'.$Host['UserName'].'</td></tr>';
    1818    }
    1919    $Output .= '</table></div>';
Note: See TracChangeset for help on using the changeset viewer.