2008-08-22 20:07:32 +02:00
|
|
|
<?php
|
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-01-11 21:42:08 +01:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2009-06-08 20:26:14 +02:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
2008-04-01 15:53:11 +02:00
|
|
|
// 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.
|
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
|
|
|
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
/**
|
2019-01-30 16:18:44 +01:00
|
|
|
* @package Include
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/ldap.php,
include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/config_process.php,
include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change or add the subpackage in phpdoc
comment blocks for to organize more the result phpdoc files. Start to
document undocument functions.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1882 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-26 17:37:47 +02:00
|
|
|
* @subpackage Config
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-10-15 09:05:04 +02:00
|
|
|
* Pandora build version and version
|
2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
*/
|
2020-03-26 01:00:17 +01:00
|
|
|
$build_version = 'PC200326';
|
2020-03-02 11:01:26 +01:00
|
|
|
$pandora_version = 'v7.0NG.744';
|
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
|
|
|
|
2012-04-24 13:52:07 +02:00
|
|
|
// Do not overwrite default timezone set if defined.
|
|
|
|
$script_tz = @date_default_timezone_get();
|
2013-05-28 14:37:51 +02:00
|
|
|
if (empty($script_tz)) {
|
2019-01-30 16:18:44 +01:00
|
|
|
date_default_timezone_set('Europe/Berlin');
|
|
|
|
ini_set('date.timezone', 'Europe/Berlin');
|
|
|
|
} else {
|
|
|
|
ini_set('date.timezone', $script_tz);
|
2012-04-24 13:52:07 +02:00
|
|
|
}
|
2011-08-19 18:25:39 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// home dir bad defined
|
2017-03-22 15:26:54 +01:00
|
|
|
if (!is_dir($config['homedir'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$ownDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR;
|
|
|
|
$config['homedir'] = $ownDir;
|
|
|
|
$config['error'] = 'homedir_bad_defined';
|
2017-03-22 15:26:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// Help to debug problems. Override global PHP configuration
|
2013-10-01 14:53:38 +02:00
|
|
|
global $develop_bypass;
|
2010-01-22 13:51:13 +01:00
|
|
|
if ($develop_bypass != 1) {
|
2019-01-30 16:18:44 +01:00
|
|
|
// error_reporting(E_ALL);
|
|
|
|
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
|
|
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
|
|
|
|
} else {
|
|
|
|
error_reporting(E_ALL & ~E_NOTICE);
|
|
|
|
}
|
|
|
|
|
|
|
|
ini_set('display_errors', 0);
|
|
|
|
ini_set('log_errors', 1);
|
|
|
|
ini_set('error_log', $config['homedir'].'/pandora_console.log');
|
|
|
|
} else {
|
|
|
|
// Develop mode, show all notices and errors on Console (and log it)
|
|
|
|
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
|
|
|
error_reporting(E_ALL & ~E_DEPRECATED);
|
|
|
|
} else {
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
}
|
|
|
|
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('log_errors', 1);
|
|
|
|
ini_set('error_log', $config['homedir'].'/pandora_console.log');
|
2010-01-22 13:51:13 +01:00
|
|
|
}
|
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
|
|
|
|
2017-02-16 10:18:08 +01:00
|
|
|
// Check if mysqli is available
|
2019-01-30 16:18:44 +01:00
|
|
|
if (!(isset($config['mysqli']))) {
|
|
|
|
$config['mysqli'] = extension_loaded('mysqli');
|
2017-02-16 11:35:26 +01:00
|
|
|
}
|
2017-02-16 10:18:08 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['start_time'] = microtime(true);
|
2009-02-26 13:09:21 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$ownDir = dirname(__FILE__).'/';
|
|
|
|
$ownDir = str_replace('\\', '/', $ownDir);
|
2010-05-06 14:48:31 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// Set by default the MySQL connection for DB, because in older Pandora have not
|
|
|
|
// this token in the config.php
|
2011-09-02 12:13:06 +02:00
|
|
|
if (!isset($config['dbtype'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['dbtype'] = 'mysql';
|
2011-09-02 12:13:06 +02:00
|
|
|
}
|
|
|
|
|
2012-04-20 Kikuchi Koichiro <koichiro@rworks.jp>
* extensions/update_manager.php,
extensions/update_manager/sql/update_manager.sql,
extensions/update_manager/sql/update_manager.postgreSQL.sql,
extensions/update_manager/sql/update_manager.oracle.sql,
extensions/update_manager/lib/libupdate_manager_client.php,
extensions/update_manager/lib/libupdate_manager.php,
include/db/postgresql.php,
include/db/oracle.php,
include/db/mysql.php,
include/functions_config.php,
include/config_process.php,
include/functions_db.php: Now pandora_console support DB
running on non-standard port.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6055 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-20 09:18:01 +02:00
|
|
|
if (!isset($config['dbport'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
switch ($config['dbtype']) {
|
|
|
|
case 'mysql':
|
|
|
|
$config['dbport'] = '3306';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'postgresql':
|
|
|
|
$config['dbport'] = '5432';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'oracle':
|
|
|
|
$config['dbport'] = '1521';
|
|
|
|
break;
|
|
|
|
}
|
2012-04-20 Kikuchi Koichiro <koichiro@rworks.jp>
* extensions/update_manager.php,
extensions/update_manager/sql/update_manager.sql,
extensions/update_manager/sql/update_manager.postgreSQL.sql,
extensions/update_manager/sql/update_manager.oracle.sql,
extensions/update_manager/lib/libupdate_manager_client.php,
extensions/update_manager/lib/libupdate_manager.php,
include/db/postgresql.php,
include/db/oracle.php,
include/db/mysql.php,
include/functions_config.php,
include/config_process.php,
include/functions_db.php: Now pandora_console support DB
running on non-standard port.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6055 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-04-20 09:18:01 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once $ownDir.'constants.php';
|
|
|
|
require_once $ownDir.'functions_db.php';
|
|
|
|
require_once $ownDir.'functions.php';
|
2011-02-14 13:27:30 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// We need a timezone BEFORE calling config_process_config.
|
2012-12-10 01:05:09 +01:00
|
|
|
// If not we will get ugly warnings. Set Europe/Madrid by default
|
|
|
|
// Later will be replaced by the good one.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (!is_dir($_SERVER['DOCUMENT_ROOT'].$config['homeurl']) || !is_dir($_SERVER['DOCUMENT_ROOT'].$config['homeurl_static'])) {
|
|
|
|
$url = explode('/', $_SERVER['REQUEST_URI']);
|
|
|
|
$flag_url = 0;
|
|
|
|
foreach ($url as $key => $value) {
|
|
|
|
if (strpos($value, 'index.php') !== false || $flag_url) {
|
|
|
|
$flag_url = 1;
|
|
|
|
unset($url[$key]);
|
|
|
|
} else if (strpos($value, 'enterprise') !== false || $flag_url) {
|
|
|
|
$flag_url = 1;
|
|
|
|
unset($url[$key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$config['homeurl'] = rtrim(join('/', $url), '/');
|
|
|
|
$config['homeurl_static'] = $config['homeurl'];
|
|
|
|
$config['error'] = 'homeurl_bad_defined';
|
|
|
|
return;
|
2017-03-22 15:26:54 +01:00
|
|
|
}
|
2017-06-08 11:26:16 +02:00
|
|
|
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (!isset($config['homeurl_static'])) {
|
|
|
|
$config['homeurl_static'] = $config['homeurl'];
|
|
|
|
} else {
|
|
|
|
if ($config['homeurl_static'] != $config['homeurl']) {
|
|
|
|
$url = explode('/', $_SERVER['REQUEST_URI']);
|
|
|
|
$flag_url = 0;
|
|
|
|
foreach ($url as $key => $value) {
|
|
|
|
if (strpos($value, 'index.php') !== false || $flag_url) {
|
|
|
|
$flag_url = 1;
|
|
|
|
unset($url[$key]);
|
|
|
|
} else if (strpos($value, 'enterprise') !== false || $flag_url) {
|
|
|
|
$flag_url = 1;
|
|
|
|
unset($url[$key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$config['homeurl'] = rtrim(join('/', $url), '/');
|
|
|
|
$config['homeurl_static'] = $config['homeurl'];
|
|
|
|
$config['error'] = 'homeurl_bad_defined';
|
|
|
|
return;
|
|
|
|
}
|
2017-03-22 15:26:54 +01:00
|
|
|
}
|
2012-12-10 01:05:09 +01:00
|
|
|
|
2017-05-11 15:44:18 +02:00
|
|
|
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (! defined('EXTENSIONS_DIR')) {
|
|
|
|
define('EXTENSIONS_DIR', 'extensions');
|
|
|
|
}
|
2017-05-11 15:44:18 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (! defined('ENTERPRISE_DIR')) {
|
|
|
|
define('ENTERPRISE_DIR', 'enterprise');
|
|
|
|
}
|
2017-05-11 15:44:18 +02:00
|
|
|
|
2019-11-11 13:33:37 +01:00
|
|
|
db_select_engine();
|
|
|
|
$config['dbconnection'] = db_connect();
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once $ownDir.'functions_config.php';
|
2017-05-11 15:44:18 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
date_default_timezone_set('Europe/Madrid');
|
2012-12-10 01:05:09 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
//
|
|
|
|
// PLEASE DO NOT CHANGE ORDER //////
|
|
|
|
//
|
|
|
|
require_once $config['homedir'].'/include/load_session.php';
|
2017-06-07 09:31:46 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (session_status() === PHP_SESSION_NONE) {
|
|
|
|
session_start();
|
|
|
|
}
|
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
|
|
|
|
2018-11-20 18:07:43 +01:00
|
|
|
config_process_config();
|
2015-04-13 11:27:23 +02:00
|
|
|
config_prepare_session();
|
|
|
|
|
2018-11-21 09:36:37 +01:00
|
|
|
// Set a the system timezone default
|
2019-01-30 16:18:44 +01:00
|
|
|
if ((!isset($config['timezone'])) or ($config['timezone'] == '')) {
|
|
|
|
$config['timezone'] = 'Europe/Berlin';
|
2011-08-19 18:25:39 +02:00
|
|
|
}
|
2012-12-10 01:05:09 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
date_default_timezone_set($config['timezone']);
|
2011-08-19 18:25:39 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once $ownDir.'streams.php';
|
|
|
|
require_once $ownDir.'gettext.php';
|
2009-03-12 10:20:49 +01:00
|
|
|
|
2010-10-11 12:37:34 +02:00
|
|
|
if (isset($_SERVER['REMOTE_ADDR'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['remote_addr'] = $_SERVER['REMOTE_ADDR'];
|
|
|
|
} else {
|
|
|
|
$config['remote_addr'] = null;
|
2010-10-11 12:37:34 +02:00
|
|
|
}
|
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
|
|
|
|
2011-08-11 20:06:54 +02:00
|
|
|
// Save the global values
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['global_block_size'] = $config['block_size'];
|
2015-01-19 14:35:56 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if (isset($config['id_user'])) {
|
|
|
|
config_user_set_custom_config();
|
|
|
|
}
|
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
|
|
|
|
2013-01-04 12:30:55 +01:00
|
|
|
// Check if inventory_changes_blacklist is setted, if not create it
|
|
|
|
if (!isset($config['inventory_changes_blacklist'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['inventory_changes_blacklist'] = [];
|
2013-01-04 12:30:55 +01:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// NEW UPDATE MANAGER URL
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
if (!isset($config['url_update_manager'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
config_update_value(
|
|
|
|
'url_update_manager',
|
|
|
|
'https://licensing.artica.es/pandoraupdate7/server.php'
|
|
|
|
);
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
}
|
|
|
|
|
2013-01-15 19:13:04 +01:00
|
|
|
if (defined('METACONSOLE')) {
|
2019-01-30 16:18:44 +01:00
|
|
|
enterprise_include_once('meta/include/functions_users_meta.php');
|
|
|
|
enterprise_hook('set_meta_user_language');
|
|
|
|
} else {
|
|
|
|
set_user_language();
|
2013-01-15 19:13:04 +01:00
|
|
|
}
|
2009-03-12 10:20:49 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once $ownDir.'functions_extensions.php';
|
2008-08-04 10:15:16 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['extensions'] = extensions_get_extensions();
|
2008-08-12 Esteban Sanchez <estebans@artica.es>
* pandoradb_data.sql: Added default languages.
* include/streams.php, include/gettext.php: Added to repository. New
files to add gettext support of mo files.
* include/functions_db.php: Function lang_string() functionallity
changed to use gettext library.
* include/languages/language_es_es.php,
include/languages/language_gl.php, include/languages/language_en.php,
include/languages/language_pt_br.php,
include/languages/language_it.php,
include/languages/language_ast_es.php,
include/languages/language_es_la.php,
include/languages/language_de.php, include/languages/language_fr.php,
include/languages/language_ca.php: Files deleted, they are
deprecated since we have moved to gettext.
* lude/languages/pt_br.mo, include/languages/es.mo,
include/languages/fr.po, include/languages/it.po,
include/languages/ca.po, include/languages/ast.po,
include/languages/de.po, include/languages/gl.mo: Gettext translations
of the previous languages we have in language_*.php files.
* include/languages/Makefile: Added to repository to generate
index.pot and mo files of each translation.
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/config_process.php,
include/functions.php, include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/sla_view.php, operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, general/logoff.php,
general/pandora_help.php, general/footer.php, general/noaccess.php,
general/logon_failed.php, general/links_menu.php,
general/login_page.php, general/logon_ok.php, general/header.php,
general/main_menu.php, godmode/groups/configure_group.php,
godmode/groups/group_list.php, godmode/setup/news.php,
godmode/setup/links.php, godmode/setup/setup.php,
godmode/users/user_list.php, godmode/users/configure_user.php,
godmode/profiles/profile_list.php, godmode/admin_access_logs.php,
godmode/db/db_info_data.php, godmode/db/db_main.php,
godmode/db/db_audit.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced string parameters of __() callings to
plain english. Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
|
|
|
|
2010-02-10 18:10:10 +01:00
|
|
|
// Detect if enterprise extension is installed
|
|
|
|
// NOTICE: This variable (config[enterprise_installed] is used in several
|
|
|
|
// sections. Faking or forcing to 1 will make pandora fails.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (file_exists($config['homedir'].'/'.ENTERPRISE_DIR.'/index.php')) {
|
|
|
|
$config['enterprise_installed'] = 1;
|
|
|
|
enterprise_include_once('include/functions_enterprise.php');
|
|
|
|
} else {
|
|
|
|
$config['enterprise_installed'] = 0;
|
2010-02-22 20:03:55 +01:00
|
|
|
}
|
2010-02-10 18:10:10 +01:00
|
|
|
|
2011-06-10 12:19:04 +02:00
|
|
|
// Function include_graphs_dependencies() it's called in the code below
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include_graph_dependencies.php';
|
2011-06-10 12:19:04 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
include_graphs_dependencies($config['homedir'].'/');
|
2011-05-16 18:52:12 +02:00
|
|
|
|
2011-11-14 10:02:54 +01:00
|
|
|
// Updates autorefresh time
|
2014-05-30 12:51:33 +02:00
|
|
|
if (isset($_POST['vc_refr'])) {
|
2019-01-30 16:18:44 +01:00
|
|
|
config_update_value('vc_refr', get_parameter('vc_refr', $config['vc_refr']));
|
2011-11-14 10:02:54 +01:00
|
|
|
}
|
|
|
|
|
2012-09-28 16:06:20 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// ======= Autorefresh code =============================================
|
|
|
|
if (isset($config['id_user'])) {
|
|
|
|
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'");
|
|
|
|
if (isset($select[0]['value'])) {
|
|
|
|
$autorefresh_list = json_decode($select[0]['value']);
|
|
|
|
} else {
|
|
|
|
$autorefresh_list = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
$config['autorefresh_white_list'] = [];
|
|
|
|
$config['autorefresh_white_list'] = $autorefresh_list;
|
|
|
|
} else {
|
|
|
|
$config['autorefresh_white_list'] = null;
|
2018-10-15 10:32:24 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2013-06-06 17:57:11 +02:00
|
|
|
// Specific metaconsole autorefresh white list sections
|
|
|
|
if (defined('METACONSOLE')) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['autorefresh_white_list'][] = 'monitoring/tactical';
|
|
|
|
$config['autorefresh_white_list'][] = 'monitoring/group_view';
|
|
|
|
$config['autorefresh_white_list'][] = 'operation/tree';
|
|
|
|
$config['autorefresh_white_list'][] = 'screens/screens';
|
2013-06-06 17:57:11 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
2012-09-28 16:06:20 +02:00
|
|
|
// Update the $config['homeurl'] with the full url with the special
|
|
|
|
// cases (reverse proxy, others ports...).
|
2019-01-30 16:18:44 +01:00
|
|
|
// ======================================================================
|
|
|
|
$config['homeurl'] = ui_get_full_url(false);
|
2014-07-23 18:59:05 +02:00
|
|
|
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
// ======================================================================
|
2014-07-23 18:59:05 +02:00
|
|
|
// Get the version of DB manager
|
2019-01-30 16:18:44 +01:00
|
|
|
// ======================================================================
|
|
|
|
switch ($config['dbtype']) {
|
|
|
|
case 'mysql':
|
|
|
|
if (!isset($config['quote_string'])) {
|
|
|
|
$config['db_quote_string'] = '"';
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'postgresql':
|
|
|
|
if (!isset($config['dbversion'])) {
|
|
|
|
$result = db_get_sql('select version();');
|
|
|
|
$result_chunks = explode(' ', $result);
|
|
|
|
|
|
|
|
$config['dbversion'] = $result_chunks[1];
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($config['quote_string'])) {
|
|
|
|
$config['db_quote_string'] = "'";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'oracle':
|
|
|
|
if (!isset($config['quote_string'])) {
|
|
|
|
$config['db_quote_string'] = "'";
|
|
|
|
}
|
|
|
|
break;
|
2014-07-23 18:59:05 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
// ======================================================================
|
2019-03-27 14:39:02 +01:00
|
|
|
// Menu display mode.
|
|
|
|
if ($_SESSION['menu_type']) {
|
|
|
|
$config['menu_type'] = $_SESSION['menu_type'];
|
|
|
|
} else {
|
|
|
|
$config['menu_type'] = 'classic';
|
|
|
|
}
|