unset($seperator); foreach ($ports[$device['vrf_id']][$device['device_id']] as $port) { $port = array_merge($device, $port); switch ($_GET['optc']) { case 'bits': case 'upkts': case 'nupkts': case 'errors': $port['width'] = '130'; $port['height'] = '30'; $port['from'] = $config['time']['day']; $port['to'] = $config['time']['now']; $port['bg'] = '#' . $bg; $port['graph_type'] = 'port_' . $_GET['optc']; echo "<div style='display: block; padding: 3px; margin: 3px; min-width: 135px; max-width:135px; min-height:75px; max-height:75px;\n text-align: center; float: left; background-color: " . $list_colour_b_b . ";'>\n <div style='font-weight: bold;'>" . makeshortif($port['ifDescr']) . '</div>'; print_port_thumbnail($port); echo "<div style='font-size: 9px;'>" . truncate(short_port_descr($port['ifAlias']), 22, '') . '</div> </div>'; break; default: echo $seperator . generate_port_link($port, makeshortif($port['ifDescr'])); $seperator = ', '; break; } //end switch } //end foreach echo '</td></tr>'; $x++; } //end foreach
if ($pw_a) { $pw_a['width'] = '150'; $pw_a['height'] = '30'; $pw_a['from'] = $config['time']['day']; $pw_a['to'] = $config['time']['now']; $pw_a['bg'] = $bg; $types = array('bits', 'upkts', 'errors'); foreach ($types as $graph_type) { $pw_a['graph_type'] = 'port_' . $graph_type; print_port_thumbnail($pw_a); } } echo '</td><td></td><td colspan=2>'; if ($pw_b) { $pw_b['width'] = '150'; $pw_b['height'] = '30'; $pw_b['from'] = $config['time']['day']; $pw_b['to'] = $config['time']['now']; $pw_b['bg'] = $bg; $types = array('bits', 'upkts', 'errors'); foreach ($types as $graph_type) { $pw_b['graph_type'] = 'port_' . $graph_type; print_port_thumbnail($pw_b); } } echo '</td></tr>'; } $linkdone[] = $pw_b['device_id'] . $pw_b['port_id']; } } echo '</table>';