load_tables(); } echo ''; $id = get_parameter('id'); $label = base64_decode(get_parameter('label', '')); ?> 0) { $query = ui_get_url_refresh (false); echo ''; } ?> Pandora FMS Graph (<?php echo modules_get_agentmodule_agent_name ($id) . ' - ' . $label; ?>) ".__('There was a problem locating the source of the graph').""; exit; } $period = get_parameter ( "period", 3600); $draw_alerts = get_parameter("draw_alerts", 0); $avg_only = get_parameter ("avg_only", 1); $show_other = (bool)get_parameter('show_other', false); if ($show_other) { $avg_only = 0; } $period = get_parameter ("period", 86400); $id = get_parameter ("id", 0); $width = get_parameter ("width", 555); $height = get_parameter ("height", 245); $label = get_parameter ("label", ""); $start_date = get_parameter ("start_date", date("Y-m-d")); $draw_events = get_parameter ("draw_events", 0); $graph_type = get_parameter ("type", "sparse"); $zoom = get_parameter ("zoom", 1); $baseline = get_parameter ("baseline", 0); $show_events_graph = get_parameter ("show_events_graph", 0); if ($zoom > 1) { $height = $height * ($zoom / 2.1); $width = $width * ($zoom / 1.4); echo ""; } $utime = get_system_time (); $current = date("Y-m-d", $utime); if ($start_date != $current) $date = strtotime($start_date); else $date = $utime; $urlImage = 'http://'; if ($config['https']) { $urlImage = 'https://'; } $urlImage .= $_SERVER['SERVER_NAME'] . $config['homeurl'] . '/'; // log4x doesnt support flash yet // if ($config['flash_charts'] == 1) echo '
'; else echo '
'; switch ($graph_type) { case 'boolean': echo grafico_modulo_boolean ($id, $period, $draw_events, $width, $height, $label, null, $draw_alerts, $avg_only, false, $date, false, $urlImage, 'adapter_'.$graph_type); echo '


'; if ($show_events_graph) echo graphic_module_events($id, $width, $height, $period, $config['homeurl'] . '/', $zoom, 'adapted_'.$graph_type); break; case 'sparse': echo grafico_modulo_sparse ($id, $period, $draw_events, $width, $height, $label, null, $draw_alerts, $avg_only, false, $date, '', $baseline, 0, true, false, $urlImage, 1, false, 'adapter_'.$graph_type); echo '


'; if ($show_events_graph) echo graphic_module_events($id, $width, $height, $period, $config['homeurl'] . '/', $zoom, 'adapted_'.$graph_type); break; case 'string': echo grafico_modulo_string ($id, $period, $draw_events, $width, $height, $label, null, $draw_alerts, 1, false, $date, false, $urlImage, 'adapter_'.$graph_type); echo '


'; if ($show_events_graph) echo graphic_module_events($id, $width, $height, $period, $config['homeurl'] . '/', $zoom, 'adapted_'.$graph_type); break; case 'log4x': echo grafico_modulo_log4x ($id, $period, $draw_events, $width, $height, $label, $unit_name, $draw_alerts, 1, $pure, $date); echo '


'; if ($show_events_graph) echo graphic_module_events($id, $width, $height, $period, $config['homeurl'] . '/', $zoom); break; default: echo fs_error_image ('../images'); break; } echo '
'; //z-index is 1 because 2 made the calendar show under the divmenu. echo '