Changeset 208 for trunk/userlist.php


Ignore:
Timestamp:
May 6, 2009, 8:21:23 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Tabulka hosts rozdělena na NetworkDevice, NetworkInterface, NetworkInterfaceType a NetworkLink. Jeden počítač může mít více rozhraní. Nově se již nepočítá pouze s stromovou topologií, ale s celkovou sítí s okruhy. Sloupce Parent byl proto nahrazen tabulkou NetworkLink, ve které jsou uchovány informace o tom, co kam je připojeno. Každé rozhraní má definovaný typ dle NetworkInterfaceType.
  • Upraveno: Tabulka HostType přejmenována na NetworkDeviceType.
  • Smazáno: Původní složka komunikačního programu sunrisechat. Nově nahrazena složkou chat pro podporu IRC.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/userlist.php

    r189 r208  
    1212
    1313    $DbResult = $this->Database->select('User', '*', 'Login != "Anonym" ORDER BY Name');
    14     while($User = $DbResult->fetch_array())
     14    while($User = $DbResult->fetch_assoc())
    1515    {
    1616      if($User['ICQ'] > 0) $ICQ = $User['ICQ']; else $ICQ = ' ';
    1717      if($User['PhoneNumber'] > 0) $Phone = $User['PhoneNumber']; else $Phone = ' ';
    1818
    19       $DbResult2 = $this->Database->select('hosts', '*', 'user='.$User['Id'].' AND block=0 ORDER BY name');
    20       $Hosts = '';
    21       while($Host = $DbResult2->fetch_array())
     19      $DbResult2 = $this->Database->query('SELECT Name, Id FROM NetworkDevice WHERE Member = (SELECT Id FROM Member WHERE Member.ResponsibleUser = '.$User['Id'].') ORDER BY Name');
     20      $Devices = array();
     21      while($Device = $DbResult2->fetch_assoc())
    2222      {
    23         $Hosts = $Hosts.$Host['name'].', ';
    24         //'<img src="http://wwp.icq.com/scripts/online.dll?icq='.$Row['icq'].'&img=5">'.
     23        $Devices[] = $Device['Name'];
    2524      }
    26       if($Hosts != '') $Hosts = substr($Hosts, 0, -2);
    27       $Output .= '<tr><td>'.$User['Name'].'</td><td>'.$User['Email'].'&nbsp;</td><td>'.$ICQ.'</td><td>'.$Phone.'</td><td>'.$Hosts.'</td></tr>';
     25      $Devices = implode(', ', $Devices);
     26      $Output .= '<tr><td>'.$User['Name'].'</td><td>'.$User['Email'].'&nbsp;</td><td>'.$ICQ.'</td><td>'.$Phone.'</td><td>'.$Devices.'</td></tr>';
    2827    }
    2928    $Output .= '</table>';
Note: See TracChangeset for help on using the changeset viewer.