Changeset 408 for trunk/finance/spotreba.php
- Timestamp:
- Oct 4, 2012, 8:29:32 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/spotreba.php
r167 r408 14 14 $Output = 'Spotřeba zařízení jednotlivých segmentů:<div align="center"><table class="WideTable"><tr><th>Jméno segmentu</th><th>Spotřeba [W]</th><th>Cena [Kč/měsíc]</th></tr>'; 15 15 $CelkovaSpotreba = 0; 16 $DbResult = $this->Database->query("SELECT * FROM network_segments");16 $DbResult = $this->Database->query("SELECT * FROM NetworkSegment"); 17 17 while($Row = $DbResult->fetch_array()) 18 18 { 19 $DbResult2 = $this->Database->query("SELECT SUM(consumption) FROM network_devices WHERE segment=".$Row['id']." AND used=1");19 $DbResult2 = $this->Database->query("SELECT SUM(consumption) FROM network_devices WHERE Segment=".$Row['Id']." AND Used=1"); 20 20 $Row2 = $DbResult2->fetch_array(); 21 21 $CelkovaSpotreba = $CelkovaSpotreba + $Row2[0]; 22 $Output .= '<tr><td>'.$Row[' name'].'</td><td align="right">'.$Row2[0].'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($Row2[0]).'</td></tr>';22 $Output .= '<tr><td>'.$Row['Name'].'</td><td align="right">'.$Row2[0].'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($Row2[0]).'</td></tr>'; 23 23 } 24 24 $Output .= '<tr style="font-weight: Bold;"><td><strong>Celkem</strong></td><td align="right">'.$CelkovaSpotreba.'</td><td align="right">'.$this->System->Modules['Finance']->W2Kc($CelkovaSpotreba).'</td></tr>';
Note:
See TracChangeset
for help on using the changeset viewer.