pandorafms/pandora_console/godmode/netflow/nf.php

96 lines
2.9 KiB
PHP
Raw Normal View History

<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
//include_once("include/functions_graph.php");
include_once("include/functions_ui.php");
//ui_require_javascript_file ('calendar');
check_login ();
if (! check_acl ($config["id_user"], 0, "IR")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$buttons ['view']= '<a href="index.php?sec=netf&sec2=operation/netflow/nf&id_name='.$name.'">'
. html_print_image ("images/lupa.png", true, array ("title" => __('View')))
. '</a>';
$buttons['edit'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'
. html_print_image ("images/edit.png", true, array ("title" => __('Filter list')))
. '</a>';
$buttons['add'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'
. html_print_image ("images/add.png", true, array ("title" => __('Add filter')))
. '</a>';
//Header
ui_print_page_header (__('Netflow Manager'), "images/networkmap/so_cisco_new.png", false, "", true, $buttons);
$update = (bool) get_parameter ("update");
if ($update) {
$config['netflow_path'] = (string)get_parameter('netflow_path');
if (db_get_value('token', 'tconfig', 'token', 'netflow_path') === false) {
config_create_value('netflow_path', $config['netflow_path']);
2012-07-24 Miguel de Dios <miguel.dedios@artica.es> * godmode/setup/file_manager.php, godmode/setup/news.php, godmode/users/configure_user.php, godmode/users/user_list.php, godmode/massive/massive_copy_modules.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_delete_action_alerts.php, godmode/massive/massive_delete_alerts.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_nc_groups.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php, godmode/netflow/nf_item_list.php, godmode/netflow/nf_report_item.php, godmode/netflow/nf.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/agentes/estado_agente.php, operation/agentes/sla_view.php, operation/agentes/tactical.php, operation/agentes/estado_generalagente.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, operation/integria_incidents/incident_detail.php, operation/gis_maps/index.php, operation/events/events_list.php, operation/events/events.php, operation/messages/message_edit.php, operation/messages/message_list.php, operation/reporting/graph_viewer.php, operation/search_reports.php, operation/netflow/nf_view.php: cleaned source code. * godmode/massive/massive_operations.php, godmode/massive/massive_edit_modules.php: fixed the massive edition of "any" module in agents. Fixes: #3543484 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
}
else {
db_process_sql_update ('tconfig',
2012-07-24 Miguel de Dios <miguel.dedios@artica.es> * godmode/setup/file_manager.php, godmode/setup/news.php, godmode/users/configure_user.php, godmode/users/user_list.php, godmode/massive/massive_copy_modules.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_delete_action_alerts.php, godmode/massive/massive_delete_alerts.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_nc_groups.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/netflow/nf_edit.php, godmode/netflow/nf_edit_form.php, godmode/netflow/nf_item_list.php, godmode/netflow/nf_report_item.php, godmode/netflow/nf.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/agentes/estado_agente.php, operation/agentes/sla_view.php, operation/agentes/tactical.php, operation/agentes/estado_generalagente.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, operation/integria_incidents/incident_detail.php, operation/gis_maps/index.php, operation/events/events_list.php, operation/events/events.php, operation/messages/message_edit.php, operation/messages/message_list.php, operation/reporting/graph_viewer.php, operation/search_reports.php, operation/netflow/nf_view.php: cleaned source code. * godmode/massive/massive_operations.php, godmode/massive/massive_edit_modules.php: fixed the massive edition of "any" module in agents. Fixes: #3543484 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 18:38:48 +02:00
array ('value' => $config['netflow_path']),
array ('token' => 'netflow_path'));
}
}
$table->width = '70%';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = "databox_color";
$table->style[0] = 'vertical-align: top;';
$table->data = array ();
$table->data[0][0] = '<b>'.__('Path').'</b>'. ui_print_help_tip (__("Read input from a sequence of files in the same directory."), true);
$table->data[0][1] = html_print_input_text ('netflow_path', $config['netflow_path'], false, 50, 200, true);
echo '<form id="netflow_setup" method="post">';
html_print_table ($table);
// Update button
echo '<div class="action-buttons" style="width:70%;">';
html_print_input_hidden ('update', 1);
html_print_submit_button (__('Update'), 'upd_button', false, 'class="sub upd"');
echo '</div></form>';
?>
<script type="text/javascript">
$(document).ready (function () {
$("textarea").TextAreaResizer ();
});
</script>