");
-echo('
- ');
+ echo('
- @@ -36,36 +43,36 @@ echo(" "); } - -#if ((is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php")) || -# ($device['os_group'] && is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os_group'].".inc.php"))) -#{ - echo('
- +if(devicepermitted($_GET['id'])) { + echo('
-
Graphs
');
-#}
-
-$health = mysql_result(mysql_query("select count(*) from storage WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(sensor_id) from sensors WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(current_id) from current WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(freq_id) from frequencies WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(volt_id) from voltage WHERE device_id = '" . $device['device_id'] . "'"), 0) +
- mysql_result(mysql_query("select count(fan_id) from fanspeed WHERE device_id = '" . $device['device_id'] . "'"), 0);
-
-if($health) {
- echo(' -
-
-
Health
-
- ');
}
-if(@mysql_result(mysql_query("select count(app_id) from applications WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
+if(devicepermitted($_GET['id'])) {
+
+ $health = mysql_result(mysql_query("select count(*) from storage WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(sensor_id) from sensors WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(current_id) from current WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(freq_id) from frequencies WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(volt_id) from voltage WHERE device_id = '" . $device['device_id'] . "'"), 0) +
+ mysql_result(mysql_query("select count(fan_id) from fanspeed WHERE device_id = '" . $device['device_id'] . "'"), 0);
+
+ if($health) {
+ echo(' -
+
+
Health
+
+ ');
+ }
+}
+
+if(devicepermitted($_GET['id']) && @mysql_result(mysql_query("select count(app_id) from applications WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
{
echo(' - @@ -85,7 +92,7 @@ if(@mysql_result(mysql_query("select count(app_id) from applications WHERE devic # '); #} -if(is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) { +if(devicepermitted($_GET['id']) && is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) { echo('
-
CollectD
@@ -93,7 +100,7 @@ if(is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) {
');
}
-if(@mysql_result(mysql_query("select count(interface_id) from ports WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
+if(devicepermitted($_GET['id']) && @mysql_result(mysql_query("select count(interface_id) from ports WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
echo(' -
Ports
@@ -101,7 +108,7 @@ if(@mysql_result(mysql_query("select count(interface_id) from ports WHERE device
');
}
-if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
+if(devicepermitted($_GET['id']) && @mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
echo(' -
VLANs
@@ -109,7 +116,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') {
+if(devicepermitted($_GET['id']) && @mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
echo(' -
VRFs
@@ -118,7 +125,7 @@ if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $
}
-if($config['enable_bgp'] && $device['bgpLocalAs']) {
+if(devicepermitted($_GET['id']) && $config['enable_bgp'] && $device['bgpLocalAs']) {
echo('
BGP
@@ -128,7 +135,6 @@ if($config['enable_bgp'] && $device['bgpLocalAs']) {
### This probably needs to die? DEATH TO NAGIOS!
-
#if(@mysql_result(mysql_query("SELECT count(*) FROM nagios_hosts WHERE address = '".$device['hostname']."'", $nagios_link), 0) > '0') {
# echo('- # @@ -146,13 +152,13 @@ if($_SESSION['userlevel'] >= "5" && mysql_result(mysql_query("SELECT count(*) FR
'); } -if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { +if(devicepermitted($_GET['id']) && $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { echo(' '); -} elseif ( $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { +} elseif ( devicepermitted($_GET['id']) && $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { echo('
Inventory
'); } - - -#if(mysql_result(mysql_query("select count(storage_id) from storage WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { -# echo(" -#
Inventory
@@ -160,20 +166,7 @@ if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entP
- -# -#
-#"); -#} - - -if(mysql_result(mysql_query("select count(service_id) from services WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { +if(devicepermitted($_GET['id']) && mysql_result(mysql_query("select count(service_id) from services WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { echo('
Storage
-#
-#
Services
@@ -182,7 +175,7 @@ if(mysql_result(mysql_query("select count(service_id) from services WHERE device
');
}
-if(@mysql_result(mysql_query("select count(toner_id) from toner WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
+if(devicepermitted($_GET['id']) && @mysql_result(mysql_query("select count(toner_id) from toner WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
echo(' '); } +if(devicepermitted($_GET['id'])) { + echo('
Toner
@@ -190,14 +183,15 @@ if(@mysql_result(mysql_query("select count(toner_id) from toner WHERE device_id
- + +
'); +} -echo('
Events
+
+ - - -
'); - -if($config['enable_syslog']) { +if(devicepermitted($_GET['id']) && $config['enable_syslog']) { echo('
Events
-
-
Syslog
- ');
-if($config['show_overview_tab']) {
+if(devicepermitted($_GET['id']) && $config['show_overview_tab']) {
echo("