0) {
$query = get_url_refresh (false);
echo '';
}
?>
Pandora FMS Graph ()
".__('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", 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);
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;
// log4x doesnt support flash yet
//
if ($config['flash_charts'] && $graph_type != "log4x") {
switch ($graph_type) {
case 'sparse':
echo grafico_modulo_sparse ($id, $period, $draw_events, $width, $height,
$label, $unit_name, $draw_alerts, $avg_only, $pure, $date, $baseline);
break;
case 'boolean':
echo grafico_modulo_boolean ($id, $period, $draw_events, $width, $height,
$label, $unit_name, $draw_alerts, 1, $pure, $date);
break;
case 'string':
echo grafico_modulo_string ($id, $period, $draw_events, $width, $height,
$label, $unit_name, $draw_alerts, 1, $pure, $date, 1);
break;
case 'log4x':
echo grafico_modulo_log4x ($id, $period, $draw_events, $width, $height,
$label, $unit_name, $draw_alerts, 1, $pure, $date, 1);
break;
default:
echo fs_error_image ('../images');
break;
}
}
else {
$image = "../../include/fgraph.php?tipo=".$graph_type."&draw_alerts=".$draw_alerts."&draw_events=".$draw_events."&id=".$id."&zoom=".$zoom."&label=". base64_encode ($label) ."&height=".$height."&width=".$width."&period=".$period."&avg_only=".$avg_only."&baseline=".$baseline;
$image .= "&date=" . $date;
print_image ($image, false, array ("border" => 0));
}
//z-index is 1 because 2 made the calendar show under the divmenu.
echo '