'Basic']; if (!$vars['view']) { $vars['view'] = "basic"; } $navbar['brand'] = "Accesspoints"; $navbar['class'] = "navbar-narrow"; foreach ($menu_options as $option => $text) { if ($vars['view'] == $option) { $navbar['options'][$option]['class'] = "active"; } $navbar['options'][$option]['text'] = $text; $navbar['options'][$option]['url'] = generate_url($vars, ['view' => $option, 'graph' => NULL]); } // FIXME. This page not exist.. (c) mike //$graph_types = array("conns" => "Connections"); foreach ($graph_types as $type => $descr) { if ($vars['graph'] == $type) { $navbar['options_right'][$type]['class'] = "active"; } $navbar['options_right'][$type]['text'] = $descr; $navbar['options_right'][$type]['url'] = generate_url($vars, ['view' => 'graphs', 'graph' => $type]); } print_navbar($navbar); unset($navbar); if ($vars['view'] == "graphs" || $vars['view'] == "services") { $table_class = "table-striped-two"; } else { $table_class = "table-striped"; } echo generate_box_open(); echo '
'; echo ' | Name | '; echo 'Identifier / MAC | '; echo 'IP Address | '; echo 'Model | '; echo 'Location | '; echo 'Serial/Fingerprint | '; echo 'Admin Status | '; echo ''; echo ' |
---|---|---|---|---|---|---|---|---|
'; echo ' | ' . $accesspoint['ap_name'] . ' | '; echo '' . $accesspoint['ap_index'] . ' | '; echo '' . $accesspoint['ap_address'] . ' | '; echo '' . $accesspoint['ap_model'] . ' | '; echo '' . $accesspoint['ap_location'] . ' | '; echo '' . $accesspoint['ap_serial'] . (isset($accesspoint['fingerprint']) ? ' / ' . $accesspoint['fingerprint'] : '') . ' | '; echo '' . $ap_state . ' | '; echo ''; if ($accesspoint['ap_status'] == 'down') //if device is down, offer the possibility to delete it from the DB { if ($_SESSION['userlevel'] > 9) { echo ''; // Delete AP modal $del_modal = ['type' => 'horizontal', 'userlevel' => 9, // Minimum user level for display form 'id' => 'modal-delete-ap-' . $accesspoint['wifi_ap_id'], 'title' => 'Delete Access Point "' . $accesspoint['ap_name'] . '"', 'icon' => $config['icon']['device-delete'], 'url' => NULL ]; $del_modal['row'][0]['id'] = [ 'type' => 'hidden', 'fieldset' => 'body', 'value' => $accesspoint['wifi_ap_id']]; $del_modal['row'][4]['confirm'] = [ 'type' => 'checkbox', 'fieldset' => 'body', 'name' => 'Confirm AP Deletion', 'onchange' => "javascript: toggleAttrib('disabled', 'btn-delete-ap-" . $accesspoint['wifi_ap_id'] . "');", 'value' => 'confirm']; $del_modal['row'][9]['btn-delete-ap-' . $accesspoint['wifi_ap_id']] = [ 'type' => 'submit', 'fieldset' => 'footer', 'div_class' => '', // Clean default form-action class! 'name' => 'Delete AP', 'icon' => 'icon-remove icon-white', 'right' => TRUE, 'class' => 'btn-danger', 'onclick' => "delete_ap(" . $accesspoint['wifi_ap_id'] . "); FALSE;", 'disabled' => TRUE]; echo generate_form_modal($del_modal); unset($del_modal); } } echo ' | '; echo '
' . PHP_EOL; echo ' | AP Uptime: | '; echo '' . $uptime_ui . ' | '; echo '||||||
' . PHP_EOL; echo ' | AP Controller Uptime: | '; echo '' . $controller_uptime_ui . ' | '; echo '||||||
' . PHP_EOL; echo ' | AP Controller latency: | '; echo '' . $controller_latency_ui . ' | '; echo '
' . PHP_EOL; echo ' | Radio Slot # | ' . PHP_EOL; echo 'Radio Interface Type | ' . PHP_EOL; echo 'Channel # | ' . PHP_EOL; echo 'Connected Devices | ' . PHP_EOL; echo '' . PHP_EOL; echo ' | ' . PHP_EOL; echo ' | Oper Status | ' . PHP_EOL; echo 'Admin Status | ' . PHP_EOL; echo '
---|---|---|---|---|---|---|---|---|
'; echo ' | ' . $RadioSlotnum . ' | '; echo '' . $member['ap_member_radiotype'] . ' | '; echo '' . $member['ap_member_channel'] . ' | '; echo '' . $member['ap_member_conns'] . ' | '; echo ''; foreach ($graph_types as $graph_type => $graph_text) { //$graph_type = "lwappmember_" . $graph_type; $graph_type = "wifi-ap-member_" . $graph_type; $graph_array['to'] = $config['time']['now']; $graph_array['from'] = $config['time']['day']; $graph_array['id'] = $member['ap_index_member']; $graph_array['type'] = $graph_type; $graph_array['legend'] = "no"; $graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; $minigraph = generate_graph_tag($graph_array); $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $member['ap_index_member'] . " - " . $graph_text); echo overlib_link($link, $minigraph, $overlib_content); unset($graph_array); } echo ' | '; echo ''; echo ' | ' . $member_state . ' | '; echo '' . $member_admin_state . ' | '; echo '
'; echo ' | Interface Name | '; echo ''; echo ' | '; echo ' | Oper Status | '; echo 'Admin Status | '; echo '
---|