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','<p> <center><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" /></center><p style="text-align: center; font-size: 13px;">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 -> Site news.</p> ',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','<p> <center><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" /></center><p style="text-align: center; font-size: 13px;">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 -> Site news.</p> ',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','<p> <center><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" /></center><p style="text-align: center; font-size: 13px;">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 -> Site news.</p> ',NOW()); + INSERT INTO tmodule VALUES (1,'Agent module'); INSERT INTO tmodule VALUES (2,'Network module');