Last change
on this file since 163 was 154, checked in by george, 16 years ago |
- Upraveno: Postupné odstraňování odkazů na tabulku users.
- Upraveno: Některé stránky přepracovány do nového zobrazovacího systému.
- Přidáno: Tabulka Subject rozdělena na tabulky Subject a Member. Transformační skript upraven.
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php
|
---|
2 | include_once('global.php');
|
---|
3 |
|
---|
4 | class HostListPage extends Page
|
---|
5 | {
|
---|
6 | var $FullTitle = 'Seznam registrovaných počítačů';
|
---|
7 | var $ShortTitle = 'Seznam počítačů';
|
---|
8 |
|
---|
9 | function Show()
|
---|
10 | {
|
---|
11 | $Output = '<div align="center" style="font-size: small;"><table class="WideTable"><tr><th>Jméno počítače</th><th>IP adresa</th><th>Naposledy</th><th>Správce</th></tr>';
|
---|
12 | $DbResult = $this->Database->select('hosts', '*', 'type=0 ORDER BY name');
|
---|
13 | while($Host = $DbResult->fetch_array())
|
---|
14 | {
|
---|
15 | $DbResult2 = $this->Database->select('User','*, CONCAT(SecondName, " ", FirstName) as FullName', 'Id='.$Host['user']);
|
---|
16 | $User = $DbResult2->fetch_array();
|
---|
17 | if($Host['online'] == 1) $Style = 'font-weight: bold; color: blue;'; else $Style = '';
|
---|
18 | if($Host['IP'] == '') $Host['IP'] = ' ';
|
---|
19 | $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td style="text-align: right;">'.HumanDate($Host['last_online']).'</td><td style="text-align: right;">'.$User['FullName'].'</td></tr>';
|
---|
20 | }
|
---|
21 | $Output .= '</table></div>';
|
---|
22 | return($Output);
|
---|
23 | }
|
---|
24 | }
|
---|
25 |
|
---|
26 | $System->AddModule(new HostListPage());
|
---|
27 | $System->Modules['HostListPage']->GetOutput();
|
---|
28 |
|
---|
29 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.