Changeset 148 for www/userlist.php
- Timestamp:
- Feb 15, 2009, 7:59:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/userlist.php
r143 r148 1 1 <?php 2 include('style.php');3 2 include_once('global.php'); 4 ShowHeader('Seznam uživatelů na síti', 'Seznam uživatelů');5 3 6 //echo('<a href="#network">Nastavení sítě</a><br>'); 7 echo('<table border="1" cellspacing="0" cellpadding="2" 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>'); 4 class UserListPage extends Page 5 { 6 var $FullTitle = 'Seznam registrovaných uživatelů'; 7 var $ShortTitle = 'Seznam uživatelů'; 8 8 9 $DbResult = $Database->select('users', '*,CONCAT(second_name," ",first_name) as fullname','role=2 ORDER BY fullname'); 10 while($User = $DbResult->fetch_array()) 11 { 12 if($User['icq']>0) $ICQ = $User['icq']; else $ICQ = ' '; 13 if($User['phone']>0) $Phone = $User['phone']; else $Phone = ' '; 14 15 $DbResult2 = $Database->select('hosts','*','user='.$User['id'].' AND block=0 ORDER BY name'); 16 $Hosts = ''; 17 while($Host = $DbResult2->fetch_array()) 9 function Show() 18 10 { 19 $Hosts = $Hosts.$Host['name'].', '; 20 //'<img src="http://wwp.icq.com/scripts/online.dll?icq='.$Row['icq'].'&img=5">'. 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('users', '*, CONCAT(second_name," ",first_name) as fullname', '1 ORDER BY fullname'); 14 while($User = $DbResult->fetch_array()) 15 { 16 if($User['icq'] > 0) $ICQ = $User['icq']; else $ICQ = ' '; 17 if($User['phone'] > 0) $Phone = $User['phone']; else $Phone = ' '; 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['fullname'].'</td><td>'.$User['email'].' </td><td>'.$ICQ.'</td><td>'.$Phone.'</td><td>'.$Hosts.'</td></tr>'; 28 } 29 $Output .= '</table>'; 30 return($Output); 21 31 } 22 if($Hosts != '') $Hosts = substr($Hosts, 0, -2);23 echo('<tr><td>'.$User['fullname'].'</td><td>'.$User['email'].' </td><td>'.$ICQ.'</td><td>'.$Phone.'</td><td>'.$Hosts.'</td></tr>');24 32 } 25 echo('</table>');26 33 27 //for($i=0;$i<60;$i++) echo('<img //src="http://wwp.icq.com/scripts/online.dll?icq=277158770&img='.$i.'"><br>'); 34 $System->AddModule(new UserListPage()); 35 $System->Modules['UserListPage']->GetOutput(); 28 36 29 ShowFooter();30 37 ?>
Note:
See TracChangeset
for help on using the changeset viewer.