migrate towards new URL format. slowly.

git-svn-id: http://www.observium.org/svn/observer/trunk@2491 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-17 19:14:44 +00:00
parent ab8471158c
commit 95a287baa7
10 changed files with 200 additions and 160 deletions
+18
View File
@@ -1,5 +1,7 @@
<?php
function generate_url($vars, $new_vars = array())
{
@@ -20,6 +22,22 @@ function generate_url($vars, $new_vars = array())
}
function generate_overlib_content($graph_array, $text)
{
global $config;
$overlib_content = '<div style="width: 580px;"><h2>'.$text."</h2>";
foreach (array('day','week','month','year') as $period)
{
$graph_array['from'] = $config['time'][$period];
$overlib_content .= str_replace('"', "\'", generate_graph_tag($graph_array));
}
$overlib_content .= "</div>";
return $overlib_content;
}
function get_percentage_colours($percentage)
{
+4 -1
View File
@@ -21,7 +21,10 @@ foreach ($periods as $period)
$graph_array_zoom['height'] = "150";
$graph_array_zoom['width'] = "400";
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['to'] . "/";
$link_array = $graph_array;
$link_array['page'] = "graphs";
unset($link_array['height'], $link_array['width']);
$link = generate_url($link_array);
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
}