[A-Za-z0-9]+)_(?P.+)/', mres($graph_type), $graphtype); $type = $graphtype['type']; $subtype = $graphtype['subtype']; if (is_file("includes/graphs/".$type."/auth.inc.php")) { include("includes/graphs/".$type."/auth.inc.php"); } if (!$auth) { include("includes/error-no-perm.inc.php"); } else { # Do we really need to show the type? User does not have to see the type of graph (i.e. sensor_temperature) # Yes, i think we doo, else we have graph titles of "router1". It's nice to show the type here. maybe only the pretty # array_type? if (isset($config['graph_types'][$type][$subtype]['descr'])) { $title .= " :: ".$config['graph_types'][$type][$subtype]['descr']; } else { $title .= " :: ".$graph_type; } $graph_array['height'] = "60"; $graph_array['width'] = "150"; $graph_array['legend'] = "no"; $graph_array['to'] = $now; $graph_array['id'] = $id; $graph_array['type'] = $graph_type; $graph_array['from'] = $day; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; print_optionbar_start(); echo($title); print_optionbar_end(); echo("
"); echo("
"); echo("
24 Hour
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $twoday; echo("
48 Hour
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $week; echo("
Week
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $config['twoweek']; echo("
Two Week
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $month; echo("
Month
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $config['twomonth']; echo("
Two Month
"); echo(generate_graph_tag($graph_array)); echo("
"); $graph_array['from'] = $year; echo("
Year
"); echo(generate_graph_tag($graph_array)); echo("
"); echo("
"); $graph_array['height'] = "300"; $graph_array['width'] = "1075"; $graph_array['from'] = $from; $graph_array['to'] = $to; $graph_array['legend'] = "yes"; echo("
"); echo(generate_graph_tag($graph_array)); echo("
"); echo("
"); } ?>