Ignore:
Timestamp:
Oct 4, 2012, 9:01:28 AM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Přejmenovaná tabulka network_device a hosts_topology.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/is/topologie-img2.php

    r224 r409  
    99
    1010// === Vytvoř stromy a ulož výsledek do databáze ===============================
    11 $DbResult = $Database->query("SELECT MAX(pos), MAX(depth) FROM hosts_topology");
     11$DbResult = $Database->query("SELECT MAX(Pos), MAX(Depth) FROM NetworkTopology");
    1212$item = $DbResult->fetch_array();
    1313$width = $item[0];
     
    3737
    3838//$DbResult = $Database->query("SELECT * FROM hosts, hosts_topology WHERE host = id AND used=1");
    39 $DbResult = $Database->query("SELECT tpl.*, tpl.host AS id, dev.name AS name, dev.online AS online, dtp.iconname AS iconname, 1 AS showonline
    40   FROM hosts_topology tpl LEFT JOIN NetworkDevice dev ON dev.id = tpl.host LEFT JOIN NetworkDeviceType dtp ON dev.type = dtp.id");
     39$DbResult = $Database->query("SELECT tpl.*, tpl.Host AS id, dev.Name AS name, dev.Online AS online, dtp.IconName AS iconname, 1 AS showonline
     40  FROM NetworkTopology tpl LEFT JOIN NetworkDevice dev ON dev.id = tpl.host LEFT JOIN NetworkDeviceType dtp ON dev.type = dtp.id");
    4141while($item = $DbResult->fetch_array())
    4242{
    4343  $id = $item['id'];
    44   $vleft = $item['pos'];
    45   $vtop = $item['depth'];
    46   $vfirst = $item['first'];
    47   $vlast = $item['last'];
     44  $vleft = $item['Pos'];
     45  $vtop = $item['Depth'];
     46  $vfirst = $item['First'];
     47  $vlast = $item['Last'];
    4848  if(($vtop > 0) || ($item['name'] == $TopHostName))
    4949  {
Note: See TracChangeset for help on using the changeset viewer.