'WAN', 'lan' => 'LAN'); for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; }?> = 500) $firstgraphshown = false; else $firstgraphshown = true; foreach ($ifdescrs as $ifdescr => $ifname){ $ifinfo = get_interface_info($ifdescr); $ifnum = convert_friendly_interface_to_real_interface_name($ifname); $currentgraph = $showngraphlist[$graphcounter]; $colposition = strpos($currentgraph,":"); $currentgraph = substr($currentgraph, $colposition+1); if($config['widgets']['traffic_graphs-config']){ if ($currentgraph =="show"){ $mingraphbutton = "inline"; $showgraphbutton = "none"; $graphdisplay = "inline"; $interfacevalue = "show"; } else { $mingraphbutton = "none"; $showgraphbutton = "inline"; $graphdisplay = "none"; $interfacevalue = "hide"; } } else { if(!$firstgraphshown){ $mingraphbutton = "inline"; $showgraphbutton = "none"; $graphdisplay = "inline"; $interfacevalue = "show"; } else { $mingraphbutton = "none"; $showgraphbutton = "inline"; $graphdisplay = "none"; $interfacevalue = "hide"; } } if ($ifinfo['status'] != "down"){ ?>
Current Traffic
Minimize <?=$ifname;?> traffic graph
Show <?=$ifname;?> traffic graph