Merge branch 'ent-6851-Quitar-marquesina-de-vista-de-eventos' into 'develop'
Ent 6851 quitar marquesina de vista de eventos See merge request artica/pandorafms!3752
This commit is contained in:
commit
06a027127f
|
@ -1,6 +1,7 @@
|
||||||
operation/servers/recon_view.php
|
operation/servers/recon_view.php
|
||||||
operation/users/webchat.php
|
operation/users/webchat.php
|
||||||
operation/events/event_statistics.php
|
operation/events/event_statistics.php
|
||||||
|
operation/events/events_marquee.php
|
||||||
include/javascript/webchat.js
|
include/javascript/webchat.js
|
||||||
attachment/pandora_chat.log.json.txt
|
attachment/pandora_chat.log.json.txt
|
||||||
attachment/pandora_chat.user_list.json.txt
|
attachment/pandora_chat.user_list.json.txt
|
||||||
|
|
|
@ -772,10 +772,6 @@ if ($pure) {
|
||||||
$rss['active'] = false;
|
$rss['active'] = false;
|
||||||
$rss['text'] = '<a class="events_link" href="operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&">'.html_print_image('images/rss.png', true, ['title' => __('RSS Events')]).'</a>';
|
$rss['text'] = '<a class="events_link" href="operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&">'.html_print_image('images/rss.png', true, ['title' => __('RSS Events')]).'</a>';
|
||||||
|
|
||||||
// Marquee.
|
|
||||||
$marquee['active'] = false;
|
|
||||||
$marquee['text'] = '<a class="events_link" href="operation/events/events_marquee.php?">'.html_print_image('images/heart.png', true, ['title' => __('Marquee display')]).'</a>';
|
|
||||||
|
|
||||||
// CSV.
|
// CSV.
|
||||||
$csv['active'] = false;
|
$csv['active'] = false;
|
||||||
$csv['text'] = '<a class="events_link" href="operation/events/export_csv.php?'.$filter_b64.'">'.html_print_image('images/csv_mc.png', true, ['title' => __('Export to CSV file')]).'</a>';
|
$csv['text'] = '<a class="events_link" href="operation/events/export_csv.php?'.$filter_b64.'">'.html_print_image('images/csv_mc.png', true, ['title' => __('Export to CSV file')]).'</a>';
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// 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 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.
|
|
||||||
error_reporting(1);
|
|
||||||
|
|
||||||
// Local settings for marquee extension
|
|
||||||
$MAX_MARQUEE_EVENTS = 10;
|
|
||||||
$MARQUEE_INTERVAL = 90;
|
|
||||||
$MARQUEE_FONT_SIZE = '32px';
|
|
||||||
$MARQUEE_SPEED = 9;
|
|
||||||
|
|
||||||
$output = '';
|
|
||||||
|
|
||||||
// Don't start a session before this import.
|
|
||||||
// The session is configured and started inside the config process.
|
|
||||||
require_once '../../include/config.php';
|
|
||||||
require_once '../../include/functions.php';
|
|
||||||
require_once '../../include/functions_db.php';
|
|
||||||
require_once '../../include/functions_api.php';
|
|
||||||
require_once '../../include/functions_users.php';
|
|
||||||
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
|
|
||||||
$config['id_user'] = $_SESSION['id_usuario'];
|
|
||||||
|
|
||||||
// http://es2.php.net/manual/en/ref.session.php#64525
|
|
||||||
// Session locking concurrency speedup!
|
|
||||||
check_login();
|
|
||||||
|
|
||||||
$event_a = check_acl($config['id_user'], 0, 'ER');
|
|
||||||
$event_w = check_acl($config['id_user'], 0, 'EW');
|
|
||||||
$event_m = check_acl($config['id_user'], 0, 'EM');
|
|
||||||
$access = ($event_a == true) ? 'ER' : (($event_w == true) ? 'EW' : (($event_m == true) ? 'EM' : 'ER'));
|
|
||||||
|
|
||||||
if (!isInACL($_SERVER['REMOTE_ADDR'])) {
|
|
||||||
db_pandora_audit(
|
|
||||||
'ACL Violation',
|
|
||||||
'Trying to access marquee without ACL Access'
|
|
||||||
);
|
|
||||||
include '../../general/noaccess.php';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$groups = users_get_groups($config['id_user'], $access);
|
|
||||||
|
|
||||||
// Otherwise select all groups the user has rights to.
|
|
||||||
if (!empty($groups)) {
|
|
||||||
$sql_group_filter = ' AND id_grupo IN ('.implode(',', array_keys($groups)).')';
|
|
||||||
} else {
|
|
||||||
$sql_group_filter = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip system messages if user is not PM
|
|
||||||
if (!check_acl($config['id_user'], 0, 'PM')) {
|
|
||||||
$sql_group_filter .= ' AND id_grupo != 0';
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case 'mysql':
|
|
||||||
$sql = "SELECT evento, timestamp, id_agente
|
|
||||||
FROM tevento
|
|
||||||
WHERE 1=1 $sql_group_filter
|
|
||||||
ORDER BY utimestamp DESC
|
|
||||||
LIMIT 0 , $MAX_MARQUEE_EVENTS";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'postgresql':
|
|
||||||
$sql = "SELECT evento, timestamp, id_agente
|
|
||||||
FROM tevento
|
|
||||||
WHERE 1=1 $sql_group_filter
|
|
||||||
ORDER BY utimestamp DESC
|
|
||||||
LIMIT $MAX_MARQUEE_EVENTS OFFSET 0";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'oracle':
|
|
||||||
$sql = "SELECT evento, timestamp, id_agente
|
|
||||||
FROM tevento
|
|
||||||
WHERE (1=1 $sql_group_filter ) AND rownum <= $MAX_MARQUEE_EVENTS
|
|
||||||
ORDER BY utimestamp DESC";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = db_get_all_rows_sql($sql);
|
|
||||||
foreach ($result as $row) {
|
|
||||||
$agente = '';
|
|
||||||
if ($row['id_agente'] != 0) {
|
|
||||||
$agente = db_get_sql(
|
|
||||||
'SELECT alias
|
|
||||||
FROM tagente
|
|
||||||
WHERE id_agente = '.$row['id_agente']
|
|
||||||
);
|
|
||||||
$agente = $agente.' : ';
|
|
||||||
}
|
|
||||||
|
|
||||||
$output .= strtoupper($agente).$row['evento'].' , '.human_time_comparation($row['timestamp']);
|
|
||||||
$output .= '. . . . . . . ';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
echo '<html>';
|
|
||||||
echo '<head>';
|
|
||||||
echo '<title>'.__('%s - Latest events', get_product_name()).'</title>';
|
|
||||||
|
|
||||||
$query = ui_get_full_url();
|
|
||||||
echo '<meta http-equiv="refresh" content="'.$MARQUEE_INTERVAL.'; URL='.$query.'">';
|
|
||||||
echo '<link rel="icon" href="../../'.ui_get_favicon().'" type="image/ico">';
|
|
||||||
echo '</head>';
|
|
||||||
|
|
||||||
echo "<body bgcolor='#000000' >";
|
|
||||||
echo '<br><br>';
|
|
||||||
echo '<center>';
|
|
||||||
echo "<div style='font-size:$MARQUEE_FONT_SIZE; color: #fff'>";
|
|
||||||
echo "<marquee width=95% scrollamount=$MARQUEE_SPEED>$output</marquee>";
|
|
||||||
echo '</center>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</body>';
|
|
|
@ -430,11 +430,6 @@ if (check_acl($config['id_user'], 0, 'ER')
|
||||||
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['text'] = __('RSS');
|
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['text'] = __('RSS');
|
||||||
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['id'] = 'RSS';
|
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['id'] = 'RSS';
|
||||||
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['type'] = 'direct';
|
$sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&fb64='.$fb64]['type'] = 'direct';
|
||||||
|
|
||||||
// Marquee.
|
|
||||||
$sub['operation/events/events_marquee.php']['text'] = __('Marquee');
|
|
||||||
$sub['operation/events/events_marquee.php']['id'] = 'Marquee';
|
|
||||||
$sub['operation/events/events_marquee.php']['type'] = 'direct';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sound Events.
|
// Sound Events.
|
||||||
|
|
Loading…
Reference in New Issue