diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3263f1009b..e93e55b7e7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-05-20 Raúl Mateos + + * operation/users/user_edit.php: Updated year. Use better table in group + list. + + * godmode/snmp_console/snmp_alert.php: Updated year. Removed old header. + Added code to show different header depending on GET parameter. + 2010-05-20 Miguel de Dios * DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package. diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 7968e5249c..1ab9afa0d4 100644 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -23,25 +23,15 @@ if (! give_acl ($config['id_user'], 0, "LW")) { return; } -// Alert Delete -// ============= -if (isset ($_GET["delete_alert"])) { // Delete alert - $alert_delete = (int) get_parameter_get ("delete_alert", 0); - $sql = sprintf ("DELETE FROM talert_snmp WHERE id_as = %d", $alert_delete); - $result = process_sql ($sql); - if ($result === false) { - echo '

'.__('There was a problem deleting the alert').'

'; - } else { - echo '

'.__('Successfully deleted').'

'; - } -} - // Form submitted // ============= -if (isset ($_GET["submit"])) { +if (isset ($_GET["update_alert"]) && $_GET["update_alert"] == "-1") { + print_page_header (__('SNMP Console')." » ".__('Create alert'), "images/computer_error.png", false, "", true); +} else if (isset ($_GET["update_alert"]) && $_GET["update_alert"] != "-1") { + print_page_header (__('SNMP Console')." » ".__('Update alert'), "images/computer_error.png", false, "", true); +} else if (isset ($_GET["submit"])) { print_page_header (__('SNMP Console')." » ".__('Update alert'), "images/computer_error.png", false, "", true); - $id_as = (int) get_parameter_get ("submit", -1); $source_ip = (string) get_parameter_post ("source_ip"); $alert_type = (int) get_parameter_post ("alert_type"); //Event, e-mail @@ -92,9 +82,10 @@ if (isset ($_GET["submit"])) { echo '

'.__('Successfully updated').'

'; } } -} else - print_page_header (__('SNMP Console')." » ".__('Create alert'), "images/computer_error.png", false, "", true); +} else { + print_page_header (__('SNMP Console')." » ".__('Alert overview'), "images/computer_error.png", false, "", true); +} // From variable init // ================== @@ -133,7 +124,18 @@ if ((isset ($_GET["update_alert"])) && ($_GET["update_alert"] != -1)) { // Header - +// Alert Delete +// ============= +if (isset ($_GET["delete_alert"])) { // Delete alert + $alert_delete = (int) get_parameter_get ("delete_alert", 0); + $sql = sprintf ("DELETE FROM talert_snmp WHERE id_as = %d", $alert_delete); + $result = process_sql ($sql); + if ($result === false) { + echo '

'.__('There was a problem deleting the alert').'

'; + } else { + echo '

'.__('Successfully deleted').'

'; + } +} // Alert form if (isset ($_GET["update_alert"])) { @@ -237,7 +239,6 @@ if (isset ($_GET["update_alert"])) { // End table echo ""; } else { - echo "

".__('SNMP Console')." » ".__('Alert overview')."

"; require_once ('include/functions_alerts.php'); diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index c299c57bf8..77bc1c8d6a 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -148,10 +148,15 @@ echo ''; echo '

'.__('Profiles/Groups assigned to this user').'

'; -$table->width = 500; -$table->cellpadding = 4; -$table->cellspacing = 4; -$table->class = "databox"; +$table->width = '50%'; +$table->data = array (); +$table->head = array (); +$table->align = array (); +$table->style = array (); +$table->style[0] = 'font-weight: bold'; +$table->style[1] = 'font-weight: bold'; +$table->head[0] = __('Profile name'); +$table->head[1] = __('Group name'); $table->data = array ();