';
echo '
';
echo "
";
echo "
SUCCESS
";
echo "
".__('Modules successfully created').'
';
echo '
';
echo '
';
}
return;
} else if ($action == 'snmpget') {
// SNMP get.
$target_oid = htmlspecialchars_decode(get_parameter('oid', ''));
$custom_action = get_parameter('custom_action', '');
if ($custom_action != '') {
$custom_action = urldecode(base64_decode($custom_action));
}
$oid = snmp_browser_get_oid(
$target_ip,
$community,
$target_oid,
$snmp_version,
$snmp3_auth_user,
$snmp3_security_level,
$snmp3_auth_method,
$snmp3_auth_pass,
$snmp3_privacy_method,
$snmp3_privacy_pass,
$server_to_exec
);
snmp_browser_print_oid(
$oid,
$custom_action,
false,
$community,
$snmp_version
);
return;
}
return;
}
// Check login and ACLs.
check_login();
if (! check_acl($config['id_user'], 0, 'AR')) {
db_pandora_audit(
'ACL Violation',
'Trying to access SNMP Console'
);
include 'general/noaccess.php';
exit;
}
// Header.
$url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_browser&pure='.$config['pure'];
if ($config['pure']) {
// Windowed.
$link['text'] = '
';
$link['text'] .= html_print_image(
'images/normal_screen.png',
true,
['title' => __('Normal screen')]
);
$link['text'] .= '';
} else {
// Fullscreen.
$link['text'] = '
';
$link['text'] .= html_print_image(
'images/full_screen.png',
true,
['title' => __('Full screen')]
);
$link['text'] .= '';
}
ui_print_page_header(
__('SNMP Browser'),
'images/op_snmp.png',
false,
'snmp_browser_view',
false,
[$link]
);
// SNMP tree container.
snmp_browser_print_container();