source: trunk/userlist.php@ 208

Last change on this file since 208 was 208, checked in by george, 16 years ago
  • 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.
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1<?php
2include_once('global.php');
3
4class UserListPage extends Page
5{
6 var $FullTitle = 'Seznam registrovaných uživatelů';
7 var $ShortTitle = 'Seznam uživatelů';
8
9 function Show()
10 {
11 $Output = '<table class="WideTable" style="font-size: small;"><tr><th>Jméno uživatele</th><th>E-mail</th><th>ICQ</th><th>Telefon</th><th>Počítače</th></tr>';
12
13 $DbResult = $this->Database->select('User', '*', 'Login != "Anonym" ORDER BY Name');
14 while($User = $DbResult->fetch_assoc())
15 {
16 if($User['ICQ'] > 0) $ICQ = $User['ICQ']; else $ICQ = '&nbsp;';
17 if($User['PhoneNumber'] > 0) $Phone = $User['PhoneNumber']; else $Phone = '&nbsp;';
18
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())
22 {
23 $Devices[] = $Device['Name'];
24 }
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>';
27 }
28 $Output .= '</table>';
29 return($Output);
30 }
31}
32
33$System->AddModule(new UserListPage());
34$System->Modules['UserListPage']->GetOutput();
35
36?>
Note: See TracBrowser for help on using the repository browser.