From 1ba420a9ce1a8ebf9d657875efecd136a24a50bc Mon Sep 17 00:00:00 2001
From: daniel <daniel.barbero@artica.es>
Date: Tue, 7 Mar 2023 16:22:13 +0100
Subject: [PATCH 01/10] fixed styles

---
 pandora_console/include/javascript/pandora.js |  7 +++++++
 pandora_console/index.php                     | 15 ---------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js
index 30da9745eb..8bfdee500c 100644
--- a/pandora_console/include/javascript/pandora.js
+++ b/pandora_console/include/javascript/pandora.js
@@ -2400,3 +2400,10 @@ function topFunction() {
     500
   );
 }
+
+function menuActionButtonResizing() {
+  $(".action_buttons_right_content").attr(
+    "style",
+    "left: " + $("#menu_full").width() + "px;"
+  );
+}
diff --git a/pandora_console/index.php b/pandora_console/index.php
index 78de0734b4..a78d97d926 100755
--- a/pandora_console/index.php
+++ b/pandora_console/index.php
@@ -1524,17 +1524,6 @@ require 'include/php_to_js_values.php';
         }
     }
 
-    //$('.button_collapse').on('click', menuActionButtonResizing());
-
-    // Cursor change for show a spinner. Experimental.
-    /*
-    $('.buttonButton').not('.dialog_opener').on('click', function(){
-        $('*').css('cursor', 'wait');
-    });
-    $('.submitButton').not('.dialog_opener').on('click', function(){
-        $('*').css('cursor', 'wait');
-    });
-*/
     // When the user scrolls down 400px from the top of the document, show the
     // button.
     window.onscroll = function() {
@@ -1545,10 +1534,6 @@ require 'include/php_to_js_values.php';
         scrollFunction()
     };
 
