source: trunk/userlist.php@ 192

Last change on this file since 192 was 189, checked in by george, 16 years ago
  • Upraveno: Údaje uživatele jméno a příjmení bylo sloušeno do údaje Zobrazované jméno. Upraveny patřičné sloupce a odkazy ze skriptů.
  • Opraveno: Registrace nových uživatelů.
  • 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_array())
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->select('hosts', '*', 'user='.$User['Id'].' AND block=0 ORDER BY name');
20 $Hosts = '';
21 while($Host = $DbResult2->fetch_array())
22 {
23 $Hosts = $Hosts.$Host['name'].', ';
24 //'<img src="http://wwp.icq.com/scripts/online.dll?icq='.$Row['icq'].'&img=5">'.
25 }
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>';
28 }
29 $Output .= '</table>';
30 return($Output);
31 }
32}
33
34$System->AddModule(new UserListPage());
35$System->Modules['UserListPage']->GetOutput();
36
37?>
Note: See TracBrowser for help on using the repository browser.