diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index a6c8b8724b..c00a8ce85c 100755 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -41,10 +41,10 @@ $save_alert = (bool)get_parameter('save_alert', false); $modify_alert = (bool)get_parameter('modify_alert', false); $delete_alert = (bool)get_parameter('delete_alert', false); $multiple_delete = (bool)get_parameter('multiple_delete', false); -$add_action = get_parameter('addbutton', ''); +$add_action = (bool)get_parameter('add_alert', 0); $delete_action = get_parameter('delete_action', 0); -if ($add_action == "Add") { +if ($add_action) { $values['id_alert_snmp'] = get_parameter('id_alert_snmp'); $values['alert_type'] = get_parameter('alert_type'); $values['al_field1'] = get_parameter('field1_value'); @@ -57,12 +57,12 @@ if ($add_action == "Add") { $values['al_field8'] = get_parameter('field8_value'); $values['al_field9'] = get_parameter('field9_value'); $values['al_field10'] = get_parameter('field10_value'); - + $result = db_process_sql_insert('talert_snmp_action', $values); } if ($delete_action) { - + $action_id = get_parameter('action_id'); $result = db_process_sql_delete('talert_snmp_action', array('id'=>$action_id)); @@ -466,10 +466,12 @@ if ($multiple_delete) { } if ($count == $total) { - ui_print_success_message(__('Successfully deleted alerts (%s / %s)', $count, $total)); + ui_print_success_message( + __('Successfully deleted alerts (%s / %s)', $count, $total)); } else { - ui_print_error_message(__('Unsuccessfully deleted alerts (%s / %s)', $count, $total)); + ui_print_error_message( + __('Unsuccessfully deleted alerts (%s / %s)', $count, $total)); } } @@ -506,16 +508,19 @@ if ($create_alert || $update_alert) { echo '
'.__('Description').' | '; - html_print_textarea('description', 3, 2, $description, 'style="width:400px;"'); - - //html_print_input_text ("description", $description, '', 60); - echo ' |
' . __('Description') . ' | ' . + ''; + html_print_textarea('description', 3, 2, $description, 'style="width:400px;"'); + echo ' | ' . + '
' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . ' | |
'.__('Enterprise String').' | '; + echo ' |
' . __('Enterprise String') . ' | ' . + ''; html_print_input_text ("oid", $oid, '', 50, 255); echo ' |