fix BGP pages

git-svn-id: http://www.observium.org/svn/observer/trunk@353 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-03-11 15:30:01 +00:00
parent dfcf7756dc
commit 98ba6a4f83
2 changed files with 15 additions and 14 deletions

View File

@@ -30,6 +30,13 @@ echo("
</a> </a>
</li>"); </li>");
echo("<li class=" . $select['graphs'] . ">
<a href='/device/" . $device['device_id'] . "/graphs/'>
<img src='images/16/server_chart.png' align=absmiddle border=0> Graphs
</a>
</li>
");
if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
echo(" echo("
<li class=" . $select['vlans'] . "> <li class=" . $select['vlans'] . ">
@@ -76,19 +83,12 @@ if($_SESSION[userlevel] >= "5") {
echo(" echo("
<li class=" . $select['map'] . "> <li class=" . $select['map'] . ">
<a href='/device/" . $device['device_id'] . "/map/'> <a href='/device/" . $device['device_id'] . "/map/'>
<img src='images/16/chart_organisation.png' align=absmiddle border=0> Port Map <img src='images/16/chart_organisation.png' align=absmiddle border=0> Map
</a> </a>
</li> </li>
"); ");
} }
echo("<li class=" . $select['graphs'] . ">
<a href='/device/" . $device['device_id'] . "/graphs/'>
<img src='images/16/server_chart.png' align=absmiddle border=0> Host Graphs
</a>
</li>
");
if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') {
echo("<li class=" . $select['entphysical'] . "> echo("<li class=" . $select['entphysical'] . ">

View File

@@ -1,22 +1,23 @@
<?php <?php
if($_GET['opta'] == "graphs" || $_GET['opta'] == "graphs") { if($_GET['optb'] == "graphs" || $_GET['idb'] == "graphs") {
$graphs = 1; $graphs = 1;
} else { } else {
$graphs = 0; $graphs = 0;
} }
echo(" echo("
<div style='float: right; text-align: right;'> <div style='padding: 5px; height: 20px; clear: both; display: block;'>
<a href='/device/" . $_GET['id'] . "/bgp/'>No Graphs</a> | <div style='float: left; font-size: 22px; font-weight: bold;'>Local AS : " . $device['bgpLocalAs'] . "</div>
<a href='/device/" . $_GET['id'] . "/bgp/graphs/'>Graphs</a> <div style='float: right; text-align: right;'>
<a href='/device/" . $_GET['id'] . "/bgp/'>No Graphs</a> |
<a href='/device/" . $_GET['id'] . "/bgp/graphs/'>Graphs</a>
</div>
</div>"); </div>");
echo("<div style='margin: 5px;'><table border=0 cellspacing=1 cellpadding=5 width=100%>"); echo("<div style='margin: 5px;'><table border=0 cellspacing=1 cellpadding=5 width=100%>");
echo("<tr><td colspan=6><h2>Local AS : " . $device['bgpLocalAs'] . "</h2></td></tr>");
$i = "1"; $i = "1";
$peer_query = mysql_query("select * from bgpPeers WHERE device_id = '".$device['device_id']."' ORDER BY bgpPeerRemoteAs, bgpPeerIdentifier"); $peer_query = mysql_query("select * from bgpPeers WHERE device_id = '".$device['device_id']."' ORDER BY bgpPeerRemoteAs, bgpPeerIdentifier");
while($peer = mysql_fetch_array($peer_query)) { while($peer = mysql_fetch_array($peer_query)) {