Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class PageHosting extends Page
|
---|
4 | {
|
---|
5 | function __construct(System $System)
|
---|
6 | {
|
---|
7 | parent::__construct($System);
|
---|
8 | $this->Title = 'Hostované projekty';
|
---|
9 | $this->ParentClass = 'PageNetwork';
|
---|
10 | }
|
---|
11 |
|
---|
12 | function Show(): string
|
---|
13 | {
|
---|
14 | $Output = '<br /><table class="WideTable"><tr><th>Název projektu</th><th>Založeno</th><th>Umístění na serveru</th><th>Zodpovědná osoba</th></tr>';
|
---|
15 | $DbResult = $this->Database->query('SELECT NetworkDevice.Name as ServerName, HostedProject.Name, HostedProject.Homepage, HostedProject.TimeCreate, User.Name AS UserName FROM HostedProject JOIN User ON User.Id = HostedProject.User JOIN NetworkDevice ON NetworkDevice.Id = HostedProject.Server ORDER BY HostedProject.Name');
|
---|
16 | while ($DbRow = $DbResult->fetch_assoc())
|
---|
17 | {
|
---|
18 | $Output .= '<tr><td><a href="'.$DbRow['Homepage'].'">'.$DbRow['Name'].'</a></td><td>'.HumanDate($DbRow['TimeCreate']).'</td><td>'.$DbRow['ServerName'].'</td><td>'.$DbRow['UserName'].'</td></tr>';
|
---|
19 | }
|
---|
20 | $Output .= '</table>';
|
---|
21 | return $Output;
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.