Changeset 873 for trunk/Modules/NetworkTopology/NetworkTopology.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkTopology/NetworkTopology.php
r738 r873 10 10 function Show() 11 11 { 12 if (count($this->System->PathItems) > 1)12 if (count($this->System->PathItems) > 1) 13 13 { 14 if ($this->System->PathItems[1] == 'topologie.png') return($this->ShowImage());15 else return (PAGE_NOT_FOUND);14 if ($this->System->PathItems[1] == 'topologie.png') return ($this->ShowImage()); 15 else return (PAGE_NOT_FOUND); 16 16 17 } else return ($this->ShowOverview());17 } else return ($this->ShowOverview()); 18 18 } 19 19 … … 23 23 $this->FormatHTML = false; 24 24 25 if (array_key_exists('debug', $_GET)) $debug = $_GET['debug'];25 if (array_key_exists('debug', $_GET)) $debug = $_GET['debug']; 26 26 else $debug = 0; 27 27 … … 54 54 'FROM NetworkTopology LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkTopology.Host '. 55 55 'LEFT JOIN NetworkDeviceType ON NetworkDevice.Type = NetworkDeviceType.Id'); 56 while ($item = $DbResult->fetch_array())56 while ($item = $DbResult->fetch_array()) 57 57 { 58 58 $id = $item['Id']; … … 62 62 $vlast = $item['Last']; 63 63 $xpos = $vleft * $spacex; 64 if (($vtop > 0) or ($item['Name'] == $this->TopHostName))64 if (($vtop > 0) or ($item['Name'] == $this->TopHostName)) 65 65 { 66 if ($vtop > 0) imageline($im, $xpos + $halfx, $vtop * $spacey, $xpos + $halfx, $vtop * $spacey + 8, $black);67 if ($vfirst >= 0)66 if ($vtop > 0) imageline($im, $xpos + $halfx, $vtop * $spacey, $xpos + $halfx, $vtop * $spacey + 8, $black); 67 if ($vfirst >= 0) 68 68 { 69 69 imageline($im, $vfirst*$spacex + $halfx, $vtop * $spacey + $spacey, $vlast*$spacex + $halfx, $vtop * $spacey + $spacey, $black); … … 71 71 } 72 72 // $ip = explode('.',$item['IP']); 73 // if (!array_key_exists(3, $ip)) $ip[3] = '';74 if ($item['IconName'] == 'comp')73 // if (!array_key_exists(3, $ip)) $ip[3] = ''; 74 if ($item['IconName'] == 'comp') 75 75 { 76 if ($item['Online'] == 1) $color = $green;76 if ($item['Online'] == 1) $color = $green; 77 77 else $color = $black; 78 78 $image = $im_comp; 79 79 } else $image = $im_dev; 80 if ($item['IconName'] == 'device')80 if ($item['IconName'] == 'device') 81 81 { 82 if ($item['Online'] == 1) $color = $green;82 if ($item['Online'] == 1) $color = $green; 83 83 else $color = $red; 84 84 $image = $im_dev; 85 85 } 86 if ($item['ShowOnline'] == 0)86 if ($item['ShowOnline'] == 0) 87 87 { 88 88 $color = $gray; … … 100 100 101 101 // === Sestavení výsledného souboru ============================================ 102 if ($debug == 0)102 if ($debug == 0) 103 103 { 104 104 Header("Content-type: image/png"); … … 109 109 imagedestroy($im_dev); 110 110 } 111 return ('');111 return (''); 112 112 } 113 113 … … 126 126 zařízení, které jsou přes něj připojeny. U zařízení, kde není stav možné 127 127 zjišťovat je použita <span style="color:gray">šedá barvou</span>.</p>'; 128 return ($Output);128 return ($Output); 129 129 } 130 130 }
Note:
See TracChangeset
for help on using the changeset viewer.