Changeset 195 for trunk/finance


Ignore:
Timestamp:
Apr 27, 2009, 7:25:40 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Kódování tabulek a sloupců sjednoceno na utf8_czech_ci.
  • Opraveno: Zobrazení seznamu počítačů uživatele.
Location:
trunk/finance
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/finance.php

    r185 r195  
    216216        $ID = $Row4['parent'];
    217217      }
    218       //echo('Pocet '.$Row3[0].','.$Row['hosts'].'<br>');
    219218      $this->Database->update('network_segments', 'id='.$NetworkSegment['id'], array('price' => $Row2['Price'], 'users' => ($Row3[0] + $RowP['users']), 'consumption' => $Row2['Consumption'], 'users_overheads' => ($Row3[0] + $RowP2['users_overheads'])));
    220219    }
  • trunk/finance/zarizeni.php

    r167 r195  
    1111    // Seznam segmentů a zařízení
    1212    $Output = 'Seznam segmentů a zařízení:<br><table style="font-size: smaller;" class="WideTable"><tr><th>Název</th><th>Spotřeba<br>[W]</th><th>Datum<br>zakoupení</th><th>Cena [Kč]</th></tr>';
    13     $DbResult = $this->Database->query("SELECT * FROM network_segments");   
     13    $DbResult = $this->Database->query('SELECT * FROM network_segments');   
    1414    while($Row = $DbResult->fetch_array())
    1515    {
    1616      $Output .= '<tr><td style="text-align: left" colspan="3"><strong>Segment: '.$Row['name'].' ('.$Row['users'].')</strong></td><td style="font-weight: Bold;" align="right">'.$Row['price'].'</td></tr>';
    17       $DbResult2 = $this->Database->query("SELECT * FROM network_devices WHERE segment=".$Row['id']." AND used=1");
     17      $DbResult2 = $this->Database->query('SELECT * FROM network_devices WHERE segment='.$Row['id'].' AND used=1');
    1818      while($Row = $DbResult2->fetch_array())
    1919      {
     
    2121      }
    2222    }
    23     $DbResult = $this->Database->query("SELECT SUM(price) FROM network_devices WHERE used=1");
     23    $DbResult = $this->Database->query('SELECT SUM(price) FROM network_devices WHERE used=1');
    2424    $Row = $DbResult->fetch_array();
    2525    $Output .= '<tr><td colspan="3"><strong>Celkem:</strong></td><td align="right"><strong>'.$Row[0].'</strong></td></tr>';
Note: See TracChangeset for help on using the changeset viewer.