";
echo "";
html_print_label (__("Name"),'name');
echo " | ";
- echo "";
+ echo " | ";
html_print_input_text ('name_category', $name_category);
echo " | ";
echo "";
diff --git a/pandora_console/godmode/db/db_audit.php b/pandora_console/godmode/db/db_audit.php
index b496f9ca78..efebd4968a 100644
--- a/pandora_console/godmode/db/db_audit.php
+++ b/pandora_console/godmode/db/db_audit.php
@@ -31,22 +31,22 @@ if (! check_acl ($config['id_user'], 0, "DM")) {
$time["all"] = get_system_time ();
// 1 day ago
-$time["1day"] = $time["all"]-86400;
+$time["1day"] = $time["all"] - SECONDS_1DAY;
// 3 days ago
-$time["3day"] = $time["all"]-(86400*3);
+$time["3day"] = $time["all"] - ( SECONDS_1DAY * 3);
// 1 week ago
-$time["1week"] = $time["all"]-(86400*7);
+$time["1week"] = $time["all"] - SECONDS_1WEEK;
// 2 weeks ago
-$time["2week"] = $time["all"]-(86400*14);
+$time["2week"] = $time["all"] - SECONDS_2WEEK;
// 1 month ago
-$time["1month"] = $time["all"]-(86400*30);
+$time["1month"] = $time["all"] - SECONDS_1MONTH;
// Three months ago
-$time["3month"] = $time["all"]-(86400*90);
+$time["3month"] = $time["all"] - SECONDS_3MONTHS;
// Todo for a good DB maintenance
/*
diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php
index 2ce631dd61..1eb7ddde1a 100644
--- a/pandora_console/godmode/events/custom_events.php
+++ b/pandora_console/godmode/events/custom_events.php
@@ -52,9 +52,11 @@ else if ($update != '') {
'value' => $event_fields
);
//update 'event_fields' in tconfig table to keep the value at update.
- $result = db_process_sql_update('tconfig', $values, array ('token' => 'event_fields'));
+ $result = db_process_sql_update('tconfig', $values,
+ array ('token' => 'event_fields'));
}
+
$result_selected = array();
//show list of fields selected.
diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php
index 49659619b0..51933576b0 100644
--- a/pandora_console/godmode/events/event_filter.php
+++ b/pandora_console/godmode/events/event_filter.php
@@ -78,7 +78,10 @@ $own_info = get_user_info ($config['id_user']);
// Get group list that user has access
$groups_user = users_get_groups ($config['id_user'], "EW", users_can_manage_group_all(), true);
-$sql = "SELECT * FROM tevent_filter WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")";
+$sql = "
+ SELECT *
+ FROM tevent_filter
+ WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")";
$filters = db_get_all_rows_sql($sql);
if ($filters === false)
diff --git a/pandora_console/godmode/massive/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php
index 4c3715a598..b92b677909 100644
--- a/pandora_console/godmode/massive/massive_add_action_alerts.php
+++ b/pandora_console/godmode/massive/massive_add_action_alerts.php
@@ -37,7 +37,7 @@ if (is_ajax ()) {
return;
}
- if(is_array($id_agents) && count($id_agents) == 1 && $id_agents[0] == '') {
+ if (is_array($id_agents) && count($id_agents) == 1 && $id_agents[0] == '') {
$id_agents = false;
}
@@ -56,7 +56,7 @@ $recursion = get_parameter ('recursion');
$add = (bool) get_parameter_post ('add');
if ($add) {
- if(empty($id_agents) || $id_agents[0] == 0)
+ if (empty($id_agents) || $id_agents[0] == 0)
ui_print_result_message (false, '', __('Could not be added').". ".__('No agents selected'));
else {
$actions = get_parameter ('action');
@@ -76,9 +76,9 @@ if ($add) {
$options = array();
- if($fires_min > 0)
+ if ($fires_min > 0)
$options['fires_min'] = $fires_min;
- if($fires_max > 0)
+ if ($fires_max > 0)
$options['fires_max'] = $fires_max;
if (empty($agent_alerts_id)) {
@@ -87,9 +87,9 @@ if ($add) {
else {
$results = true;
foreach ($agent_alerts_id as $agent_alert_id) {
- foreach($actions as $action) {
+ foreach ($actions as $action) {
$result = alerts_add_alert_agent_module_action($agent_alert_id, $action, $options);
- if($result === false)
+ if ($result === false)
$results = false;
}
}
@@ -169,14 +169,14 @@ html_print_table ($table);
$sql = 'SELECT id_agente FROM tagente_modulo WHERE id_agente_modulo IN (SELECT id_agent_module FROM talert_template_modules)';
$agents_with_templates = db_get_all_rows_sql($sql);
$agents_with_templates_json = array();
-foreach($agents_with_templates as $ag) {
+foreach ($agents_with_templates as $ag) {
$agents_with_templates_json[] = $ag['id_agente'];
}
$agents_with_templates_json = json_encode($agents_with_templates_json);
echo "";
-echo '