From ac60e296c1881cd00d65197aa1aeab7db193af06 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 10 May 2019 11:17:46 +0200 Subject: [PATCH 1/6] Add new message to News board Former-commit-id: ad9170857d95fa2c211d09a5f59f6012739177c5 --- pandora_console/extras/mr/28.sql | 2 ++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 24 +++++++++++++++++++ pandora_console/general/logon_ok.php | 6 ++--- pandora_console/pandoradb_data.sql | 4 ++-- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/pandora_console/extras/mr/28.sql b/pandora_console/extras/mr/28.sql index e4dfe8fe9b..bdf0038da3 100644 --- a/pandora_console/extras/mr/28.sql +++ b/pandora_console/extras/mr/28.sql @@ -1,5 +1,7 @@ START TRANSACTION; DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event'; +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); + COMMIT; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 4cdb88ac30..94c9e8f687 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -761,6 +761,23 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` ( PRIMARY KEY(`id_rc`) ) ENGINE = InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `tnews` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tnews` ( + `id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + `author` varchar(255) NOT NULL DEFAULT '', + `subject` varchar(255) NOT NULL DEFAULT '', + `text` TEXT NOT NULL, + `timestamp` DATETIME NOT NULL DEFAULT 0, + `id_group` int(10) NOT NULL default 0, + `modal` tinyint(1) DEFAULT 0, + `expire` tinyint(1) DEFAULT 0, + `expire_timestamp` DATETIME NOT NULL DEFAULT 0, + PRIMARY KEY(`id_news`) +) ENGINE = InnoDB DEFAULT CHARSET=utf8; + + ALTER TABLE treport_content_template ADD COLUMN `historical_db` tinyint(1) NOT NULL DEFAULT '0'; ALTER TABLE treport_content_template ADD COLUMN `lapse_calc` tinyint(1) default '0'; ALTER TABLE treport_content_template ADD COLUMN `lapse` int(11) default '300'; @@ -2103,3 +2120,10 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`; -- Update table `tuser_task` -- ---------------------------------------------------------------------- UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; + +------------------------------------------------------------------------ +------ ADD message in table 'tnews' +------------------------------------------------------------------------ + +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); + diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 6ecefbf3ac..f0dfdd24a7 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -197,9 +197,9 @@ if (!empty($all_data)) { } foreach ($news as $article) { - $text = io_safe_output($article['text']); - - + $text_bbdd = io_safe_output($article['text']); + $text = html_entity_decode($text_bbdd); + hd($text, true); echo ''.$article['subject'].''; echo ''.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.''; echo ''; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index f30798352e..39b7ffc676 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -345,8 +345,8 @@ INSERT INTO `tperfil` VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0 -- Dumping data for table `tnews` -- -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS!','This is the Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW()); -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (2,'admin','New Pandora FMS Agent Features','Feel free to test our new features for both Windows and Linux agents: Proxy and Broker modes.',NOW()); +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); + INSERT INTO tmodule VALUES (1,'Agent module'); INSERT INTO tmodule VALUES (2,'Network module'); From 5fe4a240be9c54cb03cc527de3c36e29b3281f7b Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 14 May 2019 09:47:45 +0200 Subject: [PATCH 2/6] =?UTF-8?q?se=20a=C3=B1ade=20imagen=20y=20se=20quita?= =?UTF-8?q?=20de=20bbdd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 4d9174e95ffb6f5a35aa194177363c27dcd2c4a1 --- pandora_console/images/welcome_image.png | Bin 0 -> 7285 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pandora_console/images/welcome_image.png diff --git a/pandora_console/images/welcome_image.png b/pandora_console/images/welcome_image.png new file mode 100644 index 0000000000000000000000000000000000000000..b9b745ba33ba709b61e107b1fef72a40cc5de8c3 GIT binary patch literal 7285 zcmX|mcTf{R^EN7=ARVO_5eb3;#Re>Z(mm(#BP(`E)Qlu9Fg-}8W2m--KQF`y) zgx;hhB|)k*>G0!y-*3L1yFd1syPMs;+u56Eqo2c`($jL$QczIPYdurfr=Yk3xt#Vl zu3aL>Q}5B2irsUFp+kUj$R|usZb3V*KZ{$X_>URu<(0+es*?tVq#)`etu$nd~$MfbaZrNcxYr~gfLe$FfdR$_$y;_ z{aruVvzHWJN2n$AcXxM>)aLfJ)wMP^w_QqW>(8E^u8xlGuC87pkw_p6^!0Uhb#=70 zH8(dmH8nOhH8nKU|5s|OtE(z2D$2`COG`^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f!Rp{0*bX?XRmHsNIdmcB ztn$#a8cO)YE*H@ZiQA*x7oKI*kcAWT1iVefdIaN_jmUfTRkgQ{7yiDm{+8)|R8#p= zK0g62&R7C+&|nZwNii9JHdN Date: Tue, 14 May 2019 09:48:41 +0200 Subject: [PATCH 3/6] Se muestra en la pantalla mediante html la imganen Former-commit-id: ddd86fc0b4768ed5c3750c304fded70de3389864 --- pandora_console/general/logon_ok.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index f0dfdd24a7..6f69b6a456 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -203,6 +203,7 @@ if (!empty($all_data)) { echo ''.$article['subject'].''; echo ''.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.''; echo ''; + echo '
img colabora con nosotros - Support
'; echo nl2br($text); echo ''; } From 9501187ebc49af801d1da601bd5ac06b5ce226dd Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 14 May 2019 10:01:30 +0200 Subject: [PATCH 4/6] Se cambian las consultas sql sin la imagen en la consulta Former-commit-id: fcfc9e05c4107f5b85b1a8f6140155fafe316c8e --- pandora_console/extras/mr/28.sql | 3 ++- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- pandora_console/pandoradb_data.sql | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/extras/mr/28.sql b/pandora_console/extras/mr/28.sql index bdf0038da3..356c797ca4 100644 --- a/pandora_console/extras/mr/28.sql +++ b/pandora_console/extras/mr/28.sql @@ -1,7 +1,8 @@ START TRANSACTION; DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event'; -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); + COMMIT; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 94c9e8f687..49f6b88195 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -2125,5 +2125,5 @@ UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Re ------ ADD message in table 'tnews' ------------------------------------------------------------------------ -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 39b7ffc676..0c25530e4b 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -345,8 +345,7 @@ INSERT INTO `tperfil` VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0 -- Dumping data for table `tnews` -- -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console','&lt;p&gt; &lt;center&gt;&lt;img src="https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png" alt="img colabora con nosotros - Support" width="191" height="207" /&gt;&lt;/center&gt;&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); - +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW()); INSERT INTO tmodule VALUES (1,'Agent module'); INSERT INTO tmodule VALUES (2,'Network module'); From d9dbc60eb5748bc6e96defdb09b7cc95c10fc529 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Tue, 14 May 2019 16:45:28 +0200 Subject: [PATCH 5/6] Update pandoradb_migrate_6.0_to_7.0.mysql.sql Former-commit-id: cb2edea9dca48e33260ce2fb707ed48b04d23bde --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 003dab4311..0e33358215 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -2121,7 +2121,6 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`; -- ---------------------------------------------------------------------- UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; -<<<<<<< pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql ------------------------------------------------------------------------ ------ ADD message in table 'tnews' ------------------------------------------------------------------------ @@ -2134,5 +2133,3 @@ INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal'); -======= ->>>>>>> pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql From bc849c16fbf220f50cd1afb81d3b26f18ee91172 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 14 May 2019 17:13:44 +0200 Subject: [PATCH 6/6] Only one image for welcome new board Former-commit-id: a8effda6019c394a9a2d15fbf4998490867b3b02 --- pandora_console/general/logon_ok.php | 6 ++++-- pandora_console/include/functions.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 6f69b6a456..c3de268dea 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -199,11 +199,13 @@ if (!empty($all_data)) { foreach ($news as $article) { $text_bbdd = io_safe_output($article['text']); $text = html_entity_decode($text_bbdd); - hd($text, true); echo ''.$article['subject'].''; echo ''.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.''; echo ''; - echo '
img colabora con nosotros - Support
'; + if ($article['id_news'] == 1) { + echo '
img colabora con nosotros - Support
'; + } + echo nl2br($text); echo ''; } diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index a7e0d69d42..30d64b5a26 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2668,7 +2668,7 @@ function get_news($arguments) case 'mysql': case 'postgresql': $sql = sprintf( - "SELECT subject,timestamp,text,author + "SELECT id_news,subject,timestamp,text,author FROM tnews WHERE id_group IN (%s) AND modal = %s AND (expire = 0 OR (expire = 1 AND expire_timestamp > '%s'))