source: devel/www/network/user_hosts.php@ 89

Last change on this file since 89 was 89, checked in by george, 17 years ago

Přidáno: Chybějící soubory nového webu centrály.

File size: 1.4 KB
Line 
1<?php
2
3include_once('../global.php');
4
5class NetworkHostList extends Page
6{
7 var $FullTitle = 'Registrované počítače';
8 var $ShortTitle = 'Registrované počítače';
9
10 function Show()
11 {
12
13 $Output = '<br /><table border="1" cellspacing="0" cellpadding="3" style="font-size: small; text-align: center;">
14<tr><th>Jméno počítače</th><th>Místní IP adresa</th><th>Veřejná IP adresa</th><th>CZFree IP adresa</th><th>Naposledy online</th><th>Fyzická adresa</th></tr>';
15
16 $DbResult = $this->Database->select('hosts', '*', 'type=0 AND user='.$this->System->Modules['User']->User['Id']);
17 while($Host = $DbResult->fetch_array())
18 {
19/*
20 $DbResult2 = $this->Database->select('users','*, CONCAT(second_name," ",first_name) as fullname','id='.$Host['user']);
21 $User = $DbResult2->fetch_array();
22*/
23 //'<img src="http://wwp.icq.com/scripts/online.dll?icq='.$Row['icq'].'&img=5">'.
24 if($Host['online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = '';
25 if($Host['IP'] == '') $Host['IP'] = '&nbsp;';
26 $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td>'.$Host['external_ip'].'</td><td>'.$Host['czfree_ip'].'</td><td >'.HumanDate($Host['last_online']).'</td><td>'.$Host['MAC'].'</td></tr>';
27 }
28 $Output .= '</table><br />';
29 return($Output);
30 }
31
32}
33
34$System->AddModule(new NetworkHostList());
35$System->Modules['NetworkHostList']->GetOutput();
36
37?>
Note: See TracBrowser for help on using the repository browser.