source: www/finance/monthly_overall.php@ 66

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

Přidáno: Tabulka historie měsíčních přehledů od zavedení internetu.

File size: 1.8 KB
Line 
1<?php
2include('../global.php');
3include('../style.php');
4include('include.php');
5ShowHeader('Měsíční přehledy', 'Měsíční přehledy');
6
7echo('<table cellspacing="0" cellpadding="2" border="1"><tr><th>Rok</th><th>Měsíc</th><th>Internet [Kč]</th><th>Účastníků</th><th>Správa [Kč/účastníka]</th><th>Správa [Kč]</th><th>Spotřeba [Kč/kWh]</th><th>Spotřeba [Kč]</th><th>Obrat [Kč]</th><th>Průměrná cena [Kč/účastníka]</th></tr>');
8$Total = array('money' => 0, 'administration_total' => 0, 'consumption_total' => 0, 'total_paid' => 0);
9$DbResult = $Database->select('finance_monthly_overall', '*', '1 ORDER BY date DESC');
10while($Month = $DbResult->fetch_array())
11{
12 $DateParts = explode('-', $Month['date']);
13 echo('<tr><td>'.$DateParts[0].'</td><td align="center">'.$MonthNames[$DateParts[1]*1].'</td><td align="center">'.$Month['money'].'</td><td align="center">'.$Month['member_count'].'</td><td align="center">'.$Month['administration'].'</td><td align="center">'.$Month['administration_total'].'</td><td align="center">'.$Month['kWh'].'</td><td align="center">'.$Month['consumption_total'].'</td><td align="center">'.$Month['total_paid'].'</td><td align="center">'.round($Month['total_paid'] / $Month['member_count']).'</td></tr>');
14
15 $Total['money'] += $Month['money'];
16 $Total['administration_total'] += $Month['administration_total'];
17 $Total['consumption_total'] += $Month['consumption_total'];
18 $Total['total_paid'] += $Month['total_paid'];
19 //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10">&nbsp;</td></tr>');
20}
21echo('<tr><th colspan="2">Celkem</th><th>'.$Total['money'].'</th><th>&nbsp;</th><th>&nbsp;</th><th>'.$Total['administration_total'].'</th><th>&nbsp;</th><th>'.$Total['consumption_total'].'</th><th>'.$Total['total_paid'].'</th><th>&nbsp;</th>');
22echo('</table>');
23
24ShowFooter();
25?>
Note: See TracBrowser for help on using the repository browser.