id_name)) or filters filtered * * @param tree string SNMP tree returned by snmp_broser_get_tree. * @param id string Level ID. Do not set, used for recursion. * @param depth string Branch depth. Do not set, used for recursion. * */ function snmp_browser_print_tree ($tree, $id = 0, $depth = 0, $last = 0, $last_array = array()) { static $url = false; // Get the base URL for images if ($url === false) { $url = ui_get_full_url('operation/tree'); } // Leaf if (empty ($tree['__LEAVES__'])) { return; } $count = 0; $total = sizeof (array_keys ($tree['__LEAVES__'])) - 1; $last_array[$depth] = $last; if ($depth > 0) { echo "
'; if ($return) { return $output; } echo $output; } /** * Print the div that contains the SNMP browser. * * @param bool return The result is printed if set to true or returned if set to false. * @param string width Width of the SNMP browser. Units must be specified. * @param string height Height of the SNMP browser. Units must be specified. * @param string display CSS display value for the container div. Set to none to hide the div. * * @return string The container div. * */ function snmp_browser_print_container ($return = false, $width = '95%', $height = '500px', $display = '') { // Target selection $table = new StdClass; $table->width = '100%'; $table->size = array (); $table->data = array (); $table->data[0][0] = ''.__('Target IP').'