mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
url fixies
git-svn-id: http://www.observium.org/svn/observer/trunk@3023 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -140,7 +140,7 @@ function overlib_link($url, $text, $contents, $class)
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$contents = str_replace("\"", "\'", $contents);
|
$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 .= " onmouseover=\"return overlib('".$contents."'".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">";
|
||||||
$output .= $text."</a>";
|
$output .= $text."</a>";
|
||||||
|
|
||||||
|
|||||||
@@ -7,21 +7,21 @@ function data_uri($file, $mime)
|
|||||||
return ('data:' . $mime . ';base64,' . $base64);
|
return ('data:' . $mime . ';base64,' . $base64);
|
||||||
}
|
}
|
||||||
|
|
||||||
$width = mres($_GET['width']);
|
$width = $_GET['width'];
|
||||||
$height = mres($_GET['height']);
|
$height = $_GET['height'];
|
||||||
$title = mres($_GET['title']);
|
$title = $_GET['title'];
|
||||||
$vertical = mres($_GET['vertical']);
|
$vertical = $_GET['vertical'];
|
||||||
$legend = mres($_GET['legend']);
|
$legend = $_GET['legend'];
|
||||||
$id = mres($_GET['id']);
|
$id = $_GET['id'];
|
||||||
|
|
||||||
$from = (isset($_GET['from']) ? mres($_GET['from']) : time() - 60*60*24);
|
$from = (isset($_GET['from']) ? $_GET['from'] : time() - 60*60*24);
|
||||||
$to = (isset($_GET['to']) ? mres($_GET['to']) : time());
|
$to = (isset($_GET['to']) ? $_GET['to'] : time());
|
||||||
|
|
||||||
if ($from < 0) { $from = $to + $from; }
|
if ($from < 0) { $from = $to + $from; }
|
||||||
|
|
||||||
$graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
|
$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'];
|
$type = $graphtype['type'];
|
||||||
$subtype = $graphtype['subtype'];
|
$subtype = $graphtype['subtype'];
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if($_SESSION['widescreen']) {
|
if($_SESSION['widescreen'])
|
||||||
|
{
|
||||||
if (!$graph_array['height']) { $graph_array['height'] = "110"; }
|
if (!$graph_array['height']) { $graph_array['height'] = "110"; }
|
||||||
if (!$graph_array['width']) { $graph_array['width'] = "215"; }
|
if (!$graph_array['width']) { $graph_array['width'] = "215"; }
|
||||||
$periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');
|
$periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if($_SESSION['widescreen'])
|
|||||||
if (!is_numeric($vars['from'])) { $vars['from'] = $config['time']['day']; }
|
if (!is_numeric($vars['from'])) { $vars['from'] = $config['time']['day']; }
|
||||||
if (!is_numeric($vars['to'])) { $vars['to'] = $config['time']['now']; }
|
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'];
|
$type = $graphtype['type'];
|
||||||
$subtype = $graphtype['subtype'];
|
$subtype = $graphtype['subtype'];
|
||||||
|
|||||||
Reference in New Issue
Block a user