2009-03-05 13:52:59 +01:00
< ? php
2009-06-08 20:26:14 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
2011-03-02 22:56:48 +01:00
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
2009-03-05 13:52:59 +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
2009-03-05 13:52:59 +01:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2009-06-08 20:26:14 +02:00
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2009-03-05 13:52:59 +01:00
// GNU General Public License for more details.
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
/**
* @ 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
*/
2009-03-05 13:52:59 +01:00
/**
* Creates a single config value in the database .
*
* @ param string Config token to create .
* @ param string Value to set .
*
* @ return bool Config id if success . False on failure .
*/
2011-04-15 14:03:19 +02:00
function config_create_value ( $token , $value ) {
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
return db_process_sql_insert ( 'tconfig' ,
2009-03-05 13:52:59 +01:00
array ( 'value' => $value ,
'token' => $token ));
}
/**
* Update a single config value in the database .
*
* If the config token doesn 't exists, it' s created .
*
* @ param string Config token to update .
* @ param string New value to set .
*
* @ return bool True if success . False on failure .
*/
2011-04-15 14:03:19 +02:00
function config_update_value ( $token , $value ) {
2009-03-05 13:52:59 +01:00
global $config ;
2015-06-26 10:31:09 +02:00
// Include functions_io to can call __() function
include_once ( $config [ 'homedir' ] . '/include/functions_io.php' );
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
if ( $token == 'list_ACL_IPs_for_API' ) {
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
$value = str_replace ( array ( " \r \n " , " \r " , " \n " ), " ; " ,
io_safe_output ( $value ));
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
}
2015-07-28 16:10:45 +02:00
if ( $token == 'default_assign_tags' ) {
$value = ( $value );
}
2012-06-08 09:57:53 +02:00
if ( ! isset ( $config [ $token ])) {
$config [ $token ] = $value ;
2015-06-22 10:30:57 +02:00
return ( bool ) config_create_value ( $token , io_safe_input ( $value ));
2009-10-26 17:35:34 +01:00
}
2012-06-08 09:57:53 +02:00
/* If it has not changed */
if ( $config [ $token ] == $value )
return true ;
$config [ $token ] = $value ;
2015-06-22 10:30:57 +02:00
$value = io_safe_output ( $value );
2012-06-08 09:57:53 +02:00
2013-02-27 15:25:24 +01:00
$result = db_process_sql_update ( 'tconfig' ,
2015-06-22 10:30:57 +02:00
array ( 'value' => io_safe_input ( $value )),
2012-06-08 09:57:53 +02:00
array ( 'token' => $token ));
2013-02-27 15:25:24 +01:00
if ( $result === 0 )
return true ;
else
return ( bool ) $result ;
2009-03-05 13:52:59 +01:00
}
/**
2009-04-13 18:13:55 +02:00
* Updates all config values in case setup page was invoked
2009-03-05 13:52:59 +01:00
*/
2011-04-15 14:03:19 +02:00
function config_update_config () {
2009-03-05 13:52:59 +01:00
global $config ;
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
2013-02-27 19:16:49 +01:00
// Include functions_io to can call __() function
include_once ( $config [ 'homedir' ] . '/include/functions_io.php' );
2013-05-20 11:51:12 +02:00
2009-03-05 13:52:59 +01:00
/* If user is not even log it, don't try this */
2013-02-27 15:25:24 +01:00
if ( ! isset ( $config [ 'id_user' ])) {
$config [ 'error_config_update_config' ] = array ();
$config [ 'error_config_update_config' ][ 'correct' ] = false ;
$config [ 'error_config_update_config' ][ 'message' ] = __ ( 'Failed updated: User did not login.' );
2009-03-05 13:52:59 +01:00
return false ;
2013-02-27 15:25:24 +01:00
}
2009-03-05 13:52:59 +01:00
2013-02-27 15:25:24 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , " PM " ) && ! is_user_admin ( $config [ 'id_user' ])) {
$config [ 'error_config_update_config' ] = array ();
$config [ 'error_config_update_config' ][ 'correct' ] = false ;
$config [ 'error_config_update_config' ][ 'message' ] = __ ( 'Failed updated: User is not admin.' );
2009-03-05 13:52:59 +01:00
return false ;
2013-02-27 15:25:24 +01:00
}
2009-03-05 13:52:59 +01:00
$update_config = ( bool ) get_parameter ( 'update_config' );
2012-03-14 18:51:39 +01:00
if ( $update_config ) {
db_pandora_audit ( " Setup " , " Setup has changed " );
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php,
include/functions_groups.php, include/functions_visual_map.php,
include/ajax/reporting.ajax.php, include/functions_config.php,
include/functions_ui.php, include/functions.php,
extensions/agents_modules.php, extensions/module_groups.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/integria_incidents/incident.incident.php,
operation/integria_incidents/incident.php: a lot of fixes in
relation with entities and clean source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-13 17:29:00 +02:00
}
else {
2013-02-27 15:25:24 +01:00
//Do none
2009-04-13 18:13:55 +02:00
return false ;
2012-03-14 18:51:39 +01:00
}
2009-03-05 13:52:59 +01:00
2013-02-27 15:25:24 +01:00
$error_update = array ();
2012-06-18 13:10:57 +02:00
$sec2 = get_parameter_get ( 'sec2' );
2013-02-27 15:25:24 +01:00
switch ( $sec2 ) {
2012-06-18 13:10:57 +02:00
case 'godmode/setup/setup' :
2013-01-18 18:41:00 +01:00
$section_setup = get_parameter ( 'section' );
2012-06-18 13:10:57 +02:00
//////// MAIN SETUP
2013-01-18 18:41:00 +01:00
// Setup now is divided in different tabs
switch ( $section_setup ) {
case 'general' :
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'language' , ( string ) get_parameter ( 'language' )))
$error_update [] = __ ( 'Language code for Pandora' );
2015-06-22 10:30:57 +02:00
if ( ! config_update_value ( 'remote_config' , ( string ) get_parameter ( 'remote_config' )))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Remote config directory' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'loginhash_pwd' , io_input_password (( string ) get_parameter ( 'loginhash_pwd' ))))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Auto login (hash) password' );
if ( ! config_update_value ( 'timesource' , ( string ) get_parameter ( 'timesource' )))
$error_update [] = __ ( 'Time source' );
if ( ! config_update_value ( 'autoupdate' , ( bool ) get_parameter ( 'autoupdate' )))
$error_update [] = __ ( 'Automatic check for updates' );
2016-08-26 12:41:34 +02:00
if ( ! config_update_value ( 'cert_path' , ( bool ) get_parameter ( 'cert_path' )))
$error_update [] = __ ( 'SSL cert path' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'https' , ( bool ) get_parameter ( 'https' )))
$error_update [] = __ ( 'Enforce https' );
2016-08-26 12:41:34 +02:00
if ( ! config_update_value ( 'use_cert' , ( bool ) get_parameter ( 'use_cert' )))
$error_update [] = __ ( 'Use cert.' );
2015-06-22 10:30:57 +02:00
if ( ! config_update_value ( 'attachment_store' , ( string ) get_parameter ( 'attachment_store' )))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Attachment store' );
if ( ! config_update_value ( 'list_ACL_IPs_for_API' , ( string ) get_parameter ( 'list_ACL_IPs_for_API' )))
$error_update [] = __ ( 'IP list with API access' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'api_password' , io_input_password ( get_parameter ( 'api_password' ))))
$error_update [] = __ ( 'API password' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'activate_gis' , ( bool ) get_parameter ( 'activate_gis' )))
$error_update [] = __ ( 'Enable GIS features in Pandora Console' );
if ( ! config_update_value ( 'integria_enabled' , get_parameter ( 'integria_enabled' )))
$error_update [] = __ ( 'Enable Integria incidents in Pandora Console' );
if ( ! config_update_value ( 'integria_inventory' , get_parameter ( 'integria_inventory' )))
$error_update [] = __ ( 'Integria inventory' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'integria_api_password' , io_input_password ( get_parameter ( 'integria_api_password' ))))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Integria API password' );
if ( ! config_update_value ( 'integria_url' , get_parameter ( 'integria_url' )))
$error_update [] = __ ( 'Integria URL' );
if ( ! config_update_value ( 'activate_netflow' , ( bool ) get_parameter ( 'activate_netflow' )))
$error_update [] = __ ( 'Enable Netflow' );
2013-01-18 18:41:00 +01:00
$timezone = ( string ) get_parameter ( 'timezone' );
if ( $timezone != " " ) {
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'timezone' , $timezone ))
$error_update [] = __ ( 'Timezone setup' );
2013-01-18 18:41:00 +01:00
}
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'sound_alert' , get_parameter ( 'sound_alert' )))
$error_update [] = __ ( 'Sound for Alert fired' );
if ( ! config_update_value ( 'sound_critical' , get_parameter ( 'sound_critical' )))
$error_update [] = __ ( 'Sound for Monitor critical' );
if ( ! config_update_value ( 'sound_warning' , get_parameter ( 'sound_warning' )))
$error_update [] = __ ( 'Sound for Monitor warning' );
2013-01-18 18:41:00 +01:00
# Update of Pandora FMS license
$update_manager_installed = db_get_value ( 'value' , 'tconfig' , 'token' , 'update_manager_installed' );
if ( $update_manager_installed == 1 ) {
$license_info_key = get_parameter ( 'license_info_key' , '' );
if ( ! empty ( $license_info_key )) {
2015-08-31 17:51:59 +02:00
$values = array ( db_escape_key_identifier ( 'value' ) => $license_info_key );
2015-06-25 16:16:01 +02:00
$where = array ( db_escape_key_identifier ( 'key' ) => 'customer_key' );
2013-01-18 18:41:00 +01:00
$update_manage_settings_result = db_process_sql_update ( 'tupdate_settings' , $values , $where );
2013-02-28 11:17:39 +01:00
if ( $update_manage_settings_result === false )
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'License information' );
2013-01-18 18:41:00 +01:00
}
}
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'public_url' , get_parameter ( 'public_url' )))
$error_update [] = __ ( 'Public URL' );
if ( ! config_update_value ( 'referer_security' , get_parameter ( 'referer_security' )))
$error_update [] = __ ( 'Referer security' );
if ( ! config_update_value ( 'event_storm_protection' , get_parameter ( 'event_storm_protection' )))
$error_update [] = __ ( 'Event storm protection' );
if ( ! config_update_value ( 'command_snapshot' , get_parameter ( 'command_snapshot' )))
$error_update [] = __ ( 'Command Snapshot' );
2014-05-27 19:05:37 +02:00
if ( ! config_update_value ( 'server_log_dir' , get_parameter ( 'server_log_dir' )))
$error_update [] = __ ( 'Server logs directory' );
2014-08-12 11:36:05 +02:00
if ( ! config_update_value ( 'tutorial_mode' , get_parameter ( 'tutorial_mode' )))
$error_update [] = __ ( 'Tutorial mode' );
2014-09-11 11:42:57 +02:00
if ( ! config_update_value ( 'past_planned_downtimes' , get_parameter ( 'past_planned_downtimes' )))
$error_update [] = __ ( 'Allow create planned downtimes in the past' );
2015-02-04 11:18:34 +01:00
if ( ! config_update_value ( 'limit_parameters_massive' , get_parameter ( 'limit_parameters_massive' )))
$error_update [] = __ ( 'Limit parameters massive' );
2016-06-08 13:51:34 +02:00
if ( ! config_update_value ( 'identification_reminder' , get_parameter ( 'identification_reminder' )))
$error_update [] = __ ( 'Identification_reminder' );
2016-07-04 15:46:56 +02:00
if ( ! config_update_value ( 'include_agents' , ( bool ) get_parameter ( 'include_agents' )))
$error_update [] = __ ( 'Include_agents' );
2016-07-05 16:53:40 +02:00
if ( ! config_update_value ( 'auditdir' , get_parameter ( 'auditdir' )))
$error_update [] = __ ( 'Audit log directory' );
2013-01-18 18:41:00 +01:00
break ;
case 'enterprise' :
if ( isset ( $config [ 'enterprise_installed' ]) && $config [ 'enterprise_installed' ] == 1 ) {
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'trap2agent' , ( string ) get_parameter ( 'trap2agent' )))
$error_update [] = __ ( 'Forward SNMP traps to agent (if exist)' );
if ( ! config_update_value ( 'acl_enterprise' , get_parameter ( 'acl_enterprise' )))
$error_update [] = __ ( 'Use Enterprise ACL System' );
if ( ! config_update_value ( 'metaconsole' , get_parameter ( 'metaconsole' )))
$error_update [] = __ ( 'Activate Metaconsole' );
if ( ! config_update_value ( 'collection_max_size' , get_parameter ( 'collection_max_size' )))
$error_update [] = __ ( 'Size of collection' );
if ( ! config_update_value ( 'event_replication' , ( int ) get_parameter ( 'event_replication' )))
$error_update [] = __ ( 'Events replication' );
2013-01-18 18:41:00 +01:00
if (( int ) get_parameter ( 'event_replication' ) == 1 ) {
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'replication_interval' , ( int ) get_parameter ( 'replication_interval' )))
$error_update [] = __ ( 'Replication interval' );
2015-11-18 15:23:50 +01:00
if ( ! config_update_value ( 'replication_limit' , ( int ) get_parameter ( 'replication_limit' )))
$error_update [] = __ ( 'Replication limit' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'replication_mode' , ( string ) get_parameter ( 'replication_mode' )))
$error_update [] = __ ( 'Replication mode' );
2013-04-16 12:10:44 +02:00
if ( ! config_update_value ( 'show_events_in_local' , ( string ) get_parameter ( 'show_events_in_local' )))
$error_update [] = __ ( 'Show events list in local console (read only)' );
2013-01-18 18:41:00 +01:00
}
2015-06-08 10:43:36 +02:00
if ( ! config_update_value ( 'replication_dbengine' , ( string ) get_parameter ( 'replication_dbengine' )))
$error_update [] = __ ( 'Replication DB engine' );
2015-04-06 15:26:26 +02:00
if ( ! config_update_value ( 'replication_dbhost' , ( string ) get_parameter ( 'replication_dbhost' )))
$error_update [] = __ ( 'Replication DB host' );
if ( ! config_update_value ( 'replication_dbname' , ( string ) get_parameter ( 'replication_dbname' )))
$error_update [] = __ ( 'Replication DB database' );
if ( ! config_update_value ( 'replication_dbuser' , ( string ) get_parameter ( 'replication_dbuser' )))
$error_update [] = __ ( 'Replication DB user' );
if ( ! config_update_value ( 'replication_dbpass' , io_input_password (( string ) get_parameter ( 'replication_dbpass' ))))
$error_update [] = __ ( 'Replication DB password' );
if ( ! config_update_value ( 'replication_dbport' , ( string ) get_parameter ( 'replication_dbport' )))
$error_update [] = __ ( 'Replication DB port' );
if ( ! config_update_value ( 'metaconsole_agent_cache' , ( int ) get_parameter ( 'metaconsole_agent_cache' )))
$error_update [] = __ ( 'Metaconsole agent cache' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'log_collector' , ( bool ) get_parameter ( 'log_collector' )))
$error_update [] = __ ( 'Activate Log Collector' );
2013-02-12 17:50:08 +01:00
$inventory_changes_blacklist = get_parameter ( 'inventory_changes_blacklist' , array ());
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'inventory_changes_blacklist' , implode ( ',' , $inventory_changes_blacklist )))
$error_update [] = __ ( 'Inventory changes blacklist' );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
}
break ;
case 'pass' :
2013-01-18 18:41:00 +01:00
if ( isset ( $config [ 'enterprise_installed' ]) && $config [ 'enterprise_installed' ] == 1 ) {
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'enable_pass_policy' , get_parameter ( 'enable_pass_policy' )))
$error_update [] = __ ( 'Enable password policy' );
if ( ! config_update_value ( 'pass_size' , get_parameter ( 'pass_size' )))
$error_update [] = __ ( 'Min. size password' );
if ( ! config_update_value ( 'pass_expire' , get_parameter ( 'pass_expire' )))
$error_update [] = __ ( 'Password expiration' );
if ( ! config_update_value ( 'first_login' , get_parameter ( 'first_login' )))
$error_update [] = __ ( 'Force change password on first login' );
if ( ! config_update_value ( 'mins_fail_pass' , get_parameter ( 'mins_fail_pass' )))
$error_update [] = __ ( 'User blocked if login fails' );
if ( ! config_update_value ( 'number_attempts' , get_parameter ( 'number_attempts' )))
$error_update [] = __ ( 'Number of failed login attempts' );
if ( ! config_update_value ( 'pass_needs_numbers' , get_parameter ( 'pass_needs_numbers' )))
$error_update [] = __ ( 'Password must have numbers' );
if ( ! config_update_value ( 'pass_needs_symbols' , get_parameter ( 'pass_needs_symbols' )))
$error_update [] = __ ( 'Password must have symbols' );
if ( ! config_update_value ( 'enable_pass_policy_admin' , get_parameter ( 'enable_pass_policy_admin' )))
$error_update [] = __ ( 'Apply password policy to admin users' );
if ( ! config_update_value ( 'enable_pass_history' , get_parameter ( 'enable_pass_history' )))
$error_update [] = __ ( 'Enable password history' );
if ( ! config_update_value ( 'compare_pass' , get_parameter ( 'compare_pass' )))
$error_update [] = __ ( 'Compare previous password' );
2013-01-18 18:41:00 +01:00
}
break ;
case 'auth' :
//////// AUTHENTICATION SETUP
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'auth' , get_parameter ( 'auth' )))
$error_update [] = __ ( 'Authentication method' );
if ( ! config_update_value ( 'autocreate_remote_users' , get_parameter ( 'autocreate_remote_users' )))
$error_update [] = __ ( 'Autocreate remote users' );
if ( ! config_update_value ( 'default_remote_profile' , get_parameter ( 'default_remote_profile' )))
$error_update [] = __ ( 'Autocreate profile' );
if ( ! config_update_value ( 'default_remote_group' , get_parameter ( 'default_remote_group' )))
$error_update [] = __ ( 'Autocreate profile group' );
2015-07-28 16:10:45 +02:00
if ( ! config_update_value ( 'default_assign_tags' , implode ( " , " , get_parameter ( 'default_assign_tags' ))))
$error_update [] = __ ( 'Autocreate profile tags' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'autocreate_blacklist' , get_parameter ( 'autocreate_blacklist' )))
$error_update [] = __ ( 'Autocreate blacklist' );
2013-01-18 18:41:00 +01:00
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'ad_server' , get_parameter ( 'ad_server' )))
$error_update [] = __ ( 'Active directory server' );
if ( ! config_update_value ( 'ad_port' , get_parameter ( 'ad_port' )))
$error_update [] = __ ( 'Active directory port' );
if ( ! config_update_value ( 'ad_start_tls' , get_parameter ( 'ad_start_tls' )))
$error_update [] = __ ( 'Start TLS' );
2015-07-28 16:10:45 +02:00
if ( ! config_update_value ( 'ad_advanced_config' , get_parameter ( 'ad_advanced_config' )))
2017-03-14 16:17:13 +01:00
$error_update [] = __ ( 'Advanced Config AD' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'ad_domain' , get_parameter ( 'ad_domain' )))
$error_update [] = __ ( 'Domain' );
2015-07-28 16:10:45 +02:00
if ( ! config_update_value ( 'ad_adv_perms' , get_parameter ( 'ad_adv_perms' )))
$error_update [] = __ ( 'Advanced Permisions AD' );
2013-01-18 18:41:00 +01:00
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'ldap_server' , get_parameter ( 'ldap_server' )))
$error_update [] = __ ( 'LDAP server' );
if ( ! config_update_value ( 'ldap_port' , get_parameter ( 'ldap_port' )))
$error_update [] = __ ( 'LDAP port' );
if ( ! config_update_value ( 'ldap_version' , get_parameter ( 'ldap_version' )))
$error_update [] = __ ( 'LDAP version' );
if ( ! config_update_value ( 'ldap_start_tls' , get_parameter ( 'ldap_start_tls' )))
$error_update [] = __ ( 'Start TLS' );
if ( ! config_update_value ( 'ldap_base_dn' , get_parameter ( 'ldap_base_dn' )))
$error_update [] = __ ( 'Base DN' );
if ( ! config_update_value ( 'ldap_login_attr' , get_parameter ( 'ldap_login_attr' )))
$error_update [] = __ ( 'Login attribute' );
2014-03-30 13:30:46 +02:00
if ( ! config_update_value ( 'fallback_local_auth' , get_parameter ( 'fallback_local_auth' )))
$error_update [] = __ ( 'Fallback to local authentication' );
2013-01-18 18:41:00 +01:00
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'rpandora_server' , get_parameter ( 'rpandora_server' )))
2016-01-25 11:34:11 +01:00
$error_update [] = __ ( 'MySQL host' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'rpandora_port' , get_parameter ( 'rpandora_port' )))
$error_update [] = __ ( 'MySQL port' );
if ( ! config_update_value ( 'rpandora_dbname' , get_parameter ( 'rpandora_dbname' )))
$error_update [] = __ ( 'Database name' );
if ( ! config_update_value ( 'rpandora_user' , get_parameter ( 'rpandora_user' )))
$error_update [] = __ ( 'User' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'rpandora_pass' , io_input_password ( get_parameter ( 'rpandora_pass' ))))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Password' );
2013-01-18 18:41:00 +01:00
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'rbabel_server' , get_parameter ( 'rbabel_server' )))
$error_update [] = __ ( 'Babel Enterprise host' );
if ( ! config_update_value ( 'rbabel_port' , get_parameter ( 'rbabel_port' )))
$error_update [] = __ ( 'MySQL port' );
if ( ! config_update_value ( 'rbabel_dbname' , get_parameter ( 'rbabel_dbname' )))
$error_update [] = __ ( 'Database name' );
if ( ! config_update_value ( 'rbabel_user' , get_parameter ( 'rbabel_user' )))
$error_update [] = __ ( 'User' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'rbabel_pass' , io_input_password ( get_parameter ( 'rbabel_pass' ))))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Password' );
if ( ! config_update_value ( 'rintegria_server' , get_parameter ( 'rintegria_server' )))
$error_update [] = __ ( 'Integria host' );
if ( ! config_update_value ( 'rintegria_port' , get_parameter ( 'rintegria_port' )))
$error_update [] = __ ( 'MySQL port' );
if ( ! config_update_value ( 'rintegria_dbname' , get_parameter ( 'rintegria_dbname' )))
$error_update [] = __ ( 'Database name' );
if ( ! config_update_value ( 'rintegria_user' , get_parameter ( 'rintegria_user' )))
$error_update [] = __ ( 'User' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'rintegria_pass' , io_input_password ( get_parameter ( 'rintegria_pass' ))))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Password' );
2016-09-08 17:36:56 +02:00
if ( ! config_update_value ( 'saml_path' , get_parameter ( 'saml_path' )))
$error_update [] = __ ( 'Saml path' );
2014-12-11 16:12:27 +01:00
if ( ! config_update_value ( 'double_auth_enabled' , get_parameter ( 'double_auth_enabled' )))
$error_update [] = __ ( 'Double authentication' );
2015-04-13 11:27:23 +02:00
if ( ! config_update_value ( 'session_timeout' , get_parameter ( 'session_timeout' )))
$error_update [] = __ ( 'Session timeout' );
2013-01-18 18:41:00 +01:00
/////////////
break ;
case 'perf' :
//////// PERFORMANCE SETUP
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'event_purge' , get_parameter ( 'event_purge' )))
$error_update [] =
2013-01-18 18:41:00 +01:00
$check_metaconsole_events_history = get_parameter ( 'metaconsole_events_history' , - 1 );
2013-02-27 15:25:24 +01:00
if ( $check_metaconsole_events_history != - 1 )
if ( ! config_update_value ( 'metaconsole_events_history' , get_parameter ( 'metaconsole_events_history' )))
$error_update [] = __ ( 'Max. days before delete events' );
if ( ! config_update_value ( 'trap_purge' , get_parameter ( 'trap_purge' )))
$error_update [] = __ ( 'Max. days before delete traps' );
if ( ! config_update_value ( 'string_purge' , get_parameter ( 'string_purge' )))
$error_update [] = __ ( 'Max. days before delete string data' );
if ( ! config_update_value ( 'audit_purge' , get_parameter ( 'audit_purge' )))
$error_update [] = __ ( 'Max. days before delete audit events' );
if ( ! config_update_value ( 'gis_purge' , get_parameter ( 'gis_purge' )))
$error_update [] = __ ( 'Max. days before delete GIS data' );
if ( ! config_update_value ( 'days_purge' , ( int ) get_parameter ( 'days_purge' )))
$error_update [] = __ ( 'Max. days before purge' );
if ( ! config_update_value ( 'days_delete_unknown' , ( int ) get_parameter ( 'days_delete_unknown' )))
$error_update [] = __ ( 'Max. days before delete unknown modules' );
if ( ! config_update_value ( 'days_compact' , ( int ) get_parameter ( 'days_compact' )))
$error_update [] = __ ( 'Max. days before compact data' );
2016-06-03 11:58:13 +02:00
if ( ! config_update_value ( 'days_autodisable_deletion' , ( int ) get_parameter ( 'days_autodisable_deletion' )))
$error_update [] = __ ( 'Max. days before autodisable deletion' );
2016-04-25 12:20:12 +02:00
if ( ! config_update_value ( 'report_limit' , ( int ) get_parameter ( 'report_limit' )))
$error_update [] = __ ( 'Item limit for realtime reports)' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'step_compact' , ( int ) get_parameter ( 'step_compact' )))
$error_update [] = __ ( 'Compact interpolation in hours (1 Fine-20 bad)' );
if ( ! config_update_value ( 'event_view_hr' , ( int ) get_parameter ( 'event_view_hr' )))
$error_update [] = __ ( 'Default hours for event view' );
if ( ! config_update_value ( 'realtimestats' , get_parameter ( 'realtimestats' )))
$error_update [] = __ ( 'Use realtime statistics' );
if ( ! config_update_value ( 'stats_interval' , get_parameter ( 'stats_interval' )))
$error_update [] = __ ( 'Batch statistics period (secs)' );
if ( ! config_update_value ( 'agentaccess' , ( int ) get_parameter ( 'agentaccess' )))
$error_update [] = __ ( 'Use agent access graph' );
if ( ! config_update_value ( 'num_files_attachment' , ( int ) get_parameter ( 'num_files_attachment' )))
$error_update [] = __ ( 'Max. recommended number of files in attachment directory' );
2014-09-17 14:13:51 +02:00
if ( ! config_update_value ( 'delete_notinit' , get_parameter ( 'delete_notinit' )))
$error_update [] = __ ( 'Delete not init modules' );
2016-05-27 09:37:58 +02:00
if ( ! config_update_value ( 'big_operation_step_datos_purge' , get_parameter ( 'big_operation_step_datos_purge' )))
$error_update [] = __ ( 'Big Operatiopn Step to purge old data' );
if ( ! config_update_value ( 'small_operation_step_datos_purge' , get_parameter ( 'small_operation_step_datos_purge' )))
$error_update [] = __ ( 'Small Operation Step to purge old data' );
2016-10-08 09:12:53 +02:00
if ( ! config_update_value ( 'num_past_special_days' , get_parameter ( 'num_past_special_days' )))
$error_update [] = __ ( 'Retention period of past special days' );
2017-02-06 16:20:39 +01:00
if ( ! config_update_value ( 'max_macro_fields' , get_parameter ( 'max_macro_fields' )))
$error_update [] = __ ( 'Max. macro data fields' );
2016-12-14 13:02:10 +01:00
if ( isset ( $config [ 'enterprise_installed' ]) && $config [ 'enterprise_installed' ] == 1 ) {
if ( ! config_update_value ( 'inventory_purge' , get_parameter ( 'inventory_purge' )))
$error_update [] = __ ( 'Max. days before delete inventory data' );
}
2013-01-18 18:41:00 +01:00
/////////////
break ;
case 'vis' :
//////// VISUAL STYLES SETUP
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'date_format' , ( string ) get_parameter ( 'date_format' )))
$error_update [] = __ ( 'Date format string' );
if ( ! config_update_value ( 'prominent_time' , ( string ) get_parameter ( 'prominent_time' )))
$error_update [] = __ ( 'Timestamp or time comparation' );
if ( ! config_update_value ( 'graph_color1' , ( string ) get_parameter ( 'graph_color1' )))
$error_update [] = __ ( 'Graph color (min)' );
if ( ! config_update_value ( 'graph_color2' , ( string ) get_parameter ( 'graph_color2' )))
$error_update [] = __ ( 'Graph color (avg)' );
if ( ! config_update_value ( 'graph_color3' , ( string ) get_parameter ( 'graph_color3' )))
$error_update [] = __ ( 'Graph color (max)' );
2014-03-14 09:33:13 +01:00
if ( ! config_update_value ( 'graph_color4' , ( string ) get_parameter ( 'graph_color4' )))
$error_update [] = __ ( 'Graph color #4' );
if ( ! config_update_value ( 'graph_color5' , ( string ) get_parameter ( 'graph_color5' )))
$error_update [] = __ ( 'Graph color #5' );
if ( ! config_update_value ( 'graph_color6' , ( string ) get_parameter ( 'graph_color6' )))
$error_update [] = __ ( 'Graph color #6' );
if ( ! config_update_value ( 'graph_color7' , ( string ) get_parameter ( 'graph_color7' )))
$error_update [] = __ ( 'Graph color #7' );
if ( ! config_update_value ( 'graph_color8' , ( string ) get_parameter ( 'graph_color8' )))
$error_update [] = __ ( 'Graph color #8' );
if ( ! config_update_value ( 'graph_color9' , ( string ) get_parameter ( 'graph_color9' )))
$error_update [] = __ ( 'Graph color #9' );
if ( ! config_update_value ( 'graph_color10' , ( string ) get_parameter ( 'graph_color10' )))
$error_update [] = __ ( 'Graph color #10' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'graph_res' , ( int ) get_parameter ( 'graph_res' )))
$error_update [] = __ ( 'Graphic resolution (1-low, 5-high)' );
2015-10-23 12:54:58 +02:00
if ( ! config_update_value ( 'interface_unit' , ( string ) get_parameter ( 'interface_unit' , __ ( 'Bytes' ) )))
$error_update [] = __ ( 'Value to interface graphics' );
2016-10-18 10:32:10 +02:00
if ( ! config_update_value ( 'graph_precision' , ( string ) get_parameter ( 'graph_precision' , 1 )))
$error_update [] = __ ( 'Data precision for reports' );
2013-01-18 18:41:00 +01:00
$style = ( string ) get_parameter ( 'style' );
if ( $style != $config [ 'style' ])
$style = substr ( $style , 0 , strlen ( $style ) - 4 );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'style' , $style ))
$error_update [] = __ ( 'Style template' );
if ( ! config_update_value ( 'block_size' , ( int ) get_parameter ( 'block_size' )))
$error_update [] = __ ( 'Block size for pagination' );
if ( ! config_update_value ( 'round_corner' , ( bool ) get_parameter ( 'round_corner' )))
$error_update [] = __ ( 'Use round corners' );
2014-05-30 12:51:33 +02:00
if ( ! config_update_value ( 'show_qr_code_header' , ( bool ) get_parameter ( 'show_qr_code_header' )))
$error_update [] = __ ( 'Show QR code header' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'status_images_set' , ( string ) get_parameter ( 'status_images_set' )))
$error_update [] = __ ( 'Status icon set' );
2015-06-22 10:30:57 +02:00
if ( ! config_update_value ( 'fontpath' , ( string ) get_parameter ( 'fontpath' )))
2013-02-27 15:25:24 +01:00
$error_update [] = __ ( 'Font path' );
if ( ! config_update_value ( 'font_size' , get_parameter ( 'font_size' )))
$error_update [] = __ ( 'Font size' );
if ( ! config_update_value ( 'flash_charts' , ( bool ) get_parameter ( 'flash_charts' )))
$error_update [] = __ ( 'Interactive charts' );
2017-03-16 14:35:31 +01:00
2017-03-15 15:23:28 +01:00
if ( ! config_update_value ( 'custom_logo' , ( string ) get_parameter ( 'custom_logo' )))
$error_update [] = __ ( 'Custom logo' );
if ( ! config_update_value ( 'custom_logo_login' , ( string ) get_parameter ( 'custom_logo_login' )))
$error_update [] = __ ( 'Custom logo login' );
if ( ! config_update_value ( 'custom_splash_login' , ( string ) get_parameter ( 'custom_splash_login' )))
$error_update [] = __ ( 'Custom splash login' );
if ( ! config_update_value ( 'custom_title1_login' , ( string ) get_parameter ( 'custom_title1_login' )))
$error_update [] = __ ( 'Custom title1 login' );
if ( ! config_update_value ( 'custom_title2_login' , ( string ) get_parameter ( 'custom_title2_login' )))
$error_update [] = __ ( 'Custom title2 login' );
2014-03-27 Alejandro Gallardo <alejandro.gallardo@artica.es>
* include/functions_config.php,
godmode/setup/setup_visuals.php,
general/login_page.php: Now is possible to select a
custom login background in the setup visuals section.
* images/backgrounds/default_4.0-stripes.gif,
images/backgrounds/default_4.0.jpg,
images/backgrounds/default_5.0.png,
images/backgrounds/flowers.jpg,
images/backgrounds/grass.jpg,
images/backgrounds/tiles.jpg,
images/backgrounds/wall.jpg,
images/backgrounds/wood.jpg: Added new images to use
it as custom login backgrounds.
* images/backgrounds/background1.jpg,
images/backgrounds/background2.jpg,
images/backgrounds/background3.jpg,
images/backgrounds/background4.jpg,
images/backgrounds/background5.jpg,
images/backgrounds/background6.jpg,
images/backgrounds/background7.jpg,
images/backgrounds/background8.jpg,
images/backgrounds/background9.jpg,
images/backgrounds/background10.jpg,
images/backgrounds/background_red.jpg: Delete some
VERY old images.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9655 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-27 12:49:00 +01:00
if ( ! config_update_value ( 'login_background' , ( string ) get_parameter ( 'login_background' )))
$error_update [] = __ ( 'Login background' );
2017-03-16 14:35:31 +01:00
if ( ! config_update_value ( 'meta_custom_logo' , ( string ) get_parameter ( 'meta_custom_logo' )))
$error_update [] = __ ( 'Custom logo metaconsole' );
if ( ! config_update_value ( 'meta_custom_logo_login' , ( string ) get_parameter ( 'meta_custom_logo_login' )))
$error_update [] = __ ( 'Custom logo login metaconsole' );
if ( ! config_update_value ( 'meta_custom_splash_login' , ( string ) get_parameter ( 'meta_custom_splash_login' )))
$error_update [] = __ ( 'Custom splash login metaconsole' );
if ( ! config_update_value ( 'meta_custom_title1_login' , ( string ) get_parameter ( 'meta_custom_title1_login' )))
$error_update [] = __ ( 'Custom title1 login metaconsole' );
if ( ! config_update_value ( 'meta_custom_title2_login' , ( string ) get_parameter ( 'meta_custom_title2_login' )))
$error_update [] = __ ( 'Custom title2 login metaconsole' );
if ( ! config_update_value ( 'meta_login_background' , ( string ) get_parameter ( 'meta_login_background' )))
$error_update [] = __ ( 'Login background metaconsole' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'vc_refr' , get_parameter ( 'vc_refr' )))
$error_update [] = __ ( 'Default interval for refresh on Visual Console' );
2015-03-23 16:14:17 +01:00
if ( ! config_update_value ( 'vc_line_thickness' , ( int ) get_parameter ( 'vc_line_thickness' )))
2014-06-17 17:11:50 +02:00
$error_update [] = __ ( 'Default line thickness for the Visual Console' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'agent_size_text_small' , get_parameter ( 'agent_size_text_small' )))
$error_update [] = __ ( 'Agent size text' );
if ( ! config_update_value ( 'agent_size_text_medium' , get_parameter ( 'agent_size_text_medium' )))
$error_update [] = __ ( 'Agent size text' );
if ( ! config_update_value ( 'module_size_text_small' , get_parameter ( 'module_size_text_small' )))
$error_update [] = __ ( 'Module size text' );
if ( ! config_update_value ( 'module_size_text_medium' , get_parameter ( 'module_size_text_medium' )))
$error_update [] = __ ( 'Description size text' );
if ( ! config_update_value ( 'description_size_text' , get_parameter ( 'description_size_text' )))
$error_update [] = __ ( 'Description size text' );
if ( ! config_update_value ( 'item_title_size_text' , get_parameter ( 'item_title_size_text' )))
$error_update [] = __ ( 'Item title size text' );
if ( ! config_update_value ( 'gis_label' , get_parameter ( 'gis_label' )))
$error_update [] = __ ( 'GIS Labels' );
2017-01-17 11:38:00 +01:00
if ( ! config_update_value ( 'simple_module_value' , get_parameter ( 'simple_module_value' )))
$error_update [] = __ ( 'Show units in values report' );
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'gis_default_icon' , get_parameter ( 'gis_default_icon' )))
$error_update [] = __ ( 'Default icon in GIS' );
2014-05-21 12:44:36 +02:00
if ( ! config_update_value ( 'autohidden_menu' , get_parameter ( 'autohidden_menu' )))
$error_update [] = __ ( 'Autohidden menu' );
2016-09-28 13:26:58 +02:00
if ( ! config_update_value ( 'fixed_graph' , get_parameter ( 'fixed_graph' )))
$error_update [] = __ ( 'Fixed graph' );
2014-08-04 18:50:36 +02:00
if ( ! config_update_value ( 'fixed_header' , get_parameter ( 'fixed_header' )))
$error_update [] = __ ( 'Fixed header' );
if ( ! config_update_value ( 'fixed_menu' , get_parameter ( 'fixed_menu' )))
$error_update [] = __ ( 'Fixed menu' );
2014-05-22 10:34:40 +02:00
if ( ! config_update_value ( 'paginate_module' , get_parameter ( 'paginate_module' )))
$error_update [] = __ ( 'Paginate module' );
2015-06-22 10:30:57 +02:00
if ( ! config_update_value ( 'graphviz_bin_dir' , get_parameter ( 'graphviz_bin_dir' )))
2014-06-02 19:36:00 +02:00
$error_update [] = __ ( 'Custom graphviz directory' );
2014-06-24 15:17:14 +02:00
if ( ! config_update_value ( 'networkmap_max_width' , get_parameter ( 'networkmap_max_width' )))
$error_update [] = __ ( 'Networkmap max width' );
2014-09-23 13:07:58 +02:00
if ( ! config_update_value ( 'short_module_graph_data' , get_parameter ( 'short_module_graph_data' )))
$error_update [] = __ ( 'Shortened module graph data' );
2014-11-20 15:06:11 +01:00
if ( ! config_update_value ( 'show_group_name' , get_parameter ( 'show_group_name' )))
$error_update [] = __ ( 'Show the group name instead the group icon.' );
2015-06-11 20:17:54 +02:00
if ( ! config_update_value ( 'custom_graph_width' , ( int ) get_parameter ( 'custom_graph_width' , 1 )))
2015-03-17 15:36:24 +01:00
$error_update [] = __ ( 'Default line thickness for the Custom Graph.' );
2015-06-11 21:24:14 +02:00
if ( ! config_update_value ( 'type_module_charts' , ( string ) get_parameter ( 'type_module_charts' , 'area' )))
$error_update [] = __ ( 'Default type of module charts.' );
2016-11-30 10:23:06 +01:00
if ( ! config_update_value ( 'type_interface_charts' , ( string ) get_parameter ( 'type_interface_charts' , 'line' )))
$error_update [] = __ ( 'Default type of interface charts.' );
2016-11-14 16:30:44 +01:00
if ( ! config_update_value ( 'only_average' , ( bool ) get_parameter ( 'only_average' , false )))
$error_update [] = __ ( 'Default show only average or min and max' );
2015-05-08 09:51:53 +02:00
if ( ! config_update_value ( 'render_proc' , ( bool ) get_parameter ( 'render_proc' , false )))
2015-07-27 15:34:09 +02:00
$error_update [] = __ ( 'Display data of proc modules in other format' );
2015-07-22 11:49:00 +02:00
if ( ! config_update_value ( 'render_proc_ok' , ( string ) get_parameter ( 'render_proc_ok' , __ ( 'Ok' ) )))
$error_update [] = __ ( 'Display text proc modules have state is ok' );
if ( ! config_update_value ( 'render_proc_fail' , ( string ) get_parameter ( 'render_proc_fail' , __ ( 'Fail' ) )))
$error_update [] = __ ( 'Display text when proc modules have state critical' );
2016-06-02 11:59:35 +02:00
//Daniel maya 02/06/2016 Display menu with click --INI
if ( ! config_update_value ( 'click_display' , ( bool ) get_parameter ( 'click_display' , false )))
2016-06-06 11:35:14 +02:00
$error_update [] = __ ( 'Display lateral menus with left click' );
2016-06-02 11:59:35 +02:00
//Daniel maya 02/06/2016 Display menu with click --END
2017-02-01 11:57:10 +01:00
if ( isset ( $config [ 'enterprise_installed' ]) && $config [ 'enterprise_installed' ] == 1 ) {
if ( ! config_update_value ( 'service_label_font_size' , get_parameter ( 'service_label_font_size' , false )))
$error_update [] = __ ( 'Service label font size' );
if ( ! config_update_value ( 'service_item_padding_size' , get_parameter ( 'service_item_padding_size' , false )))
$error_update [] = __ ( 'Service item padding size' );
}
2016-12-23 09:36:44 +01:00
if ( ! config_update_value ( 'percentil' , ( int ) get_parameter ( 'percentil' , 0 )))
$error_update [] = __ ( 'Default percentil' );
2017-02-07 12:58:29 +01:00
if ( ! config_update_value ( 'classic_menu' , ( bool ) get_parameter ( 'classic_menu' , false )))
$error_update [] = __ ( 'Classic menu mode' );
2016-06-02 11:59:35 +02:00
2015-02-09 19:34:36 +01:00
//--------------------------------------------------
// CUSTOM VALUES POST PROCESS
//--------------------------------------------------
$custom_value = get_parameter ( 'custom_value' );
$custom_text = get_parameter ( 'custom_text' );
$custom_value_add = ( bool ) get_parameter ( 'custom_value_add' , 0 );
$custom_value_to_delete = get_parameter ( 'custom_value_to_delete' , 0 );
$custom_value = str_replace ( ',' , '.' , $custom_value );
if ( $custom_value_add ) {
require_once ( " include/functions_post_process.php " );
if ( ! post_process_add_custom_value (
$custom_text , ( string ) $custom_value ))
$error_update [] = __ ( 'Add the custom post process' );
}
if ( $custom_value_to_delete > 0 ) {
require_once ( " include/functions_post_process.php " );
if ( ! post_process_delete_custom_value ( $custom_value_to_delete )) {
$error_update [] = __ ( 'Delete the custom post process' );
}
}
//--------------------------------------------------
//--------------------------------------------------
// CUSTOM INTERVAL VALUES
//--------------------------------------------------
2013-01-18 18:41:00 +01:00
$interval_values = get_parameter ( 'interval_values' );
// Add new interval value if is provided
$interval_value = ( float ) get_parameter ( 'interval_value' , 0 );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $interval_value > 0 ) {
2013-01-18 18:41:00 +01:00
$interval_unit = ( int ) get_parameter ( 'interval_unit' );
$new_interval = $interval_value * $interval_unit ;
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $interval_values === '' ) {
2013-01-18 18:41:00 +01:00
$interval_values = $new_interval ;
}
else {
$interval_values_array = explode ( ',' , $interval_values );
if ( ! in_array ( $new_interval , $interval_values_array )) {
$interval_values_array [] = $new_interval ;
$interval_values = implode ( ',' , $interval_values_array );
}
}
2012-12-11 17:20:10 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2013-01-18 18:41:00 +01:00
// Delete interval value if is required
$interval_to_delete = ( float ) get_parameter ( 'interval_to_delete' );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
if ( $interval_to_delete > 0 ) {
2013-01-18 18:41:00 +01:00
$interval_values_array = explode ( ',' , $interval_values );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
foreach ( $interval_values_array as $k => $iva ) {
if ( $interval_to_delete == $iva ) {
2013-01-18 18:41:00 +01:00
unset ( $interval_values_array [ $k ]);
}
}
$interval_values = implode ( ',' , $interval_values_array );
2012-12-11 17:20:10 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2015-02-09 19:34:36 +01:00
if ( ! config_update_value ( 'interval_values' , $interval_values ))
$error_update [] = __ ( 'Delete interval' );
//--------------------------------------------------
2017-01-27 17:25:10 +01:00
if ( ! config_update_value ( 'custom_report_info' , get_parameter ( 'custom_report_info' )))
$error_update [] = __ ( 'Custom report info' );
2015-02-09 19:34:36 +01:00
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
// Juanma (06/05/2014) New feature: Custom front page for reports
if ( ! config_update_value ( 'custom_report_front' , get_parameter ( 'custom_report_front' )))
$error_update [] = __ ( 'Custom report front' );
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! config_update_value ( 'custom_report_front_font' , get_parameter ( 'custom_report_front_font' )))
$error_update [] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Font family' );
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! config_update_value ( 'custom_report_front_logo' , get_parameter ( 'custom_report_front_logo' )))
$error_update [] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Custom logo' );
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! config_update_value ( 'custom_report_front_header' , get_parameter ( 'custom_report_front_header' )))
$error_update [] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Header' );
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! config_update_value ( 'custom_report_front_firstpage' , get_parameter ( 'custom_report_front_firstpage' )))
$error_update [] = __ ( 'Custom report front' ) . ' - ' . __ ( 'First page' );
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! config_update_value ( 'custom_report_front_footer' , get_parameter ( 'custom_report_front_footer' )))
$error_update [] = __ ( 'Custom report front' ) . ' - ' . __ ( 'Footer' );
2014-06-24 15:17:14 +02:00
2013-01-18 18:41:00 +01:00
break ;
case 'net' :
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'netflow_path' , get_parameter ( 'netflow_path' )))
$error_update [] = __ ( 'Data storage path' );
if ( ! config_update_value ( 'netflow_interval' , ( int ) get_parameter ( 'netflow_interval' )))
$error_update [] = __ ( 'Daemon interval' );
if ( ! config_update_value ( 'netflow_daemon' , get_parameter ( 'netflow_daemon' )))
$error_update [] = __ ( 'Daemon binary path' );
if ( ! config_update_value ( 'netflow_nfdump' , get_parameter ( 'netflow_nfdump' )))
$error_update [] = __ ( 'Nfdump binary path' );
if ( ! config_update_value ( 'netflow_nfexpire' , get_parameter ( 'netflow_nfexpire' )))
$error_update [] = __ ( 'Nfexpire binary path' );
if ( ! config_update_value ( 'netflow_max_resolution' , ( int ) get_parameter ( 'netflow_max_resolution' )))
$error_update [] = __ ( 'Maximum chart resolution' );
if ( ! config_update_value ( 'netflow_disable_custom_lvfilters' , get_parameter ( 'netflow_disable_custom_lvfilters' )))
$error_update [] = __ ( 'Disable custom live view filters' );
if ( ! config_update_value ( 'netflow_max_lifetime' , ( int ) get_parameter ( 'netflow_max_lifetime' )))
$error_update [] = __ ( 'Netflow max lifetime' );
2014-04-16 14:06:19 +02:00
if ( ! config_update_value ( 'netflow_get_ip_hostname' , ( int ) get_parameter ( 'netflow_get_ip_hostname' )))
$error_update [] = __ ( 'Name resolution for IP address' );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
break ;
2013-01-18 18:41:00 +01:00
case 'log' :
2013-02-27 15:25:24 +01:00
if ( ! config_update_value ( 'log_dir' , get_parameter ( 'log_dir' )))
$error_update [] = __ ( 'Netflow max lifetime' );
if ( ! config_update_value ( 'log_max_lifetime' , ( int ) get_parameter ( 'log_max_lifetime' )))
$error_update [] = __ ( 'Log max lifetime' );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
break ;
2013-02-28 10:46:39 +01:00
case 'hist_db' :
if ( ! config_update_value ( 'history_db_enabled' , get_parameter ( 'history_db_enabled' )))
$error_update [] = __ ( 'Enable history database' );
2016-11-11 10:29:47 +01:00
if ( ! config_update_value ( 'history_event_enabled' , get_parameter ( 'history_event_enabled' )))
$error_update [] = __ ( 'Enable history event' );
2013-02-28 10:46:39 +01:00
if ( ! config_update_value ( 'history_db_host' , get_parameter ( 'history_db_host' )))
$error_update [] = __ ( 'Host' );
if ( ! config_update_value ( 'history_db_port' , get_parameter ( 'history_db_port' )))
$error_update [] = __ ( 'Port' );
if ( ! config_update_value ( 'history_db_name' , get_parameter ( 'history_db_name' )))
$error_update [] = __ ( 'Database name' );
if ( ! config_update_value ( 'history_db_user' , get_parameter ( 'history_db_user' )))
$error_update [] = __ ( 'Database user' );
2015-03-02 17:28:34 +01:00
if ( ! config_update_value ( 'history_db_pass' , io_input_password ( get_parameter ( 'history_db_pass' ))))
2013-02-28 10:46:39 +01:00
$error_update [] = __ ( 'Database password' );
if ( ! config_update_value ( 'history_db_days' , get_parameter ( 'history_db_days' )))
$error_update [] = __ ( 'Days' );
2016-11-11 10:29:47 +01:00
if ( ! config_update_value ( 'history_event_days' , get_parameter ( 'history_event_days' )))
$error_update [] = __ ( 'Event Days' );
2013-02-28 10:46:39 +01:00
if ( ! config_update_value ( 'history_db_step' , get_parameter ( 'history_db_step' )))
$error_update [] = __ ( 'Step' );
if ( ! config_update_value ( 'history_db_delay' , get_parameter ( 'history_db_delay' )))
$error_update [] = __ ( 'Delay' );
break ;
2016-05-04 19:19:07 +02:00
case 'ehorus' :
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_enabled' , ( int ) get_parameter ( 'ehorus_enabled' , $config [ 'ehorus_enabled' ])))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'Enable eHorus' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_user' , ( string ) get_parameter ( 'ehorus_user' , $config [ 'ehorus_user' ])))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'eHorus user' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_pass' , io_input_password (( string ) get_parameter ( 'ehorus_pass' , $config [ 'ehorus_pass' ]))))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'eHorus password' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_hostname' , ( string ) get_parameter ( 'ehorus_hostname' , $config [ 'ehorus_hostname' ])))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'eHorus API hostname' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_port' , ( int ) get_parameter ( 'ehorus_port' , $config [ 'ehorus_port' ])))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'eHorus API port' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_req_timeout' , ( int ) get_parameter ( 'ehorus_req_timeout' , $config [ 'ehorus_req_timeout' ])))
2016-05-04 19:19:07 +02:00
$error_update [] = __ ( 'eHorus request timeout' );
2016-05-05 18:26:06 +02:00
if ( ! config_update_value ( 'ehorus_custom_field' , ( string ) get_parameter ( 'ehorus_custom_field' , $config [ 'ehorus_custom_field' ])))
$error_update [] = __ ( 'eHorus id custom field' );
2016-05-04 19:19:07 +02:00
break ;
2013-01-18 18:41:00 +01:00
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
}
2013-02-27 15:25:24 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2013-02-27 15:25:24 +01:00
if ( count ( $error_update ) > 0 ) {
$config [ 'error_config_update_config' ] = array ();
$config [ 'error_config_update_config' ][ 'correct' ] = false ;
$values = implode ( ', ' , $error_update );
2013-02-28 11:17:39 +01:00
$config [ 'error_config_update_config' ][ 'message' ] = sprintf ( __ ( 'Failed updated: the next values cannot update: %s' ), $values );
2013-02-27 15:25:24 +01:00
}
else {
$config [ 'error_config_update_config' ] = array ();
$config [ 'error_config_update_config' ][ 'correct' ] = true ;
2011-11-30 17:58:46 +01:00
}
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
2011-11-28 12:35:06 +01:00
enterprise_include_once ( 'include/functions_policies.php' );
2011-02-14 10:08:41 +01:00
$enterprise = enterprise_include_once ( 'include/functions_skins.php' );
if ( $enterprise !== ENTERPRISE_NOT_HOOK ) {
2015-06-22 10:30:57 +02:00
$config [ 'relative_path' ] = get_parameter ( 'relative_path' , $config [ 'relative_path' ]);
2011-02-14 10:08:41 +01:00
}
2009-03-05 13:52:59 +01:00
}
/**
2009-04-13 18:13:55 +02:00
* Process config variables
2009-03-05 13:52:59 +01:00
*/
2011-04-15 14:03:19 +02:00
function config_process_config () {
2009-03-05 13:52:59 +01:00
global $config ;
2012-06-28 15:44:15 +02:00
* include/functions_graph.php
include/functions_html.php
include/functions_messages.php
include/db/postgresql.php
include/db/mysql.php
include/db/oracle.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/ajax/skins.ajax.php
include/ajax/reporting.ajax.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/help/en/help_timesource.php
include/help/es/help_timesource.php
include/help/ja/help_timesource.php
include/config_process.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_incidents.php
include/api.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/pandora_logs.php
extensions/agents_modules.php
extensions/update_manager.php
extensions/ssh_console.php
extensions/dbmanager.php
extensions/vnc_view.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/load_updatemanager.php
extensions/update_manager/lib/libupdate_manager_client.php
extensions/update_manager/lib/libupdate_manager.php
extensions/update_manager/lib/libupdate_manager_components.php
extensions/update_manager/lib/libupdate_manager_updates.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
extensions/plugin_registration.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/search_modules.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/extensions.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/agent_fields.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident_statistics.php
operation/events/event_statistics.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/search_reports.php
operation/search_maps.php
operation/search_users.php
extras/pandora_diag.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/index.php
general/error_authconfig.php
general/links_menu.php
general/logon_ok.php
general/error_dbconfig.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/db/db_main.php
godmode/db/db_audit.php
godmode/db/db_sanity.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_event.php
godmode/db/db_purge.php
godmode/extensions.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/fields_manager.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/users/user_list.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/module_list.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/graph_builder.main.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/visual_console_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php
include/functions_db.php: Added some includes and functions of this code have "db_" prefix.
* include/functions.php: Moved function check_login(), check_acl(),
dame_nombre_pluginid(), get_os_name() from functions_db.php to functions.php.
* include/functions_groups.php: Moved functions get_childrens(), safe_acl_group()
and get_parents(), give_disabled_group(), isAllGroups(), get_group_icon(), get_all_groups(),
get_id_groups_recursive(), get_user_groups_tree_recursive(), get_group_status(),
get_group_name(), get_group_users() from functions_db.php to this code.
* include/functions_profile.php: New library with profile functions. Moved functions
get_profile_name(), get_profiles(), create_user_profile(), delete_user_profile(),
delete_profile() from functions_db.php to this code. Added new parameter in function
get_profile() to retrieve profiles with filter conditions applied.
* include/functions_users.php: New library with users functions. Moved functions
get_users_info(), get_all_model_groups(), get_user_groups(), get_user_groups_tree(),
get_user_first_group(), user_access_to_agent() from funtions_db.php to this code.
* godmode/users/configure_user.php: Changed get_profile_filter() function to get_profile().
* include/functions_agents.php: Moved functions get_group_agents(), get_agent_modules(),
get_agent_module_id(), get_agent_id(), get_agent_name(), get_agent_modules_data_count(),
check_alert_fired(), get_agent_interval(), get_agent_os(), give_agentmodule_flag(),
agent_add_address(), agent_delete_address(), get_agent_address(), get_agent_with_ip(),
get_agent_addresses(), get_agent_status(), delete_agent(), get_agentmodule_group(),
get_agent_group() from functions_db.php to this code.
* include/functions_modules.php: Moved functions get_agentmodule(), get_agentmodule_id(),
get_agentmodule_is_init(), get_agent_modules_count(), get_module_type_name(),
get_module_type_icon(), get_agentmodule_agent(), get_agentmodule_agent_name(),
get_agentmodule_name(), get_agentmodule_type(), get_monitor_downs_in_period(),
get_monitor_last_down_timestamp_in_period(), get_monitors_in_group(),
get_monitors_in_agent(), get_monitors_down(), get_moduletype_name(),
get_moduletype_description(), get_moduletypes(), get_module_interval(), show_icon_type(),
give_modulecategory_name(),
give_agent_id_from_module_id(), get_module_status(), get_agent_module_last_value(),
get_previous_data(), get_agentmodule_modulegroup(), get_modulegroups(),
get_modulegroup_name() from functions_db.php to this code.
* include/functions_alerts.php: Moved functions get_alert_type(), get_agent_alert_fired(),
get_module_alert_fired(), get_alert_fires_in_period(), get_group_alerts(), get_alerts_fired(),
get_alert_last_fire_timestamp_in_period(), get_agentmodule_status(),
get_agentmodule_last_status() from functions_db.php to this code.
* include/functions_exportserver.php: Moved function dame_nombre_servidorexportacion()
from functions_db.php to this code.
* include/functions_events.php: Moved functions get_group_events(), get_agent_events(),
get_module_events() from functions_db.php to this code.
* include/functions_servers.php: Moved functions get_server_name(), show_server_type(),
check_server_status(), server_status() from functions_db.php to this code.
* include/functions_network_profiles.php: Moved function get_networkprofile_name()
from functions_db.php to this code.
* include/functions_visual_map.php: Moved functions get_layoutdata_x(), get_layoutdata_y()
from fucntions_db.php to this code.
* include/functions_io.php: Moved function __() from functions_db.php to this code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4258 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-19 20:42:49 +02:00
$configs = db_get_all_rows_in_table ( 'tconfig' );
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2009-03-05 13:52:59 +01:00
if ( empty ( $configs )) {
2009-09-14 03:02:44 +02:00
include ( $config [ " homedir " ] . " /general/error_emptyconfig.php " );
exit ;
2009-03-05 13:52:59 +01:00
}
2015-07-06 12:32:14 +02:00
$is_windows = false ;
if ( substr ( strtolower ( PHP_OS ), 0 , 3 ) === 'win' ) {
$is_windows = true ;
}
2009-03-05 13:52:59 +01:00
/* Compatibility fix */
foreach ( $configs as $c ) {
2012-08-17 13:39:25 +02:00
$config [ $c [ 'token' ]] = $c [ 'value' ];
2009-03-05 13:52:59 +01:00
}
2009-12-28 13:20:29 +01:00
if ( ! isset ( $config [ 'language' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'language' , 'en' );
2009-12-28 13:20:29 +01:00
}
2013-01-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: changed in the
table "tlayout_data" the field "label" to text without limits.
* godmode/extensions.php, include/functions_tags.php,
include/functions_ui.php, include/functions_agents.php,
include/functions_config.php: cleaned source code style.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php,
include/styles/pandora.css, include/styles/pandora_legacy.css,
include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map_editor.php: added the formatted label
into the item label with the help of tiny_mce.
* include/javascript/tiny_mce/*: update the last version of
tiny_mce.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7524 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-01-24 12:30:37 +01:00
2013-03-11 19:30:28 +01:00
if ( isset ( $config [ 'homeurl' ]) && ( strlen ( $config [ 'homeurl' ]) > 0 )) {
if ( $config [ 'homeurl' ][ 0 ] != '/' ) {
2015-06-22 10:30:57 +02:00
$config [ 'homeurl' ] = '/' . $config [ 'homeurl' ];
2013-03-11 19:30:28 +01:00
}
2009-03-05 13:52:59 +01:00
}
2015-07-06 12:32:14 +02:00
if ( ! isset ( $config [ 'remote_config' ])) {
if ( $is_windows )
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in' ;
else
$default = '/var/spool/pandora/data_in' ;
config_update_value ( 'remote_config' , $default );
}
2009-04-13 18:13:55 +02:00
if ( ! isset ( $config [ 'date_format' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'date_format' , 'F j, Y, g:i a' );
2009-03-05 13:52:59 +01:00
}
2009-04-13 18:13:55 +02:00
if ( ! isset ( $config [ 'event_view_hr' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'event_view_hr' , 8 );
2009-03-05 13:52:59 +01:00
}
2016-04-25 12:20:12 +02:00
if ( ! isset ( $config [ 'report_limit' ])) {
config_update_value ( 'report_limit' , 100 );
}
2009-04-13 18:13:55 +02:00
if ( ! isset ( $config [ 'loginhash_pwd' ])) {
2015-03-02 17:28:34 +01:00
config_update_value ( 'loginhash_pwd' , io_input_password ( rand ( 0 , 1000 ) * rand ( 0 , 1000 ) . " pandorahash " ));
2009-03-05 13:52:59 +01:00
}
2009-04-13 18:13:55 +02:00
if ( ! isset ( $config [ " trap2agent " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'trap2agent' , 0 );
2009-03-05 13:52:59 +01:00
}
if ( ! isset ( $config [ " prominent_time " ])) {
// Prominent time tells us what to show prominently when a timestamp is
// displayed. The comparation (... days ago) or the timestamp (full date)
2011-04-15 14:03:19 +02:00
config_update_value ( 'prominent_time' , 'comparation' );
2009-03-05 13:52:59 +01:00
}
if ( ! isset ( $config [ " timesource " ])) {
// Timesource says where time comes from (system or mysql)
2011-04-15 14:03:19 +02:00
config_update_value ( 'timesource' , 'system' );
2009-03-05 13:52:59 +01:00
}
if ( ! isset ( $config [ " https " ])) {
// Sets whether or not we want to enforce https. We don't want to go to a
// potentially unexisting config by default
2011-04-15 14:03:19 +02:00
config_update_value ( 'https' , false );
2009-03-05 13:52:59 +01:00
}
2016-08-26 12:41:34 +02:00
if ( ! isset ( $config [ " use_cert " ])) {
config_update_value ( 'use_cert' , false );
}
if ( ! isset ( $config [ 'cert_path' ])) {
// Sets name and path of ssl path for use in application
config_update_value ( 'cert_path' , '/etc/ssl/certs/pandorafms.pem' );
}
2009-03-05 13:52:59 +01:00
2013-01-10 16:23:06 +01:00
if ( ! isset ( $config [ " num_files_attachment " ])) {
config_update_value ( 'num_files_attachment' , 100 );
}
2016-05-27 09:37:58 +02:00
2009-04-06 13:02:05 +02:00
if ( ! isset ( $config [ 'status_images_set' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'status_images_set' , 'default' );
2009-04-06 13:02:05 +02:00
}
2016-09-05 11:51:24 +02:00
if ( ! isset ( $config [ 'autorefresh_white_list' ])){
config_update_value ( 'autorefresh_white_list' , '' );
}
2010-02-10 20:04:16 +01:00
// Load user session
2016-11-18 13:01:13 +01:00
if ( isset ( $_SESSION [ 'id_usuario' ]))
$config [ " id_user " ] = $_SESSION [ " id_usuario " ];
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-03-31 16:32:58 +02:00
if ( ! isset ( $config [ " round_corner " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'round_corner' , false );
2009-03-31 16:32:58 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2014-05-30 12:51:33 +02:00
if ( ! isset ( $config [ " show_qr_code_header " ])) {
config_update_value ( 'show_qr_code_header' , false );
}
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " agentaccess " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'agentaccess' , true );
2009-06-24 19:03:08 +02:00
}
2009-10-26 17:35:34 +01:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " timezone " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'timezone' , " Europe/Berlin " );
2010-02-10 18:10:10 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " stats_interval " ])) {
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
config_update_value ( 'stats_interval' , SECONDS_5MINUTES );
2010-02-10 18:10:10 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " realtimestats " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'realtimestats' , 1 );
2010-02-10 18:10:10 +01:00
}
2014-09-17 14:13:51 +02:00
if ( ! isset ( $config [ " delete_notinit " ])) {
config_update_value ( 'delete_notinit' , 0 );
}
2016-05-27 09:37:58 +02:00
if ( ! isset ( $config [ " big_operation_step_datos_purge " ])) {
config_update_value ( 'big_operation_step_datos_purge' , 100 );
}
if ( ! isset ( $config [ " small_operation_step_datos_purge " ])) {
config_update_value ( 'small_operation_step_datos_purge' , 1000 );
}
2016-10-08 09:12:53 +02:00
if ( ! isset ( $config [ " num_past_special_days " ])) {
config_update_value ( 'num_past_special_days' , 0 );
}
2016-12-14 13:02:10 +01:00
if ( isset ( $config [ 'enterprise_installed' ])) {
if ( ! isset ( $config [ 'inventory_purge' ])) {
config_update_value ( 'inventory_purge' , 21 );
}
}
2017-02-06 16:20:39 +01:00
if ( ! isset ( $config [ 'max_macro_fields' ])) {
config_update_value ( 'max_macro_fields' , 10 );
}
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " event_purge " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'event_purge' , 15 );
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2013-01-16 13:57:11 +01:00
if ( ! isset ( $config [ " metaconsole_events_history " ])) {
config_update_value ( 'metaconsole_events_history' , 0 );
}
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " trap_purge " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'trap_purge' , 7 );
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " string_purge " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'string_purge' , 14 );
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " audit_purge " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'audit_purge' , 30 );
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " acl_enterprise " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'acl_enterprise' , 0 );
2010-02-22 20:03:55 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " metaconsole " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'metaconsole' , 0 );
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " gis_purge " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'gis_purge' , 7 );
2010-03-10 18:58:29 +01:00
}
2010-07-08 18:45:34 +02:00
2011-03-22 17:31:56 +01:00
if ( ! isset ( $config [ " collection_max_size " ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'collection_max_size' , 1000000 );
2010-07-08 18:45:34 +02:00
}
2011-04-20 17:54:31 +02:00
2012-12-12 10:35:40 +01:00
if ( ! isset ( $config [ " event_replication " ])) {
config_update_value ( 'event_replication' , 0 );
}
if ( ! isset ( $config [ " replication_interval " ])) {
config_update_value ( 'replication_interval' , 120 );
}
2015-11-18 15:23:50 +01:00
if ( ! isset ( $config [ " replication_limit " ])) {
config_update_value ( 'replication_limit' , 1000 );
}
2015-06-08 10:43:36 +02:00
if ( ! isset ( $config [ " replication_dbengine " ])) {
config_update_value ( 'replication_dbengine' , 'mysql' );
}
2012-12-13 18:18:49 +01:00
if ( ! isset ( $config [ " replication_dbhost " ])) {
config_update_value ( 'replication_dbhost' , " " );
2012-12-12 10:35:40 +01:00
}
2012-12-13 18:18:49 +01:00
if ( ! isset ( $config [ " replication_dbname " ])) {
config_update_value ( 'replication_dbname' , " " );
2012-12-12 10:35:40 +01:00
}
2012-12-13 18:18:49 +01:00
if ( ! isset ( $config [ " replication_dbuser " ])) {
config_update_value ( 'replication_dbuser' , " " );
2012-12-12 10:35:40 +01:00
}
2012-12-13 18:18:49 +01:00
if ( ! isset ( $config [ " replication_dbpass " ])) {
config_update_value ( 'replication_dbpass' , " " );
}
if ( ! isset ( $config [ " replication_dbport " ])) {
config_update_value ( 'replication_dbport' , " " );
}
if ( ! isset ( $config [ " replication_mode " ])) {
config_update_value ( 'replication_mode' , " only_validated " );
2012-12-12 10:35:40 +01:00
}
2015-04-06 15:26:26 +02:00
if ( ! isset ( $config [ " metaconsole_agent_cache " ])) {
config_update_value ( 'metaconsole_agent_cache' , 0 );
}
2013-04-16 12:10:44 +02:00
if ( ! isset ( $config [ " show_events_in_local " ])) {
config_update_value ( 'show_events_in_local' , 0 );
}
2013-01-11 17:02:10 +01:00
if ( ! isset ( $config [ " log_collector " ])) {
config_update_value ( 'log_collector' , 0 );
}
2016-07-04 15:46:56 +02:00
if ( ! isset ( $config [ " include_agents " ])) {
config_update_value ( 'include_agents' , 0 );
}
2016-07-05 16:53:40 +02:00
if ( ! isset ( $config [ " auditdir " ])) {
config_update_value ( 'auditdir' , " /var/www/html/pandora_console " );
}
2013-01-11 17:02:10 +01:00
if ( ! isset ( $config [ " log_dir " ])) {
2015-07-06 12:32:14 +02:00
if ( $is_windows )
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\log' ;
else
$default = '/var/spool/pandora/data_in/log' ;
config_update_value ( 'log_dir' , $default );
2013-01-11 17:02:10 +01:00
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2013-02-14 17:44:45 +01:00
if ( ! isset ( $config [ " log_max_lifetime " ])) {
config_update_value ( 'log_max_lifetime' , 15 );
}
2011-04-20 17:54:31 +02:00
if ( ! isset ( $config [ " font_size " ])) {
2012-10-02 11:07:20 +02:00
config_update_value ( 'font_size' , 6 );
2011-04-20 17:54:31 +02:00
}
2012-02-14 15:35:49 +01:00
2015-02-04 11:18:34 +01:00
if ( ! isset ( $config [ " limit_parameters_massive " ])) {
config_update_value ( 'limit_parameters_massive' , ini_get ( " max_input_vars " ) / 2 );
}
2009-10-26 17:35:34 +01:00
/*
2012-02-14 15:35:49 +01:00
* Parse the ACL IP list for access API
2009-10-26 17:35:34 +01:00
*/
2012-02-14 15:35:49 +01:00
$temp_list_ACL_IPs_for_API = array ();
if ( isset ( $config [ 'list_ACL_IPs_for_API' ])) {
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
if ( ! empty ( $config [ 'list_ACL_IPs_for_API' ])) {
$temp_list_ACL_IPs_for_API = explode ( ';' , $config [ 'list_ACL_IPs_for_API' ]);
}
2012-02-14 15:35:49 +01:00
}
$config [ 'list_ACL_IPs_for_API' ] = $temp_list_ACL_IPs_for_API ;
2009-10-26 17:35:34 +01:00
$keysConfig = array_keys ( $config );
2011-02-14 17:56:17 +01:00
2012-02-14 15:35:49 +01:00
2009-09-14 03:02:44 +02:00
// This is not set here. The first time, when no
// setup is done, update_manager extension manage it
// the first time make a conenction and disable itself
// Not Managed here !
2015-06-08 11:05:19 +02:00
// if (!isset ($config["autoupdate"])) {
2011-04-15 14:03:19 +02:00
// config_update_value ('autoupdate', true);
2010-05-06 17:53:38 +02:00
// }
2009-03-05 13:52:59 +01:00
2014-08-04 18:00:58 +02:00
require_once ( $config [ " homedir " ] . " /include/auth/mysql.php " );
2015-05-18 11:05:55 +02:00
require_once ( $config [ " homedir " ] . " /include/functions_io.php " );
2009-04-06 13:02:05 +02:00
2014-08-04 18:00:58 +02:00
// Next is the directory where "/attachment" directory is placed,
// to upload files stores. This MUST be writtable by http server
// user, and should be in pandora root. By default, Pandora adds
// /attachment to this, so by default is the pandora console home
// dir.
2009-04-06 13:02:05 +02:00
if ( ! isset ( $config [ 'attachment_store' ])) {
2014-08-04 18:00:58 +02:00
config_update_value ( 'attachment_store' ,
2015-05-08 09:51:53 +02:00
io_safe_input ( $config [ 'homedir' ]) . '/attachment' );
2009-04-06 13:02:05 +02:00
}
2014-08-04 18:00:58 +02:00
else {
//Fixed when the user moves the pandora console to another dir
//after the first uses.
if ( ! is_dir ( $config [ 'attachment_store' ])) {
config_update_value ( 'attachment_store' ,
2015-06-22 10:30:57 +02:00
$config [ 'homedir' ] . '/attachment' );
2014-08-04 18:00:58 +02:00
}
}
2009-04-06 13:02:05 +02:00
if ( ! isset ( $config [ 'fontpath' ])) {
2016-08-26 12:38:30 +02:00
$home = str_replace ( '\\' , '/' , $config [ 'homedir' ] );
2014-08-04 18:00:58 +02:00
config_update_value ( 'fontpath' ,
2016-08-26 12:38:30 +02:00
$home . '/include/fonts/smallfont.ttf' );
2009-04-06 13:02:05 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-04-06 13:02:05 +02:00
if ( ! isset ( $config [ 'style' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'style' , 'pandora' );
2009-04-06 13:02:05 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
if ( ! isset ( $config [ 'flash_charts' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'flash_charts' , true );
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2015-02-02 14:18:05 +01:00
if ( ! isset ( $config [ " login_background " ])) {
config_update_value ( 'login_background' , '' );
}
2017-03-16 14:35:31 +01:00
if ( ! isset ( $config [ " login_background_meta " ])) {
config_update_value ( 'login_background_meta' , 'background_metaconsole.png' );
}
2015-02-02 14:18:05 +01:00
if ( ! isset ( $config [ " paginate_module " ])) {
config_update_value ( 'paginate_module' , false );
}
if ( ! isset ( $config [ " graphviz_bin_dir " ])) {
config_update_value ( 'graphviz_bin_dir' , " " );
}
if ( ! isset ( $config [ " fixed_header " ])) {
config_update_value ( 'fixed_header' , false );
}
2016-09-28 13:26:58 +02:00
if ( ! isset ( $config [ " fixed_graph " ])) {
config_update_value ( 'fixed_graph' , false );
}
2015-02-02 14:18:05 +01:00
if ( ! isset ( $config [ " fixed_menu " ])) {
config_update_value ( 'fixed_menu' , false );
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
if ( ! isset ( $config [ " custom_logo " ])) {
2016-10-03 19:37:59 +02:00
config_update_value ( 'custom_logo' , 'pandora_logo_head_4.png' );
2016-10-03 12:27:59 +02:00
}
2017-03-15 15:23:28 +01:00
2016-09-28 13:26:58 +02:00
if ( ! isset ( $config [ " custom_logo_login " ])) {
2017-03-15 15:23:28 +01:00
config_update_value ( 'custom_logo_login' , 'login_logo_v7.png' );
2016-09-28 13:26:58 +02:00
}
2017-03-15 15:23:28 +01:00
if ( ! isset ( $config [ " custom_splash_login " ])) {
config_update_value ( 'custom_splash_login' , 'splash_image_default.png' );
}
2016-09-28 13:26:58 +02:00
2017-03-15 15:23:28 +01:00
if ( ! isset ( $config [ " custom_title1_login " ])) {
config_update_value ( 'custom_title1_login' , __ ( 'WELCOME TO PANDORA FMS' ));
}
if ( ! isset ( $config [ " custom_title2_login " ])) {
config_update_value ( 'custom_title2_login' , __ ( 'NEXT GENERATION' ));
}
2017-03-16 14:35:31 +01:00
if ( ! isset ( $config [ " meta_custom_logo " ])) {
config_update_value ( 'meta_custom_logo' , 'logo_pandora_metaconsola.png' );
}
if ( ! isset ( $config [ " meta_custom_logo_login " ])) {
config_update_value ( 'meta_custom_logo_login' , 'pandora_logo.png' );
}
if ( ! isset ( $config [ " meta_custom_splash_login " ])) {
config_update_value ( 'meta_custom_splash_login' , 'splash_image_metaconsola.png' );
}
if ( ! isset ( $config [ " meta_custom_title1_login " ])) {
config_update_value ( 'meta_custom_title1_login' , __ ( 'PANDORA FMS NEXT GENERATION' ));
}
if ( ! isset ( $config [ " meta_custom_title2_login " ])) {
config_update_value ( 'meta_custom_title2_login' , __ ( 'METACONSOLE' ));
}
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_enabled' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_enabled' , false );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2016-11-11 10:29:47 +01:00
if ( ! isset ( $config [ 'history_event_enabled' ])) {
config_update_value ( 'history_event_enabled' , false );
}
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_host' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_host' , '' );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_port' , 3306 );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_name' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_name' , 'pandora' );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_user' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_user' , 'pandora' );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_pass' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_pass' , '' );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_days' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_days' , 0 );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2016-11-11 10:29:47 +01:00
if ( ! isset ( $config [ 'history_event_days' ])) {
config_update_value ( 'history_event_days' , 90 );
}
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_step' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_step' , 0 );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2009-12-18 10:52:25 +01:00
if ( ! isset ( $config [ 'history_db_delay' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'history_db_delay' , 0 );
2009-12-18 10:52:25 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-01-22 15:26:21 +01:00
if ( ! isset ( $config [ 'activate_gis' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'activate_gis' , 0 );
2010-01-22 15:26:21 +01:00
}
2011-12-21 14:09:26 +01:00
if ( ! isset ( $config [ 'activate_netflow' ])) {
config_update_value ( 'activate_netflow' , 0 );
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
if ( ! isset ( $config [ 'netflow_path' ])) {
2015-07-06 12:32:14 +02:00
if ( $is_windows )
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\netflow' ;
else
$default = '/var/spool/pandora/data_in/netflow' ;
config_update_value ( 'netflow_path' , $default );
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
if ( ! isset ( $config [ 'netflow_interval' ])) {
2012-12-12 13:10:16 +01:00
config_update_value ( 'netflow_interval' , SECONDS_10MINUTES );
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2012-01-24 Ramon Novoa <rnovoa@artica.es>
* include/functions_config.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
operation/netflow/nf_live_view.php,
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/configurar_agente.php,
godmode/menu.php,
godmode/netflow/nf_edit_form.php: Added support for enterprise
netflow modules.
* godmode/netflow/nf_manage.php: Moved to
godmode/setup/setup_netflow.php.
* godmode/netflow/nf_option_form.php: Removed from repository. Not used.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5416 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-01-24 18:11:12 +01:00
if ( ! isset ( $config [ 'netflow_daemon' ])) {
config_update_value ( 'netflow_daemon' , '/usr/bin/nfcapd' );
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2012-12-05 Ramon Novoa <rnovoa@artica.es>
* pandoradb_data.sql,
include/functions_config.php,
include/functions_netflow.php,
operation/netflow/nf_live_view.php,
pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql,
godmode/setup/setup_netflow.php,
godmode/netflow/nf_edit_form.php: Performance improvements. Use csv
output to avoid using regular expressions. Removed byte, flow and
packet unit and added kilobyte, megabyte, kilobytes per second and
megabytes per second.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7232 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-05 18:29:06 +01:00
if ( ! isset ( $config [ 'netflow_nfdump' ])) {
config_update_value ( 'netflow_nfdump' , '/usr/bin/nfdump' );
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2013-02-14 17:44:45 +01:00
if ( ! isset ( $config [ 'netflow_nfexpire' ])) {
config_update_value ( 'netflow_nfexpire' , '/usr/bin/nfexpire' );
}
2014-08-12 11:36:05 +02:00
2012-12-12 13:10:16 +01:00
if ( ! isset ( $config [ 'netflow_max_resolution' ])) {
config_update_value ( 'netflow_max_resolution' , '50' );
}
2013-02-01 13:53:33 +01:00
2013-02-04 17:57:39 +01:00
if ( ! isset ( $config [ 'netflow_disable_custom_lvfilters' ])) {
config_update_value ( 'netflow_disable_custom_lvfilters' , 0 );
}
2014-08-12 11:36:05 +02:00
2013-02-14 17:44:45 +01:00
if ( ! isset ( $config [ 'netflow_max_lifetime' ])) {
config_update_value ( 'netflow_max_lifetime' , '5' );
}
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'auth' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'auth' , 'mysql' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'autocreate_remote_users' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'autocreate_remote_users' , 0 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 13:25:44 +02:00
if ( ! isset ( $config [ 'autocreate_blacklist' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'autocreate_blacklist' , '' );
2010-08-10 13:25:44 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'default_remote_profile' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'default_remote_profile' , 0 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'default_remote_group' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'default_remote_group' , 0 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2015-07-28 16:10:45 +02:00
if ( ! isset ( $config [ 'default_assign_tags' ])) {
config_update_value ( 'default_assign_tags' , '' );
}
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_server' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ldap_server' , 'localhost' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ldap_port' , 389 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_version' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ldap_version' , '3' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_start_tls' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ldap_start_tls' , 0 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_base_dn' ])) {
2014-08-04 18:00:58 +02:00
config_update_value ( 'ldap_base_dn' ,
'ou=People,dc=edu,dc=example,dc=org' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ldap_login_attr' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ldap_login_attr' , 'uid' );
2010-08-10 10:58:03 +02:00
}
2014-08-12 11:36:05 +02:00
2014-03-30 13:30:46 +02:00
if ( ! isset ( $config [ 'fallback_local_auth' ])) {
config_update_value ( 'fallback_local_auth' , '0' );
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ad_server' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ad_server' , 'localhost' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ad_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ad_port' , 389 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ad_start_tls' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ad_start_tls' , 0 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2015-07-28 16:10:45 +02:00
if ( ! isset ( $config [ 'ad_advanced_config' ])) {
config_update_value ( 'ad_advanced_config' , 0 );
}
2017-02-27 11:26:48 +01:00
if ( ! isset ( $config [ 'ad_adv_user_node' ])) {
config_update_value ( 'ad_adv_user_node' , 1 );
}
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'ad_domain' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'ad_domain' , '' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2016-09-22 15:21:39 +02:00
if ( ! isset ( $config [ 'ad_adv_perms' ])) {
2015-08-03 13:48:29 +02:00
config_update_value ( 'ad_adv_perms' , '' );
}
2016-10-21 10:37:30 +02:00
else {
if ( ! json_decode ( io_safe_output ( $config [ 'ad_adv_perms' ]))) {
$temp_ad_adv_perms = array ();
if ( $config [ 'ad_adv_perms' ] != '' ) {
$perms = explode ( ';' , io_safe_output ( $config [ 'ad_adv_perms' ]));
foreach ( $perms as $ad_adv_perm ) {
if ( preg_match ( '/[\[\]]/' , $ad_adv_perm )) {
$all_data = explode ( " , " , io_safe_output ( $ad_adv_perm ));
$profile = $all_data [ 0 ];
$group_pnd = $all_data [ 1 ];
$groups_ad = str_replace ( array ( " [ " , " ] " ), " " , $all_data [ 2 ]);
$tags = str_replace ( array ( " [ " , " ] " ), " " , $all_data [ 3 ]);
$groups_ad = explode ( '|' , $groups_ad );
$tags_name = explode ( '|' , $tags );
$tags_ids = array ();
foreach ( $tags_name as $tag ) {
$tags_ids [] = tags_get_id ( $tag );
}
$profile = profile_get_profiles (
array (
" name " => io_safe_input ( $profile )));
if ( ! $profile )
continue ;
$profile_id = array_keys ( $profile );
$id_grupo = groups_get_id ( io_safe_input ( $group_pnd ), false );
$new_ad_adv_perms [] =
array ( 'profile' => $profile_id [ 0 ],
'group' => array ( $id_grupo ),
'tags' => $tags_ids ,
'groups_ad' => $groups_ad );
}
else {
$all_data = explode ( " , " , io_safe_output ( $ad_adv_perm ));
$profile = $all_data [ 0 ];
$group_pnd = $all_data [ 1 ];
$groups_ad = $all_data [ 2 ];
$tags = $all_data [ 3 ];
$profile = profile_get_profiles (
array (
" name " => io_safe_input ( $profile )));
if ( ! $profile )
continue ;
$profile_id = array_keys ( $profile );
$id_grupo = groups_get_id ( io_safe_input ( $group_pnd ), false );
$new_ad_adv_perms [] =
array ( 'profile' => $profile_id [ 0 ],
'group' => array ( $id_grupo ),
'tags' => array ( $tags ),
'groups_ad' => array ( $groups_ad ));
}
}
if ( ! empty ( $new_ad_adv_perms )) {
$temp_ad_adv_perms = json_encode ( $new_ad_adv_perms );
}
2015-08-03 13:48:29 +02:00
}
2016-10-21 10:37:30 +02:00
config_update_value ( 'ad_adv_perms' , $temp_ad_adv_perms );
2015-07-28 16:10:45 +02:00
}
}
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rpandora_server' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rpandora_server' , 'localhost' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rpandora_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rpandora_port' , 3306 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rpandora_dbname' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rpandora_dbname' , 'pandora' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rpandora_user' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rpandora_user' , 'pandora' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rpandora_pass' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rpandora_pass' , '' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rbabel_server' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rbabel_server' , 'localhost' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rbabel_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rbabel_port' , 3306 );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rbabel_dbname' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rbabel_dbname' , 'babel' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rbabel_user' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rbabel_user' , 'babel' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 10:58:03 +02:00
if ( ! isset ( $config [ 'rbabel_pass' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rbabel_pass' , '' );
2010-08-10 10:58:03 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 11:21:20 +02:00
if ( ! isset ( $config [ 'rintegria_server' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rintegria_server' , 'localhost' );
2010-08-10 11:21:20 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 11:21:20 +02:00
if ( ! isset ( $config [ 'rintegria_port' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rintegria_port' , 3306 );
2010-08-10 11:21:20 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 11:21:20 +02:00
if ( ! isset ( $config [ 'rintegria_dbname' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rintegria_dbname' , 'integria' );
2010-08-10 11:21:20 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 11:21:20 +02:00
if ( ! isset ( $config [ 'rintegria_user' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rintegria_user' , 'integria' );
2010-08-10 11:21:20 +02:00
}
2012-07-16 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php, extensions/users_connected.php,
extensions/agents_alerts.php,
operation/visual_console/render_view.php,
operation/visual_console/public_console.php,
operation/agentes/networkmap.groups.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php, general/header.php,
godmode/db/db_refine.php, godmode/agentes/configurar_agente.php,
godmode/alerts/configure_alert_compound.php,
godmode/setup/setup_visuals.php, godmode/snmpconsole/snmp_alert.php,
godmode/modules/manage_network_components_form_wmi.php,
include/functions_config.php, include/functions_api.php,
include/functions_agents.php, include/functions_forecast.php:
cleaned source code style and change magic numbers for time
constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6773 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-16 11:24:04 +02:00
2010-08-10 11:21:20 +02:00
if ( ! isset ( $config [ 'rintegria_pass' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'rintegria_pass' , '' );
2010-08-10 11:21:20 +02:00
}
2010-10-06 16:37:33 +02:00
2016-09-08 17:36:56 +02:00
if ( ! isset ( $config [ 'saml_path' ])) {
config_update_value ( 'saml_path' , '/opt/' );
}
2010-10-06 16:37:33 +02:00
if ( ! isset ( $config [ 'autoupdate' ])) {
2012-04-13 12:39:28 +02:00
config_update_value ( 'autoupdate' , 1 );
2010-10-06 16:37:33 +02:00
}
2010-10-21 17:06:53 +02:00
2011-02-14 17:56:17 +01:00
if ( ! isset ( $config [ 'api_password' ])) {
2011-04-15 14:03:19 +02:00
config_update_value ( 'api_password' , '' );
2011-02-14 17:56:17 +01:00
}
2012-04-12 13:31:45 +02:00
2014-08-04 18:00:58 +02:00
if ( defined ( 'METACONSOLE' )) {
2013-06-06 17:57:11 +02:00
// Customizable sections (Metaconsole)
enterprise_include_once ( 'include/functions_enterprise.php' );
$customizable_sections = enterprise_hook ( 'enterprise_get_customizable_sections' );
2014-08-04 18:00:58 +02:00
2013-06-06 17:57:11 +02:00
if ( $customizable_sections != ENTERPRISE_NOT_HOOK ) {
foreach ( $customizable_sections as $k => $v ) {
if ( ! isset ( $config [ $k ])) {
config_update_value ( $k , $v [ 'default' ]);
}
}
2013-02-01 13:53:33 +01:00
}
if ( ! isset ( $config [ 'meta_num_elements' ])) {
config_update_value ( 'meta_num_elements' , 100 );
}
}
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
if ( ! isset ( $config [ 'relative_path' ]) && ( isset ( $_POST [ 'nick' ])
|| isset ( $config [ 'id_user' ])) && isset ( $config [ 'enterprise_installed' ])) {
2014-08-04 18:00:58 +02:00
2011-02-14 10:08:41 +01:00
$isFunctionSkins = enterprise_include_once ( 'include/functions_skins.php' );
2012-06-18 12:45:00 +02:00
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
// Try to update user table in order to refresh skin inmediatly
$is_user_updating = get_parameter ( " sec2 " , " " );
if ( $is_user_updating == 'operation/users/user_edit' ) {
$id = get_parameter_get ( " id " , $config [ " id_user " ]); // ID given as parameter
$user_info = get_user_info ( $id );
//If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info
if (( $config [ " id_user " ] == $id || check_acl ( $config [ " id_user " ], users_get_groups ( $id ), " UM " )) && $config [ " user_can_update_info " ]) {
$view_mode = false ;
2013-03-05 12:00:40 +01:00
}
else {
2012-06-18 12:45:00 +02:00
$view_mode = true ;
}
2012-06-28 15:44:15 +02:00
2012-06-18 12:45:00 +02:00
if ( isset ( $_GET [ " modified " ]) && ! $view_mode ) {
$upd_info [ " id_skin " ] = get_parameter ( " skin " , $user_info [ " id_skin " ]);
$return_update_skin = update_user ( $id , $upd_info );
}
2012-06-28 15:44:15 +02:00
}
2012-06-18 12:45:00 +02:00
if ( isset ( $config [ 'id_user' ]))
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_html.php
include/functions_menu.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_groups.php
include/functions_gis.php
include/auth/ldap.php
include/auth/mysql.php
include/functions_networkmap.php
include/functions_network_components.php
include/functions_visual_map.php
include/functions_profile.php
include/ajax/visual_console_builder.ajax.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_config.php
include/functions_api.php
include/functions_ui.php
include/functions_custom_graphs.php
include/fgraph.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
index.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
operation/incidents/incident_detail.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/group_view.php
operation/search_agents.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident_detail.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/events/events_rss.php
operation/events/export_csv.php
operation/events/events_list.php
operation/events/events_marquee.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
ajax.php
general/ui/agents_list.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/setup/setup_auth.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_profile.php, functions_agents.php, functions_users.php,
functions_massive_policies.php, functions_audit.php, functions_backup.php,
functions_collection.php, functions_skins.php, functions_enterprise.php,
functions_groups.php, functions_local_components.php, functions_metaconsole.php,
functions_policies.php, functions_reporting.php, functions_reporting_csv.php,
functions_reporting_pdf2.php, functions_services.php have their own prefixes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
$relative_path = enterprise_hook ( 'skins_set_image_skin_path' , array ( $config [ 'id_user' ]));
2011-02-14 10:08:41 +01:00
else
2012-11-08 16:09:24 +01:00
$relative_path = enterprise_hook ( 'skins_set_image_skin_path' , array ( get_parameter ( 'nick' )));
2011-02-14 10:08:41 +01:00
$config [ 'relative_path' ] = $relative_path ;
}
2011-07-21 12:57:54 +02:00
}
2012-04-12 13:31:45 +02:00
2011-07-21 12:57:54 +02:00
if ( ! isset ( $config [ 'dbtype' ])) {
config_update_value ( 'dbtype' , 'mysql' );
}
2011-11-17 17:55:32 +01:00
if ( ! isset ( $config [ 'vc_refr' ])) {
2016-01-28 11:57:32 +01:00
config_update_value ( 'vc_refr' , 300 );
2012-04-12 13:31:45 +02:00
}
2011-11-17 17:55:32 +01:00
2012-06-28 15:44:15 +02:00
if ( ! isset ( $config [ 'agent_size_text_small' ])) {
config_update_value ( 'agent_size_text_small' , 18 );
}
if ( ! isset ( $config [ 'agent_size_text_medium' ])) {
config_update_value ( 'agent_size_text_medium' , 50 );
}
if ( ! isset ( $config [ 'module_size_text_small' ])) {
config_update_value ( 'module_size_text_small' , 25 );
}
if ( ! isset ( $config [ 'module_size_text_medium' ])) {
config_update_value ( 'module_size_text_medium' , 50 );
}
if ( ! isset ( $config [ 'description_size_text' ])) {
config_update_value ( 'description_size_text' , 60 );
}
if ( ! isset ( $config [ 'item_title_size_text' ])) {
config_update_value ( 'item_title_size_text' , 45 );
}
2017-01-17 11:38:00 +01:00
if ( ! isset ( $config [ 'simple_module_value' ])) {
config_update_value ( 'simple_module_value' , 1 );
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
2012-08-17 13:39:25 +02:00
if ( ! isset ( $config [ 'gis_label' ])) {
config_update_value ( 'gis_label' , 0 );
}
2015-10-23 12:54:58 +02:00
if ( ! isset ( $config [ 'interface_unit' ])) {
config_update_value ( 'interface_unit' , __ ( 'Bytes' ));
}
2016-10-18 10:32:10 +02:00
if ( ! isset ( $config [ 'graph_precision' ])) {
config_update_value ( 'graph_precision' , 1 );
}
else {
if ( ! isset ( $config [ 'enterprise_installed' ])) {
config_update_value ( 'graph_precision' , 1 );
}
}
2015-10-23 12:54:58 +02:00
2012-08-17 13:39:25 +02:00
if ( ! isset ( $config [ 'gis_default_icon' ])) {
config_update_value ( 'gis_default_icon' , " marker " );
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
2012-12-11 17:20:10 +01:00
if ( ! isset ( $config [ 'interval_values' ])) {
config_update_value ( 'interval_values' , " " );
}
2012-09-06 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php, general/login_page.php,
godmode/setup/setup.php, include/functions_ui.php,
include/functions_graph.php, include/functions_html.php,
include/graphs/fgraph.php, include/graphs/functions_pchart.php,
include/graphs/functions_flot.php, include/functions_reporting.php,
include/functions_visual_map.php, include/functions_config.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
operation/agentes/tactical.php, operation/menu.php,
operation/events/events.php: added the feature to set a
public url for inverse proxy or for example mod_proxy of Apache.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-06 19:01:22 +02:00
if ( ! isset ( $config [ 'public_url' ])) {
config_update_value ( 'public_url' , " " );
}
2012-10-01 15:28:34 +02:00
if ( ! isset ( $config [ 'referer_security' ])) {
config_update_value ( 'referer_security' , 0 );
}
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/functions_agents.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/functions_snmp_browser.php,
operation/agentes/status_monitor.php: improved code style.
* include/functions_graph.php, include/graphs/fgraph.php,
include/graphs/flot/jquery.flot.pie.js,
include/graphs/flot/jquery.flot.pie.min.js,
include/graphs/flot/pandora.flot.js,
include/graphs/functions_flot.php: fixed the pie graphs, added the
expanded version of flot pie js file with some changes for the
last version of jQuery.
Fixes: #3604555
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 11:35:04 +01:00
2013-01-31 19:05:22 +01:00
if ( ! isset ( $config [ 'event_storm_protection' ])) {
config_update_value ( 'event_storm_protection' , 0 );
}
2013-02-05 18:44:21 +01:00
2014-11-20 12:48:47 +01:00
if ( ! isset ( $config [ 'server_log_dir' ])) {
config_update_value ( 'server_log_dir' , " " );
}
2014-11-20 15:06:11 +01:00
if ( ! isset ( $config [ 'show_group_name' ])) {
config_update_value ( 'show_group_name' , 0 );
}
2015-06-11 20:17:54 +02:00
if ( ! isset ( $config [ 'custom_graph_width' ])) {
config_update_value ( 'custom_graph_width' , 1 );
2015-03-17 15:36:24 +01:00
}
2015-06-11 21:24:14 +02:00
if ( ! isset ( $config [ 'type_module_charts' ])) {
config_update_value ( 'type_module_charts' , 'area' );
}
2016-11-30 10:23:06 +01:00
if ( ! isset ( $config [ 'type_interface_charts' ])) {
config_update_value ( 'type_interface_charts' , 'line' );
}
2015-06-11 21:24:14 +02:00
2015-05-04 15:44:37 +02:00
if ( ! isset ( $config [ 'render_proc' ])) {
config_update_value ( 'render_proc' , 0 );
}
2015-03-17 15:36:24 +01:00
2015-07-22 11:49:00 +02:00
if ( ! isset ( $config [ " render_proc_ok " ])) {
config_update_value ( 'render_proc_ok' , __ ( 'Ok' ) );
}
if ( ! isset ( $config [ " render_proc_fail " ])) {
config_update_value ( 'render_proc_fail' , __ ( 'Fail' ) );
}
2016-06-02 11:59:35 +02:00
//Daniel maya 02/06/2016 Display menu with click --INI
if ( ! isset ( $config [ " click_display " ])) {
2016-06-06 11:35:14 +02:00
config_update_value ( 'click_display' , 1 );
2016-06-02 11:59:35 +02:00
}
//Daniel maya 02/06/2016 Display menu with click --END
2017-02-01 11:57:10 +01:00
if ( isset ( $config [ 'enterprise_installed' ]) && $config [ 'enterprise_installed' ] == 1 ) {
if ( ! isset ( $config [ " service_label_font_size " ])) {
2017-02-16 10:09:05 +01:00
config_update_value ( 'service_label_font_size' , 20 );
2017-02-01 11:57:10 +01:00
}
if ( ! isset ( $config [ " service_item_padding_size " ])) {
2017-02-01 12:02:33 +01:00
config_update_value ( 'service_item_padding_size' , 80 );
2017-02-01 11:57:10 +01:00
}
}
2017-02-07 12:58:29 +01:00
if ( ! isset ( $config [ " classic_menu " ])) {
config_update_value ( 'classic_menu' , 0 );
}
2013-02-05 18:44:21 +01:00
if ( ! isset ( $config [ 'command_snapshot' ])) {
config_update_value ( 'command_snapshot' , 1 );
2013-02-06 12:00:51 +01:00
}
2014-05-07 18:42:12 +02:00
// Juanma (06/05/2014) New feature: Custom front page for reports
if ( ! isset ( $config [ 'custom_report_front' ])) {
config_update_value ( 'custom_report_front' , 0 );
}
if ( ! isset ( $config [ 'custom_report_front_font' ])) {
config_update_value ( 'custom_report_front_font' , 'FreeSans.ttf' );
2014-06-24 15:17:14 +02:00
}
2014-05-07 18:42:12 +02:00
if ( ! isset ( $config [ 'custom_report_front_logo' ])) {
2014-08-04 18:00:58 +02:00
config_update_value ( 'custom_report_front_logo' ,
'images/pandora_logo_white.jpg' );
2014-05-07 18:42:12 +02:00
}
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! isset ( $config [ 'custom_report_front_header' ])) {
config_update_value ( 'custom_report_front_header' , '' );
}
2014-06-24 15:17:14 +02:00
2014-05-07 18:42:12 +02:00
if ( ! isset ( $config [ 'custom_report_front_firstpage' ])) {
2014-08-04 18:00:58 +02:00
config_update_value ( 'custom_report_front_firstpage' ,
2015-09-01 12:50:09 +02:00
" <p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;"><img src="(_URLIMAGE_)/images/pandora_report_logo.png" alt="" width="800" /></p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: center;"><span style="font-size: xx-large;">(_REPORT_NAME_)</span></p>
<p style="text-align: center;"><span style="font-size: large;">(_DATETIME_)</span></p> " );
2014-06-24 15:17:14 +02:00
}
2014-05-07 18:42:12 +02:00
if ( ! isset ( $config [ 'custom_report_front_footer' ])) {
config_update_value ( 'custom_report_front_footer' , '' );
}
2014-06-24 15:17:14 +02:00
2014-05-21 12:44:36 +02:00
if ( ! isset ( $config [ 'autohidden_menu' ])) {
config_update_value ( 'autohidden_menu' , 0 );
}
2014-06-24 15:17:14 +02:00
if ( ! isset ( $config [ 'networkmap_max_width' ])) {
2014-06-25 19:43:10 +02:00
config_update_value ( 'networkmap_max_width' , 900 );
2014-06-24 15:17:14 +02:00
}
2014-08-12 11:36:05 +02:00
if ( ! isset ( $config [ 'tutorial_mode' ])) {
config_update_value ( 'tutorial_mode' , 'full' );
}
2015-02-09 19:34:36 +01:00
if ( ! isset ( $config [ 'post_process_custom_values' ])) {
config_update_value ( 'post_process_custom_values' ,
json_encode ( array ()));
}
2015-02-10 16:40:44 +01:00
if ( ! isset ( $config [ 'update_manager_proxy_server' ])) {
config_update_value ( 'update_manager_proxy_server' ,
" " );
}
if ( ! isset ( $config [ 'update_manager_proxy_port' ])) {
config_update_value ( 'update_manager_proxy_port' ,
" " );
}
if ( ! isset ( $config [ 'update_manager_proxy_user' ])) {
config_update_value ( 'update_manager_proxy_user' ,
" " );
}
if ( ! isset ( $config [ 'update_manager_proxy_password' ])) {
config_update_value ( 'update_manager_proxy_password' ,
" " );
}
2015-04-13 11:27:23 +02:00
if ( ! isset ( $config [ " session_timeout " ])) {
config_update_value ( 'session_timeout' , 90 );
}
2015-05-06 18:28:46 +02:00
if ( ! isset ( $config [ " max_file_size " ])) {
config_update_value ( 'max_file_size' , " 2M " );
}
2016-05-25 12:43:49 +02:00
if ( ! isset ( $config [ " initial_wizard " ])) {
config_update_value ( 'initial_wizard' , 0 );
}
if ( ! isset ( $config [ " identification_reminder " ])) {
config_update_value ( 'identification_reminder' , 1 );
}
2016-06-13 18:18:12 +02:00
if ( ! isset ( $config [ " identification_reminder_timestamp " ])) {
config_update_value ( 'identification_reminder_timestamp' , 0 );
}
2016-05-25 12:43:49 +02:00
if ( ! isset ( $config [ " instance_registered " ])) {
config_update_value ( 'instance_registered' , 0 );
}
2016-05-04 19:19:07 +02:00
// eHorus
if ( ! isset ( $config [ 'ehorus_enabled' ])) {
config_update_value ( 'ehorus_enabled' , 0 );
}
2016-05-09 18:48:56 +02:00
if ( ! isset ( $config [ 'ehorus_custom_field' ])) {
config_update_value ( 'ehorus_custom_field' , 'eHorusID' );
}
2016-05-04 19:19:07 +02:00
if ( ! isset ( $config [ 'ehorus_hostname' ])) {
config_update_value ( 'ehorus_hostname' , 'switch.ehorus.com' );
}
if ( ! isset ( $config [ 'ehorus_port' ])) {
config_update_value ( 'ehorus_port' , 18080 );
}
if ( ! isset ( $config [ 'ehorus_req_timeout' ])) {
config_update_value ( 'ehorus_req_timeout' , 5 );
}
2015-05-06 18:28:46 +02:00
2009-03-05 13:52:59 +01:00
/* Finally, check if any value was overwritten in a form */
2011-04-15 14:03:19 +02:00
config_update_config ();
2009-03-05 13:52:59 +01:00
}
2011-06-27 17:27:19 +02:00
2012-06-28 15:44:15 +02:00
function config_check () {
2012-04-12 13:31:45 +02:00
global $config ;
// At this first version I'm passing errors using session variables, because the error management
// is done by an AJAX request. Better solutions could be implemented in the future :-)
2012-08-17 13:39:25 +02:00
2016-05-26 18:41:38 +02:00
if ( license_free () && users_is_admin ( $config [ 'id_user' ])) {
2016-06-13 17:24:47 +02:00
$login = get_parameter ( 'login' , false );
2016-05-26 18:41:38 +02:00
//Registration advice
2016-06-13 17:24:47 +02:00
if (( ! isset ( $config [ 'instance_registered' ]) || ( $config [ 'instance_registered' ] != 1 )) && ( $login === false )) {
2016-05-26 18:41:38 +02:00
set_pandora_error_for_header (
2016-06-13 17:24:47 +02:00
__ ( 'Click <a style="font-weight:bold; text-decoration:underline" href="javascript: force_run_register();"> here</a> to start the registration process' ),
__ ( " This instance is not registered in the Update manager " ));
2016-05-26 18:41:38 +02:00
}
//Newsletter advice
$newsletter = db_get_value ( 'middlename' , 'tusuario' , 'id_user' , $config [ 'id_user' ]);
2016-06-13 17:24:47 +02:00
if ( $newsletter != 1 && $login === false ) {
2016-05-26 18:41:38 +02:00
set_pandora_error_for_header (
2016-06-13 17:24:47 +02:00
__ ( 'Click <a style="font-weight:bold; text-decoration:underline" href="javascript: force_run_newsletter();"> here</a> to start the newsletter subscription process' ),
2016-06-14 18:33:39 +02:00
__ ( " Not subscribed to the newsletter " ));
2016-05-26 18:41:38 +02:00
}
}
2012-04-12 13:31:45 +02:00
// Check default password for "admin"
2012-06-18 16:08:02 +02:00
$is_admin = db_get_value ( 'is_admin' , 'tusuario' , 'id_user' , $config [ 'id_user' ]);
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
if ( $is_admin ) {
2014-06-10 16:34:27 +02:00
$hashpass = db_get_sql ( " SELECT password
FROM tusuario WHERE id_user = 'admin' " );
2015-03-17 16:48:29 +01:00
if ( $hashpass == " 1da7ee7d45b96d0e1f45ee4ee23da560 " ) {
set_pandora_error_for_header (
__ ( 'Default password for "Admin" user has not been changed.' ),
__ ( 'Please change the default password because is a common vulnerability reported.' ));
2012-06-18 16:08:02 +02:00
}
2012-04-12 13:31:45 +02:00
}
2013-10-16 12:47:28 +02:00
if ( isset ( $config [ 'license_expired' ])) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'You can not get updates until you renew the license.' ),
__ ( 'This license has expired.' ));
2013-10-16 12:47:28 +02:00
}
2012-08-02 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql,
pandoradb.data.oracle.sql, include/functions_config.php: fixed the
"list_ACL_IPs_for_API" update.
* operation/events/events_marquee.php, godmode/setup/setup.php,
godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_special_days.php,
include/functions_api.php, include/functions_ui.php,
include/functions_netflow.php, include/functions_alerts.php,
include/functions_menu.php, include/functions_messages.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6846 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-03 14:48:09 +02:00
if ( ! is_writable ( " attachment " )) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'Please check that the web server has write rights on the {HOMEDIR}/attachment directory' ),
__ ( 'Attachment directory is not writable by HTTP Server' ));
2012-04-12 13:31:45 +02:00
}
// Get remote file dir.
2015-04-30 13:44:16 +02:00
$remote_config = io_safe_output ( db_get_value_filter ( 'value' ,
'tconfig' , array ( 'token' => 'remote_config' )));
2014-05-30 12:51:33 +02:00
2012-04-12 13:31:45 +02:00
if ( enterprise_installed ()) {
2015-05-04 15:44:37 +02:00
2013-10-29 14:16:47 +01:00
if ( ! is_readable ( $remote_config )) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'Remote configuration directory is not readble for the console' ) .
' - ' . $remote_config );
2012-04-12 13:31:45 +02:00
}
$remote_config_conf = $remote_config . " /conf " ;
2013-10-29 14:16:47 +01:00
if ( ! is_writable ( $remote_config_conf )) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header ( __ ( 'Remote configuration directory is not writtable for the console' ) .
' - ' . $remote_config . '/conf' );
2012-04-12 13:31:45 +02:00
}
$remote_config_col = $remote_config . " /collections " ;
2013-10-29 14:16:47 +01:00
if ( ! is_writable ( $remote_config_col )) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'Remote configuration directory is not writtable for the console' ) .
' - ' . $remote_config . '/collections' );
2012-04-12 13:31:45 +02:00
}
}
// Check attachment directory (too much files?)
$filecount = count ( glob ( $config [ " homedir " ] . " /attachment/* " ));
2013-01-10 16:23:06 +01:00
// N temporal files of trash should be enough for most people.
if ( $filecount > $config [ 'num_files_attachment' ]) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( " There are too much files in attachment directory. This is not fatal, but you should consider cleaning up your attachment directory manually " ) . " ( $filecount " . __ ( " files " ) . " ) " ,
__ ( 'Too much files in your tempora/attachment directory' ));
2012-04-12 13:31:45 +02:00
}
// Check database maintance
2015-03-17 16:48:29 +01:00
$db_maintance = db_get_value_filter ( 'value' , 'tconfig' ,
array ( 'token' => 'db_maintance' ));
2012-04-12 13:31:45 +02:00
2013-09-30 15:57:48 +02:00
// If never was executed, it means we are in the first Pandora FMS execution. Set current timestamp
2015-03-17 16:48:29 +01:00
if ( empty ( $db_maintance )) {
2013-09-30 15:57:48 +02:00
config_update_value ( 'db_maintance' , date ( " U " ));
}
2012-04-12 13:31:45 +02:00
2013-09-30 15:57:48 +02:00
$last_maintance = date ( " U " ) - $db_maintance ;
2012-04-12 13:31:45 +02:00
// ~ about 50 hr
2015-03-17 16:48:29 +01:00
if ( $last_maintance > 190000 ) {
set_pandora_error_for_header (
__ ( 'Your database is not well maintained. Seems that it have more than 48hr without a proper maintance. Please review Pandora FMS documentation about how to execute this maintance process (pandora_db.pl) and enable it as soon as possible' ),
__ ( " Database maintance problem " ));
2012-04-12 13:31:45 +02:00
}
2015-04-30 13:44:16 +02:00
$fontpath = io_safe_output ( db_get_value_filter ( 'value' , 'tconfig' , array ( 'token' => 'fontpath' )));
2012-04-12 13:31:45 +02:00
if (( $fontpath == " " ) OR ( ! file_exists ( $fontpath ))) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'Your defined font doesnt exist or is not defined. Please check font parameters in your config' ),
__ ( " Default font doesnt exist " ));
2012-04-12 13:31:45 +02:00
}
2015-04-06 12:18:14 +02:00
if ( $config [ 'event_storm_protection' ]) {
set_pandora_error_for_header (
__ ( 'You need to restart server after altering this configuration setting.' ),
__ ( 'Event storm protection is activated. No events will be generated during this mode.' ));
}
2012-04-12 13:31:45 +02:00
global $develop_bypass ;
2015-03-17 16:48:29 +01:00
if ( $develop_bypass == 1 ) {
set_pandora_error_for_header (
__ ( 'Your Pandora FMS has the "develop_bypass" mode enabled. This is a developer mode and should be disabled in a production system. This value is written in the main index.php file' ),
__ ( " Developer mode is enabled " ));
2012-04-12 13:31:45 +02:00
}
if ( isset ( $_SESSION [ 'new_update' ])) {
2012-04-18 20:39:58 +02:00
if ( ! empty ( $_SESSION [ 'return_installation_open' ])) {
if ( ! $_SESSION [ 'return_installation_open' ][ 'return' ]) {
foreach ( $_SESSION [ 'return_installation_open' ][ 'text' ] as $message ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
$message ,
__ ( " Error first setup Open update " ));
2012-04-18 20:39:58 +02:00
}
}
}
2012-04-12 13:31:45 +02:00
if ( $_SESSION [ 'new_update' ] == 'new' ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
2015-05-26 09:41:31 +02:00
__ ( 'There is a new update available. Please<a style="font-weight:bold;" href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online"> go to Administration:Setup:Update Manager</a> for more details.' ),
2015-03-17 16:48:29 +01:00
__ ( " New update of Pandora Console " ));
2012-04-12 13:31:45 +02:00
}
}
2012-04-18 10:08:04 +02:00
2014-01-13 14:06:45 +01:00
// PHP configuration values
$PHPupload_max_filesize = config_return_in_bytes ( ini_get ( 'upload_max_filesize' ));
$PHPmax_input_time = ini_get ( 'max_input_time' );
$PHPmemory_limit = config_return_in_bytes ( ini_get ( 'memory_limit' ));
$PHPmax_execution_time = ini_get ( 'max_execution_time' );
2014-05-12 14:36:03 +02:00
$PHPsafe_mode = ini_get ( 'safe_mode' );
2015-05-08 09:51:53 +02:00
$PHPdisable_functions = ini_get ( 'disable_functions' );
2014-05-12 14:36:03 +02:00
if ( $PHPsafe_mode === '1' ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
__ ( 'To disable, change it on your PHP configuration file (php.ini) and put safe_mode = Off (Dont forget restart apache process after changes)' ),
sprintf ( __ ( " PHP safe mode is enabled. Some features may not properly work. " )));
2014-05-12 14:36:03 +02:00
}
2014-01-13 14:06:45 +01:00
if ( $PHPmax_input_time !== '-1' ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
sprintf ( __ ( 'Recommended value is %s' ), '-1 (' . __ ( 'Unlimited' ) . ')' ) . '<br><br>' . __ ( 'Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)' ),
sprintf ( __ ( " Not recommended '%s' value in PHP configuration " ), 'max_input_time' ));
2014-01-13 14:06:45 +01:00
}
if ( $PHPmax_execution_time !== '0' ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
sprintf ( __ ( 'Recommended value is: %s' ), '0 (' . __ ( 'Unlimited' ) . ')' ) . '<br><br>' . __ ( 'Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)' ),
sprintf ( __ ( " Not recommended '%s' value in PHP configuration " ), 'max_execution_time' ));
2014-01-13 14:06:45 +01:00
}
$PHPupload_max_filesize_min = config_return_in_bytes ( '800M' );
if ( $PHPupload_max_filesize < $PHPupload_max_filesize_min ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
sprintf ( __ ( 'Recommended value is: %s' ), sprintf ( __ ( '%s or greater' ), '800M' )) . '<br><br>' . __ ( 'Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)' ),
sprintf ( __ ( " Not recommended '%s' value in PHP configuration " ), 'upload_max_filesize' ));
2014-01-13 14:06:45 +01:00
}
$PHPmemory_limit_min = config_return_in_bytes ( '500M' );
if ( $PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== '-1' ) {
2015-03-17 16:48:29 +01:00
set_pandora_error_for_header (
sprintf ( __ ( 'Recommended value is: %s' ), sprintf ( __ ( '%s or greater' ), '500M' )) . '<br><br>' . __ ( 'Please, change it on your PHP configuration file (php.ini) or contact with administrator' ),
sprintf ( __ ( " Not recommended '%s' value in PHP configuration " ), 'memory_limit' ));
2014-01-13 14:06:45 +01:00
}
2015-05-08 09:51:53 +02:00
if ( preg_match ( " /system/ " , $PHPdisable_functions ) or preg_match ( " /exec/ " , $PHPdisable_functions )) {
set_pandora_error_for_header (
__ ( " Variable disable_functions containts functions system() or exec(), in PHP configuration file (php.ini) " ) . '<br /><br />' .
__ ( 'Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)' ), __ ( " Problems with disable functions in PHP.INI " ));
}
2016-05-25 12:43:49 +02:00
2014-01-13 14:06:45 +01:00
}
function config_return_in_bytes ( $val ) {
$val = trim ( $val );
2015-01-19 14:35:56 +01:00
$last = strtolower ( $val [ strlen ( $val ) - 1 ]);
switch ( $last ) {
2014-01-13 14:06:45 +01:00
// The 'G' modifier is available since PHP 5.1.0
case 'g' :
$val *= 1024 ;
case 'm' :
$val *= 1024 ;
case 'k' :
$val *= 1024 ;
}
2015-01-19 14:35:56 +01:00
2014-01-13 14:06:45 +01:00
return $val ;
2011-06-27 17:27:19 +02:00
}
2015-01-19 14:35:56 +01:00
function config_user_set_custom_config () {
global $config ;
$userinfo = get_user_info ( $config [ 'id_user' ]);
// Refresh the last_connect info in the user table
// if last update was more than 5 minutes ago
if ( $userinfo [ 'last_connect' ] < ( time () - SECONDS_1MINUTE )) {
update_user ( $config [ 'id_user' ], array ( 'last_connect' => time ()));
}
// If block_size or flash_chart are provided then override global settings
if ( ! empty ( $userinfo [ " block_size " ]) && ( $userinfo [ " block_size " ] != 0 ))
$config [ " block_size " ] = $userinfo [ " block_size " ];
if ( $userinfo [ " flash_chart " ] != - 1 )
$config [ " flash_charts " ] = $userinfo [ " flash_chart " ];
// Each user could have it's own timezone)
if ( isset ( $userinfo [ " timezone " ])) {
if ( $userinfo [ " timezone " ] != " " ) {
date_default_timezone_set ( $userinfo [ " timezone " ]);
}
}
if ( defined ( 'METACONSOLE' )) {
$config [ 'metaconsole_access' ] = $userinfo [ " metaconsole_access " ];
}
}
2015-04-13 11:27:23 +02:00
function config_prepare_session () {
global $config ;
2016-11-23 10:13:02 +01:00
$user = users_get_user_by_id ( $config [ " id_user " ]);
$user_sesion_time = $user [ 'session_time' ];
if ( $user_sesion_time == 0 ) {
// Change the session timeout value to session_timeout minutes // 8*60*60 = 8 hours
$sessionCookieExpireTime = $config [ " session_timeout " ];
}
else {
// Change the session timeout value to session_timeout minutes // 8*60*60 = 8 hours
$sessionCookieExpireTime = $user_sesion_time ;
}
2016-11-07 15:50:04 +01:00
if ( $sessionCookieExpireTime <= 0 )
$sessionCookieExpireTime = 10 * 365 * 24 * 60 * 60 ;
else
$sessionCookieExpireTime *= 60 ;
2015-04-13 11:27:23 +02:00
ini_set ( 'session.gc_maxlifetime' , $sessionCookieExpireTime );
session_set_cookie_params ( $sessionCookieExpireTime );
// Reset the expiration time upon page load //session_name() is default name of session PHPSESSID
if ( isset ( $_COOKIE [ session_name ()]))
setcookie ( session_name (), $_COOKIE [ session_name ()], time () + $sessionCookieExpireTime , " / " );
2015-05-06 18:28:46 +02:00
ini_set ( " post_max_size " , $config [ " max_file_size " ]);
ini_set ( " upload_max_filesize " , $config [ " max_file_size " ]);
2015-04-13 11:27:23 +02:00
}
2009-06-08 20:26:14 +02:00
?>