<?php get_egfa("10.100.0.102"); function get_egfa($ip) { require "genericSnmp.php"; $mac = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.2.1.1.1.0"); $ipadd = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.9.0"); $value[0] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.2.0"); $value[1] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.3.0"); $value[2] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.4.1.4.1"); $value[3] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.4.1.4.2"); $value[4] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.4.1.4.3"); $value[5] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.5.0"); $value[6] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.6.0"); $value[7] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.1"); $value[8] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.2"); $value[9] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.3"); $value[10] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.4"); $value[11] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.5"); $value[12] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.6"); $value[13] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.7"); $value[14] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.11.7.1.2.8"); $value[15] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.3.2.2.1.18.1"); $value[16] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.3.2.2.1.19.1"); $value[17] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.3.0"); $value[18] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.4.0"); $value[19] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.5.0"); $value[20] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.10.0"); $value[21] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.12.0"); $value[22] = snmpget_bigP($ip, ".1.3.6.1.4.1.17409.1.3.1.13.0");
$query = "SELECT DISTINCT ON (ipinterface.nodeid)\nnode.nodesysoid, \nipinterface.ipaddr\nFROM \npublic.ipinterface,\npublic.node\nWHERE \nipinterface.nodeid = node.nodeid AND ipinterface.nodeid = {$nodeid};"; $result = pg_query($query) or die('Query failed: ' . pg_last_error()); while ($row = pg_fetch_object($result)) { $ip = $row->ipaddr; $oid = $row->nodesysoid; } switch ($oid) { case ".1.3.6.1.4.1.3222.14.2.1.1": # code... require "oidget/snmp_1550.php"; get_1550($ip); break; case ".1.3.6.1.4.1.5591.29317.1.11.1.3.1.1": # code... require "oidget/snmp_elink.php"; get_elink($ip); break; case ".1.3.6.1.4.1.17409.1.11": # code... require "oidget/snmp_egfa.php"; get_egfa($ip); break; default: # code... echo "There is no available SNMP info on this device."; break; } echo "<br>"; echo "<br>"; echo "<button onclick=closeWin()>Close</button>"; echo "<script>\nfunction closeWin() {\n\twindow.close();\n}\n</script>";