From 482037b37835628dac66d6febc69a7d0045111d7 Mon Sep 17 00:00:00 2001
From: Daniel Maya <daniel.maya@artica.es>
Date: Thu, 12 Sep 2019 15:28:32 +0200
Subject: [PATCH 01/39] Fixed file.png in plugin

---
 pandora_console/godmode/servers/plugin.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php
index 3eb385332c..5e15c39ee3 100644
--- a/pandora_console/godmode/servers/plugin.php
+++ b/pandora_console/godmode/servers/plugin.php
@@ -398,7 +398,7 @@ if (($create != '') || ($view != '')) {
     }
 
     $data[1] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$form_id.'" style="vertical-align: bottom;">';
-    $data[1] .= html_print_image('images/file.png', true);
+    $data[1] .= html_print_image('images/file.png', true, false, false, true);
     $data[1] .= '</a>';
     $table->data['plugin_command'] = $data;
 

From e94d8726c76a87a99a4d8f40668ee0c063b7ff2a Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Mon, 4 Nov 2019 13:59:30 +0100
Subject: [PATCH 02/39] Changed date in webchat

---
 pandora_console/operation/users/webchat.php | 26 ++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/pandora_console/operation/users/webchat.php b/pandora_console/operation/users/webchat.php
index de59c5d3e8..809ccaa000 100644
--- a/pandora_console/operation/users/webchat.php
+++ b/pandora_console/operation/users/webchat.php
@@ -165,9 +165,13 @@ echo "<div style='width:100%'>".html_print_button(
                     check_users();
                     
                     if (first_time) {
+                        var date_first_message = unix_timestamp(data['log'][0]['timestamp']);
+                        if(!date_first_message){
+                            date_first_message = unix_timestamp(new Date()/1000);
+                        }
                         print_messages({
                             0: {'type' : 'notification',
-                                'text': '<?php echo __('Connection established...get last 24h messages...'); ?>'}
+                                'text': '<?php echo __('Connection established - Retrieving messages since '); ?>'+date_first_message}
                             }, true);
                         first_time = false;
                     }
@@ -308,4 +312,24 @@ echo "<div style='width:100%'>".html_print_button(
             }
         });
     }
+
+    // Function to convert a timestamp to human date.
+    function unix_timestamp(timestamp){
+        var date = new Date(timestamp*1000);
+
+        const monthNames = [
+            "January", "February", "March", "April",
+             "May", "June", "July", "August",
+             "September", "October", "November", "December"
+        ];
+        var month = monthNames[date.getMonth()];
+
+        var day =  date.getDate();
+        var year =  date.getFullYear();
+
+        var hour = date.getHours();
+        var min = date.getMinutes();
+
+        return month + ' ' + day + ', '+ year + ', ' + hour+ ':' + min;  
+    }
 </script>

From 7c73d5f51aa0a3ff1ca86d69f751ff30bad34b46 Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Mon, 4 Nov 2019 17:56:28 +0100
Subject: [PATCH 03/39] Added confirmation to delete a visual console

---
 pandora_console/godmode/reporting/map_builder.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php
index 8f5774b3a9..32f9f97c17 100644
--- a/pandora_console/godmode/reporting/map_builder.php
+++ b/pandora_console/godmode/reporting/map_builder.php
@@ -454,10 +454,10 @@ if (!$maps && !is_metaconsole()) {
                     4 => 'action_buttons',
                 ];
                 $data[3] = '<a class="copy_visualmap" href="index.php?sec=network&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image('images/copy.png', true).'</a>';
