mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
lots of fixes for non-webroot installations
git-svn-id: http://www.observium.org/svn/observer/trunk@362 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -25,13 +25,13 @@ echo("<div class=mainpane>");
|
||||
echo("
|
||||
<ul id='maintab' class='shadetabs'>
|
||||
<li class=" . $select['overview'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/overview/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/overview/'>
|
||||
<img src='images/16/server_lightning.png' align=absmiddle border=0> Overview
|
||||
</a>
|
||||
</li>");
|
||||
|
||||
echo("<li class=" . $select['graphs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/graphs/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/graphs/'>
|
||||
<img src='images/16/server_chart.png' align=absmiddle border=0> Graphs
|
||||
</a>
|
||||
</li>
|
||||
@@ -40,7 +40,7 @@ echo("<li class=" . $select['graphs'] . ">
|
||||
if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['vlans'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/vlans/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/'>
|
||||
<img src='images/16/vlans.png' align='absmiddle' border='0'> VLANs
|
||||
</a>
|
||||
</li>");
|
||||
@@ -49,7 +49,7 @@ if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id =
|
||||
if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['vrfs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/vrfs/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/'>
|
||||
<img src='images/16/layers.png' align=absmiddle border=0> VRFs
|
||||
</a>
|
||||
</li>");
|
||||
@@ -59,7 +59,7 @@ if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $
|
||||
if($config['enable_bgp'] && $device['bgpLocalAs']) {
|
||||
echo("
|
||||
<li class=" . $select['bgp'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/bgp/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/bgp/'>
|
||||
<img src='images/16/link.png' align=absmiddle border=0> BGP
|
||||
</a>
|
||||
</li>");
|
||||
@@ -68,12 +68,12 @@ if($config['enable_bgp'] && $device['bgpLocalAs']) {
|
||||
if(@mysql_result(mysql_query("select count(interface_id) from interfaces WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['ifs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/ifs/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ifs/'>
|
||||
<img src='images/16/server_link.png' align=absmiddle border=0> Ports
|
||||
</a>
|
||||
</li>
|
||||
<li class=" . $select['ifgraphs'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/ifgraphs/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ifgraphs/'>
|
||||
<img src='images/16/chart_curve_link.png' align=absmiddle border=0> Port Graphs
|
||||
</a>
|
||||
</li>");
|
||||
@@ -82,7 +82,7 @@ if(@mysql_result(mysql_query("select count(interface_id) from interfaces WHERE d
|
||||
if($_SESSION[userlevel] >= "5") {
|
||||
echo("
|
||||
<li class=" . $select['map'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/map/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/map/'>
|
||||
<img src='images/16/chart_organisation.png' align=absmiddle border=0> Map
|
||||
</a>
|
||||
</li>
|
||||
@@ -92,7 +92,7 @@ if($_SESSION[userlevel] >= "5") {
|
||||
if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') {
|
||||
|
||||
echo("<li class=" . $select['entphysical'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/entphysical/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/entphysical/'>
|
||||
<img src='images/16/bricks.png' align=absmiddle border=0> Inventory
|
||||
</a>
|
||||
</li>
|
||||
@@ -104,7 +104,7 @@ if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entP
|
||||
if(mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['temp'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/temp/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/temp/'>
|
||||
<img src='images/16/weather_sun.png' align=absmiddle border=0> Temps
|
||||
</a>
|
||||
</li>
|
||||
@@ -114,7 +114,7 @@ if(mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_h
|
||||
if(mysql_result(mysql_query("select count(storage_id) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['storage'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/storage/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/storage/'>
|
||||
<img src='images/16/database.png' align=absmiddle border=0> Storage
|
||||
</a>
|
||||
</li>
|
||||
@@ -125,7 +125,7 @@ if(mysql_result(mysql_query("select count(storage_id) from storage WHERE host_id
|
||||
if(mysql_result(mysql_query("select count(service_id) from services WHERE service_host = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['srv'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/srv/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/srv/'>
|
||||
<img src='images/16/server_cog.png' align=absmiddle border=0> Services
|
||||
</a>
|
||||
</li>
|
||||
@@ -134,14 +134,14 @@ if(mysql_result(mysql_query("select count(service_id) from services WHERE servic
|
||||
|
||||
echo("
|
||||
<li class=" . $select['events'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/events/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/events/'>
|
||||
<img src='images/16/report_magnify.png' align=absmiddle border=0> Events
|
||||
</a>
|
||||
</li>");
|
||||
|
||||
if($config['enable_syslog']) { echo("
|
||||
<li class=" . $select['syslog'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/syslog/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/syslog/'>
|
||||
<img src='images/16/printer.png' align=absmiddle border=0> Syslog
|
||||
</a>
|
||||
</li>
|
||||
@@ -150,7 +150,7 @@ if($config['enable_syslog']) { echo("
|
||||
if($_SESSION[userlevel] >= "5" && is_file($config['rancid_configs'] . $device['hostname'])) {
|
||||
echo("
|
||||
<li class=" . $select['showconfig'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/showconfig/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/showconfig/'>
|
||||
<img src='images/16/page_white_text.png' align=absmiddle border=0> Config
|
||||
</a>
|
||||
</li>
|
||||
@@ -160,7 +160,7 @@ if($_SESSION[userlevel] >= "5" && is_file($config['rancid_configs'] . $device['h
|
||||
if($_SESSION[userlevel] >= "5") {
|
||||
echo("
|
||||
<li class=" . $select['edit'] . ">
|
||||
<a href='/device/" . $device['device_id'] . "/edit/'>
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/edit/'>
|
||||
<img src='images/16/server_edit.png' align=absmiddle border=0> Settings
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user