only show ADSL/Neighbours on those devices which have entries

git-svn-id: http://www.observium.org/svn/observer/trunk@2170 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-26 15:26:36 +00:00
parent 75e80d8fee
commit f6a4352522
+12 -5
View File
@@ -7,11 +7,18 @@ if ($_GET['opta'] == 'graphs')
print_optionbar_start();
$menu_options = array('basic' => 'Basic',
'details' => 'Details',
'neighbours' => 'Neighbours',
'arp' => 'ARP Table',
'adsl' => 'ADSL');
$menu_options['basic'] = 'Basic';
$menu_options['details'] = 'Details';
$menu_options['arp'] = 'ARP Table';
if(mysql_result(mysql_query("SELECT * FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.interface_id = L.local_interface_id"),0))
{
$menu_options['neighbours'] = 'Neighbours';
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `ifType` = 'adsl'"),0))
{
$menu_options['adsl'] = 'ADSL';
}
if (!$_GET['opta']) { $_GET['opta'] = "basic"; }