diff --git a/html/includes/table/customers.inc.php b/html/includes/table/customers.inc.php new file mode 100644 index 000000000..f3c931ad1 --- /dev/null +++ b/html/includes/table/customers.inc.php @@ -0,0 +1,105 @@ +'.$port['ifTrunk'].''; + } + else if ($port['ifVlan']) { + $vlan = 'VLAN '.$port['ifVlan'].''; + } + else { + $vlan = ''; + } + } + + $response[] = array( + 'port_descr_descr' => $customer_name, + 'device_id' => generate_device_link($device), + 'ifDescr' => generate_port_link($port, makeshortif($port['ifDescr'])), + 'port_descr_speed' => $port['port_descr_speed'], + 'port_descr_circuit' => $port['port_descr_circuit'], + 'port_descr_notes' => $port['port_descr_notes'], + + ); + + unset($customer_name); + } + + + $graph_array['type'] = 'customer_bits'; + $graph_array['height'] = '100'; + $graph_array['width'] = '220'; + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $customer['port_descr_descr']; + + $return_data = true; + include 'includes/print-graphrow.inc.php'; + $response[] = array( + 'port_descr_descr' => $graph_data[0], + 'device_id' => $graph_data[1], + 'ifDescr' => '', + 'port_descr_speed' => '', + 'port_descr_circuit' => $graph_data[2], + 'port_descr_notes' => $graph_data[3], + ); +} + +$output = array( + 'current' => $current, + 'rowCount' => $rowCount, + 'rows' => $response, + 'total' => $total, +); + +echo _json_encode($output); \ No newline at end of file diff --git a/html/pages/customers.inc.php b/html/pages/customers.inc.php index cfb974432..40277817e 100644 --- a/html/pages/customers.inc.php +++ b/html/pages/customers.inc.php @@ -1,87 +1,34 @@ '; - -echo " - - - Customer - Device - Interface - Speed - Circuit - Notes - - "; - -$i = 1; - $pagetitle[] = 'Customers'; -if (!is_array($config['customers_descr'])) { - $config['customers_descr'] = array($config['customers_descr']); -} +?> -$descr_type = "'".implode("', '", $config['customers_descr'])."'"; +
+ + + + + + + + + + + +
CustomerDeviceInterfaceSpeedCircuitNotes
+
-foreach (dbFetchRows('SELECT * FROM `ports` WHERE `port_descr_type` IN (?) GROUP BY `port_descr_descr` ORDER BY `port_descr_descr`', array(array($descr_type))) as $customer) { - $i++; +