Ignore:
Timestamp:
Jan 5, 2009, 7:31:45 AM (16 years ago)
Author:
george
Message:
  • Odstraněno: Openwebmail. * Odstraněno: phpMyAdmin. * Upraveno: Mnoho malých úprav a oprav.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/finance/monthly_overall.php

    r66 r129  
    55ShowHeader('Měsíční přehledy', 'Měsíční přehledy');
    66
    7 echo('<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');
     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><th>Investice [Kč]</th></tr>');
     8$Total = array('money' => 0, 'administration_total' => 0, 'consumption_total' => 0, 'total_paid' => 0, 'investment' => 0);
     9$DbResult = $Database->select('finance_monthly_overall', '*', '1 ORDER BY date ASC');
    1010while($Month = $DbResult->fetch_array())
    1111{
    1212  $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>');
     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><td align="center">'.$Month['investment'].'</td></tr>');
     14//  echo('<tr><td>'.$Month['date'].'</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>');
    1415
    1516  $Total['money'] += $Month['money'];
     
    1718  $Total['consumption_total'] += $Month['consumption_total'];
    1819  $Total['total_paid'] += $Month['total_paid'];
     20  $Total['investment'] += $Month['investment'];
    1921  //if($DateParts[1] == '01') echo('<tr><td style="font-size: 4;" colspan="10">&nbsp;</td></tr>');
    2022}
    21 echo('<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>');
     23echo('<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><th>'.$Total['investment'].'</tr>');
    2224echo('</table>');
    2325
Note: See TracChangeset for help on using the changeset viewer.