-    function menuActionButtonResizing() {
-        $('.action_buttons_right_content').attr('style', 'left: '+($('#menu_full').width())+'px;');
-    }
-
     function first_time_identification() {
         jQuery.post("ajax.php", {
                 "page": "general/register",

From 2dbc2e801f210e1b7f224add470c5cf2565265dd Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 17:24:36 +0100
Subject: [PATCH 02/10] Minor icon fixes

---
 .../godmode/reporting/reporting_builder.php   |  4 ++--
 pandora_console/godmode/servers/plugin.php    | 18 ++++++++++++-----
 .../include/class/SnmpConsole.class.php       | 20 +++++++++----------
 .../include/functions_filemanager.php         | 11 +++++-----
 pandora_console/include/styles/tables.css     |  6 ++++--
 .../operation/snmpconsole/snmp_browser.php    |  8 ++++----
 .../operation/snmpconsole/snmp_statistics.php | 16 +++++++--------
 .../operation/snmpconsole/snmp_view.php       |  2 +-
 8 files changed, 47 insertions(+), 38 deletions(-)

diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index 9fd9c02f7e..12d5266f34 100755
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -509,11 +509,11 @@ switch ($action) {
             'list_reports' => [
                 'active' => false,
                 'text'   => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image(
-                    'images/report_list.png',
+                    'images/logs@svg.svg',
                     true,
                     [
                         'title' => __('Reports list'),
-                        'class' => 'invert_filter',
+                        'class' => 'main_menu_icon invert_filter',
                     ]
                 ).'</a>',
             ],
diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php
index 43fad7d3be..688e898c9d 100644
--- a/pandora_console/godmode/servers/plugin.php
+++ b/pandora_console/godmode/servers/plugin.php
@@ -632,7 +632,7 @@ if (empty($create) === false || empty($view) === false) {
             $delete_macro_style = 'display:none;';
         }
 
-        $datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.'&nbsp;'.html_print_image('images/delete.png', true, ['class' => 'invert_filter']).'</a>'.'</div>';
+        $datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.'&nbsp;'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'.'</div>';
 
         $table->colspan['plugin_action'][0] = 2;
         $table->colspan['plugin_action'][2] = 2;
@@ -665,8 +665,10 @@ if (empty($create) === false || empty($view) === false) {
 
     echo '<tr><td align="right">';
 
-    if ($create != '') {
-        $button = html_print_submit_button(
+    $buttons = '';
+
+    if (empty($create) === false) {
+        $buttons .= html_print_submit_button(
             __('Create'),
             'crtbutton',
             false,
@@ -674,7 +676,7 @@ if (empty($create) === false || empty($view) === false) {
             true
         );
     } else {
-        $button = html_print_submit_button(
+        $buttons .= html_print_submit_button(
             __('Update'),
             'uptbutton',
             false,
@@ -683,8 +685,14 @@ if (empty($create) === false || empty($view) === false) {
         );
     }
 
+    $buttons .= html_print_go_back_button(
+        'index.php?sec=gservers&sec2=godmode/servers/plugin',
+        ['button_class' => ''],
+        true
+    );
+
     html_print_action_buttons(
-        $button
+        $buttons
     );
 
     echo '</form></table>';
diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php
index c84775d4ed..5999479c64 100644
--- a/pandora_console/include/class/SnmpConsole.class.php
+++ b/pandora_console/include/class/SnmpConsole.class.php
@@ -183,29 +183,29 @@ class SnmpConsole extends HTML
 
         if (!isset($config['pure']) || $config['pure'] === false) {
             $statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'">'.html_print_image(
-                'images/op_reporting.png',
+                'images/logs@svg.svg',
                 true,
                 [
                     'title' => __('Statistics'),
-                    'class' => 'invert_filter',
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             ).'</a>';
             $list['text'] = '<a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&pure=0">'.html_print_image(
-                'images/op_snmp.png',
+                'images/SNMP-network-numeric-data@svg.svg',
                 true,
                 [
                     'title' => __('List'),
-                    'class' => 'invert_filter',
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             ).'</a>';
             $list['active'] = true;
 
             $screen['text'] = '<a href="#" onClick="javascript:fullscreen(1)">'.html_print_image(
-                'images/full_screen.png',
+                'images/fullscreen@svg.svg',
                 true,
                 [
-                    'title' => __('List'),
-                    'class' => 'invert_filter',
+                    'title' => __('View in full screen'),
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             ).'</a>';
 
@@ -242,11 +242,11 @@ class SnmpConsole extends HTML
 
             echo '<a href="#" onClick="javascript:fullscreen(0)">';
             echo html_print_image(
-                'images/normal_screen.png',
+                'images/exit_fullscreen@svg.svg',
                 true,
                 [
                     'title' => __('Exit fullscreen'),
-                    'class' => 'invert_filter',
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             );
             echo '</a>';
@@ -844,7 +844,7 @@ class SnmpConsole extends HTML
                             $tmp->snmp_agent .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
                         } else {
                             $tmp->snmp_agent .= '<div class="'.$severity_class.' snmp-div"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'" title="'.__('View agent details').'">';
-                            $tmp->snmp_agent .= '<strong>'.$agent['alias'].ui_print_help_tip($tmp->source, true, 'images/tip.png');
+                            $tmp->snmp_agent .= '<strong>'.$agent['alias'].ui_print_help_tip($tmp->source, true);
                             '</strong></a></div>';
                         }
 
diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php
index 1f1f57c832..0012804398 100644
--- a/pandora_console/include/functions_filemanager.php
+++ b/pandora_console/include/functions_filemanager.php
@@ -744,8 +744,7 @@ function filemanager_file_explorer(
 
             // Actions buttons
             // Delete button.
-            $data[4] = '';
-            $data[4] .= '<span style="display: flex">';
+            $data[4] = '<div class="table_action_buttons flex">';
             $typefile = array_pop(explode('.', $fileinfo['name']));
             if (is_writable($fileinfo['realpath']) === true
                 && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3)
@@ -774,7 +773,7 @@ function filemanager_file_explorer(
                         && ($typefile !== 'iso') && ($typefile !== 'docx') && ($typefile !== 'doc') && ($fileinfo['mime'] != MIME_DIR)
                     ) {
                         $hash = md5($fileinfo['realpath'].$config['server_unique_identifier']);
-                        $data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&hash=".$hash.'&location_file='.$fileinfo['realpath']."' style='float: left;'>".html_print_image('images/edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Edit file'), 'class' => 'invert_filter']).'</a>';
+                        $data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&hash=".$hash.'&location_file='.$fileinfo['realpath']."' style='float: left;'>".html_print_image('images/edit.svg', true, ['style' => 'margin-top: 2px;', 'title' => __('Edit file'), 'class' => 'main_menu_icon invert_filter']).'</a>';
                     }
                 }
             }
@@ -794,7 +793,7 @@ function filemanager_file_explorer(
                 $data[4] .= '<a href="javascript: show_modal_real_path(`'.$fileinfo['realpath'].'`);">'.html_print_image('images/enable.svg', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter main_menu_icon']).'</a>';
             }
 
-            $data[4] .= '</span>';
+            $data[4] .= '</div>';
 
             array_push($table->data, $data);
         }
@@ -983,7 +982,7 @@ function filemanager_file_explorer(
                                 <div id='real_path'></div>";
 
             if (isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1') {
-                $modal_real_path .= "<div style='float:right;margin: 5em 0 0 auto';>".html_print_submit_button(__('Copy'), 'submit', false, 'class="sub next"', true).'</div>';
+                $modal_real_path .= "<div style='float:right;margin: 5em 0 0 auto';>".html_print_submit_button(__('Copy'), 'submit', false, ['icon' => 'wand', 'mode' => 'mini'], true).'</div>';
             }
 
             html_print_div(
@@ -997,7 +996,7 @@ function filemanager_file_explorer(
             echo '</div>';
         } else {
             echo "<div style='text-align: right; width: ".$table->width."; color:#AC4444; margin-bottom:10px;'>";
-            echo "<image class='invert_filter' src='images/info.png' />".__('The directory is read-only');
+            echo "<image class='main_menu_icon invert_filter' src='images/info@svg.svg' />".__('The directory is read-only');
             echo '</div>';
         }
     }
diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css
index 7fbf593d16..4383e02ea5 100644
--- a/pandora_console/include/styles/tables.css
+++ b/pandora_console/include/styles/tables.css
@@ -235,7 +235,8 @@
 
 .table_action_buttons > a,
 .table_action_buttons > img,
-.table_action_buttons > button {
+.table_action_buttons > button,
+.table_action_buttons > form {
   visibility: hidden;
 }
 .info_table > tbody > tr:hover {
@@ -246,7 +247,8 @@
 
 .info_table > tbody > tr:hover .table_action_buttons > a,
 .info_table > tbody > tr:hover .table_action_buttons > img,
-.info_table > tbody > tr:hover .table_action_buttons > button {
+.info_table > tbody > tr:hover .table_action_buttons > button,
+.info_table > tbody > tr:hover .table_action_buttons > form {
   visibility: visible;
 }
 
diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php
index 3bcb2be975..9831d7ba64 100644
--- a/pandora_console/operation/snmpconsole/snmp_browser.php
+++ b/pandora_console/operation/snmpconsole/snmp_browser.php
@@ -50,11 +50,11 @@ if ($config['pure']) {
     // Windowed.
     $link['text'] = '<a target="_top" href="'.$url.'&pure=0&refr=30">';
     $link['text'] .= html_print_image(
-        'images/normal_screen.png',
+        'images/exit_fullscreen@svg.svg',
         true,
         [
             'title' => __('Normal screen'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     );
     $link['text'] .= '</a>';
@@ -62,11 +62,11 @@ if ($config['pure']) {
     // Fullscreen.
     $link['text'] = '<a target="_top" href="'.$url.'&pure=1&refr=0">';
     $link['text'] .= html_print_image(
-        'images/full_screen.png',
+        'images/fullscreen@svg.svg',
         true,
         [
             'title' => __('Full screen'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     );
     $link['text'] .= '</a>';
diff --git a/pandora_console/operation/snmpconsole/snmp_statistics.php b/pandora_console/operation/snmpconsole/snmp_statistics.php
index 56109aa04c..0ebc548496 100755
--- a/pandora_console/operation/snmpconsole/snmp_statistics.php
+++ b/pandora_console/operation/snmpconsole/snmp_statistics.php
@@ -39,20 +39,20 @@ $refr = (int) get_parameter('refr', 0);
 $fullscreen = [];
 if ($config['pure']) {
     $fullscreen['text'] = '<a target="_top" href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure=0&refr='.$refr.'">'.html_print_image(
-        'images/normal_screen.png',
+        'images/exit_fullscreen@svg.svg',
         true,
         [
             'title' => __('Normal screen'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     ).'</a>';
 } else {
     $fullscreen['text'] = '<a target="_top" href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure=1&refr='.$refr.'">'.html_print_image(
-        'images/full_screen.png',
+        'images/fullscreen@svg.svg',
         true,
         [
             'title' => __('Full screen'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     ).'</a>';
 }
@@ -60,11 +60,11 @@ if ($config['pure']) {
 // List
 $list = [];
 $list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&pure='.$config['pure'].'&refresh='.$refr.'">'.html_print_image(
-    'images/op_snmp.png',
+    'images/SNMP-network-numeric-data@svg.svg',
     true,
     [
         'title' => __('List'),
-        'class' => 'invert_filter',
+        'class' => 'main_menu_icon invert_filter',
     ]
 ).'</a>';
 
@@ -72,11 +72,11 @@ $list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_v
 $statistics = [];
 $statistics['active'] = true;
 $statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'&refr='.$refr.'">'.html_print_image(
-    'images/op_reporting.png',
+    'images/logs@svg.svg',
     true,
     [
         'title' => __('Statistics'),
-        'class' => 'invert_filter',
+        'class' => 'main_menu_icon invert_filter',
     ]
 ).'</a>';
 
diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php
index 9f0f9e44f8..f5c967972c 100755
--- a/pandora_console/operation/snmpconsole/snmp_view.php
+++ b/pandora_console/operation/snmpconsole/snmp_view.php
@@ -14,7 +14,7 @@
  * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
  *
  * ============================================================================
- * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 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

From b13892ecdbb2bd3e59700f31de1243ea6e8c1e66 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 17:37:01 +0100
Subject: [PATCH 03/10] Users connected view

---
 .../extensions/users_connected.php            | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php
index 40b17f4903..21c319065b 100644
--- a/pandora_console/extensions/users_connected.php
+++ b/pandora_console/extensions/users_connected.php
@@ -34,7 +34,24 @@ function users_extension_main_god($god=true)
     }
 
     // Header.
-    ui_print_page_header(__('Users connected'), $image, false, '', $god);
+    ui_print_standard_header(
+        __('List of users connected'),
+        $image,
+        false,
+        '',
+        $god,
+        [],
+        [
+            [
+                'link'  => '',
+                'label' => __('Workspace'),
+            ],
+            [
+                'link'  => '',
+                'label' => __('Users connected'),
+            ],
+        ]
+    );
 
     $check_profile = db_get_row('tusuario_perfil', 'id_usuario', $config['id_user'], 'id_up');
     if ($check_profile === false && !users_is_admin()) {

From 651469b562b4bf271a6406b303433fb79eb35b20 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 17:37:33 +0100
Subject: [PATCH 04/10] Users connected view

---
 .../extensions/users_connected.php            | 39 +++++++++++++------
 1 file changed, 28 insertions(+), 11 deletions(-)

diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php
index 21c319065b..ad6282c598 100644
--- a/pandora_console/extensions/users_connected.php
+++ b/pandora_console/extensions/users_connected.php
@@ -1,16 +1,33 @@
 <?php
+/**
+ * Extension to manage a list of gateways and the node address where they should
+ * point to.
+ *
+ * @category   Users
+ * @package    Pandora FMS
+ * @subpackage Community
+ * @version    1.0.0
+ * @license    See below
+ *
+ *    ______                 ___                    _______ _______ ________
+ *   |   __ \.-----.--.--.--|  |.-----.----.-----. |    ___|   |   |     __|
+ *  |    __/|  _  |     |  _  ||  _  |   _|  _  | |    ___|       |__     |
+ * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
+ *
+ * ============================================================================
+ * Copyright (c) 2005-2023 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.
+ * ============================================================================
+ */
 
-// Pandora FMS - http://pandorafms.com
-// ==================================================
-// Copyright (c) 2005-2021 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; 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.
 function users_extension_main()
 {
     users_extension_main_god(false);

From 14246ea5703c3ede13eff90d1fae78e3dea53389 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 17:50:03 +0100
Subject: [PATCH 05/10] User edit notifications

---
 pandora_console/operation/users/user_edit_header.php | 12 ++++++------
 .../operation/users/user_edit_notifications.php      |  9 +++++----
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/pandora_console/operation/users/user_edit_header.php b/pandora_console/operation/users/user_edit_header.php
index ea698e1355..50cb5c52fc 100644
--- a/pandora_console/operation/users/user_edit_header.php
+++ b/pandora_console/operation/users/user_edit_header.php
@@ -77,28 +77,28 @@ if (is_metaconsole()) {
     user_meta_print_header();
     $urls['main'] = 'index.php?sec=advanced&amp;sec2=advanced/users_setup&amp;tab=user_edit';
 } else {
-    $urls['main'] = 'index.php?sec=workspace&amp;sec2=operation/users/user_edit';
+    $urls['main'] = 'index.php?sec=gusuarios&sec2=godmode/users/user_list';
     $urls['notifications'] = 'index.php?sec=workspace&amp;sec2=operation/users/user_edit_notifications';
     $buttons = [
         'main'          => [
-            'active' => $_GET['sec2'] === 'operation/users/user_edit',
+            'active' => $_GET['sec2'] === 'godmode/users/user_list&tab=user&pure=0',
             'text'   => "<a href='{$urls['main']}'>".html_print_image(
-                'images/user.png',
+                'images/user.svg',
                 true,
                 [
                     'title' => __('User management'),
-                    'class' => 'invert_filter',
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             ).'</a>',
         ],
         'notifications' => [
             'active' => $_GET['sec2'] === 'operation/users/user_edit_notifications',
             'text'   => "<a href='{$urls['notifications']}'>".html_print_image(
-                'images/alerts_template.png',
+                'images/alert@svg.svg',
                 true,
                 [
                     'title' => __('User notifications'),
-                    'class' => 'invert_filter',
+                    'class' => 'main_menu_icon invert_filter',
                 ]
             ).'</a>',
         ],
diff --git a/pandora_console/operation/users/user_edit_notifications.php b/pandora_console/operation/users/user_edit_notifications.php
index 4228c16543..e511eb0b92 100644
--- a/pandora_console/operation/users/user_edit_notifications.php
+++ b/pandora_console/operation/users/user_edit_notifications.php
@@ -15,7 +15,7 @@
  * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
  *
  * ============================================================================
- * Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 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
@@ -58,7 +58,7 @@ if (get_parameter('change_label', 0)) {
 }
 
 
-echo '<div id="user-notifications-wrapper" class="white_box table_div table_three_columns">
+echo '<div id="user-notifications-wrapper" class="white_box table_div table_three_columns padding-2">
         <div class="table_thead">
             <div class="table_th"></div>
             <div class="table_th">'.__('Enable').'</div>
@@ -91,8 +91,9 @@ foreach ($sources as $source) {
 }
 
 if ((bool) $disabled_flag === true) {
-    $s = __('Controls have been disabled by the system administrator');
-    echo '<span class="bolder color_ff0">'.$s.'</span>';
+    ui_print_warning_message(
+        __('Controls have been disabled by the system administrator')
+    );
 }
 
 echo '</div>';

From 4af67db415e2528ced9ab3bb6e1cf41726f102f2 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 18:10:07 +0100
Subject: [PATCH 06/10] Export data view

---
 .../operation/agentes/exportdata.php          | 312 +++++++++++-------
 1 file changed, 185 insertions(+), 127 deletions(-)

diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php
index 604131d888..910a46acb2 100644
--- a/pandora_console/operation/agentes/exportdata.php
+++ b/pandora_console/operation/agentes/exportdata.php
@@ -1,10 +1,10 @@
 <?php
 /**
- * Export Data view
+ * Export data.
  *
- * @category   Community
+ * @category   Tools
  * @package    Pandora FMS
- * @subpackage Tools
+ * @subpackage Operation
  * @version    1.0.0
  * @license    See below
  *
@@ -14,9 +14,15 @@
  * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
  *
  * ============================================================================
- * Copyright (c) 2007-2022 Artica Soluciones Tecnologicas, http://www.artica.es
- * This code is NOT free software. This code is NOT licenced under GPL2 licence
- * You cannnot redistribute it without written permission of copyright holder.
+ * Copyright (c) 2005-2023 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.
  * ============================================================================
  */
 
@@ -38,9 +44,25 @@ if (!check_acl($config['id_user'], 0, 'RR')) {
 
 ui_require_javascript_file('calendar');
 
-
 // Header.
-ui_print_page_header(__('Export data'), 'images/server_export_mc.png');
+ui_print_standard_header(
+    __('Export data'),
+    'images/server_export_mc.png',
+    false,
+    '',
+    false,
+    [],
+    [
+        [
+            'link'  => '',
+            'label' => __('Tools'),
+        ],
+        [
+            'link'  => '',
+            'label' => __('Export data'),
+        ],
+    ]
+);
 
 $group = get_parameter_post('group', 0);
 $agentName = get_parameter_post('agent', 0);
@@ -220,48 +242,10 @@ if (!empty($export_btn) && !empty($module)) {
 }
 
 if (empty($export_btn) || $show_form) {
-    echo '<form method="post" action="index.php?sec=reporting&amp;sec2=operation/agentes/exportdata" name="export_form" id="export_form">';
-
-    $table = new stdClass();
-    $table->width = '100%';
-    $table->border = 0;
-    $table->cellspacing = 3;
-    $table->cellpadding = 5;
-    $table->class = 'databox filters';
-    $table->style[0] = 'vertical-align: top;';
-
-    $table->data = [];
-
-    // Group selector
-    $table->data[0][0] = '<b>'.__('Group').'</b>';
-
     $groups = users_get_groups($config['id_user'], 'RR', users_can_manage_group_all());
 
-    $table->data[0][1] = '<div class="w250px">'.html_print_select_groups(
-        $config['id_user'],
-        'RR',
-        true,
-        'group',
-        $group,
-        '',
-        '',
-        0,
-        true,
-        false,
-        true,
-        '',
-        false
-    ).'</div>';
-
-    // Agent selector.
-    $table->data[1][0] = '<b>'.__('Source agent').'</b>';
-
     $filter = [];
-    if ($group > 0) {
-        $filter['id_grupo'] = (array) $group;
-    } else {
-        $filter['id_grupo'] = array_keys($groups);
-    }
+    $filter['id_grupo'] = ($group > 0) ? (array) $group : array_keys($groups);
 
     $agents = [];
     $rows = agents_get_agents($filter, false, 'RR');
@@ -286,11 +270,6 @@ if (empty($export_btn) || $show_form) {
     $params['add_none_module'] = false;
     $params['size'] = 38;
     $params['selectbox_id'] = 'module_arr';
-    $table->data[1][1] = ui_print_agent_autocomplete_input($params);
-
-    // Module selector.
-    $table->data[2][0] = '<b>'.__('Modules').'</b>';
-    $table->data[2][0] .= ui_print_help_tip(__('No modules of type string. You can not calculate their average'), true);
 
     if ($agent > 0) {
         $modules = agents_get_modules($agent);
@@ -325,91 +304,170 @@ if (empty($export_btn) || $show_form) {
         $disabled_export_button = true;
     }
 
-    $table->data[2][1] = html_print_select($modules, 'module_arr[]', array_keys($modules), '', '', 0, true, true, true, 'w250px', false);
-
-    // Start date selector.
-    $table->data[3][0] = '<b>'.__('Begin date').'</b>';
-
-    $table->data[3][1] = html_print_input_text(
-        'start_date',
-        date('Y-m-d', (get_system_time() - SECONDS_1DAY)),
-        false,
-        13,
-        10,
-        true
-    );
-    $table->data[3][1] .= html_print_image(
-        'images/calendar_view_day.png',
-        true,
-        [
-            'alt'     => 'calendar',
-            'onclick' => "scwShow(scwID('text-start_date'),this);",
-            'class'   => 'invert_filter',
-        ]
-    );
-    $table->data[3][1] .= html_print_input_text(
-        'start_time',
-        date('H:i:s', (get_system_time() - SECONDS_1DAY)),
-        false,
-        10,
-        9,
-        true
-    );
-
-    // End date selector.
-    $table->data[4][0] = '<b>'.__('End date').'</b>';
-    $table->data[4][1] = html_print_input_text(
-        'end_date',
-        date('Y-m-d', get_system_time()),
-        false,
-        13,
-        10,
-        true
-    );
-    $table->data[4][1] .= html_print_image(
-        'images/calendar_view_day.png',
-        true,
-        [
-            'alt'     => 'calendar',
-            'onclick' => "scwShow(scwID('text-end_date'),this);",
-            'class'   => 'invert_filter',
-        ]
-    );
-    $table->data[4][1] .= html_print_input_text(
-        'end_time',
-        date('H:i:s', get_system_time()),
-        false,
-        10,
-        9,
-        true
-    );
-
-    // Export type.
-    $table->data[5][0] = '<b>'.__('Export type').'</b>';
-
     $export_types = [];
     $export_types['data'] = __('Data table');
     $export_types['csv'] = __('CSV');
     $export_types['excel'] = __('MS Excel');
     $export_types['avg'] = __('Average per hour/day');
 
-    $table->data[5][1] = html_print_select($export_types, 'export_type', $export_type, '', '', 0, true, false, true, 'w250px', false);
+
+    echo '<form method="post" action="index.php?sec=reporting&amp;sec2=operation/agentes/exportdata" name="export_form" id="export_form">';
+
+    $table = new stdClass();
+    $table->width = '100%';
+    $table->border = 0;
+    $table->cellspacing = 3;
+    $table->cellpadding = 5;
+    $table->class = 'databox filter-table-adv';
+    $table->style[0] = 'vertical-align: top;';
+
+    $table->data = [];
+
+    // Group selector.
+    $table->data[0][] = html_print_label_input_block(
+        __('Group'),
+        html_print_select_groups(
+            $config['id_user'],
+            'RR',
+            true,
+            'group',
+            $group,
+            '',
+            '',
+            0,
+            true,
+            false,
+            true,
+            '',
+            false
+        )
+    );
+
+    // Agent selector.
+    $table->data[0][] = html_print_label_input_block(
+        __('Source agent'),
+        ui_print_agent_autocomplete_input($params)
+    );
+
+    // Module selector.
+    $table->data[1][] = html_print_label_input_block(
+        __('Modules'),
+        html_print_select(
+            $modules,
+            'module_arr[]',
+            array_keys($modules),
+            '',
+            '',
+            0,
+            true,
+            true,
+            true,
+            'w100p',
+            false
+        ).ui_print_input_placeholder(
+            __('No modules of type string. You can not calculate their average'),
+            true
+        )
+    );
+
+    // Export type.
+    $table->data[1][] = html_print_label_input_block(
+        __('Export type'),
+        html_print_select(
+            $export_types,
+            'export_type',
+            $export_type,
+            '',
+            '',
+            0,
+            true,
+            false,
+            true,
+            'w100p',
+            false
+        )
+    );
+
+    // Start date selector.
+    $table->data[2][] = html_print_label_input_block(
+        __('Begin date'),
+        html_print_div(
+            [
+                'class'   => 'flex-content',
+                'content' => html_print_input_text(
+                    'start_date',
+                    date('Y-m-d', (get_system_time() - SECONDS_1DAY)),
+                    false,
+                    13,
+                    10,
+                    true
+                ).html_print_image(
+                    'images/calendar_view_day.png',
+                    true,
+                    [
+                        'alt'     => 'calendar',
+                        'onclick' => "scwShow(scwID('text-start_date'),this);",
+                        'class'   => 'main_menu_icon invert_filter',
+                    ]
+                ).html_print_input_text(
+                    'start_time',
+                    date('H:i:s', (get_system_time() - SECONDS_1DAY)),
+                    false,
+                    10,
+                    9,
+                    true
+                ),
+            ],
+            true
+        )
+    );
+
+    // End date selector.
+    $table->data[2][] = html_print_label_input_block(
+        __('End date'),
+        html_print_div(
+            [
+                'class'   => 'flex-content',
+                'content' => html_print_input_text(
+                    'end_date',
+                    date('Y-m-d', get_system_time()),
+                    false,
+                    13,
+                    10,
+                    true
+                ).html_print_image(
+                    'images/calendar_view_day.png',
+                    true,
+                    [
+                        'alt'     => 'calendar',
+                        'onclick' => "scwShow(scwID('text-end_date'),this);",
+                        'class'   => 'main_menu_icon invert_filter',
+                    ]
+                ).html_print_input_text(
+                    'end_time',
+                    date('H:i:s', get_system_time()),
+                    false,
+                    10,
+                    9,
+                    true
+                ),
+            ],
+            true
+        ),
+    );
 
     html_print_table($table);
 
     // Submit button.
-    html_print_div(
-        [
-            'class'   => 'action-buttons',
-            'content' => html_print_button(
-                __('Export'),
-                'export_btn',
-                false,
-                'change_action()',
-                ['icon' => 'wand'],
-                true
-            ),
-        ]
+    html_print_action_buttons(
+        html_print_button(
+            __('Export'),
+            'export_btn',
+            false,
+            'change_action()',
+            ['icon' => 'wand'],
+            true
+        )
     );
 
     echo '</form>';

From 5017878701e736b1dd028811ba607cbd6f7920b1 Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 22:05:06 +0100
Subject: [PATCH 07/10] Messages view

---
 .../operation/messages/message_edit.php       | 149 ++++++++++--------
 .../operation/messages/message_list.php       |  86 ++++++----
 2 files changed, 141 insertions(+), 94 deletions(-)

diff --git a/pandora_console/operation/messages/message_edit.php b/pandora_console/operation/messages/message_edit.php
index 105a9560de..0e232788e7 100644
--- a/pandora_console/operation/messages/message_edit.php
+++ b/pandora_console/operation/messages/message_edit.php
@@ -14,7 +14,7 @@
  * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
  *
  * ============================================================================
- * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 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
@@ -52,7 +52,7 @@ $buttons['message_list'] = [
         true,
         [
             'title' => __('Received messages'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     ).'</a>',
 ];
@@ -64,7 +64,7 @@ $buttons['sent_messages'] = [
         true,
         [
             'title' => __('Sent messages'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     ).'</a>',
 ];
@@ -76,7 +76,7 @@ $buttons['create_message'] = [
         true,
         [
             'title' => __('Create message'),
-            'class' => 'invert_filter',
+            'class' => 'main_menu_icon invert_filter',
         ]
     ).'</a>',
 ];
@@ -218,11 +218,8 @@ if ($read_message) {
         true
     );
 
-    html_print_div(
-        [
-            'class'   => 'action-buttons',
-            'content' => $outputButtons,
-        ],
+    html_print_action_buttons(
+        $outputButtons
     );
 
     return;
@@ -264,18 +261,6 @@ if ($send_mes === true) {
 // User info.
 $own_info = get_user_info($config['id_user']);
 
-$table = new stdClass();
-$table->width = '100%';
-$table->class = 'databox filters';
-
-$table->data = [];
-
-$table->data[0][0] = __('Sender');
-
-$table->data[0][1] = (empty($own_info['fullname']) === false) ? $own_info['fullname'] : $config['id_user'];
-
-$table->data[1][0] = __('Destination');
-
 $is_admin = (bool) db_get_value(
     'is_admin',
     'tusuario',
@@ -305,15 +290,29 @@ foreach ($users_full as $user_id => $user_info) {
     $users[$user_info['id_user']] = (empty($user_info['fullname']) === true) ? $user_info['id_user'] : $user_info['fullname'];
 }
 
+$table = new stdClass();
+$table->id = 'send_message_table';
+$table->width = '100%';
+$table->class = 'databox max_floating_element_size filter-table-adv';
+$table->style = [];
+$table->style[0] = 'width: 30%';
+$table->style[1] = 'width: 70%';
+$table->data = [];
+
+$table->data[0][] = html_print_label_input_block(
+    __('Sender'),
+    '<span class="result_info_text">'.((empty($own_info['fullname']) === false) ? $own_info['fullname'] : $config['id_user']).'</span>'
+);
+
 // Check if the user to reply is in the list, if not add reply user.
 if ($reply === true) {
-    $table->data[1][1] = (array_key_exists($dst_user, $users) === true) ? $users[$dst_user] : $dst_user;
-    $table->data[1][1] .= html_print_input_hidden(
+    $destinationInputs = (array_key_exists($dst_user, $users) === true) ? $users[$dst_user] : $dst_user;
+    $destinationInputs .= html_print_input_hidden(
         'dst_user',
         $dst_user,
         true
     );
-    $table->data[1][1] .= html_print_input_hidden(
+    $destinationInputs .= html_print_input_hidden(
         'replied',
         '1',
         true
@@ -324,21 +323,27 @@ if ($reply === true) {
 
     $groups = users_get_groups($config['id_user'], 'AR');
     // Get a list of all groups.
-    $table->data[1][1] = html_print_select(
-        $users,
-        'dst_user',
-        $dst_user,
-        'changeStatusOtherSelect(\'dst_user\', \'dst_group\')',
-        __('Select user'),
-        false,
-        true,
-        false,
-        ''
-    );
-    $table->data[1][1] .= '&nbsp;&nbsp;'.__('OR').'&nbsp;&nbsp;';
-    $table->data[1][1] .= html_print_div(
+    $destinationInputs = html_print_div(
         [
-            'class'   => 'w250px inline',
+            'class'   => 'select_users mrgn_right_5px',
+            'content' => html_print_select(
+                $users,
+                'dst_user',
+                $dst_user,
+                'changeStatusOtherSelect(\'dst_user\', \'dst_group\')',
+                __('Select user'),
+                false,
+                true,
+                false,
+                ''
+            ),
+        ],
+        true
+    );
+    $destinationInputs .= __('OR');
+    $destinationInputs .= html_print_div(
+        [
+            'class'   => 'mrgn_lft_5px',
             'content' => html_print_select_groups(
                 $config['id_user'],
                 'AR',
@@ -355,24 +360,41 @@ if ($reply === true) {
     );
 }
 
-$table->data[2][0] = __('Subject');
-$table->data[2][1] = html_print_input_text(
-    'subject',
-    $subject,
-    '',
-    50,
-    70,
-    true
+$table->data[0][] = html_print_label_input_block(
+    __('Destination'),
+    html_print_div(
+        [
+            'class'   => 'flex-content-left',
+            'content' => $destinationInputs,
+        ],
+        true
+    )
 );
 
-$table->data[3][0] = __('Message');
-$table->data[3][1] = html_print_textarea(
-    'message',
-    15,
-    255,
-    $message,
-    '',
-    true
+$table->colspan[1][] = 2;
+$table->data[1][] = html_print_label_input_block(
+    __('Subject'),
+    html_print_input_text(
+        'subject',
+        $subject,
+        '',
+        50,
+        70,
+        true
+    )
+);
+
+$table->colspan[2][] = 2;
+$table->data[2][] = html_print_label_input_block(
+    __('Message'),
+    html_print_textarea(
+        'message',
+        15,
+        50,
+        $message,
+        '',
+        true
+    )
 );
 
 $jsOutput = '';
@@ -396,17 +418,14 @@ echo '<form method="post" action="index.php?sec=message_list&amp;sec2=operation/
 // Print the main table.
 html_print_table($table);
 // Print the action buttons section.
-html_print_div(
-    [
-        'class'   => 'action-buttons',
-        'content' => html_print_submit_button(
-            __('Send message'),
-            'send_mes',
-            false,
-            [ 'icon' => 'wand' ],
-            true
-        ),
-    ]
+html_print_action_buttons(
+    html_print_submit_button(
+        __('Send message'),
+        'send_mes',
+        false,
+        [ 'icon' => 'wand' ],
+        true
+    )
 );
 
 echo '</form>';
diff --git a/pandora_console/operation/messages/message_list.php b/pandora_console/operation/messages/message_list.php
index 7a8258aeff..f62c686e2f 100644
--- a/pandora_console/operation/messages/message_list.php
+++ b/pandora_console/operation/messages/message_list.php
@@ -14,7 +14,7 @@
  * |___|   |___._|__|__|_____||_____|__| |___._| |___|   |__|_|__|_______|
  *
  * ============================================================================
- * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
+ * Copyright (c) 2005-2023 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
@@ -206,26 +206,37 @@ if (empty($messages) === true) {
         $data[0] = '';
         if ($message['read'] == 1) {
             if ($show_sent === true) {
-                $data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&read_message=1&amp;show_sent=1&amp;id_message='.$message_id.'">';
-                $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Click to read'), 'class' => 'invert_filter']);
-                $data[0] .= '</a>';
+                $pathRead = 'index.php?sec=message_list&amp;sec2=operation/messages/message_edit&read_message=1&amp;show_sent=1&amp;id_message='.$message_id;
+                $titleRead = __('Click to read');
             } else {
-                $data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&amp;mark_unread=1&amp;id_message='.$message_id.'">';
-                $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Mark as unread'), 'class' => 'invert_filter']);
-                $data[0] .= '</a>';
+                $pathRead = 'index.php?sec=message_list&amp;sec2=operation/messages/message_list&amp;mark_unread=1&amp;id_message='.$message_id;
+                $titleRead = __('Mark as unread');
             }
         } else {
             if ($show_sent === true) {
-                $data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;show_sent=1&amp;id_message='.$message_id.'">';
-                $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']);
-                $data[0] .= '</a>';
+                $pathRead = 'index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;show_sent=1&amp;id_message='.$message_id;
+                $titleRead = __('Message unread - click to read');
             } else {
-                $data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;id_message='.$message_id.'">';
-                $data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']);
-                $data[0] .= '</a>';
+                $pathRead = 'index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;id_message='.$message_id;
+                $titleRead = __('Message unread - click to read');
             }
         }
 
+        $data[0] = html_print_anchor(
+            [
+                'href'    => $pathRead,
+                'content' => html_print_image(
+                    'images/email_inbox.png',
+                    true,
+                    [
+                        'title' => $titleRead,
+                        'class' => 'main_menu_icon invert_filter',
+                    ],
+                ),
+            ],
+            true
+        );
+
         if ($show_sent === true) {
             $dest_user = get_user_fullname($message['dest']);
             if (!$dest_user) {
@@ -243,18 +254,24 @@ if (empty($messages) === true) {
         }
 
         if ($show_sent === true) {
-            $data[2] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&show_sent=1&amp;id_message='.$message_id.'">';
+            $pathSubject = 'index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&show_sent=1&amp;id_message='.$message_id;
         } else {
-            $data[2] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;id_message='.$message_id.'">';
+            $pathSubject = 'index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;id_message='.$message_id;
         }
 
-        if ($message['subject'] == '') {
-            $data[2] .= __('No Subject');
-        } else {
-            $data[2] .= $message['subject'];
+        $contentSubject = (empty($message['subject']) === true) ? __('No Subject') : $message['subject'];
+
+        if ((int) $message['read'] !== 1) {
+            $contentSubject = '<strong>'.$contentSubject.'</strong>';
         }
 
-        $data[2] .= '</a>';
+        $data[2] .= html_print_anchor(
+            [
+                'href'    => $pathSubject,
+                'content' => $contentSubject,
+            ],
+            true
+        );
 
         $data[3] = ui_print_timestamp(
             $message['timestamp'],
@@ -264,13 +281,27 @@ if (empty($messages) === true) {
 
         $table->cellclass[][4] = 'table_action_buttons';
         if ($show_sent === true) {
-            $data[4] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id.'"
-                onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
+            $pathDelete = 'index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id;
         } else {
-            $data[4] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&delete_message=1&id='.$message_id.'"
-                onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
+            $pathDelete = 'index.php?sec=message_list&amp;sec2=operation/messages/message_list&delete_message=1&id='.$message_id;
         }
 
+        $data[4] = html_print_anchor(
+            [
+                'href'    => $pathDelete,
+                'content' => html_print_image(
+                    'images/delete.svg',
+                    true,
+                    [
+                        'title' => __('Delete'),
+                        'class' => 'main_menu_icon invert_filter',
+                    ]
+                ),
+                'onClick' => 'javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;',
+            ],
+            true
+        );
+
         array_push($table->data, $data);
     }
 }
@@ -312,11 +343,8 @@ if (empty($messages) === false) {
 
     echo '<form id="create_message_form" method="post" class="float-right" action="index.php?sec=message_list&sec2=operation/messages/message_edit"></form>';
 
-    html_print_div(
-        [
-            'class'   => 'action-buttons',
-            'content' => $outputButton,
-        ]
+    html_print_action_buttons(
+        $outputButton
     );
 
     ?>

From eefb62e520fab8c2b199a2e702ff3ff108642cea Mon Sep 17 00:00:00 2001
From: Jose Gonzalez <jose.gonzalez@pandorafms.com>
Date: Tue, 7 Mar 2023 22:45:48 +0100
Subject: [PATCH 08/10] Input improve

---
 pandora_console/include/functions_html.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index e9e60f3418..be9ed5d1a8 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -4903,7 +4903,8 @@ function html_print_autocomplete_modules(
     $filter=[],
     $return=false,
     $id_agent_module=0,
-    $size='30'
+    $size='30',
+    $underInputTip=false
 ) {
     global $config;
 
@@ -4960,7 +4961,11 @@ function html_print_autocomplete_modules(
     html_print_input_hidden($name.'_hidden', $id_agent_module);
 
     if (is_metaconsole() === false) {
-        ui_print_help_tip(__('Type at least two characters to search the module.'), false);
+        if ($underInputTip === true) {
+            ui_print_input_placeholder(__('Type at least two characters to search the module.'), false);
+        } else {
+            ui_print_help_tip(__('Type at least two characters to search the module.'), false);
+        }
     }
 
     $javascript_ajax_page = ui_get_full_url('ajax.php', false, false, false);

From 27357b16b632a40bd58c771c6f8e6a85f86feb7e Mon Sep 17 00:00:00 2001
From: artica <artica.devel@gmail.com>
Date: Wed, 8 Mar 2023 01:00:21 +0100
Subject: [PATCH 09/10] 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 d48173512f..7d9cee8f9c 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-agent-unix
-Version: 7.0NG.769-230307
+Version: 7.0NG.769-230308
 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 cb6b963504..53c9f200aa 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.769-230307"
+pandora_version="7.0NG.769-230308"
 
 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 012a228cd2..492ec37320 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1023,7 +1023,7 @@ my $Sem = undef;
 my $ThreadSem = undef;
 
 use constant AGENT_VERSION => '7.0NG.769';
-use constant AGENT_BUILD => '230307';
+use constant AGENT_BUILD => '230308';
 
 # 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 26931473af..77859b1dde 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -4,7 +4,7 @@
 %global __os_install_post %{nil}
 %define name        pandorafms_agent_linux
 %define version     7.0NG.769
-%define release     230307
+%define release     230308
 
 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 329768dfa7..857f141c94 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -4,7 +4,7 @@
 %global __os_install_post %{nil}
 %define name        pandorafms_agent_linux
 %define version     7.0NG.769
-%define release     230307
+%define release     230308
 
 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 1a32864bd8..79cc3133b3 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.769"
-PI_BUILD="230307"
+PI_BUILD="230308"
 OS_NAME=`uname -s`
 
 FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 48912e2ff3..a78a35121f 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
 {}
 
 Version
-{230307}
+{230308}
 
 ViewReadme
 {Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 11a3383389..d7ef085547 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.769 Build 230307")
+#define PANDORA_VERSION ("7.0NG.769 Build 230308")
 
 string pandora_path;
 string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 3c842ed958..76b5c3540e 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.769(Build 230307))"
+      VALUE "ProductVersion", "(7.0NG.769(Build 230308))"
       VALUE "FileVersion", "1.0.0.0"
     END
   END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index d71a8ffb94..b3ce245f17 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-console
-Version: 7.0NG.769-230307
+Version: 7.0NG.769-230308
 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 ecb6a40251..0a19d7c0e3 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.769-230307"
+pandora_version="7.0NG.769-230308"
 
 package_pear=0
 package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 75b110fd90..e4b91d9635 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 = 'PC230307';
+$build_version = 'PC230308';
 $pandora_version = 'v7.0NG.769';
 
 // Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 2a7bde9bb0..68d69a23d6 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -131,7 +131,7 @@
         <div style='padding-bottom: 50px'>
             <?php
             $version = '7.0NG.769';
-            $build = '230228';
+            $build = '230308';
             $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 d4d603403c..eb62c05265 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.769
-%define release     230307
+%define release     230308
 
 # 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 77dfd3a0de..abdbaf546a 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.769
-%define release     230307
+%define release     230308
 
 # 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 8010510fa4..dfc00451f9 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.769
-%define release     230307
+%define release     230308
 %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 18f8e0b57b..cb6fda43f4 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 7.0NG.769-230307
+Version: 7.0NG.769-230308
 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 4e6df8422b..c99e58931e 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.769-230307"
+pandora_version="7.0NG.769-230308"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index d9be514599..7bf9e9f9c6 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -46,7 +46,7 @@ our @EXPORT = qw(
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.769";
-my $pandora_build = "230307";
+my $pandora_build = "230308";
 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 fdd2825106..2bfc545a3f 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
 
 # version: Defines actual version of Pandora Server for this module only
 my $pandora_version = "7.0NG.769";
-my $pandora_build = "230307";
+my $pandora_build = "230308";
 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 205a8ef850..a4738c6552 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -4,7 +4,7 @@
 %global __os_install_post %{nil}
 %define name        pandorafms_server
 %define version     7.0NG.769
-%define release     230307
+%define release     230308
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 2cc1e07821..b108390a3d 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -4,7 +4,7 @@
 %global __os_install_post %{nil}
 %define name        pandorafms_server
 %define version     7.0NG.769
-%define release     230307
+%define release     230308
 
 Summary:            Pandora FMS Server
 Name:               %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 6479a6943a..2a76611dde 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
 # **********************************************************************
 
 PI_VERSION="7.0NG.769"
-PI_BUILD="230307"
+PI_BUILD="230308"
 
 MODE=$1
 if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 3ddb47ab77..ce08881710 100755
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -35,7 +35,7 @@ use PandoraFMS::Config;
 use PandoraFMS::DB;
 
 # version: define current version
-my $version = "7.0NG.769 Build 230307";
+my $version = "7.0NG.769 Build 230308";
 
 # Pandora server configuration
 my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index e5eec498f7..0b193ab6c6 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.769 Build 230307";
+my $version = "7.0NG.769 Build 230308";
 
 # save program name for logging
 my $progname = basename($0);

From bc501ec5524c0abddb35b59a05b45a008d84e896 Mon Sep 17 00:00:00 2001
From: daniel <daniel.barbero@artica.es>
Date: Wed, 8 Mar 2023 08:28:48 +0100
Subject: [PATCH 10/10] fixed styles

---
 pandora_console/include/styles/pandora.css | 37 ----------------------
 1 file changed, 37 deletions(-)

diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 63ad0d2e52..b426f2f4d2 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -86,43 +86,6 @@
   font-weight: 900;
 }
 
-/*
-@font-face {
-  font-family: "lato-italic";
-  src: url("../fonts/Lato-Italic.woff") format("woff");
-  font-weight: 400;
-  font-style: italic;
-}
-
-@font-face {
-  font-family: "lato";
-  src: url("../fonts/Lato-LightItalic.woff") format("woff");
-  font-weight: 300;
-  font-style: italic;
-}
-
-@font-face {
-  font-family: "lato";
-  src: url("../fonts/Lato-ThinItalic.woff") format("woff");
-  font-weight: 100;
-  font-style: italic;
-}
-
-@font-face {
-  font-family: "lato";
-  src: url("../fonts/Lato-BoldItalic.woff") format("woff");
-  font-weight: 700;
-  font-style: italic;
-}
-
-@font-face {
-  font-family: "lato";
-  src: url("../fonts/Lato-BlackItalic.woff") format("woff");
-  font-weight: 900;
-  font-style: italic;
-}
-*/
-
 @font-face {
   font-family: "source-code";
   src: url("../fonts/SourceCodePro.woff") format("woff");