Last change
on this file since 3 was 3, checked in by george, 17 years ago |
První pracovní verze nového webu.
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | <?
|
---|
2 | include('../style.php');
|
---|
3 | include('../db.php');
|
---|
4 | //include('../is/global.php');
|
---|
5 | DB_Init('localhost','root','','is');
|
---|
6 | DB_Query('SET CHARACTER SET latin2');
|
---|
7 | ShowHeader('Zaøízení sítì','Zaøízení');
|
---|
8 |
|
---|
9 | // Seznam segmentù a zaøízení
|
---|
10 | echo('Seznam segmentù a zaøízení:<br><table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3"><tr><th>Název</th><th>Spotøeba<br>[W]</th><th>Datum<br>zakoupení</th><th>Cena [Kè]</th></tr>');
|
---|
11 | DB_Query("SELECT * FROM network_segments");
|
---|
12 | while($Row = DB_Row())
|
---|
13 | {
|
---|
14 | echo('<tr><td colspan="3"><strong>Segment: '.$Row['name'].' ('.$Row['users'].')</strong></td><td style="font-weight: Bold;" align="right">'.$Row['price'].'</td></tr>');
|
---|
15 | DB_Save();
|
---|
16 | DB_Query("SELECT * FROM network_devices WHERE segment=".$Row['id']." AND used=1");
|
---|
17 | while($Row = DB_Row())
|
---|
18 | {
|
---|
19 | echo('<tr><td>'.$Row['name'].'</td><td align="right">'.$Row['consumption'].'</td><td align="right">'.HumanDate($Row['date']).'</td><td align="right">'.$Row['price'].'</td></tr>');
|
---|
20 | }
|
---|
21 | DB_Load();
|
---|
22 | }
|
---|
23 | DB_Query("SELECT SUM(price) FROM network_devices WHERE used=1");
|
---|
24 | $Row = DB_Row();
|
---|
25 | echo('<tr><td colspan="3"><strong>Celkem:</strong></td><td align="right"><strong>'.$Row[0].'</strong></td></tr>');
|
---|
26 | echo('</table>');
|
---|
27 |
|
---|
28 | ShowFooter();
|
---|
29 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.