-                $data[4] = '<a class="delete_visualmap" href="index.php?sec=network&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;delete_layout=1">'.html_print_image('images/cross.png', true).'</a>';
+                $data[4] = '<a class="delete_visualmap" href="index.php?sec=network&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
             } else {
                 $data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image('images/copy.png', true).'</a>';
-                $data[4] = '<a class="delete_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&amp;delete_layout=1">'.html_print_image('images/cross.png', true).'</a>';
+                $data[4] = '<a class="delete_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_layout='.$map['id'].'&amp;delete_layout=1" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\n'.__('Delete').': '.$map['name'].'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
             }
         } else {
             $data[3] = '';

From b40f0012db580a0b617a1e04f3e02688d4c370be Mon Sep 17 00:00:00 2001
From: alejandro-campos <alejandro.campos@artica.es>
Date: Tue, 5 Nov 2019 14:34:43 +0100
Subject: [PATCH 04/39] fix bug in meta visual console: group item not
 retrieving values properly

---
 .../include/functions_visual_map.php          | 22 +++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index 1c6afb9eed..417b6dc587 100755
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -1900,6 +1900,8 @@ function visual_map_print_item(
                             echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">';
                         }
                     } else {
+                        $is_meta = is_metaconsole();
+                        
                         $agents_critical = agents_get_agents(
                             [
                                 'disabled' => 0,
@@ -1908,7 +1910,10 @@ function visual_map_print_item(
                             ],
                             ['COUNT(*) as total'],
                             'AR',
-                            false
+                            false,
+                            false,
+                            0,
+                            $is_meta
                         );
                         $agents_warning = agents_get_agents(
                             [
@@ -1918,7 +1923,10 @@ function visual_map_print_item(
                             ],
                             ['COUNT(*) as total'],
                             'AR',
-                            false
+                            false,
+                            false,
+                            0,
+                            $is_meta
                         );
                         $agents_unknown = agents_get_agents(
                             [
@@ -1928,7 +1936,10 @@ function visual_map_print_item(
                             ],
                             ['COUNT(*) as total'],
                             'AR',
-                            false
+                            false,
+                            false,
+                            0,
+                            $is_meta
                         );
                         $agents_ok = agents_get_agents(
                             [
@@ -1938,7 +1949,10 @@ function visual_map_print_item(
                             ],
                             ['COUNT(*) as total'],
                             'AR',
-                            false
+                            false,
+                            false,
+                            0,
+                            $is_meta
                         );
                         $total_agents = ($agents_critical[0]['total'] + $agents_warning[0]['total'] + $agents_unknown[0]['total'] + $agents_ok[0]['total']);
                         $stat_agent_ok = ($agents_ok[0]['total'] / $total_agents * 100);

From 5ea93011d3ce77371c0ee685d22eb59d024d7015 Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Tue, 12 Nov 2019 09:53:10 +0100
Subject: [PATCH 05/39] Changed title  name or description in items table of
 reports

---
 .../godmode/reporting/reporting_builder.list_items.php          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php
index 1b7d3b4df6..00e93efa28 100755
--- a/pandora_console/godmode/reporting/reporting_builder.list_items.php
+++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php
@@ -386,7 +386,7 @@ if ($items) {
     }
 
     $table->head[4] = __('Time lapse');
-    $table->head[5] = __('Name').' / '.__('Description');
+    $table->head[5] = __('Name or Description');
     if (check_acl($config['id_user'], 0, 'RM')) {
         $table->head[6] = '<span title="'.__('Options').'">'.__('Op.').'</span>';
         if ($report_w || $report_m) {

From f9215af803dc57a16cbc1d70937988f784bdd3e4 Mon Sep 17 00:00:00 2001
From: Luis Calvo <luis.calvo@artica.es>
Date: Tue, 12 Nov 2019 17:33:58 +0100
Subject: [PATCH 06/39] Added tooltip to CSV datatable button

---
 pandora_console/include/functions_ui.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 3f2736c698..4cd7d338c3 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -3233,6 +3233,7 @@ function ui_print_datatable(array $parameters)
                 {
                     extend: "csv",
                     text : "'.__('Export current page to CSV').'",
+                    titleAttr: "'.__('Export current page to CSV').'",
                     title: "export_'.$parameters['id'].'_current_page_'.date('Y-m-d').'",
                     fieldSeparator: "'.$config['csv_divider'].'",
                     exportOptions : {

From f6b86042b21a7e15a184f943d9433dbe21ac3a85 Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Wed, 13 Nov 2019 12:19:09 +0100
Subject: [PATCH 07/39] Fixed bug in select for linked visual console

---
 pandora_console/include/functions_visual_map_editor.php | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php
index 0e678c6111..ed99a7b429 100755
--- a/pandora_console/include/functions_visual_map_editor.php
+++ b/pandora_console/include/functions_visual_map_editor.php
@@ -1447,9 +1447,6 @@ function visual_map_editor_print_hack_translate_strings()
 <script type="text/javascript">
 $(document).ready (function () {
     $("#map_linked").change(function () {
-        $("option[value=" + this.value + "]", this)
-        .attr("selected", true).siblings()
-        .removeAttr("selected")
         $("#text-agent").val("");
         $("input[name=id_agent]").val(0);
         $("#module").empty();

From bae61d4225cd4052dc47674aff9b244ed9c62406 Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Wed, 20 Nov 2019 10:30:22 +0100
Subject: [PATCH 08/39] Changed date format to last remote contact

---
 pandora_console/include/functions_events.php   | 2 +-
 pandora_console/include/functions_treeview.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index cb8ef39481..b462d80764 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -3980,7 +3980,7 @@ function events_page_details($event, $server='')
 
         $data = [];
         $data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Last contact').'</div>';
-        $data[1] = ($agent['ultimo_contacto'] == '1970-01-01 00:00:00') ? '<i>'.__('N/A').'</i>' : date_w_fixed_tz($agent['ultimo_contacto']);
+        $data[1] = ($agent['ultimo_contacto'] == '1970-01-01 00:00:00') ? '<i>'.__('N/A').'</i>' : ui_print_timestamp($agent['ultimo_contacto'], true);
         $table_details->data[] = $data;
 
         $data = [];
diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index c8b893c091..558cc0f061 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -624,7 +624,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
     if ($agent['ultimo_contacto_remoto'] == '01-01-1970 00:00:00') {
         $last_remote_contact = __('Never');
     } else {
-        $last_remote_contact = ui_print_timestamp($agent['ultimo_contacto_remoto'], true);
+        $last_remote_contact = date_w_fixed_tz($agent['ultimo_contacto_remoto']);
     }
 
     $row = [];

From d4720c2260d7c1918b818b42f8c558e3a6364149 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Tue, 3 Dec 2019 13:59:03 +0100
Subject: [PATCH 09/39] add firts changes

---
 pandora_console/general/header.php            |  18 +-
 .../include/ajax/order_interpreter.php        |  62 +++++++
 .../include/class/OrderInterpreter.class.php  | 157 ++++++++++++++++++
 .../include/styles/order_interpreter.css      |  29 ++++
 4 files changed, 264 insertions(+), 2 deletions(-)
 create mode 100644 pandora_console/include/ajax/order_interpreter.php
 create mode 100644 pandora_console/include/class/OrderInterpreter.class.php
 create mode 100644 pandora_console/include/styles/order_interpreter.css

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 368accd39b..b36785329c 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -13,6 +13,8 @@
 require_once 'include/functions_messages.php';
 require_once 'include/functions_servers.php';
 require_once 'include/functions_notifications.php';
+require_once 'include/ajax/order_interpreter.php';
+ui_require_css_file('order_interpreter');
 
 // Check permissions
 // Global errors/warnings checking.
@@ -120,8 +122,13 @@ if ($config['menu_type'] == 'classic') {
             }
 
             $search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
-                    onkeyup="javascript: fieldKeyWordEmpty = false;" class="search_input" />';
+                    onkeyup="showinterpreter()" class="search_input" />';
 
+            $search_bar .= '<div 
+            id="result_order"
+            class="show_result_interpreter"
+            style="display:none">Go to Agent Management<br>
+            Go to Agent view</div>';
             // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
             $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
             $search_bar .= '</form>';
@@ -630,7 +637,14 @@ if ($config['menu_type'] == 'classic') {
     var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
 
     var new_chat = <?php echo (int) $_SESSION['new_chat']; ?>;
-
+    
+    function showinterpreter(){
+        if( $('#keywords').val() === ''){
+            $('#result_order').hide();
+        }else {
+            $('#result_order').show();
+        }
+    }
     /**
     * Loads modal from AJAX to add feedback.
     */
diff --git a/pandora_console/include/ajax/order_interpreter.php b/pandora_console/include/ajax/order_interpreter.php
new file mode 100644
index 0000000000..5edc8913f3
--- /dev/null
+++ b/pandora_console/include/ajax/order_interpreter.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Order interpreter ajax controller.
+ *
+ * @category   OrderInterpreter
+ * @package    Pandora FMS
+ * @subpackage New Installation Welcome Window
+ * @version    1.0.0
+ * @license    See below
+ *
+ *    ______                 ___                    _______ _______ ________
+ *   |   __ \.-----.--.--.--|  |.-----.----.-----. |    ___|   |   |     __|
+ *  |    __/|  _  |     |  _  ||  _  |   _|  _  | |    ___|       |__     |
+ * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
+ *
+ * ============================================================================
+ * Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
+ * Please see http://pandorafms.org for full contribution list
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation for version 2.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ============================================================================
+ */
+
+// Begin.
+global $config;
+
+require_once $config['homedir'].'/include/class/OrderInterpreter.class.php';
+if (is_ajax() === false) {
+    exit;
+}
+
+$ajaxPage = 'include/ajax/order_interpreter';
+
+// Control call flow.
+try {
+    // User access and validation is being processed on class constructor.
+    $order_interpreter = new OrderInterpreter(true, $ajaxPage);
+} catch (Exception $e) {
+    exit;
+}
+
+// Ajax controller.
+$method = get_parameter('method', '');
+
+if (method_exists($order_interpreter, $method) === true) {
+    if ($order_interpreter->ajaxMethod($method) === true) {
+        $order_interpreter->{$method}();
+    } else {
+        $order_interpreter->error('Unavailable method.');
+    }
+} else {
+    $order_interpreter->error('Method not found. ['.$method.']');
+}
+
+
+// Stop any execution.
+exit;
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
new file mode 100644
index 0000000000..92474d617e
--- /dev/null
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Welcome to Pandora FMS feature.
+ *
+ * @category   Class
+ * @package    Pandora FMS
+ * @subpackage Order Interpreter
+ * @version    1.0.0
+ * @license    See below
+ *
+ *    ______                 ___                    _______ _______ ________
+ *   |   __ \.-----.--.--.--|  |.-----.----.-----. |    ___|   |   |     __|
+ *  |    __/|  _  |     |  _  ||  _  |   _|  _  | |    ___|       |__     |
+ * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
+ *
+ * ============================================================================
+ * Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
+ * Please see http://pandorafms.org for full contribution list
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation for version 2.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ============================================================================
+ */
+
+// Begin.
+global $config;
+
+require_once $config['homedir'].'/godmode/wizards/Wizard.main.php';
+
+/**
+ * Class OrderInterpreter.
+ */
+class OrderInterpreter extends Wizard
+{
+
+    /**
+     * Allowed methods to be called using AJAX request.
+     *
+     * @var array
+     */
+    public $AJAXMethods = ['getResult'];
+
+    /**
+     * Url of controller.
+     *
+     * @var string
+     */
+    public $ajaxController;
+
+
+    /**
+     * Generates a JSON error.
+     *
+     * @param string $msg Error message.
+     *
+     * @return void
+     */
+    public function error($msg)
+    {
+        echo json_encode(
+            ['error' => $msg]
+        );
+    }
+
+
+    /**
+     * Checks if target method is available to be called using AJAX.
+     *
+     * @param string $method Target method.
+     *
+     * @return boolean True allowed, false not.
+     */
+    public function ajaxMethod($method)
+    {
+        global $config;
+
+        // Check access.
+        check_login();
+
+        return in_array($method, $this->AJAXMethods);
+    }
+
+
+    /**
+     * Constructor.
+     *
+     * @param boolean $must_run        Must run or not.
+     * @param string  $ajax_controller Controller.
+     *
+     * @return object
+     * @throws Exception On error.
+     */
+    public function __construct(
+        $ajax_controller='include/ajax/order_interpreter'
+    ) {
+        $this->ajaxController = $ajax_controller;
+        $this->pages_name = [
+            0 => __('Agent view'),
+            1 => __('Agent Management'),
+            2 => __('Manage Agents'),
+            3 => __('Manage Policies'),
+        ];
+        $this->pages_url = [
+            0 => ui_get_full_url(),
+            1 => ui_get_full_url(),
+            2 => ui_get_full_url(),
+            3 => ui_get_full_url(),
+        ];
+
+    }
+
+
+    /**
+     * Method to print order interpreted on header search input.
+     *
+     * @return void
+     */
+    public function getResult()
+    {
+        // Take value from input search.
+        $text = get_parameter('text', '');
+
+        foreach ($this->pages_name as $key => $value) {
+            if (preg_match('/'.$text.'/', $value)) {
+                echo 'pene gordo';
+            }
+        }
+
+        return;
+
+    }
+
+
+    /**
+     * Load JS content.
+     * function that enables the functions to the buttons when its action is
+     *  completed.
+     * Assign the url of each button.
+     *
+     * @return string HTML code for javascript functionality.
+     */
+    public function loadJS()
+    {
+        ob_start();
+        ?>
+    <script type="text/javascript">
+    </script>   
+        <?php
+        return ob_get_clean();
+    }
+
+
+}
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
new file mode 100644
index 0000000000..a8d5e00ab2
--- /dev/null
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -0,0 +1,29 @@
+div.show_result_interpreter {
+  background-position: center right 10px;
+  background-repeat: no-repeat;
+  background-size: 17px;
+  background-color: #f2f6f7;
+  padding: 0px;
+  padding-right: 0px;
+  padding-left: 0px;
+  padding-right: 0px;
+  padding-left: 0px;
+  margin: 0;
+  margin-top: 0px;
+  margin-left: 0px;
+  margin-left: 0px;
+  width: 300px;
+  height: 30px;
+  margin-left: 2px;
+  padding-left: 15px;
+  padding-right: 40px;
+  color: rgb(0, 0, 0);
+  font-family: "Open Sans", sans-serif;
+  font-size: 8.5pt;
+  border-top-left-radius: 10px;
+  border-bottom-left-radius: 10px;
+  border-top-right-radius: 10px;
+  border-bottom-right-radius: 10px;
+  border-color: #1a1919;
+  margin-top: 1px;
+}

From 631170bfe92e8a35d4442eeacbfb78586f81ecd3 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Tue, 3 Dec 2019 14:26:31 +0100
Subject: [PATCH 10/39] resolv blank page

---
 pandora_console/include/ajax/order_interpreter.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pandora_console/include/ajax/order_interpreter.php b/pandora_console/include/ajax/order_interpreter.php
index 5edc8913f3..8e4cc557b4 100644
--- a/pandora_console/include/ajax/order_interpreter.php
+++ b/pandora_console/include/ajax/order_interpreter.php
@@ -30,8 +30,9 @@
 global $config;
 
 require_once $config['homedir'].'/include/class/OrderInterpreter.class.php';
+
 if (is_ajax() === false) {
-    exit;
+    return;
 }
 
 $ajaxPage = 'include/ajax/order_interpreter';

From 14b8379ccb84f660def22c5950499367ad8795f9 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Tue, 3 Dec 2019 15:11:16 +0100
Subject: [PATCH 11/39] ajax call, controller, class, match result, return
 array inputs(example to return)

---
 pandora_console/general/header.php               | 16 ++++++++++++++++
 .../include/class/OrderInterpreter.class.php     | 12 ++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index b36785329c..ee741e62f2 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -642,6 +642,22 @@ if ($config['menu_type'] == 'classic') {
         if( $('#keywords').val() === ''){
             $('#result_order').hide();
         }else {
+            $.ajax({
+                type: "POST",
+                url: "ajax.php",
+                dataType: "text",
+                data: {
+                    page: 'include/ajax/order_interpreter',
+                    method: 'getResult',
+                    text: $('#keywords').val(),
+                },
+                success: function (data) {
+                    console.log(data);
+                },
+                error: function (data) {
+                    console.error("Fatal error in AJAX call to interpreter order", data)
+                }
+            });
             $('#result_order').show();
         }
     }
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 92474d617e..bf253bebd8 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -117,20 +117,20 @@ class OrderInterpreter extends Wizard
     /**
      * Method to print order interpreted on header search input.
      *
-     * @return void
+     * @return array
      */
-    public function getResult()
+    public function getResult():array
     {
         // Take value from input search.
         $text = get_parameter('text', '');
-
+        $array_found = [];
         foreach ($this->pages_name as $key => $value) {
-            if (preg_match('/'.$text.'/', $value)) {
-                echo 'pene gordo';
+            if (preg_match('/.*'.$text.'.*/', $value)) {
+                $array_found[$key] = '<input id='.$key.'><a href="'.$this->pages_url[$key].'">'.$value.'</a>';
             }
         }
 
-        return;
+        return $array_found;
 
     }
 

From 7eec91b9460a673c77be8fcc70773e6a9d387715 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Tue, 3 Dec 2019 18:19:32 +0100
Subject: [PATCH 12/39] Show result in normal window

---
 pandora_console/general/header.php            | 14 +++----
 .../include/class/OrderInterpreter.class.php  | 30 ++++++++++-----
 .../include/styles/order_interpreter.css      | 37 +++++--------------
 3 files changed, 37 insertions(+), 44 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index ee741e62f2..47696d8226 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -124,11 +124,8 @@ if ($config['menu_type'] == 'classic') {
             $search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
                     onkeyup="showinterpreter()" class="search_input" />';
 
-            $search_bar .= '<div 
-            id="result_order"
-            class="show_result_interpreter"
-            style="display:none">Go to Agent Management<br>
-            Go to Agent view</div>';
+
+            $search_bar .= '<div id="result_order" style="display:grid"></div>';
             // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
             $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
             $search_bar .= '</form>';
@@ -629,7 +626,7 @@ if ($config['menu_type'] == 'classic') {
         });
     }
 
-    // Resize event
+    // Resize event.
     window.addEventListener("resize", function() {
         attatch_to_image();
     });
@@ -645,7 +642,7 @@ if ($config['menu_type'] == 'classic') {
             $.ajax({
                 type: "POST",
                 url: "ajax.php",
-                dataType: "text",
+                dataType: "html",
                 data: {
                     page: 'include/ajax/order_interpreter',
                     method: 'getResult',
@@ -653,7 +650,8 @@ if ($config['menu_type'] == 'classic') {
                 },
                 success: function (data) {
                     console.log(data);
-                },
+                   $('#result_order').html(data);
+                   },
                 error: function (data) {
                     console.error("Fatal error in AJAX call to interpreter order", data)
                 }
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index bf253bebd8..0e30df76ad 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -99,16 +99,24 @@ class OrderInterpreter extends Wizard
     ) {
         $this->ajaxController = $ajax_controller;
         $this->pages_name = [
-            0 => __('Agent view'),
+            0 => __('Tactical View'),
             1 => __('Agent Management'),
-            2 => __('Manage Agents'),
+            2 => __('List Alerts'),
             3 => __('Manage Policies'),
         ];
         $this->pages_url = [
-            0 => ui_get_full_url(),
-            1 => ui_get_full_url(),
-            2 => ui_get_full_url(),
-            3 => ui_get_full_url(),
+            0 => ui_get_full_url(
+                'index.php?sec=view&sec2=operation/agentes/tactical'
+            ),
+            1 => ui_get_full_url(
+                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+            ),
+            2 => ui_get_full_url(
+                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+            ),
+            3 => ui_get_full_url(
+                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+            ),
         ];
 
     }
@@ -119,18 +127,22 @@ class OrderInterpreter extends Wizard
      *
      * @return array
      */
-    public function getResult():array
+    public function getResult()
     {
         // Take value from input search.
         $text = get_parameter('text', '');
         $array_found = [];
+        echo '<div id="result_order" class="show_result_interpreter">';
+        echo '<ul>';
         foreach ($this->pages_name as $key => $value) {
             if (preg_match('/.*'.$text.'.*/', $value)) {
-                $array_found[$key] = '<input id='.$key.'><a href="'.$this->pages_url[$key].'">'.$value.'</a>';
+                echo '<li>';
+                echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
+                echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
             }
         }
 
-        return $array_found;
+        echo '</ul></div';
 
     }
 
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index a8d5e00ab2..a25e1f31f6 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -1,29 +1,12 @@
 div.show_result_interpreter {
-  background-position: center right 10px;
-  background-repeat: no-repeat;
-  background-size: 17px;
-  background-color: #f2f6f7;
-  padding: 0px;
-  padding-right: 0px;
-  padding-left: 0px;
-  padding-right: 0px;
-  padding-left: 0px;
-  margin: 0;
-  margin-top: 0px;
-  margin-left: 0px;
-  margin-left: 0px;
-  width: 300px;
-  height: 30px;
-  margin-left: 2px;
-  padding-left: 15px;
-  padding-right: 40px;
-  color: rgb(0, 0, 0);
-  font-family: "Open Sans", sans-serif;
-  font-size: 8.5pt;
-  border-top-left-radius: 10px;
-  border-bottom-left-radius: 10px;
-  border-top-right-radius: 10px;
-  border-bottom-right-radius: 10px;
-  border-color: #1a1919;
-  margin-top: 1px;
+  background-color: #fff;
+  color: #000;
+  border: 1px solid #e2e2e2;
+  border-top-left-radius: 4px;
+  border-top-right-radius: 4px;
+  padding-left: 10px;
+  padding-top: 5px;
+  padding-bottom: 5px;
+  box-shadow: 0px 0px 15px -4px #dadada;
+  z-index: 1;
 }

From 1f97fcef401c80be2b81bac8970747d4ccf18790 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Tue, 3 Dec 2019 18:31:13 +0100
Subject: [PATCH 13/39] update css and preg_match

---
 .../include/class/OrderInterpreter.class.php  | 22 ++++++++++---------
 .../include/styles/order_interpreter.css      |  2 ++
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 0e30df76ad..0f673e25f6 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -125,24 +125,26 @@ class OrderInterpreter extends Wizard
     /**
      * Method to print order interpreted on header search input.
      *
-     * @return array
+     * @return void
      */
     public function getResult()
     {
         // Take value from input search.
         $text = get_parameter('text', '');
         $array_found = [];
-        echo '<div id="result_order" class="show_result_interpreter">';
-        echo '<ul>';
-        foreach ($this->pages_name as $key => $value) {
-            if (preg_match('/.*'.$text.'.*/', $value)) {
-                echo '<li>';
-                echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
-                echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+        if ($text !== '') {
+            echo '<div id="result_order" class="show_result_interpreter">';
+            echo '<ul>';
+            foreach ($this->pages_name as $key => $value) {
+                if (preg_match('/.*'.$text.'.*/i', $value)) {
+                    echo '<li>';
+                    echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
+                    echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+                }
             }
-        }
 
-        echo '</ul></div';
+            echo '</ul></div';
+        }
 
     }
 
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index a25e1f31f6..b9bcfb53cf 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -8,5 +8,7 @@ div.show_result_interpreter {
   padding-top: 5px;
   padding-bottom: 5px;
   box-shadow: 0px 0px 15px -4px #dadada;
+  position: absolute;
   z-index: 1;
+  width: 300px;
 }

From fbb1e533627e06dad09afa033e7275718be404b9 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Wed, 4 Dec 2019 17:28:03 +0100
Subject: [PATCH 14/39] update orderinterpreter

---
 .../include/class/OrderInterpreter.class.php  | 24 +++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 0f673e25f6..350b303e85 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -88,8 +88,7 @@ class OrderInterpreter extends Wizard
     /**
      * Constructor.
      *
-     * @param boolean $must_run        Must run or not.
-     * @param string  $ajax_controller Controller.
+     * @param string $ajax_controller Controller.
      *
      * @return object
      * @throws Exception On error.
@@ -135,11 +134,22 @@ class OrderInterpreter extends Wizard
         if ($text !== '') {
             echo '<div id="result_order" class="show_result_interpreter">';
             echo '<ul>';
-            foreach ($this->pages_name as $key => $value) {
-                if (preg_match('/.*'.$text.'.*/i', $value)) {
-                    echo '<li>';
-                    echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
-                    echo 'GO TO <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+
+            if (io_safe_output($text) === __('GO TO ')) {
+                foreach ($this->pages_name as $key => $value) {
+                        echo '<li>';
+                        echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
+                        echo '&nbsp;
+           <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+                }
+            } else {
+                foreach ($this->pages_name as $key => $value) {
+                    if (preg_match('/.*'.io_safe_output($text).'.*/i', __('GO TO '.$value))) {
+                        echo '<li>';
+                        echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
+                        echo '&nbsp;
+                    <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+                    }
                 }
             }
 

From 1430e6ee112f9d2fa380e6bd5c1bb20f20af7a7f Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 5 Dec 2019 16:10:31 +0100
Subject: [PATCH 15/39] Update orderinterpreter class and css

---
 .../include/class/OrderInterpreter.class.php  | 141 +++++++++++++++---
 .../include/styles/order_interpreter.css      |   6 +
 2 files changed, 124 insertions(+), 23 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 350b303e85..3e5e5bc50c 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -97,25 +97,108 @@ class OrderInterpreter extends Wizard
         $ajax_controller='include/ajax/order_interpreter'
     ) {
         $this->ajaxController = $ajax_controller;
+
+        // Example pages names.
         $this->pages_name = [
-            0 => __('Tactical View'),
-            1 => __('Agent Management'),
-            2 => __('List Alerts'),
-            3 => __('Manage Policies'),
+            0  => __('Tactical View'),
+            1  => __('Agent Management'),
+            2  => __('List Alerts'),
+            3  => __('Manage Policies'),
+            4  => __('Tactical View'),
+            5  => __('Agent Management'),
+            7  => __('List Alerts'),
+            8  => __('Manage Policies'),
+            9  => __('Tactical View'),
+            10 => __('Agent Management'),
+            11 => __('List Alerts'),
+            12 => __('Manage Policies'),
         ];
+
+        // Example ICON.
+        $this->pages_icon = [
+            0  => ui_get_full_url(
+                'images/op_monitoring.menu_gray.png'
+            ),
+            1  => ui_get_full_url(
+                'images/gm_resources.menu_gray.png'
+            ),
+            2  => ui_get_full_url(
+                'images/gm_alerts.menu_gray.png'
+            ),
+            3  => ui_get_full_url(
+                'images/gm_configuration.menu_gray.png'
+            ),
+            4  => ui_get_full_url(
+                'images/op_monitoring.menu_gray.png'
+            ),
+            5  => ui_get_full_url(
+                'images/gm_resources.menu_gray.png'
+            ),
+            6  => ui_get_full_url(
+                'images/gm_alerts.menu_gray.png'
+            ),
+            7  => ui_get_full_url(
+                'images/gm_configuration.menu_gray.png'
+            ),
+            8  => ui_get_full_url(
+                'images/op_monitoring.menu_gray.png'
+            ),
+            9  => ui_get_full_url(
+                'images/gm_resources.menu_gray.png'
+            ),
+            10 => ui_get_full_url(
+                'images/gm_alerts.menu_gray.png'
+            ),
+            11 => ui_get_full_url(
+                'images/gm_configuration.menu_gray.png'
+            ),
+            12 => ui_get_full_url(
+                'images/gm_configuration.menu_gray.png'
+            ),
+
+        ];
+        // Example URLS.
         $this->pages_url = [
-            0 => ui_get_full_url(
+            0  => ui_get_full_url(
                 'index.php?sec=view&sec2=operation/agentes/tactical'
             ),
-            1 => ui_get_full_url(
+            1  => ui_get_full_url(
                 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
             ),
-            2 => ui_get_full_url(
+            2  => ui_get_full_url(
                 'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
             ),
-            3 => ui_get_full_url(
+            3  => ui_get_full_url(
                 'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
             ),
+            4  => ui_get_full_url(
+                'index.php?sec=view&sec2=operation/agentes/tactical'
+            ),
+            5  => ui_get_full_url(
+                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+            ),
+            6  => ui_get_full_url(
+                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+            ),
+            7  => ui_get_full_url(
+                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+            ),
+            8  => ui_get_full_url(
+                'index.php?sec=view&sec2=operation/agentes/tactical'
+            ),
+            9  => ui_get_full_url(
+                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+            ),
+            10 => ui_get_full_url(
+                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+            ),
+            11 => ui_get_full_url(
+                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+            ),
+            12 => ui_get_full_url(
+                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+            ),
+
         ];
 
     }
@@ -131,28 +214,42 @@ class OrderInterpreter extends Wizard
         // Take value from input search.
         $text = get_parameter('text', '');
         $array_found = [];
+        $iterator = 0;
+        $more_results = 0;
+
         if ($text !== '') {
             echo '<div id="result_order" class="show_result_interpreter">';
             echo '<ul>';
 
-            if (io_safe_output($text) === __('GO TO ')) {
-                foreach ($this->pages_name as $key => $value) {
+            foreach ($this->pages_name as $key => $value) {
+                if (preg_match(
+                    '/.*'.io_safe_output($text).'.*/i',
+                    __('GO TO '.$value)
+                )
+                ) {
+                    if ($iterator <= 9) {
                         echo '<li>';
-                        echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
+                        echo '
+                        Go to &nbsp;&nbsp;
+                        <img src="'.$this->pages_icon[$key].'">';
                         echo '&nbsp;
-           <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
-                }
-            } else {
-                foreach ($this->pages_name as $key => $value) {
-                    if (preg_match('/.*'.io_safe_output($text).'.*/i', __('GO TO '.$value))) {
-                        echo '<li>';
-                        echo '<img src="http://localhost/pandora_console/images/arrow_right_green.png">';
-                        echo '&nbsp;
-                    <a href="'.$this->pages_url[$key].'">'.$value.'</a><br>';
+                        <a href="'.$this->pages_url[$key].'">
+                        '.$value.'</a><br>';
+                    }
+
+                    $iterator ++;
+
+                    if ($iterator > 10) {
+                        $more_results ++;
                     }
                 }
             }
 
+            if ($iterator > 9) {
+                echo '<li class="more_results"><br>';
+                echo '+ '.$more_results.' results found';
+            }
+
             echo '</ul></div';
         }
 
@@ -161,9 +258,7 @@ class OrderInterpreter extends Wizard
 
     /**
      * Load JS content.
-     * function that enables the functions to the buttons when its action is
-     *  completed.
-     * Assign the url of each button.
+     * function to create JS actions.
      *
      * @return string HTML code for javascript functionality.
      */
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index b9bcfb53cf..6f3194086c 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -12,3 +12,9 @@ div.show_result_interpreter {
   z-index: 1;
   width: 300px;
 }
+
+.more_results {
+  text-align: right;
+  margin-right: 20px;
+  display: grid;
+}

From 8ca473b2a7838969a3fb55a891ff6a8073a1d2aa Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Wed, 11 Dec 2019 18:42:46 +0100
Subject: [PATCH 16/39] ajust search input

---
 pandora_console/general/header.php            |  7 +++++-
 .../include/styles/order_interpreter.css      | 23 ++++++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 47696d8226..2b040c13d9 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -112,7 +112,7 @@ if ($config['menu_type'] == 'classic') {
                 }
             }
 
-            $search_bar .= '<input type="text" id="keywords" name="keywords"';
+            $search_bar .= '<input  type="text" id="keywords" name="keywords"';
             if (!isset($config['search_keywords'])) {
                 $search_bar .= "value='".__('Enter keywords to search')."'";
             } else if (strlen($config['search_keywords']) == 0) {
@@ -637,6 +637,8 @@ if ($config['menu_type'] == 'classic') {
     
     function showinterpreter(){
         if( $('#keywords').val() === ''){
+            $('#keywords').addClass('search_input');
+            $('#keywords').removeClass('results-found');
             $('#result_order').hide();
         }else {
             $.ajax({
@@ -656,7 +658,10 @@ if ($config['menu_type'] == 'classic') {
                     console.error("Fatal error in AJAX call to interpreter order", data)
                 }
             });
+            $('#keywords').removeClass('search_input');
+            $('#keywords').addClass('results-found');
             $('#result_order').show();
+
         }
     }
     /**
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index 6f3194086c..694637c606 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -10,7 +10,7 @@ div.show_result_interpreter {
   box-shadow: 0px 0px 15px -4px #dadada;
   position: absolute;
   z-index: 1;
-  width: 300px;
+  width: 302px;
 }
 
 .more_results {
@@ -18,3 +18,24 @@ div.show_result_interpreter {
   margin-right: 20px;
   display: grid;
 }
+
+.results-found {
+  background-image: url("../../images/input_zoom_gray.png");
+  background-position: center right 10px;
+  background-repeat: no-repeat;
+  background-size: 17px;
+  background-color: #f2f6f7;
+  padding: 0px;
+  margin: 0;
+  width: 300px;
+  height: 30px;
+  margin-left: 2px;
+  padding-left: 15px;
+  padding-right: 40px;
+  color: #777;
+  font-family: "Open Sans", sans-serif;
+  font-size: 8.5pt;
+  border-top-left-radius: 50px;
+  border-top-right-radius: 50px;
+  border-color: transparent;
+}

From 1f3fc1f908d6536c0f25f3eedf452d874f595092 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 12 Dec 2019 16:27:11 +0100
Subject: [PATCH 17/39] add more pages in order interpreter

---
 .../include/ajax/order_interpreter.php        |  1 -
 .../include/class/OrderInterpreter.class.php  | 69 +++++++++++--------
 .../include/styles/order_interpreter.css      |  4 ++
 3 files changed, 43 insertions(+), 31 deletions(-)

diff --git a/pandora_console/include/ajax/order_interpreter.php b/pandora_console/include/ajax/order_interpreter.php
index 8e4cc557b4..ce14996bb4 100644
--- a/pandora_console/include/ajax/order_interpreter.php
+++ b/pandora_console/include/ajax/order_interpreter.php
@@ -58,6 +58,5 @@ if (method_exists($order_interpreter, $method) === true) {
     $order_interpreter->error('Method not found. ['.$method.']');
 }
 
-
 // Stop any execution.
 exit;
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 3e5e5bc50c..c1d190b110 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -30,6 +30,7 @@
 global $config;
 
 require_once $config['homedir'].'/godmode/wizards/Wizard.main.php';
+ui_require_css_file('order_interpreter');
 
 /**
  * Class OrderInterpreter.
@@ -102,16 +103,18 @@ class OrderInterpreter extends Wizard
         $this->pages_name = [
             0  => __('Tactical View'),
             1  => __('Agent Management'),
-            2  => __('List Alerts'),
+            2  => __('General Setup'),
             3  => __('Manage Policies'),
-            4  => __('Tactical View'),
-            5  => __('Agent Management'),
-            7  => __('List Alerts'),
-            8  => __('Manage Policies'),
-            9  => __('Tactical View'),
-            10 => __('Agent Management'),
-            11 => __('List Alerts'),
-            12 => __('Manage Policies'),
+            4  => __('List Alerts'),
+            5  => __('View Events'),
+            6  => __('Dashboard'),
+            7  => __('Visual Console'),
+            8  => __('Manage Servers'),
+            9  => __('Edit User'),
+            10 => __('Three View'),
+            11 => __('Network Component'),
+            12 => __('Task List'),
+            13 => __('Update Manager'),
         ];
 
         // Example ICON.
@@ -123,37 +126,40 @@ class OrderInterpreter extends Wizard
                 'images/gm_resources.menu_gray.png'
             ),
             2  => ui_get_full_url(
-                'images/gm_alerts.menu_gray.png'
+                'images/gm_setup.menu_gray.png'
             ),
             3  => ui_get_full_url(
                 'images/gm_configuration.menu_gray.png'
             ),
             4  => ui_get_full_url(
-                'images/op_monitoring.menu_gray.png'
+                'images/gm_alerts.menu_gray.png'
             ),
             5  => ui_get_full_url(
-                'images/gm_resources.menu_gray.png'
+                'images/op_events.menu_gray.png'
             ),
             6  => ui_get_full_url(
-                'images/gm_alerts.menu_gray.png'
+                'images/op_reporting.menu_gray.png'
             ),
             7  => ui_get_full_url(
-                'images/gm_configuration.menu_gray.png'
+                'images/op_network.menu_gray.png'
             ),
             8  => ui_get_full_url(
-                'images/op_monitoring.menu_gray.png'
+                'images/gm_servers.menu_gray.png'
             ),
             9  => ui_get_full_url(
-                'images/gm_resources.menu_gray.png'
+                'images/gm_users.menu_gray.png'
             ),
             10 => ui_get_full_url(
-                'images/gm_alerts.menu_gray.png'
+                'images/op_monitoring.menu_gray.png'
             ),
             11 => ui_get_full_url(
                 'images/gm_configuration.menu_gray.png'
             ),
             12 => ui_get_full_url(
-                'images/gm_configuration.menu_gray.png'
+                'images/gm_discovery.menu.png'
+            ),
+            13 => ui_get_full_url(
+                'images/um_messages.menu_gray.png'
             ),
 
         ];
@@ -166,37 +172,40 @@ class OrderInterpreter extends Wizard
                 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
             ),
             2  => ui_get_full_url(
-                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+                'index.php?sec=general&sec2=godmode/setup/setup&section=general'
             ),
             3  => ui_get_full_url(
                 'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
             ),
             4  => ui_get_full_url(
-                'index.php?sec=view&sec2=operation/agentes/tactical'
+                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
             ),
             5  => ui_get_full_url(
-                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+                'index.php?sec=eventos&sec2=operation/events/events'
             ),
             6  => ui_get_full_url(
-                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+                'index.php?sec=reporting&sec2=enterprise/dashboard/dashboards'
             ),
             7  => ui_get_full_url(
-                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+                'index.php?sec=network&sec2=godmode/reporting/map_builder'
             ),
             8  => ui_get_full_url(
-                'index.php?sec=view&sec2=operation/agentes/tactical'
+                'index.php?sec=gservers&sec2=godmode/servers/modificar_server'
             ),
             9  => ui_get_full_url(
-                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+                'index.php?sec=workspace&sec2=operation/users/user_edit'
             ),
             10 => ui_get_full_url(
-                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+                'index.php?sec=view&sec2=operation/tree'
             ),
             11 => ui_get_full_url(
-                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+                'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components'
             ),
             12 => ui_get_full_url(
-                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+                'index.php?sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist'
+            ),
+            13 => ui_get_full_url(
+                'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup'
             ),
 
         ];
@@ -228,9 +237,9 @@ class OrderInterpreter extends Wizard
                 )
                 ) {
                     if ($iterator <= 9) {
-                        echo '<li>';
+                        echo '<li class="list_found">';
                         echo '
-                        Go to &nbsp;&nbsp;
+                        Go to &nbsp;
                         <img src="'.$this->pages_icon[$key].'">';
                         echo '&nbsp;
                         <a href="'.$this->pages_url[$key].'">
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index 694637c606..ae7c49d8f2 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -39,3 +39,7 @@ div.show_result_interpreter {
   border-top-right-radius: 50px;
   border-color: transparent;
 }
+
+.list_found {
+  padding-top: 5px;
+}

From 6a5dfb5ec9a707d2cbe66a8c67e75a64eba0a746 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 12 Dec 2019 17:16:09 +0100
Subject: [PATCH 18/39] refactor code

---
 .../include/class/OrderInterpreter.class.php  | 245 ++++++++++--------
 1 file changed, 132 insertions(+), 113 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index c1d190b110..f0d0a62d13 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -99,114 +99,133 @@ class OrderInterpreter extends Wizard
     ) {
         $this->ajaxController = $ajax_controller;
 
-        // Example pages names.
-        $this->pages_name = [
-            0  => __('Tactical View'),
-            1  => __('Agent Management'),
-            2  => __('General Setup'),
-            3  => __('Manage Policies'),
-            4  => __('List Alerts'),
-            5  => __('View Events'),
-            6  => __('Dashboard'),
-            7  => __('Visual Console'),
-            8  => __('Manage Servers'),
-            9  => __('Edit User'),
-            10 => __('Three View'),
-            11 => __('Network Component'),
-            12 => __('Task List'),
-            13 => __('Update Manager'),
-        ];
-
-        // Example ICON.
-        $this->pages_icon = [
-            0  => ui_get_full_url(
-                'images/op_monitoring.menu_gray.png'
-            ),
-            1  => ui_get_full_url(
-                'images/gm_resources.menu_gray.png'
-            ),
-            2  => ui_get_full_url(
-                'images/gm_setup.menu_gray.png'
-            ),
-            3  => ui_get_full_url(
-                'images/gm_configuration.menu_gray.png'
-            ),
-            4  => ui_get_full_url(
-                'images/gm_alerts.menu_gray.png'
-            ),
-            5  => ui_get_full_url(
-                'images/op_events.menu_gray.png'
-            ),
-            6  => ui_get_full_url(
-                'images/op_reporting.menu_gray.png'
-            ),
-            7  => ui_get_full_url(
-                'images/op_network.menu_gray.png'
-            ),
-            8  => ui_get_full_url(
-                'images/gm_servers.menu_gray.png'
-            ),
-            9  => ui_get_full_url(
-                'images/gm_users.menu_gray.png'
-            ),
-            10 => ui_get_full_url(
-                'images/op_monitoring.menu_gray.png'
-            ),
-            11 => ui_get_full_url(
-                'images/gm_configuration.menu_gray.png'
-            ),
-            12 => ui_get_full_url(
-                'images/gm_discovery.menu.png'
-            ),
-            13 => ui_get_full_url(
-                'images/um_messages.menu_gray.png'
-            ),
-
-        ];
-        // Example URLS.
-        $this->pages_url = [
-            0  => ui_get_full_url(
-                'index.php?sec=view&sec2=operation/agentes/tactical'
-            ),
-            1  => ui_get_full_url(
-                'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
-            ),
-            2  => ui_get_full_url(
-                'index.php?sec=general&sec2=godmode/setup/setup&section=general'
-            ),
-            3  => ui_get_full_url(
-                'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
-            ),
-            4  => ui_get_full_url(
-                'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
-            ),
-            5  => ui_get_full_url(
-                'index.php?sec=eventos&sec2=operation/events/events'
-            ),
-            6  => ui_get_full_url(
-                'index.php?sec=reporting&sec2=enterprise/dashboard/dashboards'
-            ),
-            7  => ui_get_full_url(
-                'index.php?sec=network&sec2=godmode/reporting/map_builder'
-            ),
-            8  => ui_get_full_url(
-                'index.php?sec=gservers&sec2=godmode/servers/modificar_server'
-            ),
-            9  => ui_get_full_url(
-                'index.php?sec=workspace&sec2=operation/users/user_edit'
-            ),
-            10 => ui_get_full_url(
-                'index.php?sec=view&sec2=operation/tree'
-            ),
-            11 => ui_get_full_url(
-                'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components'
-            ),
-            12 => ui_get_full_url(
-                'index.php?sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist'
-            ),
-            13 => ui_get_full_url(
-                'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup'
-            ),
+        $this->pages_menu = [
+            0  => [
+                'name' => __('Tactical View'),
+                'icon' => ui_get_full_url(
+                    'images/op_monitoring.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=view&sec2=operation/agentes/tactical'
+                ),
+            ],
+            1  => [
+                'name' => __('Agent Management'),
+                'icon' => ui_get_full_url(
+                    'images/gm_resources.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
+                ),
+            ],
+            2  => [
+                'name' => __('General Setup'),
+                'icon' => ui_get_full_url(
+                    'images/gm_setup.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=general&sec2=godmode/setup/setup&section=general'
+                ),
+            ],
+            3  => [
+                'name' => __('Manage Policies'),
+                'icon' => ui_get_full_url(
+                    'images/gm_configuration.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
+                ),
+            ],
+            4  => [
+                'name' => __('List Alerts'),
+                'icon' => ui_get_full_url(
+                    'images/gm_alerts.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
+                ),
+            ],
+            5  => [
+                'name' => __('View Events'),
+                'icon' => ui_get_full_url(
+                    'images/op_events.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=eventos&sec2=operation/events/events'
+                ),
+            ],
+            6  => [
+                'name' => __('Dashboard'),
+                'icon' => ui_get_full_url(
+                    'images/op_reporting.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=reporting&sec2=enterprise/dashboard/dashboards'
+                ),
+            ],
+            7  => [
+                'name' => __('Visual Console'),
+                'icon' => ui_get_full_url(
+                    'images/op_network.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=network&sec2=godmode/reporting/map_builder'
+                ),
+            ],
+            8  => [
+                'name' => __('Manage Servers'),
+                'icon' => ui_get_full_url(
+                    'images/gm_servers.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=gservers&sec2=godmode/servers/modificar_server'
+                ),
+            ],
+            9  => [
+                'name' => __('Edit User'),
+                'icon' => ui_get_full_url(
+                    'images/gm_users.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=workspace&sec2=operation/users/user_edit'
+                ),
+            ],
+            10 => [
+                'name' => __('Three View'),
+                'icon' => ui_get_full_url(
+                    'images/op_monitoring.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=view&sec2=operation/tree'
+                ),
+            ],
+            11 => [
+                'name' => __('Network Component'),
+                'icon' => ui_get_full_url(
+                    'images/gm_configuration.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components'
+                ),
+            ],
+            12 => [
+                'name' => __('Task List'),
+                'icon' => ui_get_full_url(
+                    'images/gm_discovery.menu.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist'
+                ),
+            ],
+            13 => [
+                'name' => __('Update Manager'),
+                'icon' => ui_get_full_url(
+                    'images/um_messages.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup'
+                ),
+            ],
 
         ];
 
@@ -230,20 +249,20 @@ class OrderInterpreter extends Wizard
             echo '<div id="result_order" class="show_result_interpreter">';
             echo '<ul>';
 
-            foreach ($this->pages_name as $key => $value) {
+            foreach ($this->pages_menu as $key => $value) {
                 if (preg_match(
                     '/.*'.io_safe_output($text).'.*/i',
-                    __('GO TO '.$value)
+                    __('GO TO '.$value['name'])
                 )
                 ) {
                     if ($iterator <= 9) {
                         echo '<li class="list_found">';
                         echo '
                         Go to &nbsp;
-                        <img src="'.$this->pages_icon[$key].'">';
+                        <img src="'.$this->pages_menu[$key]['icon'].'">';
                         echo '&nbsp;
-                        <a href="'.$this->pages_url[$key].'">
-                        '.$value.'</a><br>';
+                        <a href="'.$this->pages_menu[$key]['url'].'">
+                        '.$value['name'].'</a><br>';
                     }
 
                     $iterator ++;

From 480673521c1e4b6d4a8752a73652d058244cb484 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:08:44 +0100
Subject: [PATCH 19/39] Can select with keyboard list items

---
 pandora_console/general/header.php            | 52 +++++++++++++++++--
 .../include/class/OrderInterpreter.class.php  | 12 +++--
 .../include/styles/order_interpreter.css      |  4 ++
 3 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 2b040c13d9..36fe9bea82 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -101,7 +101,8 @@ if ($config['menu_type'] == 'classic') {
 
         if ($acl_head_search) {
             // Search bar.
-            $search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
+            $search_bar = '<form autocomplete="off" method="get" style="display: inline;" name="quicksearch" action="">';
+            '<input autocomplete="false" name="hidden" type="text" style="display:none;">';
             if (!isset($config['search_keywords'])) {
                 $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
             } else {
@@ -112,7 +113,7 @@ if ($config['menu_type'] == 'classic') {
                 }
             }
 
-            $search_bar .= '<input  type="text" id="keywords" name="keywords"';
+            $search_bar .= '<input id="keywords" name="keywords"';
             if (!isset($config['search_keywords'])) {
                 $search_bar .= "value='".__('Enter keywords to search')."'";
             } else if (strlen($config['search_keywords']) == 0) {
@@ -121,8 +122,8 @@ if ($config['menu_type'] == 'classic') {
                 $search_bar .= "value='".$config['search_keywords']."'";
             }
 
-            $search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
-                    onkeyup="showinterpreter()" class="search_input" />';
+            $search_bar .= 'type="search" onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
+                    onkeyup="showinterpreter()" class="search_input"/>';
 
 
             $search_bar .= '<div id="result_order" style="display:grid"></div>';
@@ -636,10 +637,52 @@ if ($config['menu_type'] == 'classic') {
     var new_chat = <?php echo (int) $_SESSION['new_chat']; ?>;
     
     function showinterpreter(){
+
+        if(event.keyCode == 1 && $("#result_items li.active").length != 0 )
+        {
+            window.location = $('#result_items').find("li.active a").attr('href');
+        }
+        var code = event.key;
+        switch (code){
+            case 'ArrowDown':
+                if($("#result_items li.active").length!=0)
+                {
+                    var storeTarget = $('#result_items').find("li.active").next();
+                    $("#result_items li.active").removeClass("active");
+                    storeTarget.focus().addClass("active");
+                   
+                }
+                else
+                {
+                    $('#result_items').find("li:first").focus().addClass("active");
+                }
+           return;
+
+           case 'ArrowUp':
+                if($("#result_items li.active"))
+                {
+                    var storeTarget = $('#result_items').find("li.active").prev();
+                    $("#result_items li.active").removeClass("active");
+                    storeTarget.focus().addClass("active");
+                }
+                else
+                {
+                    $('#result_items').find("li:first").focus().addClass("active");
+                }
+           return;
+                
+           case 'ArrowRight':
+           return;
+           case 'ArrowLeft':
+           return;
+
+        }
+        
         if( $('#keywords').val() === ''){
             $('#keywords').addClass('search_input');
             $('#keywords').removeClass('results-found');
             $('#result_order').hide();
+            $('#keywords').attr('placeholder','Enter keywords to search');
         }else {
             $.ajax({
                 type: "POST",
@@ -651,7 +694,6 @@ if ($config['menu_type'] == 'classic') {
                     text: $('#keywords').val(),
                 },
                 success: function (data) {
-                    console.log(data);
                    $('#result_order').html(data);
                    },
                 error: function (data) {
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index f0d0a62d13..93cb3f4d01 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -247,7 +247,7 @@ class OrderInterpreter extends Wizard
 
         if ($text !== '') {
             echo '<div id="result_order" class="show_result_interpreter">';
-            echo '<ul>';
+            echo '<ul id="result_items">';
 
             foreach ($this->pages_menu as $key => $value) {
                 if (preg_match(
@@ -256,7 +256,7 @@ class OrderInterpreter extends Wizard
                 )
                 ) {
                     if ($iterator <= 9) {
-                        echo '<li class="list_found">';
+                        echo '<li class="list_found" name="'.$iterator.'" id="'.$iterator.'">';
                         echo '
                         Go to &nbsp;
                         <img src="'.$this->pages_menu[$key]['icon'].'">';
@@ -274,11 +274,12 @@ class OrderInterpreter extends Wizard
             }
 
             if ($iterator > 9) {
-                echo '<li class="more_results"><br>';
-                echo '+ '.$more_results.' results found';
+                echo '</li>';
             }
 
-            echo '</ul></div';
+            echo $this->loadJS();
+            echo '</ul><div class="more_results">
+                  + '.$more_results.' results found</div></div';
         }
 
     }
@@ -295,6 +296,7 @@ class OrderInterpreter extends Wizard
         ob_start();
         ?>
     <script type="text/javascript">
+    
     </script>   
         <?php
         return ob_get_clean();
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index ae7c49d8f2..84c903969d 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -43,3 +43,7 @@ div.show_result_interpreter {
 .list_found {
   padding-top: 5px;
 }
+
+.active {
+  background: #f2f6f7;
+}

From 2139e0ef841872e3782e53d8388661089dea3aa9 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:11:12 +0100
Subject: [PATCH 20/39] add 3 on key event

---
 pandora_console/general/header.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 36fe9bea82..893a252bf0 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -638,7 +638,7 @@ if ($config['menu_type'] == 'classic') {
     
     function showinterpreter(){
 
-        if(event.keyCode == 1 && $("#result_items li.active").length != 0 )
+        if(event.keyCode == 13 && $("#result_items li.active").length != 0 )
         {
             window.location = $('#result_items').find("li.active a").attr('href');
         }

From 90d0be6ff1f088442a4355b8eeded74056933074 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:22:50 +0100
Subject: [PATCH 21/39] fixed error

---
 .../include/class/OrderInterpreter.class.php           | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 93cb3f4d01..bb60ccc3a7 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -278,10 +278,14 @@ class OrderInterpreter extends Wizard
             }
 
             echo $this->loadJS();
-            echo '</ul><div class="more_results">
-                  + '.$more_results.' results found</div></div';
-        }
+            echo '</ul>';
+            if ($iterator > 10) {
+                echo '<div class="more_results">
+                  + '.$more_results.' results found</div>';
+            }
 
+            echo '</div';
+        }
     }
 
 

From 4e712d1a45dc310753807bf78aa6ae12ec0fbfd0 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:25:33 +0100
Subject: [PATCH 22/39] fixed error

---
 pandora_console/include/class/OrderInterpreter.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index bb60ccc3a7..69a96c38d8 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -191,7 +191,7 @@ class OrderInterpreter extends Wizard
                 ),
             ],
             10 => [
-                'name' => __('Three View'),
+                'name' => __('Tree View'),
                 'icon' => ui_get_full_url(
                     'images/op_monitoring.menu_gray.png'
                 ),

From 3008651b659416beb63d9e0e8a2474ac0d289d1f Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:43:30 +0100
Subject: [PATCH 23/39] add < list

---
 .../include/class/OrderInterpreter.class.php  | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 69a96c38d8..bc5cd70ca5 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -100,7 +100,7 @@ class OrderInterpreter extends Wizard
         $this->ajaxController = $ajax_controller;
 
         $this->pages_menu = [
-            0  => [
+            [
                 'name' => __('Tactical View'),
                 'icon' => ui_get_full_url(
                     'images/op_monitoring.menu_gray.png'
@@ -109,7 +109,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=view&sec2=operation/agentes/tactical'
                 ),
             ],
-            1  => [
+            [
                 'name' => __('Agent Management'),
                 'icon' => ui_get_full_url(
                     'images/gm_resources.menu_gray.png'
@@ -118,7 +118,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
                 ),
             ],
-            2  => [
+            [
                 'name' => __('General Setup'),
                 'icon' => ui_get_full_url(
                     'images/gm_setup.menu_gray.png'
@@ -127,7 +127,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=general&sec2=godmode/setup/setup&section=general'
                 ),
             ],
-            3  => [
+            [
                 'name' => __('Manage Policies'),
                 'icon' => ui_get_full_url(
                     'images/gm_configuration.menu_gray.png'
@@ -136,7 +136,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
                 ),
             ],
-            4  => [
+            [
                 'name' => __('List Alerts'),
                 'icon' => ui_get_full_url(
                     'images/gm_alerts.menu_gray.png'
@@ -145,7 +145,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
                 ),
             ],
-            5  => [
+            [
                 'name' => __('View Events'),
                 'icon' => ui_get_full_url(
                     'images/op_events.menu_gray.png'
@@ -154,7 +154,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=eventos&sec2=operation/events/events'
                 ),
             ],
-            6  => [
+            [
                 'name' => __('Dashboard'),
                 'icon' => ui_get_full_url(
                     'images/op_reporting.menu_gray.png'
@@ -163,7 +163,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=reporting&sec2=enterprise/dashboard/dashboards'
                 ),
             ],
-            7  => [
+            [
                 'name' => __('Visual Console'),
                 'icon' => ui_get_full_url(
                     'images/op_network.menu_gray.png'
@@ -172,7 +172,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=network&sec2=godmode/reporting/map_builder'
                 ),
             ],
-            8  => [
+            [
                 'name' => __('Manage Servers'),
                 'icon' => ui_get_full_url(
                     'images/gm_servers.menu_gray.png'
@@ -181,7 +181,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=gservers&sec2=godmode/servers/modificar_server'
                 ),
             ],
-            9  => [
+            [
                 'name' => __('Edit User'),
                 'icon' => ui_get_full_url(
                     'images/gm_users.menu_gray.png'
@@ -190,7 +190,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=workspace&sec2=operation/users/user_edit'
                 ),
             ],
-            10 => [
+            [
                 'name' => __('Tree View'),
                 'icon' => ui_get_full_url(
                     'images/op_monitoring.menu_gray.png'
@@ -199,7 +199,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=view&sec2=operation/tree'
                 ),
             ],
-            11 => [
+            [
                 'name' => __('Network Component'),
                 'icon' => ui_get_full_url(
                     'images/gm_configuration.menu_gray.png'
@@ -208,7 +208,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components'
                 ),
             ],
-            12 => [
+            [
                 'name' => __('Task List'),
                 'icon' => ui_get_full_url(
                     'images/gm_discovery.menu.png'
@@ -217,7 +217,7 @@ class OrderInterpreter extends Wizard
                     'index.php?sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist'
                 ),
             ],
-            13 => [
+            [
                 'name' => __('Update Manager'),
                 'icon' => ui_get_full_url(
                     'images/um_messages.menu_gray.png'
@@ -284,7 +284,7 @@ class OrderInterpreter extends Wizard
                   + '.$more_results.' results found</div>';
             }
 
-            echo '</div';
+            echo '</div>';
         }
     }
 

From de161d830ce9ce193bac66e715babc524911cdc5 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 13 Dec 2019 14:46:47 +0100
Subject: [PATCH 24/39] add Traducction

---
 pandora_console/include/class/OrderInterpreter.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index bc5cd70ca5..8309356b4e 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -281,7 +281,7 @@ class OrderInterpreter extends Wizard
             echo '</ul>';
             if ($iterator > 10) {
                 echo '<div class="more_results">
-                  + '.$more_results.' results found</div>';
+                  + '.$more_results.' '.__('results found').'</div>';
             }
 
             echo '</div>';

From d8f232d814c701512d40394abb61c716a00a6fe8 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@artica.es>
Date: Mon, 16 Dec 2019 16:39:13 +0100
Subject: [PATCH 25/39] Added control for MS Edge and Internet Explorer
 browsers for disallow linear gradient

---
 pandora_console/general/login_page.php   | 8 +++++++-
 pandora_console/include/styles/login.css | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index 816533aab0..2410094c41 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -82,12 +82,18 @@ if (!empty($page) && !empty($sec)) {
 }
 
 $login_body_style = '';
+$login_body_class = '';
 // Overrides the default background with the defined by the user.
 if (!empty($config['login_background'])) {
     $background_url = 'images/backgrounds/'.$config['login_background'];
     $login_body_style = "style=\"background:linear-gradient(74deg, #02020255 36%, transparent 36%), url('".$background_url."');\"";
 }
 
+// Support for Internet Explorer and Microsoft Edge browsers
+if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Edge') !== false) {
+    $login_body_class = "class='login_body_trident'";
+}
+
 // Get alternative custom in case of db fail.
 $custom_fields = [
     'custom_logo_login',
@@ -111,7 +117,7 @@ foreach ($custom_fields as $field) {
 // Get the custom icons.
 $docs_logo = ui_get_docs_logo();
 $support_logo = ui_get_support_logo();
-echo '<div id="login_body" '.$login_body_style.'>';
+echo '<div id="login_body" '.$login_body_class.' '.$login_body_style.'>';
 echo '<div id="header_login">';
 
 echo '<div id="list_icon_docs_support"><ul>';
diff --git a/pandora_console/include/styles/login.css b/pandora_console/include/styles/login.css
index f6c072b314..426d06bb89 100644
--- a/pandora_console/include/styles/login.css
+++ b/pandora_console/include/styles/login.css
@@ -33,6 +33,10 @@ div#error_buttons a {
   background-repeat: repeat;
 }
 
+.login_body_trident {
+  background: url("../../images/backgrounds/background_pandora_console_keys.jpg") !important;
+}
+
 p.log_in {
   color: #fff;
   padding: 0px 10px;

From 4197b7036beb66abf76ef67ff47ec8ecaeda320a Mon Sep 17 00:00:00 2001
From: fbsanchez <fborja.sanchez@artica.es>
Date: Thu, 19 Dec 2019 11:48:20 +0100
Subject: [PATCH 26/39] Added ssh_launcher settings to pandora_Server

---
 pandora_server/conf/pandora_server.conf.new | 4 +++-
 pandora_server/lib/PandoraFMS/Config.pm     | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new
index fa9491ce14..1906fa72eb 100644
--- a/pandora_server/conf/pandora_server.conf.new
+++ b/pandora_server/conf/pandora_server.conf.new
@@ -163,9 +163,11 @@ wmiserver 1
 network_timeout 4
 
 # Network timeout (in seconds) for timeout in remote execution commands (PANDORA FMS ENTERPRISE ONLY).
-
 rcmd_timeout 30
 
+# Remote execution modules, ssh_launcher extra option (PANDORA FMS ENTERPRISE ONLY).
+ssh_launcher /usr/share/pandora_server/util/ssh_launcher.sh
+
 # Server keepalive (in seconds)
 
 server_keepalive 45
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index f8270f95da..85244d84df 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -360,6 +360,9 @@ sub pandora_load_config {
 	# Discovery SAP Artica environment
 	$pa_config->{"sap_artica_test"} = 0;
 
+	# Remote execution modules, option ssh_launcher
+	$pa_config->{"ssh_launcher"} = "/usr/bin/ssh_launcher";
+
 	# braa for enterprise snmp server
 	$pa_config->{"braa"} = "/usr/bin/braa";
 
@@ -861,6 +864,9 @@ sub pandora_load_config {
 		elsif ($parametro =~ m/^sap_artica_test\s(.*)/i) {
 			$pa_config->{'sap_artica_test'}= clean_blank($1);
 		}
+		elsif ($parametro =~ m/^ssh_launcher\s(.*)/i) {
+			$pa_config->{'ssh_launcher'}= clean_blank($1);
+		}
 		elsif ($parametro =~ m/^nmap_timing_template\s+([0-9]*)/i) {
 			$pa_config->{'nmap_timing_template'}= clean_blank($1); 
 		}

From e06c974e67db2ab71182d6221109aee58e3ae55a Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 19 Dec 2019 14:10:43 +0100
Subject: [PATCH 27/39] add acl's to order interpreter

---
 pandora_console/general/header.php            |   8 +
 .../include/class/OrderInterpreter.class.php  | 141 +++++++++++++++++-
 2 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 893a252bf0..943461d6bc 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -637,6 +637,14 @@ if ($config['menu_type'] == 'classic') {
     var new_chat = <?php echo (int) $_SESSION['new_chat']; ?>;
     
     function showinterpreter(){
+        
+        document.onclick = function(e) {
+            $('#result_order').hide();
+            $('#keywords').addClass('search_input');
+            $('#keywords').removeClass('results-found');
+            $('#keywords')..value = '';
+            $('#keywords').attr('placeholder','Enter keywords to search');
+        }
 
         if(event.keyCode == 13 && $("#result_items li.active").length != 0 )
         {
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 8309356b4e..9765e7a5d2 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -97,6 +97,7 @@ class OrderInterpreter extends Wizard
     public function __construct(
         $ajax_controller='include/ajax/order_interpreter'
     ) {
+        global $config;
         $this->ajaxController = $ajax_controller;
 
         $this->pages_menu = [
@@ -108,6 +109,15 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=view&sec2=operation/agentes/tactical'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'AR'
+                ) || check_acl(
+                    $config['id_user'],
+                    0,
+                    'AW'
+                ),
             ],
             [
                 'name' => __('Agent Management'),
@@ -117,6 +127,15 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'AW'
+                ) && check_acl(
+                    $config['id_user'],
+                    0,
+                    'AD'
+                ),
             ],
             [
                 'name' => __('General Setup'),
@@ -126,6 +145,13 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=general&sec2=godmode/setup/setup&section=general'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'PM'
+                ) || is_user_admin(
+                    $config['id_user']
+                ),
             ],
             [
                 'name' => __('Manage Policies'),
@@ -135,6 +161,11 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=gmodules&sec2=enterprise/godmode/policies/policies'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'AW'
+                ),
             ],
             [
                 'name' => __('List Alerts'),
@@ -144,6 +175,21 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=galertas&sec2=godmode/alerts/alert_list'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'LW'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'AD'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'LM'
+                ),
             ],
             [
                 'name' => __('View Events'),
@@ -153,6 +199,21 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=eventos&sec2=operation/events/events'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'ER'
+                ) ||
+                check_acl(
+                    $config['id_user'],
+                    0,
+                    'EW'
+                ) ||
+                check_acl(
+                    $config['id_user'],
+                    0,
+                    'EM'
+                ),
             ],
             [
                 'name' => __('Dashboard'),
@@ -162,6 +223,11 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=reporting&sec2=enterprise/dashboard/dashboards'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'RR'
+                ),
             ],
             [
                 'name' => __('Visual Console'),
@@ -171,6 +237,11 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=network&sec2=godmode/reporting/map_builder'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'VW'
+                ),
             ],
             [
                 'name' => __('Manage Servers'),
@@ -180,6 +251,11 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=gservers&sec2=godmode/servers/modificar_server'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'AW'
+                ),
             ],
             [
                 'name' => __('Edit User'),
@@ -189,6 +265,7 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=workspace&sec2=operation/users/user_edit'
                 ),
+                'acl'  => true,
             ],
             [
                 'name' => __('Tree View'),
@@ -198,6 +275,7 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=view&sec2=operation/tree'
                 ),
+                'acl'  => true,
             ],
             [
                 'name' => __('Network Component'),
@@ -207,6 +285,11 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'PM'
+                ),
             ],
             [
                 'name' => __('Task List'),
@@ -216,6 +299,41 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'AR'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'AW'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'AM'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'RR'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'RW'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'RM'
+                )
+                || check_acl(
+                    $config['id_user'],
+                    0,
+                    'PM'
+                ),
             ],
             [
                 'name' => __('Update Manager'),
@@ -225,6 +343,25 @@ class OrderInterpreter extends Wizard
                 'url'  => ui_get_full_url(
                     'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup'
                 ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'PM'
+                ) && is_user_admin($config['id_user']),
+            ],
+            [
+                'name' => __('Manage Agent Groups'),
+                'icon' => ui_get_full_url(
+                    'images/gm_users.menu_gray.png'
+                ),
+                'url'  => ui_get_full_url(
+                    'index.php?sec=gagente&sec2=godmode/groups/group_list&tab=groups'
+                ),
+                'acl'  => check_acl(
+                    $config['id_user'],
+                    0,
+                    'PM'
+                ),
             ],
 
         ];
@@ -239,6 +376,8 @@ class OrderInterpreter extends Wizard
      */
     public function getResult()
     {
+        global $config;
+
         // Take value from input search.
         $text = get_parameter('text', '');
         $array_found = [];
@@ -253,7 +392,7 @@ class OrderInterpreter extends Wizard
                 if (preg_match(
                     '/.*'.io_safe_output($text).'.*/i',
                     __('GO TO '.$value['name'])
-                )
+                ) && $value['acl']
                 ) {
                     if ($iterator <= 9) {
                         echo '<li class="list_found" name="'.$iterator.'" id="'.$iterator.'">';

From 7217176a7563cb8613cfaa6f0a2a0759cfdff1b3 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 19 Dec 2019 14:11:07 +0100
Subject: [PATCH 28/39] add acl's to order interpreter

---
 pandora_console/general/header.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 943461d6bc..027a7a1efa 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -637,12 +637,12 @@ if ($config['menu_type'] == 'classic') {
     var new_chat = <?php echo (int) $_SESSION['new_chat']; ?>;
     
     function showinterpreter(){
-        
+
         document.onclick = function(e) {
             $('#result_order').hide();
             $('#keywords').addClass('search_input');
             $('#keywords').removeClass('results-found');
-            $('#keywords')..value = '';
+            $('#keywords').value = '';
             $('#keywords').attr('placeholder','Enter keywords to search');
         }
 

From 87405ba318a47c73df959dbf71bd7ec2a183a7ea Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 19 Dec 2019 14:20:31 +0100
Subject: [PATCH 29/39] add message no resoult found

---
 pandora_console/general/header.php                       | 1 +
 pandora_console/include/class/OrderInterpreter.class.php | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 027a7a1efa..362213bb75 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -703,6 +703,7 @@ if ($config['menu_type'] == 'classic') {
                 },
                 success: function (data) {
                    $('#result_order').html(data);
+                   console.log(data);
                    },
                 error: function (data) {
                     console.error("Fatal error in AJAX call to interpreter order", data)
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 9765e7a5d2..af0cb0443e 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -423,6 +423,10 @@ class OrderInterpreter extends Wizard
                   + '.$more_results.' '.__('results found').'</div>';
             }
 
+            if ($iterator === 0) {
+                echo __('No results found');
+            }
+
             echo '</div>';
         }
     }

From 43d08f354a89f84fc3230571c0a97c950feaf38d Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 19 Dec 2019 16:53:45 +0100
Subject: [PATCH 30/39] Ajustes CSS

---
 pandora_console/general/header.php                |  2 +-
 .../include/class/OrderInterpreter.class.php      |  2 +-
 .../include/styles/order_interpreter.css          | 15 ++++++++++-----
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 362213bb75..b0bc0bf1d1 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -126,7 +126,7 @@ if ($config['menu_type'] == 'classic') {
                     onkeyup="showinterpreter()" class="search_input"/>';
 
 
-            $search_bar .= '<div id="result_order" style="display:grid"></div>';
+            $search_bar .= '<div id="result_order" class="result_order"></div>';
             // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
             $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
             $search_bar .= '</form>';
diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index af0cb0443e..727579f167 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -385,7 +385,7 @@ class OrderInterpreter extends Wizard
         $more_results = 0;
 
         if ($text !== '') {
-            echo '<div id="result_order" class="show_result_interpreter">';
+            echo '<div class="show_result_interpreter">';
             echo '<ul id="result_items">';
 
             foreach ($this->pages_menu as $key => $value) {
diff --git a/pandora_console/include/styles/order_interpreter.css b/pandora_console/include/styles/order_interpreter.css
index 84c903969d..6af20c68c5 100644
--- a/pandora_console/include/styles/order_interpreter.css
+++ b/pandora_console/include/styles/order_interpreter.css
@@ -2,15 +2,15 @@ div.show_result_interpreter {
   background-color: #fff;
   color: #000;
   border: 1px solid #e2e2e2;
-  border-top-left-radius: 4px;
-  border-top-right-radius: 4px;
+  border-bottom-left-radius: 10px;
+  border-bottom-right-radius: 10px;
   padding-left: 10px;
   padding-top: 5px;
   padding-bottom: 5px;
   box-shadow: 0px 0px 15px -4px #dadada;
   position: absolute;
   z-index: 1;
-  width: 302px;
+  width: 300px;
 }
 
 .more_results {
@@ -35,8 +35,8 @@ div.show_result_interpreter {
   color: #777;
   font-family: "Open Sans", sans-serif;
   font-size: 8.5pt;
-  border-top-left-radius: 50px;
-  border-top-right-radius: 50px;
+  border-top-left-radius: 10px;
+  border-top-right-radius: 10px;
   border-color: transparent;
 }
 
@@ -47,3 +47,8 @@ div.show_result_interpreter {
 .active {
   background: #f2f6f7;
 }
+
+.result_order {
+  margin-left: 2px;
+  display: grid;
+}

From 8695e1aa4b4dfafee9ff1c347f5d9b729f302cae Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 19 Dec 2019 17:45:38 +0100
Subject: [PATCH 31/39] Restore reverted changes

---
 pandora_console/include/functions_api.php | 104 +++++++++++++---------
 1 file changed, 62 insertions(+), 42 deletions(-)

diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index 5c76cbb949..86892515fb 100644
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -3070,21 +3070,20 @@ function api_get_policy_modules($thrash1, $thrash2, $other, $thrash3)
 
 
 /**
- * Create a network module in agent. And return the id_agent_module of new module.
+ * Create a network module in agent.
+ * And return the id_agent_module of new module.
  *
- * @param string            $id    Name of agent to add the module.
- * @param $thrash1 Don't use.
- * @param array             $other it's array, $other as param is <name_module>;<disabled>;<id_module_type>;
- *              <id_module_group>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;<ff_threshold>;
- *              <history_data>;<ip_target>;<module_port>;<snmp_community>;<snmp_oid>;<module_interval>;<post_process>;
- *              <min>;<max>;<custom_id>;<description>;<disabled_types_event>;<module_macros>;
- *              <each_ff>;<ff_threshold_normal>;<ff_threshold_warning>;<ff_threshold_critical>; in this order
- *              and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
- *              example:
- *
- *              api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|www.google.es|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|
- *
- * @param $thrash3 Don't use
+ * @param    string $id      Name of agent to add the module.
+ * @param    string $thrash1 Don't use.
+ * @param    array  $other   It's array, $other as param is <name_module>;<disabled>;<id_module_type>;
+ *    <id_module_group>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;<ff_threshold>;
+ *    <history_data>;<ip_target>;<module_port>;<snmp_community>;<snmp_oid>;<module_interval>;<post_process>;
+ *    <min>;<max>;<custom_id>;<description>;<disabled_types_event>;<module_macros>;
+ *    <each_ff>;<ff_threshold_normal>;<ff_threshold_warning>;<ff_threshold_critical>; in this order
+ *    and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>).
+ * @param    string $thrash3 Don't use.
+ * @example: api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|www.google.es|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|*
+ * @return   mixed Return.
  */
 function api_set_create_network_module($id, $thrash1, $other, $thrash3)
 {
@@ -3155,16 +3154,17 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3)
         'min_ff_event_critical' => $other['data'][27],
         'critical_inverse'      => $other['data'][28],
         'warning_inverse'       => $other['data'][29],
+        'ff_type'               => $other['data'][30],
     ];
 
     if (! $values['descripcion']) {
         $values['descripcion'] = '';
-        // Column 'descripcion' cannot be null
+        // Column 'descripcion' cannot be null.
     }
 
     if (! $values['module_macros']) {
         $values['module_macros'] = '';
-        // Column 'module_macros' cannot be null
+        // Column 'module_macros' cannot be null.
     }
 
     if ($agent_by_alias) {
@@ -3190,7 +3190,7 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3)
     }
 
     if (is_error($idModule)) {
-        // TODO: Improve the error returning more info
+        // TODO: Improve the error returning more info.
         returnError('error_create_network_module', __('Error in creation network module.'));
     } else {
         returnData('string', ['type' => 'string', 'data' => $idModule]);
@@ -3307,6 +3307,7 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
         'critical_inverse',
         'warning_inverse',
         'policy_linked',
+        'ff_type',
     ];
 
     $values = [];
@@ -3420,16 +3421,17 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3)
         'min_ff_event_critical' => $other['data'][32],
         'critical_inverse'      => $other['data'][33],
         'warning_inverse'       => $other['data'][34],
+        'ff_type'               => $other['data'][35],
     ];
 
     if (! $values['descripcion']) {
         $values['descripcion'] = '';
-        // Column 'descripcion' cannot be null
+        // Column 'descripcion' cannot be null.
     }
 
     if (! $values['module_macros']) {
         $values['module_macros'] = '';
-        // Column 'module_macros' cannot be null
+        // Column 'module_macros' cannot be null.
     }
 
     if ($agent_by_alias) {
@@ -3455,7 +3457,7 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3)
     }
 
     if (is_error($idModule)) {
-        // TODO: Improve the error returning more info
+        // TODO: Improve the error returning more info.
         returnError('error_create_plugin_module', __('Error in creation plugin module.'));
     } else {
         returnData('string', ['type' => 'string', 'data' => $idModule]);
@@ -3562,6 +3564,7 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
         'critical_inverse',
         'warning_inverse',
         'policy_linked',
+        'ff_type',
     ];
 
     $values = [];
@@ -3669,16 +3672,17 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3)
         'ff_timeout'            => $other['data'][23],
         'critical_inverse'      => $other['data'][24],
         'warning_inverse'       => $other['data'][25],
+        'ff_type'               => $other['data'][26],
     ];
 
     if (! $values['descripcion']) {
         $values['descripcion'] = '';
-        // Column 'descripcion' cannot be null
+        // Column 'descripcion' cannot be null.
     }
 
     if (! $values['module_macros']) {
         $values['module_macros'] = '';
-        // Column 'module_macros' cannot be null
+        // Column 'module_macros' cannot be null.
     }
 
     if ($agent_by_alias) {
@@ -3704,7 +3708,7 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3)
     }
 
     if (is_error($idModule)) {
-        // TODO: Improve the error returning more info
+        // TODO: Improve the error returning more info.
         returnError('error_create_data_module', __('Error in creation data module.'));
     } else {
         returnData('string', ['type' => 'string', 'data' => $idModule]);
@@ -3785,7 +3789,7 @@ function api_set_create_synthetic_module($id, $agent_by_alias, $other, $thrash3)
 
     if (! $values['descripcion']) {
         $values['descripcion'] = '';
-        // Column 'descripcion' cannot be null
+        // Column 'descripcion' cannot be null.
     }
 
     if ($agent_by_alias) {
@@ -3795,7 +3799,7 @@ function api_set_create_synthetic_module($id, $agent_by_alias, $other, $thrash3)
             $idModule = modules_create_agent_module($idAgent, $name, $values, true);
 
             if (is_error($idModule)) {
-                // TODO: Improve the error returning more info
+                // TODO: Improve the error returning more info.
                 returnError('error_create_data_module', __('Error in creation data module.'));
             } else {
                 $synthetic_type = $other['data'][1];
@@ -4190,6 +4194,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3)
         'critical_inverse',
         'warning_inverse',
         'policy_linked',
+        'ff_type',
     ];
 
     $values = [];
@@ -4277,7 +4282,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
     $disabled_types_event[EVENTS_GOING_UNKNOWN] = (int) !$other['data'][27];
     $disabled_types_event = json_encode($disabled_types_event);
 
-    // SNMP version 3
+    // SNMP version 3.
     if ($other['data'][14] == '3') {
         if ($other['data'][23] != 'AES' and $other['data'][23] != 'DES') {
             returnError('error_create_snmp_module', __('Error in creation SNMP module. snmp3_priv_method doesn\'t exist. Set it to \'AES\' or \'DES\'. '));
@@ -4329,6 +4334,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
             'min_ff_event_normal'   => $other['data'][31],
             'min_ff_event_warning'  => $other['data'][32],
             'min_ff_event_critical' => $other['data'][33],
+            'ff_type'               => $other['data'][34],
         ];
     } else {
         $values = [
@@ -4360,12 +4366,13 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
             'min_ff_event_normal'   => $other['data'][25],
             'min_ff_event_warning'  => $other['data'][26],
             'min_ff_event_critical' => $other['data'][27],
+            'ff_type'               => $other['data'][28],
         ];
     }
 
     if (! $values['descripcion']) {
         $values['descripcion'] = '';
-        // Column 'descripcion' cannot be null
+        // Column 'descripcion' cannot be null.
     }
 
     if ($agent_by_alias) {
@@ -4528,6 +4535,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
             'min_ff_event_warning',
             'min_ff_event_critical',
             'policy_linked',
+            'ff_type',
         ];
     } else {
         $snmp_module_fields = [
@@ -4559,6 +4567,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
             'min_ff_event_warning',
             'min_ff_event_critical',
             'policy_linked',
+            'ff_type',
         ];
     }
 
@@ -4656,6 +4665,7 @@ function api_set_new_network_component($id, $thrash1, $other, $thrash2)
         'min_ff_event_normal'   => $other['data'][20],
         'min_ff_event_warning'  => $other['data'][21],
         'min_ff_event_critical' => $other['data'][22],
+        'ff_type'               => $other['data'][23],
     ];
 
     $name_check = db_get_value('name', 'tnetwork_component', 'name', $id);
@@ -4756,6 +4766,7 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2)
         'min_ff_event_normal'   => $other['data'][24],
         'min_ff_event_warning'  => $other['data'][25],
         'min_ff_event_critical' => $other['data'][26],
+        'ff_type'               => $other['data'][27],
     ];
 
     $name_check = db_get_value('name', 'tnetwork_component', 'name', $id);
@@ -4891,6 +4902,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2)
             'min_ff_event_normal'   => $other['data'][29],
             'min_ff_event_warning'  => $other['data'][30],
             'min_ff_event_critical' => $other['data'][31],
+            'ff_type'               => $other['data'][32],
         ];
     } else {
         $values = [
@@ -4922,6 +4934,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2)
             'min_ff_event_normal'   => $other['data'][25],
             'min_ff_event_warning'  => $other['data'][26],
             'min_ff_event_critical' => $other['data'][27],
+            'ff_type'               => $other['data'][28],
         ];
     }
 
@@ -5002,6 +5015,7 @@ function api_set_new_local_component($id, $thrash1, $other, $thrash2)
         'min_ff_event_warning'       => $other['data'][8],
         'min_ff_event_critical'      => $other['data'][9],
         'ff_timeout'                 => $other['data'][10],
+        'ff_type'                    => $other['data'][11],
     ];
 
     $name_check = enterprise_hook(
@@ -6835,6 +6849,7 @@ function api_set_add_data_module_policy($id, $thrash1, $other, $thrash3)
     $values['min_ff_event_warning'] = $other['data'][21];
     $values['min_ff_event_critical'] = $other['data'][22];
     $values['ff_timeout'] = $other['data'][23];
+    $values['ff_type'] = $other['data'][24];
 
     if ($name_module_policy !== false) {
         if ($name_module_policy[0]['name'] == $other['data'][0]) {
@@ -7076,6 +7091,7 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3)
     $values['min_ff_event_normal'] = $other['data'][24];
     $values['min_ff_event_warning'] = $other['data'][25];
     $values['min_ff_event_critical'] = $other['data'][26];
+    $values['ff_type'] = $other['data'][27];
 
     if ($name_module_policy !== false) {
         if ($name_module_policy[0]['name'] == $other['data'][0]) {
@@ -7134,7 +7150,7 @@ function api_set_update_network_module_policy($id, $thrash1, $other, $thrash3)
         return;
     }
 
-    // Check if the module exists
+    // Check if the module exists.
     $module_policy = enterprise_hook('policies_get_modules', [$id, ['id' => $other['data'][0]], 'id_module']);
 
     if ($module_policy === false) {
@@ -7241,7 +7257,7 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3)
         return;
     }
 
-    // Check if the module is already in the policy
+    // Check if the module is already in the policy.
     $name_module_policy = enterprise_hook('policies_get_modules', [$id, ['name' => $other['data'][0]], 'name']);
 
     if ($name_module_policy === ENTERPRISE_NOT_HOOK) {
@@ -7285,6 +7301,7 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3)
     $values['min_ff_event_normal'] = $other['data'][29];
     $values['min_ff_event_warning'] = $other['data'][30];
     $values['min_ff_event_critical'] = $other['data'][31];
+    $values['ff_type'] = $other['data'][32];
 
     if ($name_module_policy !== false) {
         if ($name_module_policy[0]['name'] == $other['data'][0]) {
@@ -7344,7 +7361,7 @@ function api_set_update_plugin_module_policy($id, $thrash1, $other, $thrash3)
         return;
     }
 
-    // Check if the module exists
+    // Check if the module exists.
     $module_policy = enterprise_hook('policies_get_modules', [$id, ['id' => $other['data'][0]], 'id_module']);
 
     if ($module_policy === false) {
@@ -7449,10 +7466,10 @@ function api_set_add_module_in_conf($id_agent, $module_name, $configuration_data
 
     $new_configuration_data = io_safe_output(urldecode($configuration_data['data']));
 
-    // Check if exist a current module with the same name in the conf file
+    // Check if exist a current module with the same name in the conf file.
     $old_configuration_data = config_agents_get_module_from_conf($id_agent, io_safe_output($module_name));
 
-    // If exists a module with same name, abort
+    // If exists a module with same name, abort.
     if (!empty($old_configuration_data)) {
         returnError('error_adding_module_conf', '-2');
         exit;
@@ -7571,7 +7588,7 @@ function api_set_update_module_in_conf($id_agent, $module_name, $configuration_d
 
     $new_configuration_data = io_safe_output(urldecode($configuration_data_serialized['data']));
 
-    // Get current configuration
+    // Get current configuration.
     $old_configuration_data = config_agents_get_module_from_conf($id_agent, io_safe_output($module_name));
 
     // If not exists
@@ -7580,7 +7597,7 @@ function api_set_update_module_in_conf($id_agent, $module_name, $configuration_d
         exit;
     }
 
-    // If current configuration and new configuration are equal, abort
+    // If current configuration and new configuration are equal, abort.
     if ($new_configuration_data == $old_configuration_data) {
         returnData('string', ['type' => 'string', 'data' => '1']);
         exit;
@@ -7702,6 +7719,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
             'min_ff_event_normal'   => $other['data'][30],
             'min_ff_event_warning'  => $other['data'][31],
             'min_ff_event_critical' => $other['data'][32],
+            'ff_type'               => $other['data'][33],
         ];
     } else {
         $values = [
@@ -7731,6 +7749,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
             'min_ff_event_normal'   => $other['data'][24],
             'min_ff_event_warning'  => $other['data'][25],
             'min_ff_event_critical' => $other['data'][26],
+            'ff_type'               => $other['data'][27],
         ];
     }
 
@@ -13508,7 +13527,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
     }
 
     $graph_seconds = (!empty($other) && isset($other['data'][0])) ? $other['data'][0] : SECONDS_1HOUR;
-    // 1 hour by default
+    // 1 hour by default.
     $graph_threshold = (!empty($other) && isset($other['data'][2]) && $other['data'][2]) ? $other['data'][2] : 0;
 
     if (is_nan($graph_seconds) || $graph_seconds <= 0) {
@@ -13624,7 +13643,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3)
     ];
 
     if (!isset($name)) {
-        // avoid warnings
+        // avoid warnings.
         $name = '';
     }
 
@@ -13632,7 +13651,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3)
         $id_agent = agents_create_agent($values_agent['nombre'], $values_agent['id_grupo'], 300, '', $values_agent);
 
         if ($id_agent !== false) {
-            // Create cluster
+            // Create cluster.
             $values_cluster = [
                 'name'         => $name,
                 'cluster_type' => $cluster_type,
@@ -13644,7 +13663,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3)
             $id_cluster = db_process_sql_insert('tcluster', $values_cluster);
 
             if ($id_cluster === false) {
-                // failed to create cluster, rollback previously created agent
+                // failed to create cluster, rollback previously created agent.
                 agents_delete_agent($id_agent, true);
             }
 
@@ -13989,7 +14008,7 @@ function api_set_apply_module_template($id_template, $id_agent, $thrash3, $thras
             return;
         }
 
-        // Take agent data
+        // Take agent data.
         $row = db_get_row('tagente', 'id_agente', $id_agent);
 
         $intervalo = $row['intervalo'];
@@ -14023,7 +14042,7 @@ function api_set_apply_module_template($id_template, $id_agent, $thrash3, $thras
             }
 
             foreach ($nc as $row2) {
-                // Insert each module from tnetwork_component into agent
+                // Insert each module from tnetwork_component into agent.
                 $values = [
                     'id_agente'             => $id_agent,
                     'id_tipo_modulo'        => $row2['type'],
@@ -14069,18 +14088,19 @@ function api_set_apply_module_template($id_template, $id_agent, $thrash3, $thras
                     'min_ff_event_normal'   => $row2['min_ff_event_normal'],
                     'min_ff_event_warning'  => $row2['min_ff_event_warning'],
                     'min_ff_event_critical' => $row2['min_ff_event_critical'],
+                    'ff_type'               => $row2['ff_type'],
                 ];
 
                 $name = $row2['name'];
 
-                // Put tags in array if the component has to add them later
+                // Put tags in array if the component has to add them later.
                 if (!empty($row2['tags'])) {
                     $tags = explode(',', $row2['tags']);
                 } else {
                     $tags = [];
                 }
 
-                // Check if this module exists in the agent
+                // Check if this module exists in the agent.
                 $module_name_check = db_get_value_filter('id_agente_modulo', 'tagente_modulo', ['delete_pending' => 0, 'nombre' => $name, 'id_agente' => $id_agent]);
 
                 if ($module_name_check !== false) {

From 2c37ef4acbc8a3bf8498aa16a65454d7f76ec95f Mon Sep 17 00:00:00 2001
From: Luis Calvo <luis.calvo@artica.es>
Date: Fri, 20 Dec 2019 14:18:48 +0100
Subject: [PATCH 32/39] dbmanager blankspaces transparent to user

---
 pandora_console/extensions/dbmanager.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php
index 546ee463fa..6d41459d90 100644
--- a/pandora_console/extensions/dbmanager.php
+++ b/pandora_console/extensions/dbmanager.php
@@ -22,6 +22,17 @@ function dbmanager_query($sql, &$error, $dbconnection)
     }
 
     $sql = html_entity_decode($sql, ENT_QUOTES);
+
+    // Extract the text in quotes to add html entities before query db.
+    $patttern = '/(?:"|\')+([^"\']*)(?:"|\')+/m';
+    $sql = preg_replace_callback(
+        $patttern,
+        function ($matches) {
+            return '"'.io_safe_input($matches[1]).'"';
+        },
+        $sql
+    );
+
     if ($config['mysqli']) {
         $result = mysqli_query($dbconnection, $sql);
         if ($result === false) {

From d653b4d685daa740fc6c9f69e1e46a3e9df80cef Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Tue, 24 Dec 2019 00:01:22 +0100
Subject: [PATCH 33/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 93a40b2995..3ca6b7d735 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-191223
+Version: 7.0NG.742-191224
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 6559e77b6b..982d889a01 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191223"
+pandora_version="7.0NG.742-191224"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index c21a1bd7d0..18a9cb3492 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '191223';
+use constant AGENT_BUILD => '191224';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 656fc07568..b39974f95f 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 5aa55e434b..91285996d2 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index cb13e4db0d..adc39e14ce 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191223"
+PI_BUILD="191224"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 10b1c09726..15c45e861c 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{191223}
+{191224}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index eecd2a841a..b84e516a5c 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 191223)")
+#define PANDORA_VERSION ("7.0NG.742(Build 191224)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 92d7c050dc..c427050c80 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 191223))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 191224))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 1d7ead3321..d0577e1776 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-191223
+Version: 7.0NG.742-191224
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 80eea093b4..f9f88b758f 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191223"
+pandora_version="7.0NG.742-191224"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 7a78b15b44..40e6acc0b0 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC191223';
+$build_version = 'PC191224';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index dc63ae2138..54bb893152 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '191223';
+            $build = '191224';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index a71b98aa0e..341e28c323 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index a78cda9041..0a42cf9e32 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 571623e0e6..cf140a8dbe 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 580c355611..785b8af156 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-191223
+Version: 7.0NG.742-191224
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index cf1a3927b9..4ff4793698 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191223"
+pandora_version="7.0NG.742-191224"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 6b9d63b935..f0feaff7fe 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191223";
+my $pandora_build = "191224";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 3e01880183..76b9487444 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191223";
+my $pandora_build = "191224";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index ee4f6129fd..dbabb0576d 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index cfa593bc8d..5b3be14cd8 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191223
+%define release     191224
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 4d659b57ec..b95a75bbb4 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191223"
+PI_BUILD="191224"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 47ad0f9c50..b5530142f9 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS191223";
+my $version = "7.0NG.742 PS191224";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 8dfe32ccef..acc13fe097 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS191223";
+my $version = "7.0NG.742 PS191224";
 
 # save program name for logging
 my $progname = basename($0);

From 4294ec6d1b120be6e88bee5b69e8bd4d2e8b54dd Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Wed, 25 Dec 2019 00:01:11 +0100
Subject: [PATCH 34/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 3ca6b7d735..1ab1624468 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-191224
+Version: 7.0NG.742-191225
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 982d889a01..a8ea2a75f9 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191224"
+pandora_version="7.0NG.742-191225"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 18a9cb3492..aea8c00c6a 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '191224';
+use constant AGENT_BUILD => '191225';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index b39974f95f..e5d26bc4e7 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 91285996d2..78afc2feca 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index adc39e14ce..cef3984be4 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191224"
+PI_BUILD="191225"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 15c45e861c..2df2043887 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{191224}
+{191225}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index b84e516a5c..bcb6e0ab4f 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 191224)")
+#define PANDORA_VERSION ("7.0NG.742(Build 191225)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index c427050c80..2ffc4df1a1 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 191224))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 191225))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index d0577e1776..025b8b13ea 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-191224
+Version: 7.0NG.742-191225
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index f9f88b758f..2b69186a3c 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191224"
+pandora_version="7.0NG.742-191225"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 40e6acc0b0..5d22a3fa91 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC191224';
+$build_version = 'PC191225';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 54bb893152..837dd42945 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '191224';
+            $build = '191225';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 341e28c323..3ba672e720 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 0a42cf9e32..67f13406ae 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index cf140a8dbe..65d8330586 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 785b8af156..9e6b62516f 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-191224
+Version: 7.0NG.742-191225
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 4ff4793698..d3013fe905 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191224"
+pandora_version="7.0NG.742-191225"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 081beb968a..f3a435cf2a 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191224";
+my $pandora_build = "191225";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 76b9487444..1ad7166098 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191224";
+my $pandora_build = "191225";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index dbabb0576d..70ed92e02f 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 5b3be14cd8..d874de8f49 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191224
+%define release     191225
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index b95a75bbb4..7b71dee9e7 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191224"
+PI_BUILD="191225"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index b5530142f9..92f54ea3a9 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS191224";
+my $version = "7.0NG.742 PS191225";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index acc13fe097..b76ba9337a 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS191224";
+my $version = "7.0NG.742 PS191225";
 
 # save program name for logging
 my $progname = basename($0);

From 287d37752017f594b3e908ffa5d89c4b18891933 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Thu, 26 Dec 2019 00:01:08 +0100
Subject: [PATCH 35/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 1ab1624468..2152bb8890 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-191225
+Version: 7.0NG.742-191226
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index a8ea2a75f9..8293f84f4e 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191225"
+pandora_version="7.0NG.742-191226"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index aea8c00c6a..1774a9e089 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '191225';
+use constant AGENT_BUILD => '191226';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index e5d26bc4e7..096c0fb1fc 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 78afc2feca..e335c73739 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index cef3984be4..54186e424d 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191225"
+PI_BUILD="191226"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 2df2043887..b35c3ac50f 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{191225}
+{191226}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index bcb6e0ab4f..783b0cf4a6 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 191225)")
+#define PANDORA_VERSION ("7.0NG.742(Build 191226)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 2ffc4df1a1..9f0d863497 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 191225))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 191226))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 025b8b13ea..58ba00cbee 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-191225
+Version: 7.0NG.742-191226
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 2b69186a3c..6537bebf0f 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191225"
+pandora_version="7.0NG.742-191226"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 5d22a3fa91..790e9b76d8 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC191225';
+$build_version = 'PC191226';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 837dd42945..9b7223a66f 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '191225';
+            $build = '191226';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 3ba672e720..8b70027e7d 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 67f13406ae..71663b268a 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 65d8330586..d8619e6b86 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 9e6b62516f..bf5568b83a 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-191225
+Version: 7.0NG.742-191226
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index d3013fe905..043d4f97fb 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191225"
+pandora_version="7.0NG.742-191226"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index f3a435cf2a..6a55debbf0 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191225";
+my $pandora_build = "191226";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 1ad7166098..84924c519a 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191225";
+my $pandora_build = "191226";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 70ed92e02f..61a8e52c36 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index d874de8f49..8023b80f63 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191225
+%define release     191226
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 7b71dee9e7..e28c53c0b6 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191225"
+PI_BUILD="191226"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 92f54ea3a9..dc270c0bc6 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS191225";
+my $version = "7.0NG.742 PS191226";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index b76ba9337a..8b7cd277eb 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS191225";
+my $version = "7.0NG.742 PS191226";
 
 # save program name for logging
 my $progname = basename($0);

From 04ed92523a7d5e63973235c36f32037739c4a9b5 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Thu, 26 Dec 2019 10:29:26 +0100
Subject: [PATCH 36/39] changed token VW to VR

---
 pandora_console/include/class/OrderInterpreter.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pandora_console/include/class/OrderInterpreter.class.php b/pandora_console/include/class/OrderInterpreter.class.php
index 727579f167..43abced394 100644
--- a/pandora_console/include/class/OrderInterpreter.class.php
+++ b/pandora_console/include/class/OrderInterpreter.class.php
@@ -240,7 +240,7 @@ class OrderInterpreter extends Wizard
                 'acl'  => check_acl(
                     $config['id_user'],
                     0,
-                    'VW'
+                    'VR'
                 ),
             ],
             [

From 5b346c1ed9ddc9a85908003ea457046ea1a4b620 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Tue, 31 Dec 2019 00:01:11 +0100
Subject: [PATCH 37/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 2152bb8890..8f2ae7ed4b 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-191226
+Version: 7.0NG.742-191231
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 8293f84f4e..eab3ea4f11 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191226"
+pandora_version="7.0NG.742-191231"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 1774a9e089..ba8a9327a5 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '191226';
+use constant AGENT_BUILD => '191231';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 096c0fb1fc..a6990dfc38 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index e335c73739..ad66a842cb 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 54186e424d..e7538f83a8 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191226"
+PI_BUILD="191231"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index b35c3ac50f..b0cff6cfbc 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{191226}
+{191231}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 783b0cf4a6..2e2a290c95 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 191226)")
+#define PANDORA_VERSION ("7.0NG.742(Build 191231)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 9f0d863497..46c940f754 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 191226))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 191231))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 58ba00cbee..7d993e9e98 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-191226
+Version: 7.0NG.742-191231
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 6537bebf0f..239887e46c 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191226"
+pandora_version="7.0NG.742-191231"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 790e9b76d8..eeca004c75 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC191226';
+$build_version = 'PC191231';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 9b7223a66f..3592d0ccb9 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '191226';
+            $build = '191231';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 8b70027e7d..aace23cef3 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 71663b268a..dfe6ee5647 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index d8619e6b86..f86c5381ce 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index bf5568b83a..70fdba8aea 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-191226
+Version: 7.0NG.742-191231
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 043d4f97fb..ef586854c1 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191226"
+pandora_version="7.0NG.742-191231"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 6a55debbf0..098b78f77e 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191226";
+my $pandora_build = "191231";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 84924c519a..14055b720e 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191226";
+my $pandora_build = "191231";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 61a8e52c36..2bf17e1353 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 8023b80f63..ce82ca0f8b 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191226
+%define release     191231
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index e28c53c0b6..144ce83fb8 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191226"
+PI_BUILD="191231"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index dc270c0bc6..69d41fc131 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS191226";
+my $version = "7.0NG.742 PS191231";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 8b7cd277eb..d34dc0a02b 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS191226";
+my $version = "7.0NG.742 PS191231";
 
 # save program name for logging
 my $progname = basename($0);

From d386d3c3905ac64ad42ab8bfec04bbcdb8843d34 Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Wed, 1 Jan 2020 00:01:10 +0100
Subject: [PATCH 38/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 8f2ae7ed4b..096946a9a6 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-191231
+Version: 7.0NG.742-200101
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index eab3ea4f11..0c1c9959f4 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191231"
+pandora_version="7.0NG.742-200101"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index ba8a9327a5..b7625f600e 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '191231';
+use constant AGENT_BUILD => '200101';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index a6990dfc38..1376bb0c88 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index ad66a842cb..1f1498d075 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index e7538f83a8..5a4fd4d530 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191231"
+PI_BUILD="200101"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index b0cff6cfbc..5b68c20201 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{191231}
+{200101}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 2e2a290c95..d89967a507 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 191231)")
+#define PANDORA_VERSION ("7.0NG.742(Build 200101)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 46c940f754..1fe07407ff 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 191231))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 200101))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 7d993e9e98..3078404f39 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-191231
+Version: 7.0NG.742-200101
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 239887e46c..a42cc0b9c7 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191231"
+pandora_version="7.0NG.742-200101"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index eeca004c75..0badd652a7 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC191231';
+$build_version = 'PC200101';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 3592d0ccb9..d43afccfa7 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '191231';
+            $build = '200101';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index aace23cef3..e8d62050f7 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index dfe6ee5647..cbbe8458ab 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index f86c5381ce..d7413557da 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 70fdba8aea..0a1f576c81 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-191231
+Version: 7.0NG.742-200101
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index ef586854c1..3ad1a5fb47 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-191231"
+pandora_version="7.0NG.742-200101"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 098b78f77e..91b0d9388f 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191231";
+my $pandora_build = "200101";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 14055b720e..86535c543d 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "191231";
+my $pandora_build = "200101";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 2bf17e1353..6f4afdea97 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index ce82ca0f8b..37682d3afc 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     191231
+%define release     200101
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 144ce83fb8..13f5767596 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="191231"
+PI_BUILD="200101"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 69d41fc131..15e195bf95 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS191231";
+my $version = "7.0NG.742 PS200101";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index d34dc0a02b..668b489ae6 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS191231";
+my $version = "7.0NG.742 PS200101";
 
 # save program name for logging
 my $progname = basename($0);

From 713737986ba3002b97c9f3a07d669a7bb7e3ba9d Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Thu, 2 Jan 2020 00:01:10 +0100
Subject: [PATCH 39/39] Auto-updated build strings.

---
 pandora_agents/unix/DEBIAN/control             | 2 +-
 pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
 pandora_agents/unix/pandora_agent              | 2 +-
 pandora_agents/unix/pandora_agent.redhat.spec  | 2 +-
 pandora_agents/unix/pandora_agent.spec         | 2 +-
 pandora_agents/unix/pandora_agent_installer    | 2 +-
 pandora_agents/win32/installer/pandora.mpi     | 2 +-
 pandora_agents/win32/pandora.cc                | 2 +-
 pandora_agents/win32/versioninfo.rc            | 2 +-
 pandora_console/DEBIAN/control                 | 2 +-
 pandora_console/DEBIAN/make_deb_package.sh     | 2 +-
 pandora_console/include/config_process.php     | 2 +-
 pandora_console/install.php                    | 2 +-
 pandora_console/pandora_console.redhat.spec    | 2 +-
 pandora_console/pandora_console.rhel7.spec     | 2 +-
 pandora_console/pandora_console.spec           | 2 +-
 pandora_server/DEBIAN/control                  | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh      | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm        | 2 +-
 pandora_server/lib/PandoraFMS/PluginTools.pm   | 2 +-
 pandora_server/pandora_server.redhat.spec      | 2 +-
 pandora_server/pandora_server.spec             | 2 +-
 pandora_server/pandora_server_installer        | 2 +-
 pandora_server/util/pandora_db.pl              | 2 +-
 pandora_server/util/pandora_manage.pl          | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 096946a9a6..4bd5df6d46 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.742-200101
+Version: 7.0NG.742-200102
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 0c1c9959f4..cddb9a7300 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-200101"
+pandora_version="7.0NG.742-200102"
 
 echo "Test if you has the tools for to make the packages."
 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index b7625f600e..1a151c4a70 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '200101';
+use constant AGENT_BUILD => '200102';
 
 # Agent log default file size maximum and instances
 use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 1376bb0c88..206b3c5fb1 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 1f1498d075..1ba17f0f7b 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_agent_unix
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 Summary:            Pandora FMS Linux agent, PERL version
 Name:               %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 5a4fd4d530..2a46018ffc 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="200101"
+PI_BUILD="200102"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 5b68c20201..c182f1b6aa 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{200101}
+{200102}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index d89967a507..0a035a0161 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
 using namespace Pandora_Strutils;
 
 #define PATH_SIZE    _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.742(Build 200101)")
+#define PANDORA_VERSION ("7.0NG.742(Build 200102)")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 1fe07407ff..aeda50b19d 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
       VALUE "LegalCopyright", "Artica ST"
       VALUE "OriginalFilename", "PandoraAgent.exe"
       VALUE "ProductName", "Pandora FMS Windows Agent"
-      VALUE "ProductVersion", "(7.0NG.742(Build 200101))"
+      VALUE "ProductVersion", "(7.0NG.742(Build 200102))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 3078404f39..2eef782f04 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.742-200101
+Version: 7.0NG.742-200102
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index a42cc0b9c7..ab4054e612 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-200101"
+pandora_version="7.0NG.742-200102"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 0badd652a7..af97c89b7c 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
 /**
  * Pandora build version and version
  */
-$build_version = 'PC200101';
+$build_version = 'PC200102';
 $pandora_version = 'v7.0NG.742';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index d43afccfa7..8794355a6a 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
         <div style='height: 10px'>
             <?php
             $version = '7.0NG.742';
-            $build = '200101';
+            $build = '200102';
             $banner = "v$version Build $build";
 
             error_reporting(0);
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index e8d62050f7..d431866a5e 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index cbbe8458ab..eeea79b1ab 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 # User and Group under which Apache is running
 %define httpd_name  httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index d7413557da..85019c65eb 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_console
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 %define httpd_name      httpd
 # User and Group under which Apache is running
 %define httpd_name  apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 0a1f576c81..929a1cd10f 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.742-200101
+Version: 7.0NG.742-200102
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 3ad1a5fb47..52cefdefbd 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="7.0NG.742-200101"
+pandora_version="7.0NG.742-200102"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 91b0d9388f..a9e0eb4d71 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "200101";
+my $pandora_build = "200102";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 86535c543d..36ce54b116 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.742";
-my $pandora_build = "200101";
+my $pandora_build = "200102";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 6f4afdea97..aa28bd2e00 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 37682d3afc..b5acd25c09 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
 #
 %define name        pandorafms_server
 %define version     7.0NG.742
-%define release     200101
+%define release     200102
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 13f5767596..923e70964b 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.742"
-PI_BUILD="200101"
+PI_BUILD="200102"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 15e195bf95..e606894892 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.742 PS200101";
+my $version = "7.0NG.742 PS200102";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 668b489ae6..a191dd9203 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
 Encode::Locale::decode_argv;
 
 # version: define current version
-my $version = "7.0NG.742 PS200101";
+my $version = "7.0NG.742 PS200102";
 
 # save program name for logging
 my $progname = basename($0);