$id)); if (empty($advanced_filter)) $type = 0; else $type = 1; echo $type; } // Get values of the current netflow filter if ($get_filter_values){ $id = get_parameter('id'); $filter_values = db_get_row_filter ('tnetflow_filter', array('id_sg' => $id)); echo json_encode($filter_values); } return; } // Read filter configuration $filter_id = (int) get_parameter ('filter_id', 0); $filter['id_name'] = get_parameter ('name', ''); $filter['id_group'] = (int) get_parameter ('assign_group', 0); $filter['aggregate'] = get_parameter('aggregate',''); $filter['output'] = get_parameter('output','bytes'); $filter['ip_dst'] = get_parameter('ip_dst',''); $filter['ip_src'] = get_parameter('ip_src',''); $filter['dst_port'] = get_parameter('dst_port',''); $filter['src_port'] = get_parameter('src_port',''); $filter['advanced_filter'] = get_parameter('advanced_filter',''); $filter['advanced_filter'] = get_parameter('advanced_filter',''); // Read chart configuration $chart_type = (int) get_parameter('chart_type', 0); $max_aggregates = (int) get_parameter('max_aggregates', 0); $period = (int) get_parameter('period', '86400'); $update_date = (int) get_parameter('update_date', 0); $date = get_parameter_post ('date', date ("Y/m/d", get_system_time ())); $time = get_parameter_post ('time', date ("H:i:s", get_system_time ())); $connection_name = get_parameter('connection_name', ''); $interval_length = (int) get_parameter('interval_length', 300); // Read buttons $draw = get_parameter('draw_button', ''); $save = get_parameter('save_button', ''); $update = get_parameter('update_button', ''); // Calculate start and end dates $end_date = strtotime ($date . " " . $time); $start_date = $end_date - $period; if (! defined ('METACONSOLE')) { //Header ui_print_page_header (__('Netflow live view'), "images/networkmap/so_cisco_new.png", false, "", false, array ()); if (! is_executable ($config['netflow_nfdump'])) { ui_print_error_message(__('nfdump binary not found!')); } } else { $nav_bar = array(array('link' => 'index.php?sec=main', 'text' => __('Main')), array('link' => 'index.php?sec=netf&sec2=operation/netflow/nf_live_view', 'text' => __('Netflow live view'))); ui_meta_print_page_header($nav_bar); ui_meta_print_header(__("Netflow live view")); } // Save user defined filter if ($save != '' && check_acl ($config["id_user"], 0, "AW")) { // Save filter args $filter['filter_args'] = netflow_get_filter_arguments ($filter); $filter_id = db_process_sql_insert ('tnetflow_filter', $filter); if ($filter_id === false) { $filter_id = 0; echo '