'
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
. '';
//Header
ui_print_page_header (__('Netflow'), "images/networkmap/so_cisco_new.png", false, "", false, $buttons);
echo"
".__('Filter graph')."
";
echo '';
if (empty ($id)){
echo fs_error_image();
return;
}
$report_name = db_get_value('id_name', 'tnetflow_report', 'id_report', $id);
echo"$report_name
";
$all_rcs = db_get_all_rows_sql("SELECT id_rc FROM tnetflow_report_content WHERE id_report='$id'");
if (empty ($all_rcs)) {
echo fs_error_image();
return;
}
// Process report items
for ($x = 0; isset($all_rcs[$x]['id_rc']); $x++) {
// Get report item
$content_report = db_get_row_sql("SELECT * FROM tnetflow_report_content WHERE id_rc='" . $all_rcs[$x]['id_rc'] . "'");
$max_aggregates= $content_report['max'];
$type = $content_report['show_graph'];
// Get item filters
$filter = db_get_row_sql("SELECT * FROM tnetflow_filter WHERE id_sg = '" . io_safe_input ($content_report['id_filter']) . "'", false, true);
$command = netflow_get_command ($filter);
$aggregate = $filter['aggregate'];
$unit = $filter['output'];
// Process item
switch ($type){
case '0':
$data = netflow_get_data ($start_date, $end_date, $command, $aggregate, $max_aggregates, $unit);
if ($aggregate != 'none') {
echo graph_netflow_aggregate_area($data, $interval, 660, 320, '', '', '', '', $end_date, $unit);
} else {
echo graph_netflow_total_area($data, $interval, 660, 320, '', '','','',$date);
}
break;
case '1':
$result = netflow_get_stats ($start_date, $end_date, $command, $aggregate, $max_aggregates, $unit);
echo graph_netflow_aggregate_pie($result);
break;
case '2':
$data = netflow_get_data ($start_date, $end_date, $command, $aggregate, $max_aggregates, $unit);
echo netflow_data_table ($data, $start_date, $end_date, $unit);
break;
case '3':
$data = netflow_get_stats ($start_date, $end_date, $command, $aggregate, $max_aggregates, $unit);
echo netflow_stat_table ($data, $start_date, $end_date, $unit);
break;
default:
echo fs_error_image();
break;
}
}
?>