2010-07-25 18:05:16 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-17 11:29:23 +00:00
|
|
|
global $config;
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-09-04 21:50:48 +00:00
|
|
|
if($_SESSION['widescreen']) {
|
|
|
|
if(!$graph_array['height']) { $graph_array['height'] = "110"; }
|
|
|
|
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
|
|
|
|
} else {
|
|
|
|
if(!$graph_array['height']) { $graph_array['height'] = "100"; }
|
|
|
|
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
|
|
|
|
}
|
2011-04-19 21:54:43 +00:00
|
|
|
|
2011-05-17 19:21:20 +00:00
|
|
|
$graph_array['to'] = $config['time']['now'];
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-09-04 21:50:48 +00:00
|
|
|
$periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-03-17 11:29:23 +00:00
|
|
|
foreach ($periods as $period)
|
|
|
|
{
|
2011-05-17 19:21:20 +00:00
|
|
|
$graph_array['from'] = $config['time'][$period];
|
2011-03-17 11:29:23 +00:00
|
|
|
$graph_array_zoom = $graph_array;
|
|
|
|
$graph_array_zoom['height'] = "150";
|
|
|
|
$graph_array_zoom['width'] = "400";
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-05-17 19:21:20 +00:00
|
|
|
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['to'] . "/";
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-03-17 11:29:23 +00:00
|
|
|
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
|
|
|
}
|
2010-07-25 18:05:16 +00:00
|
|
|
|
2011-04-19 21:54:43 +00:00
|
|
|
?>
|