" . PHP_EOL; print "" . PHP_EOL; print "" . PHP_EOL; } function gpsmap_version() { global $config; $info = parse_ini_file($config['base_path'] . '/plugins/gpsmap/INFO', true); return $info['info']; } //defines latitude and longitude for devices function gpsmap_config_form() { global $fields_host_edit, $url_path; $fields_host_edit2 = $fields_host_edit; $fields_host_edit3 = array(); foreach ($fields_host_edit2 as $f => $a) { $fields_host_edit3[$f] = $a; if ($f == 'disabled') { $fields_host_edit3['gpsSpacer'] = array( 'friendly_name' => __('Map Settings', 'gpsmap'), 'method' => 'spacer', ); $fields_host_edit3['GPScoverage'] = array( 'friendly_name' => __('Overlay Inclusion', 'gpsmap'), 'description' => __('Disable to plot host only, not included in coverage overlay.', 'gpsmap'), 'method' => 'checkbox', 'value' => '|arg1:GPScoverage|', 'default' => 'on', ); $fields_host_edit3['latitude'] = array( 'friendly_name' => __('Latitude', 'gpsmap'), 'description' => __('The devices latitude coordinates', 'gpsmap'), 'method' => 'textbox', 'max_length' => 13, 'value' => '|arg1:latitude|', 'default' => '', ); $fields_host_edit3['longitude'] = array( 'friendly_name' => __('Longitude', 'gpsmap'), 'description' => __('The devices longitude coordinates', 'gpsmap'), 'method' => 'textbox', 'max_length' => 13, 'value' => '|arg1:longitude|', 'default' => '', ); if (isset_request_var('id') && get_current_page() == $url_path . 'host.php') { $did = get_filter_request_var('id'); $row = db_fetch_row_prepared('SELECT AP FROM `host` RIGHT JOIN gpsmap_templates ON host.host_template_id = gpsmap_templates.templateID WHERE id = ?', array($did)); if (cacti_sizeof($row) && $row['AP'] == 1) { $fields_host_edit3['start'] = array( 'friendly_name' => __('Starting Degree', 'gpsmap'), 'description' => __('Starting degree for directional area between 0-360', 'gpsmap'), 'method' => 'textbox', 'max_length' => 4, 'value' => '|arg1:start|', 'default' => '0', ); $fields_host_edit3['stop'] = array( 'friendly_name' => __('Stopping Degree', 'gpsmap'), 'description' => __('Stopping degree for directional area, must be greater than the Starting Degree', 'gpsmap'), 'method' => 'textbox', 'max_length' => 4, 'value' => '|arg1:stop|', 'default' => '360', ); $fields_host_edit3['rdistance'] = array( 'friendly_name' => __('Specify Radius', 'gpsmap'), 'description' => __('Manually specify radius for Access Point. Set to 0 to determine radius based on grouped devices', 'gpsmap'), 'method' => 'textbox', 'max_length' => 10, 'value' => '|arg1:rdistance|', 'default' => '0', ); } } $fields_host_edit3['groupnum'] = array( 'friendly_name' => __('Group ID', 'gpsmap'), 'description' => __('Groups define what devices are included in the coverage overlay. Will be checked against AP device group number. 0 to disable', 'gpsmap'), 'method' => 'textbox', 'max_length' => 3, 'value' => '|arg1:groupnum|', 'default' => '0', ); } } $fields_host_edit = $fields_host_edit3; }