url fixies

git-svn-id: http://www.observium.org/svn/observer/trunk@3023 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-04-10 17:36:28 +00:00
parent 1ab62e74b8
commit d5690a7d93
4 changed files with 13 additions and 12 deletions

View File

@ -140,7 +140,7 @@ function overlib_link($url, $text, $contents, $class)
global $config;
$contents = str_replace("\"", "\'", $contents);
$output = "<a class='".$class."' href='".$url."'";
$output = "<a class='".$class."' href=\"".$url.'"';
$output .= " onmouseover=\"return overlib('".$contents."'".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">";
$output .= $text."</a>";

View File

@ -7,21 +7,21 @@ function data_uri($file, $mime)
return ('data:' . $mime . ';base64,' . $base64);
}
$width = mres($_GET['width']);
$height = mres($_GET['height']);
$title = mres($_GET['title']);
$vertical = mres($_GET['vertical']);
$legend = mres($_GET['legend']);
$id = mres($_GET['id']);
$width = $_GET['width'];
$height = $_GET['height'];
$title = $_GET['title'];
$vertical = $_GET['vertical'];
$legend = $_GET['legend'];
$id = $_GET['id'];
$from = (isset($_GET['from']) ? mres($_GET['from']) : time() - 60*60*24);
$to = (isset($_GET['to']) ? mres($_GET['to']) : time());
$from = (isset($_GET['from']) ? $_GET['from'] : time() - 60*60*24);
$to = (isset($_GET['to']) ? $_GET['to'] : time());
if ($from < 0) { $from = $to + $from; }
$graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', mres($_GET['type']), $graphtype);
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', $_GET['type'], $graphtype);
$type = $graphtype['type'];
$subtype = $graphtype['subtype'];

View File

@ -2,7 +2,8 @@
global $config;
if($_SESSION['widescreen']) {
if($_SESSION['widescreen'])
{
if (!$graph_array['height']) { $graph_array['height'] = "110"; }
if (!$graph_array['width']) { $graph_array['width'] = "215"; }
$periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');

View File

@ -16,7 +16,7 @@ if($_SESSION['widescreen'])
if (!is_numeric($vars['from'])) { $vars['from'] = $config['time']['day']; }
if (!is_numeric($vars['to'])) { $vars['to'] = $config['time']['now']; }
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', mres($vars['type']), $graphtype);
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', $vars['type'], $graphtype);
$type = $graphtype['type'];
$subtype = $graphtype['subtype'];