2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02: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-06-08 20:26:14 +02:00
// Please see http://pandorafms.org for full contribution list
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02: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-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
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 Filemanager
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
*/
/** #@+
* Constants
*/
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
define ( 'MIME_UNKNOWN' , 0 );
define ( 'MIME_DIR' , 1 );
define ( 'MIME_IMAGE' , 2 );
define ( 'MIME_ZIP' , 3 );
2010-07-07 14:27:37 +02:00
define ( 'MIME_TEXT' , 4 );
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-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
if ( ! function_exists ( 'mime_content_type' )) {
/**
* Gets the MIME type of a file .
*
* Help function in case mime_magic is not loaded on PHP .
*
* @ param string Filename to get MIME type .
*
* @ return The MIME type of the file .
*/
function mime_content_type ( $filename ) {
$mime_types = array (
'txt' => 'text/plain' ,
'htm' => 'text/html' ,
'html' => 'text/html' ,
'php' => 'text/html' ,
'css' => 'text/css' ,
'js' => 'application/javascript' ,
'json' => 'application/json' ,
'xml' => 'application/xml' ,
'swf' => 'application/x-shockwave-flash' ,
'flv' => 'video/x-flv' ,
// images
'png' => 'image/png' ,
'jpe' => 'image/jpeg' ,
'jpeg' => 'image/jpeg' ,
'jpg' => 'image/jpeg' ,
'gif' => 'image/gif' ,
'bmp' => 'image/bmp' ,
'ico' => 'image/vnd.microsoft.icon' ,
'tiff' => 'image/tiff' ,
'tif' => 'image/tiff' ,
'svg' => 'image/svg+xml' ,
'svgz' => 'image/svg+xml' ,
// archives
'zip' => 'application/zip' ,
'rar' => 'application/x-rar-compressed' ,
'exe' => 'application/x-msdownload' ,
'msi' => 'application/x-msdownload' ,
'cab' => 'application/vnd.ms-cab-compressed' ,
'gz' => 'application/x-gzip' ,
'gz' => 'application/x-bzip2' ,
// audio/video
'mp3' => 'audio/mpeg' ,
'qt' => 'video/quicktime' ,
'mov' => 'video/quicktime' ,
// adobe
'pdf' => 'application/pdf' ,
'psd' => 'image/vnd.adobe.photoshop' ,
'ai' => 'application/postscript' ,
'eps' => 'application/postscript' ,
'ps' => 'application/postscript' ,
// ms office
'doc' => 'application/msword' ,
'rtf' => 'application/rtf' ,
'xls' => 'application/vnd.ms-excel' ,
'ppt' => 'application/vnd.ms-powerpoint' ,
// open office
'odt' => 'application/vnd.oasis.opendocument.text' ,
'ods' => 'application/vnd.oasis.opendocument.spreadsheet'
);
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/manage_recontask_form.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components.php,
include/functions_ui.php, include/functions_incidents.php,
include/functions_agents.php, include/functions_alerts.php,
include/functions_messages.php, include/db/mysql.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/auth/ldap.php, operation/events/events.php,
operation/incidents/incident_detail.php, operation/tree.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/users/user_edit.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6798 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 10:54:40 +02:00
2016-07-04 10:48:18 +02:00
$ext_fields = explode ( '.' , $filename );
2016-07-04 10:48:18 +02:00
$ext = array_pop ( $ext_fields );
2016-07-04 10:48:18 +02:00
$ext = strtolower ( $ext );
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
if ( array_key_exists ( $ext , $mime_types )) {
return $mime_types [ $ext ];
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/manage_recontask_form.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components.php,
include/functions_ui.php, include/functions_incidents.php,
include/functions_agents.php, include/functions_alerts.php,
include/functions_messages.php, include/db/mysql.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/auth/ldap.php, operation/events/events.php,
operation/incidents/incident_detail.php, operation/tree.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/users/user_edit.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6798 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 10:54:40 +02:00
}
elseif ( function_exists ( 'finfo_open' )) {
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$finfo = finfo_open ( FILEINFO_MIME );
$mimetype = finfo_file ( $finfo , $filename );
finfo_close ( $finfo );
return $mimetype ;
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/servers/manage_recontask_form.php,
godmode/alerts/configure_alert_compound.php,
godmode/modules/manage_network_components.php,
include/functions_ui.php, include/functions_incidents.php,
include/functions_agents.php, include/functions_alerts.php,
include/functions_messages.php, include/db/mysql.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/auth/ldap.php, operation/events/events.php,
operation/incidents/incident_detail.php, operation/tree.php,
operation/agentes/estado_agente.php, operation/agentes/sla_view.php,
operation/users/user_edit.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6798 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-24 10:54:40 +02:00
}
else {
2011-09-01 20:03:01 +02:00
$temp = exec ( " file " . $filename );
if ( isset ( $temp ) && $temp != '' )
return $temp ;
else
return 'application/octet-stream' ;
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
}
}
}
2014-09-08 14:17:46 +02:00
global $config ;
if ( isset ( $config [ 'homedir_filemanager' ])) {
2016-07-04 10:48:18 +02:00
$homedir_filemanager = io_safe_output ( $config [ 'homedir_filemanager' ]);
2014-09-08 14:17:46 +02:00
}
else {
$homedir_filemanager = $config [ 'homedir' ];
}
2010-07-07 14:27:37 +02:00
$upload_file_or_zip = ( bool ) get_parameter ( 'upload_file_or_zip' );
if ( $upload_file_or_zip ) {
2010-07-13 20:04:37 +02:00
$decompress = get_parameter ( 'decompress' );
if ( ! $decompress ) {
2010-07-07 14:27:37 +02:00
$upload_file = true ;
$upload_zip = false ;
}
else {
$upload_file = false ;
$upload_zip = true ;
}
}
else {
$upload_file = ( bool ) get_parameter ( 'upload_file' );
$upload_zip = ( bool ) get_parameter ( 'upload_zip' );
}
// Upload file
if ( $upload_file ) {
// Load global vars
global $config ;
2010-07-08 11:01:31 +02:00
$config [ 'filemanager' ] = array ();
$config [ 'filemanager' ][ 'correct_upload_file' ] = 0 ;
2010-08-04 20:54:48 +02:00
$config [ 'filemanager' ][ 'message' ] = null ;
2010-07-08 11:01:31 +02:00
2010-07-07 14:27:37 +02:00
check_login ();
2017-11-28 13:36:33 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , " AW " )) {
* 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
db_pandora_audit ( " ACL Violation " , " Trying to access File manager " );
2010-07-07 14:27:37 +02:00
require ( " general/noaccess.php " );
return ;
}
if ( isset ( $_FILES [ 'file' ]) && $_FILES [ 'file' ][ 'name' ] != " " ) {
$filename = $_FILES [ 'file' ][ 'name' ];
$filesize = $_FILES [ 'file' ][ 'size' ];
2014-04-25 13:07:30 +02:00
$real_directory = io_safe_output (( string ) get_parameter ( 'real_directory' ));
$directory = io_safe_output (( string ) get_parameter ( 'directory' ));
$umask = io_safe_output (( string ) get_parameter ( 'umask' , '' ));
2010-07-07 14:27:37 +02:00
2010-07-08 12:32:49 +02:00
$hash = get_parameter ( 'hash' , '' );
$testHash = md5 ( $real_directory . $directory . $config [ 'dbpass' ]);
if ( $hash != $testHash ) {
2014-09-08 13:45:52 +02:00
$config [ 'filemanager' ][ 'message' ] =
ui_print_error_message ( __ ( 'Security error' ), '' , true );
2010-07-07 14:27:37 +02:00
}
else {
2010-07-08 12:32:49 +02:00
// Copy file to directory and change name
if ( $directory == '' ) {
$nombre_archivo = $real_directory . '/' . $filename ;
}
else {
2014-09-08 14:17:46 +02:00
$nombre_archivo = $homedir_filemanager . '/' .
2012-12-17 14:44:28 +01:00
$directory . '/' . $filename ;
2010-07-08 12:32:49 +02:00
}
2010-08-04 20:54:48 +02:00
2010-07-08 12:32:49 +02:00
if ( ! @ copy ( $_FILES [ 'file' ][ 'tmp_name' ], $nombre_archivo )) {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Upload error' ), '' , true );
2010-08-04 20:54:48 +02:00
}
else {
2013-06-27 13:42:53 +02:00
if ( $umask !== '' ) {
chmod ( $nombre_archivo , $umask );
}
2010-07-08 12:32:49 +02:00
$config [ 'filemanager' ][ 'correct_upload_file' ] = 1 ;
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_success_message ( __ ( 'Upload correct' ), '' , true );
2010-07-08 12:32:49 +02:00
// Delete temporal file
unlink ( $_FILES [ 'file' ][ 'tmp_name' ]);
}
2012-12-17 14:44:28 +01:00
}
2010-07-07 14:27:37 +02:00
}
}
2013-09-05 08:41:02 +02:00
if ( isset ( $_SERVER [ 'CONTENT_LENGTH' ])) {
// Control the max_post_size exceed
if ( intval ( $_SERVER [ 'CONTENT_LENGTH' ]) > 0 && empty ( $_POST ) AND empty ( $_FILES )) {
$config [ 'filemanager' ][ 'correct_upload_file' ] = 0 ;
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'File size seems to be too large. Please check your php.ini configuration or contact with the administrator' ), '' , true );
}
2013-08-02 14:38:38 +02:00
}
2010-07-07 14:27:37 +02:00
// Create text file
$create_text_file = ( bool ) get_parameter ( 'create_text_file' );
if ( $create_text_file ) {
// Load global vars
global $config ;
2010-07-08 11:01:31 +02:00
$config [ 'filemanager' ] = array ();
$config [ 'filemanager' ][ 'correct_upload_file' ] = 0 ;
2011-03-02 22:56:48 +01:00
$config [ 'filemanager' ][ 'message' ] = null ;
2010-07-08 11:01:31 +02:00
2010-07-07 14:27:37 +02:00
check_login ();
2017-11-28 13:36:33 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , " AW " )) {
* 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
db_pandora_audit ( " ACL Violation " , " Trying to access File manager " );
2010-07-07 14:27:37 +02:00
require ( " general/noaccess.php " );
return ;
}
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$filename = io_safe_output ( get_parameter ( 'name_file' ));
2010-07-07 14:27:37 +02:00
if ( $filename != " " ) {
2012-12-17 14:44:28 +01:00
2010-07-07 14:27:37 +02:00
$real_directory = ( string ) get_parameter ( 'real_directory' );
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$real_directory = io_safe_output ( $real_directory );
2010-07-07 14:27:37 +02:00
$directory = ( string ) get_parameter ( 'directory' );
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$directory = io_safe_output ( $directory );
2013-06-27 13:42:53 +02:00
$umask = ( string ) get_parameter ( 'umask' , '' );
2010-07-07 14:27:37 +02:00
2010-07-08 12:32:49 +02:00
$hash = get_parameter ( 'hash' , '' );
$testHash = md5 ( $real_directory . $directory . $config [ 'dbpass' ]);
if ( $hash != $testHash ) {
2012-04-26 13:34:34 +02:00
ui_print_error_message ( __ ( 'Security error' ), '' , true );
2010-07-07 14:27:37 +02:00
}
2010-07-08 11:01:31 +02:00
else {
2010-07-08 12:32:49 +02:00
if ( $directory == '' ) {
2012-12-17 14:44:28 +01:00
$nombre_archivo = $real_directory . '/' . $filename ;
2010-07-08 12:32:49 +02:00
}
else {
2014-09-08 14:17:46 +02:00
$nombre_archivo = $homedir_filemanager . '/' .
2012-12-17 14:44:28 +01:00
$directory . '/' . $filename ;
2010-07-08 12:32:49 +02:00
}
2012-12-17 14:44:28 +01:00
2010-07-08 12:32:49 +02:00
if ( ! @ touch ( $nombre_archivo )) {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Error creating file' ), '' , true );
2010-07-08 12:32:49 +02:00
}
else {
2013-06-27 13:42:53 +02:00
if ( $umask !== '' ) {
chmod ( $nombre_archivo , $umask );
}
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_success_message ( __ ( 'Upload correct' ), '' , true );
2010-07-08 12:32:49 +02:00
$config [ 'filemanager' ][ 'correct_upload_file' ] = 1 ;
}
2010-07-08 11:01:31 +02:00
}
2010-07-07 14:27:37 +02:00
}
else {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Error creating file with empty name' ), '' , true );
2010-07-07 14:27:37 +02:00
}
}
2011-04-18 17:00:43 +02:00
// Upload zip
2010-07-07 14:27:37 +02:00
if ( $upload_zip ) {
// Load global vars
global $config ;
2010-07-08 11:01:31 +02:00
$config [ 'filemanager' ] = array ();
$config [ 'filemanager' ][ 'correct_upload_file' ] = 0 ;
2010-08-04 20:54:48 +02:00
$config [ 'filemanager' ][ 'message' ] = null ;
2010-07-08 11:01:31 +02:00
2010-07-07 14:27:37 +02:00
check_login ();
2017-11-28 13:36:33 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , " AW " )) {
* 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
db_pandora_audit ( " ACL Violation " , " Trying to access File manager " );
2010-07-07 14:27:37 +02:00
require ( " general/noaccess.php " );
return ;
}
if ( isset ( $_FILES [ 'file' ]) && $_FILES [ 'file' ][ 'name' ] != " " ) {
$filename = $_FILES [ 'file' ][ 'name' ];
$filesize = $_FILES [ 'file' ][ 'size' ];
$real_directory = ( string ) get_parameter ( 'real_directory' );
2014-04-25 13:07:30 +02:00
$real_directory = io_safe_output ( $real_directory );
2010-07-07 14:27:37 +02:00
$directory = ( string ) get_parameter ( 'directory' );
2014-04-25 13:07:30 +02:00
$directory = io_safe_output ( $directory );
2010-07-07 14:27:37 +02:00
2010-07-08 12:32:49 +02:00
$hash = get_parameter ( 'hash' , '' );
$testHash = md5 ( $real_directory . $directory . $config [ 'dbpass' ]);
if ( $hash != $testHash ) {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Security error' ), '' , true );
2010-07-07 14:27:37 +02:00
}
else {
2010-07-08 12:32:49 +02:00
// Copy file to directory and change name
if ( $directory == '' ) {
$nombre_archivo = $real_directory . '/' . $filename ;
}
else {
2014-09-08 14:17:46 +02:00
$nombre_archivo = $homedir_filemanager . '/' . $directory . '/' . $filename ;
2010-07-08 12:32:49 +02:00
}
2014-09-08 13:45:52 +02:00
2010-07-08 12:32:49 +02:00
if ( ! @ copy ( $_FILES [ 'file' ][ 'tmp_name' ], $nombre_archivo )) {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Attach error' ), '' , true );
2010-07-08 12:32:49 +02:00
}
else {
// Delete temporal file
unlink ( $_FILES [ 'file' ][ 'tmp_name' ]);
//Extract the zip file
$zip = new ZipArchive ;
2014-09-08 14:17:46 +02:00
$pathname = $homedir_filemanager . '/' . $directory . '/' ;
2010-07-08 12:32:49 +02:00
if ( $zip -> open ( $nombre_archivo ) === true ) {
$zip -> extractTo ( $pathname );
unlink ( $nombre_archivo );
}
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_success_message ( __ ( 'Upload correct' ), '' , true );
2010-07-08 12:32:49 +02:00
$config [ 'filemanager' ][ 'correct_upload_file' ] = 1 ;
2010-07-08 11:01:31 +02:00
}
2010-07-07 14:27:37 +02:00
}
}
}
// CREATE DIR
$create_dir = ( bool ) get_parameter ( 'create_dir' );
if ( $create_dir ) {
2010-07-08 11:01:31 +02:00
global $config ;
$config [ 'filemanager' ] = array ();
$config [ 'filemanager' ][ 'correct_create_dir' ] = 0 ;
2010-08-04 20:54:48 +02:00
$config [ 'filemanager' ][ 'message' ] = null ;
2010-07-08 11:01:31 +02:00
2010-07-07 14:27:37 +02:00
$directory = ( string ) get_parameter ( 'directory' , " / " );
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$directory = io_safe_output ( $directory );
2010-07-08 12:32:49 +02:00
$hash = get_parameter ( 'hash' , '' );
$testHash = md5 ( $directory . $config [ 'dbpass' ]);
if ( $hash != $testHash ) {
2013-05-23 17:42:32 +02:00
ui_print_error_message ( __ ( 'Security error.' ));
2010-07-07 14:27:37 +02:00
}
else {
2010-07-08 12:32:49 +02:00
$dirname = ( string ) get_parameter ( 'dirname' );
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$dirname = io_safe_output ( $dirname );
2012-12-17 14:44:28 +01:00
2010-07-08 12:32:49 +02:00
if ( $dirname != '' ) {
2014-09-08 14:17:46 +02:00
@ mkdir ( $homedir_filemanager . '/' .
2012-12-17 14:44:28 +01:00
$directory . '/' . $dirname );
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_success_message ( __ ( 'Directory created' ), '' , true );
2010-07-08 12:32:49 +02:00
$config [ 'filemanager' ][ 'correct_create_dir' ] = 1 ;
}
else {
2012-04-26 13:34:34 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Error creating file with empty name' ), '' , true );
2010-07-08 12:32:49 +02:00
}
2010-07-07 14:27:37 +02:00
}
}
//DELETE FILE OR DIR
$delete_file = ( bool ) get_parameter ( 'delete_file' );
if ( $delete_file ) {
2010-07-08 11:01:31 +02:00
global $config ;
2012-06-20 17:43:41 +02:00
2010-07-08 11:01:31 +02:00
$config [ 'filemanager' ] = array ();
$config [ 'filemanager' ][ 'delete' ] = 0 ;
2010-08-04 20:54:48 +02:00
$config [ 'filemanager' ][ 'message' ] = null ;
2010-07-08 11:01:31 +02:00
2010-07-07 14:27:37 +02:00
$filename = ( string ) get_parameter ( 'filename' );
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.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/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.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/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.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/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.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/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.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/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$filename = io_safe_output ( $filename );
2010-07-08 12:32:49 +02:00
$hash = get_parameter ( 'hash' , '' );
$testHash = md5 ( $filename . $config [ 'dbpass' ]);
if ( $hash != $testHash ) {
2012-06-20 17:43:41 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_error_message ( __ ( 'Security error' ), '' , true );
2010-07-08 12:32:49 +02:00
}
else {
2012-06-20 17:43:41 +02:00
$config [ 'filemanager' ][ 'message' ] = ui_print_success_message ( __ ( 'Deleted' ), '' , true );
2012-12-17 14:44:28 +01:00
2012-06-20 17:43:41 +02:00
if ( is_dir ( $filename )) {
2010-07-08 12:32:49 +02:00
rmdir ( $filename );
$config [ 'filemanager' ][ 'delete' ] = 1 ;
2012-06-20 17:43:41 +02:00
}
else {
2010-07-08 12:32:49 +02:00
unlink ( $filename );
$config [ 'filemanager' ][ 'delete' ] = 1 ;
}
2010-07-07 14:27:37 +02:00
}
}
/**
* Recursive delete directory and empty or not directory .
*
* @ param string $dir The dir to deletete
*/
2013-02-14 16:03:07 +01:00
function filemanager_delete_directory ( $dir ) {
2014-04-25 13:07:30 +02:00
// Windows compatibility
$dir = str_replace ( " \\ " , " / " , $dir );
2013-02-14 16:03:07 +01:00
if ( $handle = opendir ( $dir )) {
2010-07-08 18:45:34 +02:00
while ( false !== ( $file = readdir ( $handle ))) {
if (( $file != " . " ) && ( $file != " .. " )) {
2013-02-14 16:03:07 +01:00
if ( is_dir ( $dir . $file )) {
if ( ! rmdir ( $dir . $file )) {
2011-04-27 15:43:31 +02:00
filemanager_delete_directory ( $dir . $file . '/' );
2010-07-07 14:27:37 +02:00
}
}
2013-02-14 16:03:07 +01:00
else {
2010-07-07 14:27:37 +02:00
unlink ( $dir . $file );
}
2011-03-02 22:56:48 +01:00
}
}
2010-07-07 14:27:37 +02:00
closedir ( $handle );
rmdir ( $dir );
}
}
2010-07-08 18:45:34 +02:00
/**
* Read a directory recursibly and return a array with the files with
* the absolute path and relative
*
* @ param string $dir absoute dir to scan
* @ param string $relative_path Relative path to scan , by default ''
*
* @ return array The files in the dirs , empty array for empty dir of files .
*/
2015-06-09 15:53:25 +02:00
function filemanager_read_recursive_dir ( $dir , $relative_path = '' , $add_empty_dirs = false ) {
2010-07-08 18:45:34 +02:00
$return = array ();
2015-06-09 15:53:25 +02:00
2014-04-25 13:07:30 +02:00
// Windows compatibility
$dir = str_replace ( " \\ " , " / " , $dir );
$relative_path = str_replace ( " \\ " , " / " , $relative_path );
2010-07-08 18:45:34 +02:00
if ( $handle = opendir ( $dir ))
{
while ( false !== ( $entry = readdir ( $handle ))) {
if (( $entry != " . " ) && ( $entry != " .. " )) {
2013-06-27 13:42:53 +02:00
if ( is_dir ( $dir . $entry )) {
2015-06-09 15:53:25 +02:00
$return [] = array (
'relative' => $relative_path . $entry ,
'absolute' => $dir . $entry ,
'dir' => true );
$return = array_merge ( $return ,
filemanager_read_recursive_dir (
$dir . $entry . '/' , $relative_path . $entry . '/' ,
'' , $add_empty_dirs ));
2010-07-08 18:45:34 +02:00
}
2013-06-27 13:42:53 +02:00
else {
2015-06-09 15:53:25 +02:00
$return [] = array (
'relative' => $relative_path . $entry ,
'absolute' => $dir . $entry ,
'dir' => false );
2010-07-08 18:45:34 +02:00
}
}
}
closedir ( $handle );
}
return $return ;
}
2010-07-07 14:27:37 +02:00
/**
* The main function to show the directories and files .
*
* @ param string $real_directory The string of dir as realpath .
* @ param string $relative_directory The string of dir as relative path .
* @ param string $url The url to set in the forms and some links in the explorer .
* @ param string $father The directory father don ' t navigate bottom this .
* @ param boolean $editor The flag to set the edition of text files .
2013-06-27 13:42:53 +02:00
* @ param string $url_file The url to put in the files instead the default . By default empty string and use the url of filemanager .
* @ param boolean $download_button The flag to show download button , by default false .
* @ param string $umask The umask as hex values to set the new files or updload .
2010-07-07 14:27:37 +02:00
*/
2014-09-08 13:45:52 +02:00
function filemanager_file_explorer ( $real_directory , $relative_directory ,
$url , $father = '' , $editor = false , $readOnly = false ,
2014-09-08 14:17:46 +02:00
$url_file = '' , $download_button = false , $umask = '' ,
$homedir_filemanager = false ) {
2014-09-08 13:45:52 +02:00
2010-07-08 12:32:49 +02:00
global $config ;
2014-09-08 14:17:46 +02:00
2014-04-25 13:07:30 +02:00
// Windows compatibility
$real_directory = str_replace ( " \\ " , " / " , $real_directory );
$relative_directory = str_replace ( " \\ " , " / " , $relative_directory );
$father = str_replace ( " \\ " , " / " , $father );
2010-07-08 12:32:49 +02:00
2014-09-08 14:17:46 +02:00
if ( $homedir_filemanager === false ) {
$homedir_filemanager = $config [ 'homedir' ];
unset ( $config [ 'homedir_filemanager' ]);
config_update_value ( 'homedir_filemanager' ,
$homedir_filemanager );
}
else {
$config [ 'homedir_filemanager' ] = $homedir_filemanager ;
}
2012-12-17 14:44:28 +01:00
$hack_metaconsole = '' ;
if ( defined ( 'METACONSOLE' ))
$hack_metaconsole = '../../' ;
2010-07-07 14:27:37 +02:00
?>
< script type = " text/javascript " >
2013-06-27 13:42:53 +02:00
function show_form_create_folder () {
2013-07-26 09:46:37 +02:00
show_main_buttons_folder ()
$ ( " #table_filemanager-1 " ) . css ( 'display' , '' );
2013-06-27 13:42:53 +02:00
$ ( " #main_buttons " ) . css ( " display " , " none " );
$ ( " #create_folder " ) . css ( " display " , " " );
}
2010-08-04 20:54:48 +02:00
2013-06-27 13:42:53 +02:00
function show_upload_file () {
2013-07-26 09:46:37 +02:00
show_main_buttons_folder ()
$ ( " #table_filemanager-1 " ) . css ( 'display' , '' );
2013-06-27 13:42:53 +02:00
$ ( " #main_buttons " ) . css ( " display " , " none " );
$ ( " #upload_file " ) . css ( " display " , " " );
}
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
2013-06-27 13:42:53 +02:00
function show_create_text_file () {
2013-07-26 09:46:37 +02:00
show_main_buttons_folder ()
$ ( " #table_filemanager-1 " ) . css ( 'display' , '' );
2010-08-04 20:54:48 +02:00
2013-06-27 13:42:53 +02:00
$ ( " #main_buttons " ) . css ( " display " , " none " );
$ ( " #create_text_file " ) . css ( " display " , " " );
}
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
2013-06-27 13:42:53 +02:00
function show_main_buttons_folder () {
2013-07-26 09:46:37 +02:00
$ ( " #table_filemanager-1 " ) . css ( 'display' , 'none' );
2013-06-27 13:42:53 +02:00
$ ( " #create_folder " ) . css ( " display " , " none " );
$ ( " #upload_file " ) . css ( " display " , " none " );
$ ( " #create_text_file " ) . css ( " display " , " none " );
}
2010-07-07 14:27:37 +02:00
</ script >
< ? php
// List files
if ( ! is_dir ( $real_directory )) {
echo __ ( 'Directory %s doesn\'t exist!' , $relative_directory );
return ;
}
2011-04-27 15:43:31 +02:00
$files = filemanager_list_dir ( $real_directory );
2010-07-07 14:27:37 +02:00
2015-06-09 15:53:25 +02:00
$table = new stdClass ();
2015-06-12 15:50:46 +02:00
$table -> width = '100%' ;
2013-07-26 09:46:37 +02:00
$table -> id = 'table_filemanager' ;
2015-04-23 17:52:16 +02:00
if ( ! defined ( 'METACONSOLE' )) {
$table -> class = 'databox data' ;
$table -> title = '<span>' . __ ( 'Index of %s' , $relative_directory ) . '</span>' ;
}
2015-06-08 11:05:19 +02:00
if ( defined ( 'METACONSOLE' )) {
2015-03-06 12:28:05 +01:00
$table -> class = 'databox_tactical' ;
$table -> title = '<span>' . __ ( 'Index of images' ) . '</span>' ;
}
2010-07-07 14:27:37 +02:00
$table -> colspan = array ();
$table -> data = array ();
$table -> head = array ();
$table -> size = array ();
2012-04-30 17:21:38 +02:00
2012-12-17 14:44:28 +01:00
$table -> align [ 1 ] = 'left' ;
2013-02-26 21:08:39 +01:00
$table -> align [ 2 ] = 'left' ;
2012-12-17 14:44:28 +01:00
$table -> align [ 3 ] = 'left' ;
2013-02-26 21:08:39 +01:00
$table -> align [ 4 ] = 'left' ;
2010-07-07 14:27:37 +02:00
$table -> size [ 0 ] = '24px' ;
$table -> head [ 0 ] = '' ;
$table -> head [ 1 ] = __ ( 'Name' );
$table -> head [ 2 ] = __ ( 'Last modification' );
$table -> head [ 3 ] = __ ( 'Size' );
$table -> head [ 4 ] = __ ( 'Actions' );
2015-04-23 17:52:16 +02:00
if ( ! defined ( 'METACONSOLE' )) {
2015-06-12 15:50:46 +02:00
$table -> headstyle [ 0 ] = 'background-color:#82B92E' ;
$table -> headstyle [ 1 ] = 'background-color:#82B92E' ;
$table -> headstyle [ 2 ] = 'background-color:#82B92E' ;
$table -> headstyle [ 3 ] = 'background-color:#82B92E' ;
$table -> headstyle [ 4 ] = 'background-color:#82B92E' ;
2015-04-23 17:52:16 +02:00
}
2010-07-07 14:27:37 +02:00
$prev_dir = explode ( " / " , $relative_directory );
$prev_dir_str = " " ;
for ( $i = 0 ; $i < ( count ( $prev_dir ) - 1 ); $i ++ ) {
$prev_dir_str .= $prev_dir [ $i ];
if ( $i < ( count ( $prev_dir ) - 2 ))
$prev_dir_str .= " / " ;
}
2013-02-14 16:03:07 +01:00
2010-07-07 14:27:37 +02:00
if (( $prev_dir_str != '' ) && ( $father != $relative_directory )) {
2011-04-27 15:43:31 +02:00
$table -> data [ 0 ][ 0 ] = html_print_image ( 'images/go_previous.png' , true );
2010-07-08 19:47:31 +02:00
$table -> data [ 0 ][ 1 ] = '<a href="' . $url . '&directory=' . $prev_dir_str . '&hash2=' . md5 ( $prev_dir_str . $config [ 'dbpass' ]) . '">' ;
2010-07-07 14:27:37 +02:00
$table -> data [ 0 ][ 1 ] .= __ ( 'Parent directory' );
$table -> data [ 0 ][ 1 ] .= '</a>' ;
$table -> colspan [ 0 ][ 1 ] = 5 ;
}
if ( is_writable ( $real_directory )) {
2010-08-02 12:36:55 +02:00
$table -> rowstyle [ 1 ] = 'display: none;' ;
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 0 ] = '' ;
2010-08-02 12:36:55 +02:00
$table -> data [ 1 ][ 1 ] = '' ;
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= '<div id="create_folder" style="display: none;">' ;
$table -> data [ 1 ][ 1 ] .= '<form method="post" action="' . $url . '">' ;
2015-06-12 15:50:46 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_text ( 'dirname' , '' , '' , 30 , 255 , true );
2015-04-23 17:52:16 +02:00
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_submit_button ( __ ( 'Create' ), 'crt' , false , 'class="sub next"' , true );
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_button ( __ ( 'Close' ), 'close' ,
2015-03-11 15:57:05 +01:00
false , 'show_main_buttons_folder();' , " class='sub cancel' " , true );
2015-04-23 17:52:16 +02:00
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'directory' , $relative_directory , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'create_dir' , 1 , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'hash' , md5 ( $relative_directory . $config [ 'dbpass' ]), true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'hash2' , md5 ( $relative_directory . $config [ 'dbpass' ]), true );
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= '</form>' ;
$table -> data [ 1 ][ 1 ] .= '</div>' ;
$table -> data [ 1 ][ 1 ] .= '<div id="upload_file" style="display: none;">' ;
2015-04-23 17:52:16 +02:00
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= '<form method="post" action="' . $url . '" enctype="multipart/form-data">' ;
2011-04-13 18:11:02 +02:00
$table -> data [ 1 ][ 1 ] .= ui_print_help_tip ( __ ( " The zip upload in this dir, easy to upload multiple files. " ), true );
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_file ( 'file' , true , false );
2013-06-27 13:42:53 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'umask' , $umask , true );
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_checkbox ( 'decompress' , 1 , false , true );
2010-07-13 20:04:37 +02:00
$table -> data [ 1 ][ 1 ] .= __ ( 'Decompress' );
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= ' ' ;
2015-04-23 17:52:16 +02:00
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_submit_button ( __ ( 'Go' ), 'go' , false , 'class="sub next"' , true );
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_button ( __ ( 'Close' ), 'close' ,
2015-03-11 15:57:05 +01:00
false , 'show_main_buttons_folder();' , " class='sub cancel' " , true );
2015-04-23 17:52:16 +02:00
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'real_directory' , $real_directory , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'directory' , $relative_directory , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'hash' , md5 ( $real_directory . $relative_directory . $config [ 'dbpass' ]), true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'hash2' , md5 ( $relative_directory . $config [ 'dbpass' ]), true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'upload_file_or_zip' , 1 , true );
2012-10-26 19:37:57 +02:00
$table -> data [ 1 ][ 1 ] .= '</form>' ;
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= '</div>' ;
$table -> data [ 1 ][ 1 ] .= '<div id="create_text_file" style="display: none;">' ;
$table -> data [ 1 ][ 1 ] .= '<form method="post" action="' . $url . '">' ;
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_text ( 'name_file' , '' , '' , 30 , 50 , true );
2015-04-23 17:52:16 +02:00
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_submit_button ( __ ( 'Create' ), 'create' , false , 'class="sub next"' , true );
$table -> data [ 1 ][ 1 ] .= ' ' . html_print_button ( __ ( 'Close' ), 'close' ,
2015-03-11 15:57:05 +01:00
false , 'show_main_buttons_folder();' , " class='sub cancel' " , true );
2015-04-23 17:52:16 +02:00
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'real_directory' , $real_directory , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'directory' , $relative_directory , true );
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'hash' , md5 ( $real_directory . $relative_directory . $config [ 'dbpass' ]), true );
2013-06-27 13:42:53 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'umask' , $umask , true );
2011-04-27 15:43:31 +02:00
$table -> data [ 1 ][ 1 ] .= html_print_input_hidden ( 'create_text_file' , 1 , true );
2013-06-27 13:42:53 +02:00
$table -> data [ 1 ][ 1 ] .= '</form>' ;
2010-07-07 14:27:37 +02:00
$table -> data [ 1 ][ 1 ] .= '</div>' ;
$table -> colspan [ 1 ][ 1 ] = 5 ;
}
foreach ( $files as $fileinfo ) {
2014-09-08 13:45:52 +02:00
2014-04-25 13:07:30 +02:00
$fileinfo [ 'realpath' ] = str_replace ( " \\ " , " / " , $fileinfo [ 'realpath' ]);
2012-12-17 14:44:28 +01:00
$relative_path = str_replace ( $_SERVER [ 'DOCUMENT_ROOT' ], '' , $fileinfo [ 'realpath' ]);
2010-07-07 14:27:37 +02:00
$data = array ();
switch ( $fileinfo [ 'mime' ]) {
case MIME_DIR :
2013-08-01 16:56:50 +02:00
$data [ 0 ] = html_print_image ( 'images/mimetypes/directory.png' , true , array ( 'title' => __ ( 'Directory' )));
2010-07-07 14:27:37 +02:00
break ;
case MIME_IMAGE :
2013-08-01 16:56:50 +02:00
$data [ 0 ] = html_print_image ( 'images/mimetypes/image.png' , true , array ( 'title' => __ ( 'Image' )));
2010-07-07 14:27:37 +02:00
break ;
case MIME_ZIP :
2013-08-01 16:56:50 +02:00
$data [ 0 ] = html_print_image ( 'images/mimetypes/zip.png' , true , array ( 'title' => __ ( 'Compressed file' )));
2010-07-07 14:27:37 +02:00
break ;
case MIME_TEXT :
2013-08-01 16:56:50 +02:00
$data [ 0 ] = html_print_image ( 'images/mimetypes/text.png' , true , array ( 'title' => __ ( 'Text file' )));
2010-07-07 14:27:37 +02:00
break ;
2014-09-08 13:45:52 +02:00
case MIME_UNKNOWN :
if ( $fileinfo [ 'size' ] == 0 ) {
2016-06-16 11:50:20 +02:00
if (( strstr ( $fileinfo [ 'name' ], '.txt' ) !== false ) || ( strstr ( $fileinfo [ 'name' ], '.conf' ) !== false ) || ( strstr ( $fileinfo [ 'name' ], '.sql' ) !== false ) || ( strstr ( $fileinfo [ 'name' ], '.pl' ) !== false )) {
2014-09-08 13:45:52 +02:00
$fileinfo [ 'mime' ] = MIME_TEXT ;
$data [ 0 ] = html_print_image ( 'images/mimetypes/text.png' , true , array ( 'title' => __ ( 'Text file' )));
2016-06-14 12:06:38 +02:00
} else {
//unknow
$data [ 0 ] = '' ;
2014-09-08 13:45:52 +02:00
}
2016-06-14 12:06:38 +02:00
} else {
//pdf
$data [ 0 ] = '' ;
2014-09-08 13:45:52 +02:00
}
break ;
2010-07-07 14:27:37 +02:00
default :
2013-08-01 16:56:50 +02:00
$data [ 0 ] = html_print_image ( 'images/mimetypes/unknown.png' , true , array ( 'title' => __ ( 'Unknown' )));
2010-07-07 14:27:37 +02:00
break ;
}
if ( $fileinfo [ 'is_dir' ]) {
2010-07-08 19:47:31 +02:00
$data [ 1 ] = '<a href="' . $url . '&directory=' . $relative_directory . '/' . $fileinfo [ 'name' ] . '&hash2=' . md5 ( $relative_directory . '/' . $fileinfo [ 'name' ] . $config [ 'dbpass' ]) . '">' . $fileinfo [ 'name' ] . '</a>' ;
2010-08-02 12:36:55 +02:00
}
2013-06-27 13:42:53 +02:00
else if ( ! empty ( $url_file )) {
//Set the custom url file
$url_file_clean = str_replace ( '[FILE_FULLPATH]' , $fileinfo [ 'realpath' ], $url_file );
$data [ 1 ] = '<a href="' . $url_file_clean . '">' . $fileinfo [ 'name' ] . '</a>' ;
}
2010-08-02 12:36:55 +02:00
else {
2012-12-17 14:44:28 +01:00
$hash = md5 ( $relative_path . $config [ 'dbpass' ]);
2016-07-15 09:26:09 +02:00
$data [ 1 ] = '<a href="' . $hack_metaconsole . 'include/get_file.php?file=' . urlencode ( base64_encode ( $relative_path )) . '&hash=' . $hash . '">' . $fileinfo [ 'name' ] . '</a>' ;
2010-07-07 14:27:37 +02:00
}
2017-10-30 16:04:58 +01:00
// Notice that uploaded php files could be dangerous
if ( pathinfo ( $fileinfo [ 'realpath' ], PATHINFO_EXTENSION ) == 'php' &&
( is_readable ( $fileinfo [ 'realpath' ]) || is_executable ( $fileinfo [ 'realpath' ]))) {
$error_message = __ ( 'This file could be executed by any user' );
$error_message .= '. ' . __ ( 'Make sure it can\'t perform dangerous tasks' );
$data [ 1 ] = '<span class="error forced_title" data-title="' . $error_message . '" data-use_title_for_force_title="1">'
. $data [ 1 ]
. '</span>' ;
}
2011-04-13 18:11:02 +02:00
$data [ 2 ] = ui_print_timestamp ( $fileinfo [ 'last_modified' ], true ,
2010-07-07 14:27:37 +02:00
array ( 'prominent' => true ));
if ( $fileinfo [ 'is_dir' ]) {
$data [ 3 ] = '' ;
2010-08-02 12:36:55 +02:00
}
else {
2014-09-08 13:45:52 +02:00
$data [ 3 ] = ui_format_filesize ( $fileinfo [ 'size' ]);
2010-07-07 14:27:37 +02:00
}
//Actions buttons
//Delete button
$data [ 4 ] = '' ;
2010-07-13 20:04:37 +02:00
$data [ 4 ] .= '<span style="">' ;
2016-09-15 15:47:10 +02:00
$typefile = array_pop ( explode ( " . " , $fileinfo [ 'name' ]));
2010-07-07 14:27:37 +02:00
if ( is_writable ( $fileinfo [ 'realpath' ]) &&
( ! is_dir ( $fileinfo [ 'realpath' ]) || count ( scandir ( $fileinfo [ 'realpath' ])) < 3 )) {
2010-07-13 20:04:37 +02:00
$data [ 4 ] .= '<form method="post" action="' . $url . '" style="display: inline;">' ;
2010-07-07 14:27:37 +02:00
$data [ 4 ] .= '<input type="image" src="images/cross.png" onClick="if (!confirm(\' ' . __ ( 'Are you sure?' ) . '\')) return false;">' ;
2011-04-27 15:43:31 +02:00
$data [ 4 ] .= html_print_input_hidden ( 'filename' , $fileinfo [ 'realpath' ], true );
$data [ 4 ] .= html_print_input_hidden ( 'hash' , md5 ( $fileinfo [ 'realpath' ] . $config [ 'dbpass' ]), true );
$data [ 4 ] .= html_print_input_hidden ( 'delete_file' , 1 , true );
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
2014-09-08 14:17:46 +02:00
$relative_dir = str_replace ( $homedir_filemanager , '' , str_replace ( " \\ " , " / " , dirname ( $fileinfo [ 'realpath' ])));
2011-06-21 13:09:47 +02:00
if ( $relative_dir [ 0 ] == '/' ) {
$relative_dir = substr ( $relative_dir , 1 );
}
$hash2 = md5 ( $relative_dir . $config [ 'dbpass' ]);
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
2011-06-21 13:09:47 +02:00
$data [ 4 ] .= html_print_input_hidden ( 'directory' , $relative_dir , true );
$data [ 4 ] .= html_print_input_hidden ( 'hash2' , $hash2 , true );
2010-07-07 14:27:37 +02:00
$data [ 4 ] .= '</form>' ;
2010-08-05 19:02:45 +02:00
if (( $editor ) && ( ! $readOnly )) {
2016-09-16 09:23:52 +02:00
if (( $typefile != 'bin' ) && ( $typefile != 'pdf' ) && ( $typefile != 'png' ) && ( $typefile != 'jpg' ) &&
( $typefile != 'iso' ) && ( $typefile != 'docx' ) && ( $typefile != 'doc' )) {
2016-10-21 12:21:44 +02:00
$hash = md5 ( $fileinfo [ 'realpath' ] . $config [ 'dbpass' ]);
$data [ 4 ] .= " <a style='vertical-align: top;' href=' $url &edit_file=1&hash= " . $hash . " &location_file= " . $fileinfo [ 'realpath' ] . " ' style='float: left;'> " . html_print_image ( 'images/edit.png' , true , array ( " style " => 'margin-top: 2px;' , 'title' => __ ( 'Edit file' ))) . " </a> " ;
2010-07-07 14:27:37 +02:00
}
}
}
2013-06-27 13:42:53 +02:00
if (( ! $fileinfo [ 'is_dir' ]) && ( $download_button )) {
2016-09-15 15:47:10 +02:00
$hash = md5 ( $fileinfo [ 'realpath' ] . $config [ 'dbpass' ]);
$data [ 4 ] .= '<a href="include/get_file.php?file=' . urlencode ( base64_encode ( $fileinfo [ 'realpath' ])) . '&hash=' . $hash . '" style="vertical-align: 25%;">' ;
2013-06-27 13:42:53 +02:00
$data [ 4 ] .= html_print_image ( 'images/file.png' , true );
$data [ 4 ] .= '</a>' ;
}
2010-07-13 20:04:37 +02:00
$data [ 4 ] .= '</span>' ;
2013-06-27 13:42:53 +02:00
2010-07-07 14:27:37 +02:00
array_push ( $table -> data , $data );
}
2010-08-05 19:02:45 +02:00
if ( ! $readOnly ) {
if ( is_writable ( $real_directory )) {
2014-09-08 13:45:52 +02:00
//The buttons to make actions
2015-03-06 12:28:05 +01:00
if ( defined ( " METACONSOLE " ))
echo " <div style='text-align: left; width: " . $table -> width . " ;'> " ;
else
2015-06-12 15:50:46 +02:00
echo " <div style='text-align: right; width: " . $table -> width . " ; margin-bottom:5px;'> " ;
2014-09-08 13:45:52 +02:00
echo " <a href='javascript: show_form_create_folder();' style='margin-right: 3px; margin-bottom: 5px;'> " ;
echo html_print_image ( 'images/create_directory.png' , true ,
array ( " title " => __ ( 'Create directory' )));
2013-06-27 13:42:53 +02:00
echo " </a> " ;
2014-09-08 13:45:52 +02:00
2013-02-26 21:08:39 +01:00
echo " <a href='javascript: show_create_text_file();' style='margin-right: 3px; margin-bottom: 5px;'> " ;
2014-09-08 13:45:52 +02:00
echo html_print_image ( 'images/create_file.png' , true ,
array ( " title " => __ ( 'Create text' )));
2013-06-27 13:42:53 +02:00
echo " </a> " ;
2014-09-08 13:45:52 +02:00
2013-02-26 21:08:39 +01:00
echo " <a href='javascript: show_upload_file();'> " ;
2014-09-08 13:45:52 +02:00
echo html_print_image ( 'images/upload_file.png' , true ,
array ( " title " => __ ( 'Upload file/s' )));
2013-06-27 13:42:53 +02:00
echo " </a> " ;
2014-09-08 13:45:52 +02:00
2010-08-05 19:02:45 +02:00
echo " </div> " ;
}
else {
echo " <div style='text-align: right; width: " . $table -> width . " ; color:#AC4444;'> " ;
2010-08-31 16:23:59 +02:00
echo " <image src='images/info.png' /> " . __ ( 'The directory is read-only' );
2010-08-05 19:02:45 +02:00
echo " </div> " ;
}
2010-08-02 12:36:55 +02:00
}
2011-04-27 15:43:31 +02:00
html_print_table ( $table );
2010-07-07 14:27:37 +02:00
}
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
/**
* Check if a directory is writable .
*
* @ param string Directory path to check .
* @ param bool If set , it will try to make the directory writeable if it ' s not .
*
* @ param bool Wheter the directory is writeable or not .
*/
2011-04-27 15:43:31 +02:00
function filemanager_get_file_info ( $filepath ) {
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
global $config ;
$realpath = realpath ( $filepath );
2014-04-25 13:07:30 +02:00
$filepath = str_replace ( " \\ " , " / " , $filepath ); // Windows compatibility
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$info = array ( 'mime' => MIME_UNKNOWN ,
'mime_extend' => mime_content_type ( $filepath ),
'link' => 0 ,
'is_dir' => false ,
'name' => basename ( $realpath ),
2009-11-25 13:03:19 +01:00
'url' => str_replace ( '//' , '/' , $config [ 'homeurl' ] . str_ireplace ( $config [ 'homedir' ], '' , $realpath )),
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
'realpath' => $realpath ,
'size' => filesize ( $realpath ),
'last_modified' => filemtime ( $realpath )
);
$zip_mimes = array ( 'application/zip' ,
'application/x-rar-compressed' ,
'application/x-gzip' ,
'application/x-bzip2' );
if ( is_dir ( $filepath )) {
$info [ 'mime' ] = MIME_DIR ;
$info [ 'is_dir' ] = true ;
$info [ 'size' ] = 0 ;
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
}
else if ( strpos ( $info [ 'mime_extend' ], 'image' ) !== false ) {
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$info [ 'mime' ] = MIME_IMAGE ;
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
}
else if ( in_array ( $info [ 'mime_extend' ], $zip_mimes )) {
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$info [ 'mime' ] = MIME_ZIP ;
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
}
else if ( strpos ( $info [ 'mime_extend' ], 'text' ) !== false ) {
2010-07-07 14:27:37 +02:00
$info [ 'mime' ] = MIME_TEXT ;
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
}
return $info ;
}
/**
* Check if a directory is writable .
*
* @ param string Directory path to check .
* @ param bool If set , it will try to make the directory writeable if it ' s not .
*
* @ param bool Wheter the directory is writeable or not .
*/
2011-04-27 15:43:31 +02:00
function filemanager_list_dir ( $dirpath ) {
2014-04-25 13:07:30 +02:00
$dirpath = str_replace ( " \\ " , " / " , $dirpath ); // Windows compatibility
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$files = array ();
$dirs = array ();
$dir = opendir ( $dirpath );
while ( $file = @ readdir ( $dir )) {
/* Ignore hidden files */
if ( $file [ 0 ] == '.' )
continue ;
2011-04-27 15:43:31 +02:00
$info = filemanager_get_file_info ( $dirpath . '/' . $file );
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
if ( $info [ 'is_dir' ]) {
$dirs [ $file ] = $info ;
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
}
else {
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
$files [ $file ] = $info ;
}
}
ksort ( $files );
ksort ( $dirs );
closedir ( $dir );
return array_merge ( $dirs , $files );
}
?>