' . PHP_EOL; if ($vars['view'] == "detail") { $cols = [ 'state-marker' => '', [NULL, 'style' => "width: 1px;"], 'device' => ['device' => 'Device', 'style' => "min-width: 150px;"], ['port' => 'Port Name', 'descr' => 'Description', 'errors' => 'Errors', 'style' => "min-width: 250px;"], [NULL], ['traffic' => ['Bits', 'subfields' => ['traffic_in' => 'In', 'traffic_out' => 'Out']], 'packets' => ['Pkts', 'subfields' => ['packets_in' => 'In', 'packets_out' => 'Out']], 'style' => "width: 100px;"], ['media' => "Media", 'speed' => 'Speed'], ['mac' => "MAC"], ]; } else { $cols = [ 'state-marker' => '', [NULL, 'style' => "width: 1px;"], 'device' => ['device' => 'Device', 'style' => "min-width: 150px;"], ['port' => 'Port Name', 'descr' => 'Description', 'errors' => 'Errors', 'style' => "min-width: 250px;"], ['traffic' => ['Bits', 'subfields' => ['traffic_in' => 'In', 'traffic_out' => 'Out']], 'style' => "width: 100px;"], ['traffic_perc' => ['%', 'subfields' => ['traffic_perc_in' => 'In', 'traffic_perc_out' => 'Out']], 'style' => "width: 110px;"], ['packets' => ['Pkts', 'subfields' => ['packets_in' => 'In', 'packets_out' => 'Out']], 'style' => "width: 90px;"], ['speed' => 'Speed', 'mtu' => 'MTU', 'style' => "width: 90px;"], ['media' => 'Media', 'mac' => 'MAC', 'style' => "width: 150px;"] ]; } echo generate_table_header($cols, $vars); echo '' . PHP_EOL; $ports_disabled = 0; $ports_down = 0; $ports_up = 0; $ports_total = 0; foreach ($ports as $port) { $ports_total++; print_port_row($port, $vars); } echo ''; echo generate_box_close(); echo pagination($vars, $ports_count); // EOF