diff --git a/data_queries.php b/data_queries.php index 5762799c60..b70b7a03d3 100644 --- a/data_queries.php +++ b/data_queries.php @@ -89,6 +89,10 @@ header('Location: data_queries.php?header=false&action=item_edit&id=' . get_request_var('snmp_query_graph_id') . '&snmp_query_id=' . get_request_var('snmp_query_id')); break; + case 'item_remove_confirm': + data_query_item_remove_confirm(); + + break; case 'item_remove': get_filter_request_var('snmp_query_id'); @@ -369,27 +373,68 @@ function data_query_item_remove_dssv() { db_execute_prepared('DELETE FROM snmp_query_graph_rrd_sv WHERE id = ?', array(get_request_var('id'))); } -function data_query_item_remove() { +function data_query_item_remove_confirm() { + global $vdef_functions, $vdef_item_types, $custom_vdef_data_source_types; + /* ================= input validation ================= */ get_filter_request_var('id'); get_filter_request_var('snmp_query_id'); /* ==================================================== */ - if ((read_config_option('deletion_verification') == 'on') && (!isset_request_var('confirm'))) { - top_header(); + form_start('data_queries.php?action=edit&id' . get_request_var('snmp_query_id')); - form_confirm('Are You Sure?', "Are you sure you want to delete the Data Query Graph '" . htmlspecialchars(db_fetch_cell_prepared('SELECT name FROM snmp_query_graph WHERE id = ?', array(get_request_var('id'))), ENT_QUOTES) . "'?", htmlspecialchars('data_queries.php?action=edit&id=' . get_request_var('snmp_query_id')), htmlspecialchars('data_queries.php?action=item_remove&id=' . get_request_var('id') . '&snmp_query_id=' . get_request_var('snmp_query_id'))); + html_start_box('', '100%', '', '3', 'center', ''); - bottom_footer(); - exit; - } + $graph_template = db_fetch_row('SELECT * FROM snmp_query_graph WHERE id=' . get_request_var('id')); - if ((read_config_option('deletion_verification') == '') || (isset_request_var('confirm'))) { - db_execute_prepared('DELETE FROM snmp_query_graph WHERE id = ?', array(get_request_var('id'))); - db_execute_prepared('DELETE FROM snmp_query_graph_rrd WHERE snmp_query_graph_id = ?', array(get_request_var('id'))); - db_execute_prepared('DELETE FROM snmp_query_graph_rrd_sv WHERE snmp_query_graph_id = ?', array(get_request_var('id'))); - db_execute_prepared('DELETE FROM snmp_query_graph_sv WHERE snmp_query_graph_id = ?', array(get_request_var('id'))); - } + ?> + + +

Click 'Continue' to delete the following Data Query Graph Association.

+

Graph Name: ''
+ + + + + + + + + + + - '> + '> + +