2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
2007-11-21 14:26:24 +00:00
|
|
|
global $config;
|
|
|
|
|
2007-06-24 14:56:47 +00:00
|
|
|
if(!$graph_type) { $graph_type = $_GET['type']; }
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2009-02-06 15:17:09 +00:00
|
|
|
if(!$device) { $device['device_id'] = getifhost($interface['interface_id']); }
|
|
|
|
|
2010-03-11 21:58:50 +00:00
|
|
|
$graph_array['height'] = "100";
|
|
|
|
$graph_array['width'] = "215";
|
|
|
|
$graph_array['to'] = $now;
|
|
|
|
$graph_array['port'] = $interface['interface_id'];
|
|
|
|
$graph_array['type'] = $graph_type;
|
|
|
|
|
2010-03-14 01:38:43 +00:00
|
|
|
$periods = array('day', 'week', 'month', 'year');
|
2010-03-11 21:58:50 +00:00
|
|
|
|
2010-03-14 01:38:43 +00:00
|
|
|
foreach($periods as $period) {
|
|
|
|
$graph_array['from'] = $$period;
|
|
|
|
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
|
2010-03-14 13:50:14 +00:00
|
|
|
echo(overlib_link($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
2010-03-14 01:38:43 +00:00
|
|
|
}
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
?>
|