diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2dcb4430af..c3f3539ab6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,16 @@ +2013-02-11 Miguel de Dios + + * godmode/menu.php, godmode/alerts/configure_alert_template.php, + godmode/alerts/alert_actions.php, + godmode/agentes/agent_template.php, + godmode/massive/massive_delete_agents.php: cleaned source code. + + * include/functions_html.php: added the weeks in the input for + times. + + * operation/agentes/stat_win.php: fixed the malformated table when + show extended options in the time widget. + 2013-02-11 Sergio Martin * operation/gis_maps/index.php diff --git a/pandora_console/godmode/agentes/agent_template.php b/pandora_console/godmode/agentes/agent_template.php index f29661b7c8..917f6b6473 100644 --- a/pandora_console/godmode/agentes/agent_template.php +++ b/pandora_console/godmode/agentes/agent_template.php @@ -106,13 +106,14 @@ if (isset ($_POST["template_id"])) { $error_count++; } else { - + $id_agente_modulo = db_process_sql_insert('tagente_modulo', $values); // Set the initial module status if ($row2["type"] == 21 || $row2["type"] == 22 || $row2["type"] == 23) { $status = 0; - } else { + } + else { $status = 4; } @@ -131,10 +132,11 @@ if (isset ($_POST["template_id"])) { // Update module status count if ($status == 4) { db_process_sql ('UPDATE tagente SET total_count=total_count+1, notinit_count=notinit_count+1 WHERE id_agente=' . (int)$id_agente); - } else { + } + else { db_process_sql ('UPDATE tagente SET total_count=total_count+1, normal_count=normal_count+1 WHERE id_agente=' . (int)$id_agente); } - } + } else $error_count++; } diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index ad759d340e..e9a9965b48 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -81,13 +81,13 @@ if ($copy_action) { exit; } else { - // Header + // Header if (defined('METACONSOLE')) { alerts_meta_print_header (); } - else { + else { ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "alert_action", true); - } + } } } // If user tries to copy an action of others groups else { @@ -99,13 +99,13 @@ if ($copy_action) { $is_in_group = in_array($al_action['id_group'], $own_groups); // Then action group have to be in his own groups if ($is_in_group) { - // Header + // Header if (defined('METACONSOLE')) { alerts_meta_print_header (); } - else { + else { ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "alert_action", true); - } + } } else { db_pandora_audit("ACL Violation", @@ -113,13 +113,14 @@ if ($copy_action) { require ("general/noaccess.php"); exit; } - } - } else { - // Header + } + } + else { + // Header if (defined('METACONSOLE')) { alerts_meta_print_header (); } - else { + else { ui_print_page_header (__('Alerts').' » '.__('Alert actions'), "images/god2.png", false, "alert_action", true); } } diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index ba7690fbbd..e4aac3c816 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -412,7 +412,7 @@ if ($create_template) { } else { $result = ''; - } + } if ($result) { //db_pandora_audit("Command management", "Create alert command " . $result, false, false, json_encode($values)); db_pandora_audit("Template alert management", "Create alert template #" . $result, false, false, json_encode($values)); diff --git a/pandora_console/godmode/massive/massive_delete_agents.php b/pandora_console/godmode/massive/massive_delete_agents.php index 3af8d99b6a..2df3a8d50d 100644 --- a/pandora_console/godmode/massive/massive_delete_agents.php +++ b/pandora_console/godmode/massive/massive_delete_agents.php @@ -49,7 +49,7 @@ function process_manage_delete ($id_agents) { if (! $success) { $agent_id_restore = $id_agent; break; - } + } $count_deleted++; } diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 1bd51fcb4e..fe167b20ff 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -274,7 +274,7 @@ if (check_acl ($config['id_user'], 0, "PM")) { if (array_key_exists('fatherId',$extmenu)) { if (strlen($extmenu['fatherId']) > 0) { $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); - if ($extmenu["name"] != 'DB interface'){ + if ($extmenu["name"] != 'DB interface') { if (!empty($config['refr'])) { $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr']; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 3e8cc3338d..9f5e821ed3 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -448,6 +448,7 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = ' SECONDS_1MINUTE => __('minutes'), SECONDS_1HOUR => __('hours'), SECONDS_1DAY => __('days'), + SECONDS_1WEEK => __('weeks'), SECONDS_1MONTH => __('months'), SECONDS_1YEAR => __('years')); diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 8e9bd7db4d..cb66098c63 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -37,7 +37,7 @@ if (! isset ($config['id_user']) && get_parameter("loginhash", 0)) { db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $loginhash_user; $config["id_user"] = $loginhash_user; - + $hash_connection_data = true; } @@ -283,18 +283,18 @@ $label = base64_decode(get_parameter('label', '')); Reload button'); ?> -
+
-
- + - +
- - - - - - - - - - - - + + + + + + + + + + + +
+ -
- -
- -
- -
+ + + +
+ + + +
+ +