get rid of base_url, part 1 of ...

git-svn-id: http://www.observium.org/svn/observer/trunk@2132 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-04-21 13:41:24 +00:00
parent 6826be0f91
commit 6cc1abf2e5
15 changed files with 33 additions and 32 deletions

View File

@@ -22,7 +22,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
$graphs = $config['os']['default']['over'];
}
$url = $config['base_url']."/device/" . $device['device_id'] . "/" . $linksuffix;
$url = "device/" . $device['device_id'] . "/" . $linksuffix;
$contents = "<div class=list-large>".$device['hostname'];
if ($device['hardware']) { $contents .= " - ".$device['hardware']; }
$contents .= "</div>";
@@ -41,8 +41,8 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
$graphhead = $entry['text'];
$contents .= '<div style="width: 708px">';
$contents .= '<span style="margin-left: 5px; font-size: 12px; font-weight: bold;">'.$graphhead.'</span><br />';
$contents .= '<img src="' . $config['base_url'] . "/graph.php?id=" . $device['device_id'] . "&amp;from=$start&amp;to=$end&amp;width=275&amp;height=100&amp;type=$graph&amp;legend=no" . '" style="margin: 2px;">';
$contents .= '<img src="' . $config['base_url'] . "/graph.php?id=" . $device['device_id'] . "&amp;from=".$config['week']."&amp;to=$end&amp;width=275&amp;height=100&amp;type=$graph&amp;legend=no" . '" style="margin: 2px;">';
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&amp;from=$start&amp;to=$end&amp;width=275&amp;height=100&amp;type=$graph&amp;legend=no" . '" style="margin: 2px;">';
$contents .= "<img src=\"graph.php?id=" . $device['device_id'] . "&amp;from=".$config['week']."&amp;to=$end&amp;width=275&amp;height=100&amp;type=$graph&amp;legend=no" . '" style="margin: 2px;">';
$contents .= '</div>';
}
@@ -205,7 +205,7 @@ function generate_graph_tag ($args)
global $config;
$sep = "?";
$url = $config['base_url'] . "/graph.php";
$url = "graph.php";
foreach ($args as $key => $arg)
{
$url .= $sep.$key."=".$arg;
@@ -260,7 +260,7 @@ function generate_port_link($args, $text = NULL, $type = NULL)
$content .= generate_graph_tag($graph_array);
$content .= "</div>";
$url = $config['base_url']."/device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
$url = "device/".$args['device_id']."/port/" . $args['interface_id'] . "/";
if (port_permitted($args['interface_id'])) {
return overlib_link($url, $text, $content, $class);

View File

@@ -1,4 +1,4 @@
<script type="text/javascript" src="<?php echo($config['base_url']); ?>/js/tw-sack.js"></script>
<script type="text/javascript" src="js/tw-sack.js"></script>
<script type="text/javascript">
var ajax = new Array();

View File

@@ -16,7 +16,7 @@ foreach ($periods as $period)
$graph_array_zoom['height'] = "150";
$graph_array_zoom['width'] = "400";
$link = $config['base_url'] . "/graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['now'] . "/";
$link = "graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $graph_array['from'] . "/" . $config['now'] . "/";
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
}

View File

@@ -23,10 +23,10 @@ if ($service['service_checked'])
$checked = formatUptime($checked);
} else { $checked = "Never"; }
$mini_url = $config['base_url'] . "/graph.php?id=".$service['service_id']."&amp;type=service_availability&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=efefef";
$mini_url = "graph.php?id=".$service['service_id']."&amp;type=service_availability&amp;from=".$day."&amp;to=".$now."&amp;width=80&amp;height=20&amp;bg=efefef";
$popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$service['service_type'];
$popup .= "</div><img src=\'".$config['base_url']."/graph.php?id=" . $service['service_id'] . "&amp;type=service_availability&amp;from=$day&amp;to=$now&amp;width=400&amp;height=125\'>";
$popup .= "</div><img src=\'graph.php?id=" . $service['service_id'] . "&amp;type=service_availability&amp;from=$day&amp;to=$now&amp;width=400&amp;height=125\'>";
$popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
echo("