Changeset 195


Ignore:
Timestamp:
Apr 27, 2009, 7:25:40 AM (15 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
Files:
1 added
4 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>';
  • trunk/network.php

    r148 r195  
    128128        $Output .= 'Aktualizováno: 10.8.2008';
    129129        break;
    130       case 'udp_forward':
    131         $Output .= '<br /><strong>Průchozí UDP porty her:</strong><br />
    132 <table style="font-size: small;" border="1" cellspacing="0" cellpadding="3">
    133 <tr><th>Hra</th><th>Číslo portu</th></tr>';
    134         $DbResult = $this->Database->select('network_udp_forwarder', '*');
    135         while($Row = $DbResult->fetch_array())
    136         {
    137           $Output .= '<tr><td>'.$Row['game'].'</td><td align="right">'.$Row['port'].'</td></tr>';
    138         }
    139         $Output .= '</table>';
    140         break;
    141130      default:
    142131        $Output .= '<a href="?section=servers">Seznam serverů</a><br />';
    143         $Output .= '<a href="?section=udp_forward">Průchozí UDP porty přes centrálu</a><br />';
    144132        $Output .= '<a href="?section=nastaveni_pripojeni">Nastavení připojení počítačů</a><br />';
    145133        $Output .= '<a href="?section=obsazeni_wifi_kanalu">Obsazení Wi-Fi kanálů</a><br />';
  • trunk/network/user_hosts.php

    r163 r195  
    1212
    1313    $Output = '<br /><table class="WideTable">
    14 <tr><th>Jméno počítače</th><th>Místní IP adresa</th><th>Veřejná IP adresa</th><th>CZFree IP adresa</th><th>Naposledy online</th><th>Fyzická adresa</th></tr>';
     14<tr><th>Jméno počítače</th><th>Typ</th></th><th>Místní IP adresa</th><th>Veřejná IP adresa</th><th>CZFree IP adresa</th><th>Naposledy online</th><th>Fyzická adresa</th></tr>';
    1515
    16     $DbResult = $this->Database->select('hosts', '*', 'type=0 AND user='.$this->System->Modules['User']->User['Member']);
     16    $DbResult = $this->Database->query('SELECT hosts.*, HostType.Name AS HostType FROM hosts LEFT JOIN HostType ON HostType.Id = hosts.type WHERE (hosts.used = 1) AND (hosts.user = '.$this->System->Modules['User']->User['Member'].') ORDER BY hosts.name');
    1717    while($Host = $DbResult->fetch_array())
    1818    {
     
    2323      if($Host['external_ip'] == '') $Host['external_ip'] = '&nbsp;';
    2424      if($Host['MAC'] == '') $Host['MAC'] = '&nbsp;';
    25       $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['IP'].'</td><td>'.$Host['external_ip'].'</td><td>'.$Host['czfree_ip'].'</td><td >'.HumanDate($Host['last_online']).'</td><td>'.$Host['MAC'].'</td></tr>';
     25      $Output .= '<tr><td style="text-align: left; '.$Style.'">'.$Host['name'].'</td><td>'.$Host['HostType'].'</td><td>'.$Host['IP'].'</td><td>'.$Host['external_ip'].'</td><td>'.$Host['czfree_ip'].'</td><td >'.HumanDate($Host['last_online']).'</td><td>'.$Host['MAC'].'</td></tr>';
    2626    }
    2727    $Output .= '</table><br />';
Note: See TracChangeset for help on using the changeset viewer.