2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
<?php
|
2019-07-01 12:46:09 +02:00
|
|
|
/**
|
|
|
|
* Ajax handler.
|
|
|
|
*
|
|
|
|
* @category Ajax handler.
|
|
|
|
* @package Pandora FMS.
|
|
|
|
* @subpackage OpenSource.
|
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
|
|
|
* ______ ___ _______ _______ ________
|
2023-06-08 12:42:10 +02:00
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
2019-07-01 12:46:09 +02:00
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
2023-06-08 11:53:13 +02:00
|
|
|
* Copyright (c) 2005-2023 Pandora FMS
|
2023-06-08 13:19:01 +02:00
|
|
|
* Please see https://pandorafms.com/community/ for full contribution list
|
2019-07-01 12:46:09 +02:00
|
|
|
* 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.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Begin.
|
2020-06-26 15:48:58 +02:00
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
2019-07-01 12:46:09 +02:00
|
|
|
define('AJAX', true);
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
|
2021-05-19 11:31:52 +02:00
|
|
|
if (defined('__PAN_XHPROF__') === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
define('__PAN_XHPROF__', 0);
|
|
|
|
}
|
2018-11-13 12:55:25 +01:00
|
|
|
|
|
|
|
if (__PAN_XHPROF__ === 1) {
|
2021-05-19 11:31:52 +02:00
|
|
|
if (function_exists('tideways_xhprof_enable') === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
tideways_xhprof_enable();
|
|
|
|
}
|
2018-11-13 12:55:25 +01:00
|
|
|
}
|
|
|
|
|
2021-05-19 11:31:52 +02:00
|
|
|
if (file_exists('include/config.php') === false
|
|
|
|
|| is_readable('include/config.php') === false
|
2020-07-22 10:56:16 +02:00
|
|
|
) {
|
2019-01-30 16:18:44 +01:00
|
|
|
exit;
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
|
|
|
|
2018-11-21 13:08:58 +01:00
|
|
|
// Don't start a session before this import.
|
|
|
|
// The session is configured and started inside the config process.
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/config.php';
|
|
|
|
require_once 'include/functions.php';
|
|
|
|
require_once 'include/functions_db.php';
|
|
|
|
require_once 'include/auth/mysql.php';
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
|
2020-07-22 10:56:16 +02:00
|
|
|
if (isset($config['console_log_enabled']) === true
|
|
|
|
&& $config['console_log_enabled'] == 1
|
|
|
|
) {
|
2021-05-19 11:31:52 +02:00
|
|
|
ini_set('log_errors', true);
|
2020-07-02 18:32:32 +02:00
|
|
|
ini_set('error_log', $config['homedir'].'/log/console.log');
|
|
|
|
} else {
|
2021-05-19 11:31:52 +02:00
|
|
|
ini_set('log_errors', false);
|
|
|
|
ini_set('error_log', '');
|
2020-07-02 18:32:32 +02:00
|
|
|
}
|
|
|
|
|
2021-02-25 12:08:58 +01:00
|
|
|
// Sometimes input is badly retrieved from caller...
|
|
|
|
if (empty($_REQUEST) === true) {
|
|
|
|
$data = explode('&', urldecode(file_get_contents('php://input')));
|
|
|
|
foreach ($data as $d) {
|
|
|
|
$r = explode('=', $d, 2);
|
2021-02-25 12:09:41 +01:00
|
|
|
$_POST[$r[0]] = $r[1];
|
|
|
|
$_GET[$r[0]] = $r[1];
|
2021-02-25 12:08:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-22 10:56:16 +02:00
|
|
|
// Hash login process.
|
|
|
|
if (isset($_GET['loginhash']) === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$loginhash_data = get_parameter('loginhash_data', '');
|
|
|
|
$loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
|
|
|
|
|
|
|
|
if ($config['loginhash_pwd'] != ''
|
2020-07-22 10:56:16 +02:00
|
|
|
&& $loginhash_data == md5(
|
|
|
|
$loginhash_user.io_output_password($config['loginhash_pwd'])
|
|
|
|
)
|
2019-01-30 16:18:44 +01:00
|
|
|
) {
|
|
|
|
db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']);
|
|
|
|
$_SESSION['id_usuario'] = $loginhash_user;
|
|
|
|
$config['id_user'] = $loginhash_user;
|
|
|
|
} else {
|
|
|
|
include_once 'general/login_page.php';
|
2022-01-20 10:55:23 +01:00
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_USER_REGISTRATION,
|
|
|
|
'Loginhash failed',
|
|
|
|
'system'
|
|
|
|
);
|
2021-02-09 10:25:08 +01:00
|
|
|
while (ob_get_length() > 0) {
|
|
|
|
ob_end_flush();
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
exit('</html>');
|
|
|
|
}
|
2013-02-05 15:46:16 +01:00
|
|
|
}
|
|
|
|
|
2021-05-19 11:31:52 +02:00
|
|
|
// Another auth class example: PandoraFMS\Dashboard\Manager.
|
2020-07-22 10:56:16 +02:00
|
|
|
$auth_class = io_safe_output(
|
2021-05-19 11:31:52 +02:00
|
|
|
get_parameter('auth_class', 'PandoraFMS\User')
|
2020-07-22 10:56:16 +02:00
|
|
|
);
|
2021-05-19 11:31:52 +02:00
|
|
|
|
2022-03-08 14:50:59 +01:00
|
|
|
$page = (string) get_parameter('page');
|
|
|
|
$page = safe_url_extraclean($page);
|
|
|
|
$page .= '.php';
|
2022-10-04 18:13:50 +02:00
|
|
|
$page = realpath($page);
|
2020-07-22 10:56:16 +02:00
|
|
|
$public_hash = get_parameter('auth_hash', false);
|
|
|
|
$public_login = false;
|
|
|
|
|
2022-03-08 14:50:59 +01:00
|
|
|
|
|
|
|
if (false === ((bool) get_parameter('doLogin', false) === true
|
2022-10-19 16:46:07 +02:00
|
|
|
&& $page === realpath('include/rest-api/index.php'))
|
2022-03-08 14:50:59 +01:00
|
|
|
) {
|
|
|
|
// Check user.
|
|
|
|
if (class_exists($auth_class) === false || $public_hash === false) {
|
|
|
|
check_login();
|
|
|
|
} else {
|
|
|
|
if ($auth_class::validatePublicHash($public_hash) === false) {
|
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_USER_REGISTRATION,
|
|
|
|
'Trying to access public dashboard (Invalid public hash)'
|
|
|
|
);
|
|
|
|
include 'general/noaccess.php';
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
// OK. Simulated user log in. If you want to use your own auth_class
|
|
|
|
// remember to set $config['force_instant_logout'] to true to avoid
|
|
|
|
// persistent user login.
|
|
|
|
}
|
2020-07-22 10:56:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ob_start();
|
2019-07-01 12:46:09 +02:00
|
|
|
|
|
|
|
// Enterprise support.
|
2021-05-19 11:31:52 +02:00
|
|
|
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php') === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
include_once ENTERPRISE_DIR.'/load_enterprise.php';
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['remote_addr'] = $_SERVER['REMOTE_ADDR'];
|
2009-04-01 10:04:49 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['id_user'] = $_SESSION['id_usuario'];
|
|
|
|
$isFunctionSkins = enterprise_include_once('include/functions_skins.php');
|
|
|
|
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
2020-07-22 10:56:16 +02:00
|
|
|
$config['relative_path'] = enterprise_hook(
|
|
|
|
'skins_set_image_skin_path',
|
|
|
|
[$config['id_user']]
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2012-07-09 10:07:05 +02:00
|
|
|
|
2021-05-19 11:31:52 +02:00
|
|
|
if (is_metaconsole() === true) {
|
2019-07-01 12:46:09 +02:00
|
|
|
// Backward compatibility.
|
|
|
|
define('METACONSOLE', true);
|
2013-05-16 10:23:51 +02:00
|
|
|
}
|
2013-03-04 13:51:22 +01:00
|
|
|
|
2021-05-19 11:31:52 +02:00
|
|
|
if (file_exists($page) === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
include_once $page;
|
|
|
|
} else {
|
|
|
|
echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>';
|
2008-06-17 Esteban Sanchez <estebans@artica.es>
* ajax.php: Added to repository. AJAX interface for Pandora. A new
time is coming...
* pandoradb.sql: Added id_group to treport. A report is now assigned
to a group of agents. Changes in treport_content to add an order
field, drop sla fields and use an enum for the type. NOTE: This will
break all your current defined reports, update under your
responsabillity. Added table treport_content_sla_combined to define
SLAs in the SLA types reports.
* godmode/reporting/graph_builder.php: Use Pandora functions. Adde
javascript code to display the module icon when changing from the
dropdown menu.
* godmode/reporting/reporting_builder.php: Almost complet rewritten to
use Pandora HTML functions. Style correction.
* include/functions.php: Added new report types. Style correction.
* include/functions_db.php: Use Pandora database functions to get
simple values. Added functions get_agents_in_group(),
get_modules_in_agent(), get_simple_alerts_in_agent(),
get_combined_alerts_in_agent(), get_alerts_in_agent(),
get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(),
get_alert_fires_in_period(),
get_alert_last_fire_timestamp_in_period(). Deleted debug output and
fixed calling to an inexistent function in
return_moduledata_sum_value().
* include/functions_html.php: Tab style correction. Thanks to Ramon
for the advice. Fixed some errors on print_table that was causing not
to work fine if rowclass or colspan was defined.
* include/functions_reporting.php: Adde date support to
return_module_SLA(), event_reporting(). Added alert_reporting(),
monitor_health_reporting(), general_group_reporting() and
agents_detailed_reporting() to implement new report types. Style
correction.
* include/javascript/pandora.js: Added html_entity_decode() function
to decode some AJAX results.
* javascript/jquery.js: Added to repository. jQuery version 1.2.4a
* include/javascript/jquery.timeentry.js: jQuery plugin to manage time
inputs.
* include/javascript/jquery.ui.datepicker.js: jQuery plugin to manage
date inputs in a dropdown calendar.
* include/languages/date_*.js, include/languages/time_*.js: Added to
repository. Translation of date and time strings for the new calendar
javascript support.
* include/languages/language_en.php: Added new strings relatives to
reports.
* include/languages/language_de.php,
include/languages/language_fr.php, include/languages/language_gl.php,
include/languages/language_pt_br.php: Fixed a variable name.
* godmode/groups/group_list.php: Avoid the use of an extra indentation
by returning if no success on comprueba_login().
* include/styles/pandora.css: Add some classes. Tab style correction.
* operation/agentes/ver_agente.php: Added AJAX support to agent
operations.
* operation/reporting/graph_viewer.php: Period dropdown selection
improved and printed with Pandora functions.
* operation/reporting/reporting_viewer.php: Massive rewritten.
Implemented date and time support, added new report types, use Pandora
functions...
* reporting/fgraph.php: Documentation fix. Added a new graphic to show
monitors health.
* godmode/agentes/agent_manager.php,
operation/reporting/custom_reporting.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@869 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-17 16:30:44 +02:00
|
|
|
}
|
2018-11-13 12:55:25 +01:00
|
|
|
|
|
|
|
if (__PAN_XHPROF__ === 1) {
|
2019-01-30 16:18:44 +01:00
|
|
|
pandora_xhprof_display_result('ajax', 'console');
|
2018-11-13 12:55:25 +01:00
|
|
|
}
|
2020-07-22 10:56:16 +02:00
|
|
|
|
|
|
|
|
2021-02-09 12:05:59 +01:00
|
|
|
if (isset($config['force_instant_logout']) === true
|
|
|
|
&& $config['force_instant_logout'] === true
|
|
|
|
) {
|
2020-07-22 10:56:16 +02:00
|
|
|
// Force user logout.
|
|
|
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
|
|
|
session_start();
|
|
|
|
}
|
|
|
|
|
|
|
|
$iduser = $_SESSION['id_usuario'];
|
|
|
|
$_SESSION = [];
|
|
|
|
session_destroy();
|
|
|
|
header_remove('Set-Cookie');
|
|
|
|
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
|
|
|
|
2023-05-25 09:51:20 +02:00
|
|
|
if ($config['auth'] === 'saml' && empty($public_hash) === true) {
|
2020-07-22 10:56:16 +02:00
|
|
|
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
|
|
|
|
$as = new SimpleSAML_Auth_Simple('PandoraFMS');
|
|
|
|
$as->logout();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-02-09 10:25:08 +01:00
|
|
|
while (ob_get_length() > 0) {
|
|
|
|
ob_end_flush();
|
2020-07-22 10:56:16 +02:00
|
|
|
}
|