Changeset 409 for trunk/is/topologie-img2.php
- Timestamp:
- Oct 4, 2012, 9:01:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/is/topologie-img2.php
r224 r409 9 9 10 10 // === 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"); 12 12 $item = $DbResult->fetch_array(); 13 13 $width = $item[0]; … … 37 37 38 38 //$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 showonline40 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"); 41 41 while($item = $DbResult->fetch_array()) 42 42 { 43 43 $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']; 48 48 if(($vtop > 0) || ($item['name'] == $TopHostName)) 49 49 {
Note:
See TracChangeset
for help on using the changeset viewer.