Add new message to News board

Former-commit-id: ad9170857d95fa2c211d09a5f59f6012739177c5
This commit is contained in:
marcos.alconada 2019-05-10 11:17:46 +02:00
parent 3119278b26
commit ac60e296c1
4 changed files with 31 additions and 5 deletions

View File

@ -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;

View File

@ -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());

View File

@ -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 '<tr><th class="green_title">'.$article['subject'].'</th></tr>';
echo '<tr><td>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</td></tr>';
echo '<tr><td class="datos">';

View File

@ -345,8 +345,8 @@ INSERT INTO `tperfil` VALUES (1,'Operator&#x20;&#40;Read&#41;',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&#x20;to&#x20;Pandora&#x20;FMS&#x20;Console','&amp;lt;p&amp;gt;&#x20;&amp;lt;center&amp;gt;&amp;lt;img&#x20;src=&quot;https://pandorafms.com/wp-content/uploads/2018/04/img_colabora_con_nosotros.png&quot;&#x20;alt=&quot;img&#x20;colabora&#x20;con&#x20;nosotros&#x20;-&#x20;Support&quot;&#x20;width=&quot;191&quot;&#x20;height=&quot;207&quot;&#x20;/&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&#x20;style=&quot;text-align:&#x20;center;&#x20;font-size:&#x20;13px;&quot;&amp;gt;Hello,&#x20;congratulations,&#x20;if&#x20;you&apos;ve&#x20;arrived&#x20;here&#x20;you&#x20;already&#x20;have&#x20;an&#x20;operational&#x20;monitoring&#x20;console.&#x20;Remember&#x20;that&#x20;our&#x20;forums&#x20;and&#x20;online&#x20;documentation&#x20;are&#x20;available&#x20;24x7&#x20;to&#x20;get&#x20;you&#x20;out&#x20;of&#x20;any&#x20;trouble.&#x20;You&#x20;can&#x20;replace&#x20;this&#x20;message&#x20;with&#x20;a&#x20;personalized&#x20;one&#x20;at&#x20;Admin&#x20;tools&#x20;-&amp;amp;gt;&#x20;Site&#x20;news.&amp;lt;/p&amp;gt;&#x20;',NOW());
INSERT INTO tmodule VALUES (1,'Agent&#x20;module');
INSERT INTO tmodule VALUES (2,'Network&#x20;module');