2006-03-27 05:37:27 +02:00
< ? php
2008-08-22 20:07:32 +02:00
2009-06-08 20:21:21 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
2010-03-02 18:19:44 +01:00
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
2009-06-08 20:21:21 +02:00
// Please see http://pandorafms.org for full contribution list
2006-07-11 16:14:09 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
2008-08-22 20:07:32 +02:00
// as published by the Free Software Foundation for version 2.
2006-07-11 16:14:09 +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.
2006-03-27 05:37:27 +02:00
// Load global vars
2010-03-03 18:10:37 +01:00
global $config ;
2006-07-11 16:14:09 +02:00
2019-01-30 16:18:44 +01:00
check_login ();
2010-03-10 18:58:29 +01:00
2015-03-06 12:28:05 +01:00
enterprise_hook ( 'open_meta_frame' );
2019-01-30 16:18:44 +01:00
require_once $config [ 'homedir' ] . '/include/functions_profile.php' ;
require_once $config [ 'homedir' ] . '/include/functions_users.php' ;
require_once $config [ 'homedir' ] . '/include/functions_groups.php' ;
require_once $config [ 'homedir' ] . '/include/functions_visual_map.php' ;
require_once $config [ 'homedir' ] . '/include/functions_custom_fields.php' ;
2018-03-20 16:51:41 +01:00
enterprise_include_once ( 'include/functions_profile.php' );
* 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
2013-04-22 12:31:20 +02:00
$meta = false ;
2019-01-30 16:18:44 +01:00
if ( enterprise_installed () && defined ( 'METACONSOLE' )) {
$meta = true ;
2013-04-22 12:31:20 +02:00
}
2019-01-30 16:18:44 +01:00
$isFunctionSkins = enterprise_include_once ( 'include/functions_skins.php' );
enterprise_include_once ( 'include/functions_dashboard.php' );
2011-04-25 11:41:35 +02:00
2019-01-30 16:18:44 +01:00
// Add the columns for the enterprise Pandora edition.
2011-05-10 17:53:43 +02:00
$enterprise_include = false ;
if ( ENTERPRISE_NOT_HOOK !== enterprise_include ( 'include/functions_policies.php' )) {
2019-01-30 16:18:44 +01:00
$enterprise_include = true ;
2011-05-10 17:53:43 +02:00
}
2019-01-30 16:18:44 +01:00
if ( $enterprise_include ) {
enterprise_include_once ( 'meta/include/functions_users_meta.php' );
}
2012-12-11 18:39:48 +01:00
2010-03-10 18:58:29 +01:00
// This defines the working user. Beware with this, old code get confusses
// and operates with current logged user (dangerous).
2019-01-30 16:18:44 +01:00
$id = get_parameter ( 'id' , get_parameter ( 'id_user' , '' ));
// ID given as parameter
2012-12-11 18:39:48 +01:00
$pure = get_parameter ( 'pure' , 0 );
2010-03-10 18:58:29 +01:00
2019-01-30 16:18:44 +01:00
$user_info = get_user_info ( $id );
2009-01-22 18:44:33 +01:00
2019-01-30 16:18:44 +01:00
if ( ! check_acl ( $config [ 'id_user' ], 0 , 'UM' )) {
db_pandora_audit (
'ACL Violation' ,
'Trying to access User Management'
);
include 'general/noaccess.php' ;
return ;
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_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_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_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_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
}
2012-11-03 17:41:26 +01:00
/*
* Disabled at the moment .
2019-01-30 16:18:44 +01:00
if ( ! check_referer ()) {
require ( " general/noaccess.php " );
return ;
}
*/
2011-11-03 18:28:18 +01:00
2011-06-29 19:21:13 +02:00
$tab = get_parameter ( 'tab' , 'user' );
2010-02-22 20:03:55 +01:00
// Header
2013-04-22 12:31:20 +02:00
if ( $meta ) {
2019-01-30 16:18:44 +01:00
user_meta_print_header ();
$sec = 'advanced' ;
} else {
$buttons = [
'user' => [
'active' => false ,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure=' . $pure . '">' . html_print_image ( 'images/gm_users.png' , true , [ 'title' => __ ( 'User management' )]) . '</a>' ,
],
'profile' => [
'active' => false ,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure=' . $pure . '">' . html_print_image ( 'images/profiles.png' , true , [ 'title' => __ ( 'Profile management' )]) . '</a>' ,
],
];
$buttons [ $tab ][ 'active' ] = true ;
2019-04-29 14:36:02 +02:00
ui_print_page_header (
__ ( 'User detail editor' ),
'images/gm_users.png' ,
false ,
'profile_tab' ,
true ,
$buttons
);
2019-01-30 16:18:44 +01:00
$sec = 'gusuarios' ;
2012-12-11 18:39:48 +01:00
}
2010-02-22 20:03:55 +01:00
2013-05-20 10:42:02 +02:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
if ( $config [ 'user_can_update_info' ]) {
2019-01-30 16:18:44 +01:00
$view_mode = false ;
} else {
$view_mode = true ;
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_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_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_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_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
}
2019-01-30 16:18:44 +01:00
$new_user = ( bool ) get_parameter ( 'new_user' );
$create_user = ( bool ) get_parameter ( 'create_user' );
$add_profile = ( bool ) get_parameter ( 'add_profile' );
$delete_profile = ( bool ) get_parameter ( 'delete_profile' );
$update_user = ( bool ) get_parameter ( 'update_user' );
$status = get_parameter ( 'status' , - 1 );
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
2011-08-30 17:21:40 +02:00
// Reset status var if current action is not update_user
2019-01-30 16:18:44 +01:00
if ( $new_user || $create_user || $add_profile
|| $delete_profile || $update_user
) {
$status = - 1 ;
2011-08-30 17:21:40 +02:00
}
2011-08-30 16:51:03 +02:00
2009-03-27 12:33:11 +01:00
if ( $new_user && $config [ 'admin_can_add_user' ]) {
2019-01-30 16:18:44 +01:00
$user_info = [];
$id = '' ;
$user_info [ 'fullname' ] = '' ;
$user_info [ 'firstname' ] = '' ;
$user_info [ 'lastname' ] = '' ;
$user_info [ 'email' ] = '' ;
$user_info [ 'phone' ] = '' ;
$user_info [ 'comments' ] = '' ;
$user_info [ 'is_admin' ] = 0 ;
$user_info [ 'language' ] = 'default' ;
$user_info [ 'timezone' ] = '' ;
$user_info [ 'not_login' ] = false ;
$user_info [ 'strict_acl' ] = false ;
$user_info [ 'session_time' ] = 0 ;
2019-07-09 14:08:06 +02:00
$user_info [ 'middlename' ] = 0 ;
2019-01-30 16:18:44 +01:00
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$user_info [ 'id_skin' ] = '' ;
}
$user_info [ 'section' ] = '' ;
$user_info [ 'data_section' ] = '' ;
// This attributes are inherited from global configuration
$user_info [ 'block_size' ] = $config [ 'block_size' ];
if ( enterprise_installed () && defined ( 'METACONSOLE' )) {
$user_info [ 'metaconsole_agents_manager' ] = 0 ;
$user_info [ 'metaconsole_assigned_server' ] = '' ;
$user_info [ 'metaconsole_access_node' ] = 0 ;
}
2019-05-27 18:49:47 +02:00
if ( $config [ 'ehorus_user_level_conf' ]) {
$user_info [ 'ehorus_user_level_user' ] = '' ;
$user_info [ 'ehorus_user_level_pass' ] = '' ;
2019-05-28 13:14:42 +02:00
$user_info [ 'ehorus_user_level_enabled' ] = true ;
2019-05-27 18:49:47 +02:00
}
2009-03-27 12:33:11 +01:00
}
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
if ( $create_user ) {
2019-01-30 16:18:44 +01:00
if ( ! $config [ 'admin_can_add_user' ]) {
ui_print_error_message ( __ ( 'The current authentication scheme doesn\'t support creating users on %s' , get_product_name ()));
return ;
}
if ( html_print_csrf_error ()) {
return ;
}
$user_is_admin = ( int ) get_parameter ( 'is_admin' , 0 );
$values = [];
$values [ 'id_user' ] = ( string ) get_parameter ( 'id_user' );
$values [ 'fullname' ] = ( string ) get_parameter ( 'fullname' );
$values [ 'firstname' ] = ( string ) get_parameter ( 'firstname' );
$values [ 'lastname' ] = ( string ) get_parameter ( 'lastname' );
$password_new = ( string ) get_parameter ( 'password_new' , '' );
$password_confirm = ( string ) get_parameter ( 'password_confirm' , '' );
$values [ 'email' ] = ( string ) get_parameter ( 'email' );
$values [ 'phone' ] = ( string ) get_parameter ( 'phone' );
$values [ 'comments' ] = ( string ) get_parameter ( 'comments' );
$values [ 'is_admin' ] = $user_is_admin ;
$values [ 'language' ] = get_parameter ( 'language' , 'default' );
$values [ 'timezone' ] = ( string ) get_parameter ( 'timezone' );
$values [ 'default_event_filter' ] = ( int ) get_parameter ( 'default_event_filter' );
$values [ 'default_custom_view' ] = ( int ) get_parameter ( 'default_custom_view' );
$dashboard = get_parameter ( 'dashboard' , '' );
$visual_console = get_parameter ( 'visual_console' , '' );
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$values [ 'id_skin' ] = ( int ) get_parameter ( 'skin' , 0 );
}
$values [ 'block_size' ] = ( int ) get_parameter ( 'block_size' , $config [ 'block_size' ]);
$values [ 'section' ] = get_parameter ( 'section' );
if (( $values [ 'section' ] == 'Event list' ) || ( $values [ 'section' ] == 'Group view' ) || ( $values [ 'section' ] == 'Alert detail' ) || ( $values [ 'section' ] == 'Tactical view' ) || ( $values [ 'section' ] == 'Default' )) {
$values [ 'data_section' ] = '' ;
} else if ( $values [ 'section' ] == 'Dashboard' ) {
$values [ 'data_section' ] = $dashboard ;
} else if ( io_safe_output ( $values [ 'section' ]) == 'Visual console' ) {
$values [ 'data_section' ] = $visual_console ;
} else if ( $values [ 'section' ] == 'Other' || io_safe_output ( $values [ 'section' ]) == 'External link' ) {
$values [ 'data_section' ] = get_parameter ( 'data_section' );
}
if ( enterprise_installed ()) {
$values [ 'force_change_pass' ] = 1 ;
$values [ 'last_pass_change' ] = date ( 'Y/m/d H:i:s' , get_system_time ());
if ( defined ( 'METACONSOLE' )) {
$values [ 'metaconsole_access' ] = get_parameter ( 'metaconsole_access' , 'basic' );
$values [ 'metaconsole_agents_manager' ] = ( $user_is_admin == 1 ? 1 : get_parameter ( 'metaconsole_agents_manager' , '0' ));
$values [ 'metaconsole_assigned_server' ] = get_parameter ( 'metaconsole_assigned_server' , '' );
$values [ 'metaconsole_access_node' ] = ( $user_is_admin == 1 ? 1 : get_parameter ( 'metaconsole_access_node' , '0' ));
}
}
$values [ 'not_login' ] = ( bool ) get_parameter ( 'not_login' , false );
2019-07-09 14:08:06 +02:00
$values [ 'middlename' ] = get_parameter ( 'middlename' , 0 );
2019-01-30 16:18:44 +01:00
$values [ 'strict_acl' ] = ( bool ) get_parameter ( 'strict_acl' , false );
$values [ 'session_time' ] = ( int ) get_parameter ( 'session_time' , 0 );
2019-05-27 18:49:47 +02:00
// eHorus user level conf
if ( $config [ 'ehorus_user_level_conf' ]) {
2019-05-28 13:14:42 +02:00
$values [ 'ehorus_user_level_enabled' ] = ( bool ) get_parameter ( 'ehorus_user_level_enabled' , false );
if ( $values [ 'ehorus_user_level_enabled' ] === true ) {
$values [ 'ehorus_user_level_user' ] = ( string ) get_parameter ( 'ehorus_user_level_user' );
$values [ 'ehorus_user_level_pass' ] = ( string ) get_parameter ( 'ehorus_user_level_pass' );
} else {
$values [ 'ehorus_user_level_user' ] = null ;
$values [ 'ehorus_user_level_pass' ] = null ;
}
2019-05-27 18:49:47 +02:00
}
2019-05-28 13:14:42 +02:00
2019-01-30 16:18:44 +01:00
if ( $id == '' ) {
ui_print_error_message ( __ ( 'User ID cannot be empty' ));
$user_info = $values ;
$password_new = '' ;
$password_confirm = '' ;
$new_user = true ;
} else if ( $password_new == '' ) {
ui_print_error_message ( __ ( 'Passwords cannot be empty' ));
$user_info = $values ;
$password_new = '' ;
$password_confirm = '' ;
$new_user = true ;
} else if ( $password_new != $password_confirm ) {
ui_print_error_message ( __ ( 'Passwords didn\'t match' ));
$user_info = $values ;
$password_new = '' ;
$password_confirm = '' ;
$new_user = true ;
} else {
$info = '{"Id_user":"' . $values [ 'id_user' ] . '","FullName":"' . $values [ 'fullname' ] . '","Firstname":"' . $values [ 'firstname' ] . '","Lastname":"' . $values [ 'lastname' ] . '","Email":"' . $values [ 'email' ] . '","Phone":"' . $values [ 'phone' ] . '","Comments":"' . $values [ 'comments' ] . '","Is_admin":"' . $values [ 'is_admin' ] . '","Language":"' . $values [ 'language' ] . '","Timezone":"' . $values [ 'timezone' ] . '","Block size":"' . $values [ 'block_size' ] . '"' ;
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$info .= ',"Skin":"' . $values [ 'id_skin' ] . '"}' ;
} else {
$info .= '}' ;
}
$result = create_user ( $id , $password_new , $values );
if ( $result ) {
$res = save_pass_history ( $id , $password_new );
}
db_pandora_audit (
'User management' ,
'Created user ' . io_safe_input ( $id ),
false ,
false ,
$info
);
ui_print_result_message (
$result ,
__ ( 'Successfully created' ),
__ ( 'Could not be created' )
);
$password_new = '' ;
$password_confirm = '' ;
if ( $result ) {
if ( $values [ 'strict_acl' ]) {
if ( $values [ 'is_admin' ]) {
ui_print_info_message ( __ ( 'Strict ACL is not recommended for admin users because performance could be affected.' ));
}
}
$user_info = get_user_info ( $id );
$new_user = false ;
} else {
$user_info = $values ;
$new_user = true ;
}
}
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
}
if ( $update_user ) {
2019-01-30 16:18:44 +01:00
if ( html_print_csrf_error ()) {
return ;
}
$values = [];
$values [ 'id_user' ] = ( string ) get_parameter ( 'id_user' );
$values [ 'fullname' ] = ( string ) get_parameter ( 'fullname' );
$values [ 'firstname' ] = ( string ) get_parameter ( 'firstname' );
$values [ 'lastname' ] = ( string ) get_parameter ( 'lastname' );
$values [ 'email' ] = ( string ) get_parameter ( 'email' );
$values [ 'phone' ] = ( string ) get_parameter ( 'phone' );
$values [ 'comments' ] = ( string ) get_parameter ( 'comments' );
$values [ 'is_admin' ] = get_parameter ( 'is_admin' , 0 );
$values [ 'language' ] = ( string ) get_parameter ( 'language' );
$values [ 'timezone' ] = ( string ) get_parameter ( 'timezone' );
$values [ 'default_event_filter' ] = ( int ) get_parameter ( 'default_event_filter' );
$values [ 'default_custom_view' ] = ( int ) get_parameter ( 'default_custom_view' );
2019-07-09 14:08:06 +02:00
// eHorus user level conf.
2019-05-28 17:19:13 +02:00
$values [ 'ehorus_user_level_enabled' ] = ( bool ) get_parameter ( 'ehorus_user_level_enabled' , false );
$values [ 'ehorus_user_level_user' ] = ( string ) get_parameter ( 'ehorus_user_level_user' );
$values [ 'ehorus_user_level_pass' ] = ( string ) get_parameter ( 'ehorus_user_level_pass' );
2019-07-09 14:08:06 +02:00
$values [ 'middlename' ] = get_parameter ( 'middlename' , 0 );
2019-05-28 13:14:42 +02:00
2019-01-30 16:18:44 +01:00
$dashboard = get_parameter ( 'dashboard' , '' );
$visual_console = get_parameter ( 'visual_console' , '' );
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$values [ 'id_skin' ] = get_parameter ( 'skin' , 0 );
}
$values [ 'block_size' ] = get_parameter ( 'block_size' , $config [ 'block_size' ]);
$values [ 'section' ] = get_parameter ( 'section' );
if (( $values [ 'section' ] == 'Event list' ) || ( $values [ 'section' ] == 'Group view' ) || ( $values [ 'section' ] == 'Alert detail' ) || ( $values [ 'section' ] == 'Tactical view' ) || ( $values [ 'section' ] == 'Default' )) {
$values [ 'data_section' ] = '' ;
} else if ( $values [ 'section' ] == 'Dashboard' ) {
$values [ 'data_section' ] = $dashboard ;
} else if ( io_safe_output ( $values [ 'section' ]) == 'Visual console' ) {
$values [ 'data_section' ] = $visual_console ;
} else if ( $values [ 'section' ] == 'Other' || io_safe_output ( $values [ 'section' ]) == 'External link' ) {
$values [ 'data_section' ] = get_parameter ( 'data_section' );
}
if ( enterprise_installed () && defined ( 'METACONSOLE' )) {
$values [ 'metaconsole_access' ] = get_parameter ( 'metaconsole_access' );
$values [ 'metaconsole_agents_manager' ] = get_parameter ( 'metaconsole_agents_manager' , '0' );
$values [ 'metaconsole_assigned_server' ] = get_parameter ( 'metaconsole_assigned_server' , '' );
$values [ 'metaconsole_access_node' ] = get_parameter ( 'metaconsole_access_node' , '0' );
}
$values [ 'not_login' ] = ( bool ) get_parameter ( 'not_login' , false );
$values [ 'strict_acl' ] = ( bool ) get_parameter ( 'strict_acl' , false );
$values [ 'session_time' ] = ( int ) get_parameter ( 'session_time' , 0 );
$res1 = update_user ( $id , $values );
if ( $config [ 'user_can_update_password' ]) {
$password_new = ( string ) get_parameter ( 'password_new' , '' );
$password_confirm = ( string ) get_parameter ( 'password_confirm' , '' );
if ( $password_new != '' ) {
if ( $password_confirm == $password_new ) {
if (( ! $values [ 'is_admin' ] || $config [ 'enable_pass_policy_admin' ]) && $config [ 'enable_pass_policy' ]) {
$pass_ok = login_validate_pass ( $password_new , $id , true );
if ( $pass_ok != 1 ) {
ui_print_error_message ( $pass_ok );
} else {
$res2 = update_user_password ( $id , $password_new );
if ( $res2 ) {
db_process_sql_insert (
'tsesion' ,
[
'id_sesion' => '' ,
'id_usuario' => $id ,
'ip_origen' => $_SERVER [ 'REMOTE_ADDR' ],
'accion' => 'Password change' ,
'descripcion' => 'Access password updated' ,
'fecha' => date ( 'Y-m-d H:i:s' ),
'utimestamp' => time (),
]
);
$res3 = save_pass_history ( $id , $password_new );
}
ui_print_result_message (
$res1 || $res2 ,
__ ( 'User info successfully updated' ),
__ ( 'Error updating user info (no change?)' )
);
}
} else {
$res2 = update_user_password ( $id , $password_new );
if ( $res2 ) {
$res3 = save_pass_history ( $id , $password_new );
db_process_sql_insert (
'tsesion' ,
[
'id_sesion' => '' ,
'id_usuario' => $id ,
'ip_origen' => $_SERVER [ 'REMOTE_ADDR' ],
'accion' => 'Password change' ,
'descripcion' => 'Access password updated' ,
'fecha' => date ( 'Y-m-d H:i:s' ),
'utimestamp' => time (),
]
);
}
ui_print_result_message (
$res1 || $res2 ,
__ ( 'User info successfully updated' ),
__ ( 'Error updating user info (no change?)' )
);
}
} else {
db_process_sql_insert (
'tsesion' ,
[
'id_sesion' => '' ,
'id_usuario' => $id ,
'ip_origen' => $_SERVER [ 'REMOTE_ADDR' ],
'accion' => 'Password change' ,
'descripcion' => 'Access password update failed' ,
'fecha' => date ( 'Y-m-d H:i:s' ),
'utimestamp' => time (),
]
);
ui_print_error_message ( __ ( 'Passwords does not match' ));
}
} else {
$has_skin = false ;
$has_wizard = false ;
$info = '{"id_user":"' . $values [ 'id_user' ] . ' " ,
" FullName " : " '. $values['fullname'] .' " ,
" Firstname " : " '. $values['firstname'] .' " ,
" Lastname " : " '. $values['lastname'] .' " ,
" Email " : " '. $values['email'] .' " ,
" Phone " : " '. $values['phone'] .' " ,
" Comments " : " '. $values['comments'] .' " ,
" Is_admin " : " '. $values['is_admin'] .' " ,
" Language " : " '. $values['language'] .' " ,
" Timezone " : " '. $values['timezone'] .' " ,
" Block size " : " '. $values['block_size'] .' " ,
" Section " : " '. $values['section'] .' " ' ;
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$info .= ',"Skin":"' . $values [ 'id_skin' ] . '"' ;
$has_skin = true ;
}
if ( enterprise_installed () && defined ( 'METACONSOLE' )) {
$info .= ',"Wizard access":"' . $values [ 'metaconsole_access' ] . '"}' ;
$has_wizard = true ;
} else if ( $has_skin ) {
$info .= '}' ;
}
if ( ! $has_skin && ! $has_wizard ) {
$info .= '}' ;
}
db_pandora_audit (
'User management' ,
'Updated user ' . io_safe_input ( $id ),
false ,
false ,
$info
);
ui_print_result_message (
$res1 ,
__ ( 'User info successfully updated' ),
__ ( 'Error updating user info (no change?)' )
);
}
} else {
ui_print_result_message (
$res1 ,
__ ( 'User info successfully updated' ),
__ ( 'Error updating user info (no change?)' )
);
}
if ( $values [ 'strict_acl' ]) {
$count_groups = 0 ;
$count_tags = 0 ;
$profiles = db_get_all_rows_field_filter ( 'tusuario_perfil' , 'id_usuario' , $id );
if ( $profiles === false ) {
$profiles = [];
}
foreach ( $profiles as $profile ) {
$count_groups = ( $count_groups + 1 );
$arr_tags = explode ( ',' , $profile [ 'tags' ]);
$count_tags = ( $count_tags + count ( $arr_tags ));
}
if (( $count_groups > 3 ) && ( $count_tags > 10 )) {
ui_print_info_message ( __ ( 'Strict ACL is not recommended for this user. Performance could be affected.' ));
}
}
$user_info = $values ;
2011-08-30 17:21:40 +02:00
}
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
if ( $status != - 1 ) {
2019-01-30 16:18:44 +01:00
ui_print_result_message (
$status ,
__ ( 'User info successfully updated' ),
__ ( 'Error updating user info (no change?)' )
);
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
}
if ( $add_profile ) {
2019-01-30 16:18:44 +01:00
$id2 = ( string ) get_parameter ( 'id' );
$group2 = ( int ) get_parameter ( 'assign_group' );
$profile2 = ( int ) get_parameter ( 'assign_profile' );
$tags = ( array ) get_parameter ( 'assign_tags' );
$no_hierarchy = ( int ) get_parameter ( 'no_hierarchy' , 0 );
foreach ( $tags as $k => $tag ) {
if ( empty ( $tag )) {
unset ( $tags [ $k ]);
}
}
$tags = implode ( ',' , $tags );
db_pandora_audit (
'User management' ,
'Added profile for user ' . io_safe_input ( $id2 ),
false ,
false ,
'Profile: ' . $profile2 . ' Group: ' . $group2 . ' Tags: ' . $tags
);
$return = profile_create_user_profile ( $id2 , $profile2 , $group2 , false , $tags , $no_hierarchy );
ui_print_result_message (
$return ,
__ ( 'Profile added successfully' ),
__ ( 'Profile cannot be added' )
);
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
}
if ( $delete_profile ) {
2019-01-30 16:18:44 +01:00
$id2 = ( string ) get_parameter ( 'id_user' );
$id_up = ( int ) get_parameter ( 'id_user_profile' );
$perfilUser = db_get_row ( 'tusuario_perfil' , 'id_up' , $id_up );
$id_perfil = $perfilUser [ 'id_perfil' ];
$perfil = db_get_row ( 'tperfil' , 'id_perfil' , $id_perfil );
db_pandora_audit (
'User management' ,
'Deleted profile for user ' . io_safe_input ( $id2 ),
false ,
false ,
'The profile with id ' . $id_perfil . ' in the group ' . $perfilUser [ 'id_grupo' ]
);
$return = profile_delete_user_profile ( $id2 , $id_up );
ui_print_result_message (
$return ,
__ ( 'Successfully deleted' ),
__ ( 'Could not be deleted' )
);
2009-01-22 18:44:33 +01:00
}
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_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_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_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_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
2019-08-19 12:31:47 +02:00
if ( $values ) {
$user_info = $values ;
}
2015-06-25 10:07:53 +02:00
$table = new stdClass ();
2013-04-22 12:31:20 +02:00
$table -> id = 'user_configuration_table' ;
2015-06-15 15:50:28 +02:00
$table -> width = '100%' ;
$table -> class = 'databox filters' ;
2015-06-08 11:05:19 +02:00
if ( defined ( 'METACONSOLE' )) {
2019-01-30 16:18:44 +01:00
if ( $id ) {
$table -> head [ 0 ] = __ ( 'Update User' );
} else {
$table -> head [ 0 ] = __ ( 'Create User' );
}
$table -> head_colspan [ 0 ] = 5 ;
$table -> headstyle [ 0 ] = 'text-align: center' ;
2015-03-06 12:28:05 +01:00
}
2019-01-30 16:18:44 +01:00
$table -> data = [];
$table -> colspan = [];
$table -> size = [];
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> size [ 0 ] = '35%' ;
$table -> size [ 1 ] = '65%' ;
2019-01-30 16:18:44 +01:00
$table -> style = [];
2015-06-15 15:50:28 +02:00
$table -> style [ 0 ] = 'font-weight: bold;' ;
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> data [ 0 ][ 0 ] = __ ( 'User ID' );
2019-01-30 16:18:44 +01:00
$table -> data [ 0 ][ 1 ] = html_print_input_text_extended (
'id_user' ,
$id ,
'' ,
'' ,
20 ,
60 ,
! $new_user || $view_mode ,
'' ,
'' ,
true
);
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> data [ 1 ][ 0 ] = __ ( 'Full (display) name' );
2019-01-30 16:18:44 +01:00
$table -> data [ 1 ][ 1 ] = html_print_input_text_extended (
'fullname' ,
$user_info [ 'fullname' ],
'' ,
'' ,
30 ,
125 ,
$view_mode ,
'' ,
'' ,
true
);
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
$table -> data [ 2 ][ 0 ] = __ ( 'Language' );
2019-01-30 16:18:44 +01:00
$table -> data [ 2 ][ 1 ] = html_print_select_from_sql (
'SELECT id_language, name FROM tlanguage' ,
'language' ,
$user_info [ 'language' ],
'' ,
__ ( 'Default' ),
'default' ,
true
);
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
2018-06-11 16:40:10 +02:00
$table -> data [ 3 ][ 0 ] = __ ( 'Timezone' );
2019-01-30 16:18:44 +01:00
$table -> data [ 3 ][ 1 ] = html_print_timezone_select ( 'timezone' , $user_info [ 'timezone' ]);
2018-06-11 16:40:10 +02:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
if ( $config [ 'user_can_update_password' ]) {
2019-01-30 16:18:44 +01:00
$table -> data [ 4 ][ 0 ] = __ ( 'Password' );
$table -> data [ 4 ][ 1 ] = html_print_input_text_extended (
'password_new' ,
'' ,
'' ,
'' ,
15 ,
45 ,
$view_mode ,
'' ,
'' ,
true ,
true
);
$table -> data [ 5 ][ 0 ] = __ ( 'Password confirmation' );
$table -> data [ 5 ][ 1 ] = html_print_input_text_extended (
'password_confirm' ,
'' ,
'' ,
'' ,
15 ,
45 ,
$view_mode ,
'' ,
'' ,
true ,
true
);
}
$own_info = get_user_info ( $config [ 'id_user' ]);
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
if ( $config [ 'admin_can_make_admin' ]) {
2019-01-30 16:18:44 +01:00
$table -> data [ 6 ][ 0 ] = __ ( 'Global Profile' );
$table -> data [ 6 ][ 1 ] = '' ;
if ( $own_info [ 'is_admin' ] || $user_info [ 'is_admin' ]) {
$table -> data [ 6 ][ 1 ] = html_print_radio_button ( 'is_admin' , 1 , '' , $user_info [ 'is_admin' ], true );
$table -> data [ 6 ][ 1 ] .= __ ( 'Administrator' );
$table -> data [ 6 ][ 1 ] .= ui_print_help_tip ( __ ( 'This user has permissions to manage all. An admin user should not requiere additional group permissions, except for using Enterprise ACL.' ), true );
$table -> data [ 6 ][ 1 ] .= '<br />' ;
}
$table -> data [ 6 ][ 1 ] .= html_print_radio_button ( 'is_admin' , 0 , '' , $user_info [ 'is_admin' ], true );
$table -> data [ 6 ][ 1 ] .= __ ( 'Standard User' );
$table -> data [ 6 ][ 1 ] .= ui_print_help_tip ( __ ( 'This user has separated permissions to view data in his group agents, create incidents belong to his groups, add notes in another incidents, create personal assignments or reviews and other tasks, on different profiles' ), true );
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
}
2009-01-22 18:44:33 +01:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> data [ 7 ][ 0 ] = __ ( 'E-mail' );
2019-01-30 16:18:44 +01:00
$table -> data [ 7 ][ 1 ] = html_print_input_text_extended (
'email' ,
$user_info [ 'email' ],
'' ,
'' ,
20 ,
100 ,
$view_mode ,
'' ,
'' ,
true
);
2008-06-09 19:51:18 +02:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> data [ 8 ][ 0 ] = __ ( 'Phone number' );
2019-01-30 16:18:44 +01:00
$table -> data [ 8 ][ 1 ] = html_print_input_text_extended (
'phone' ,
$user_info [ 'phone' ],
'' ,
'' ,
10 ,
30 ,
$view_mode ,
'' ,
'' ,
true
);
2008-08-12 16:41:53 +02:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
$table -> data [ 9 ][ 0 ] = __ ( 'Comments' );
2019-01-30 16:18:44 +01:00
$table -> data [ 9 ][ 1 ] = html_print_textarea (
'comments' ,
2 ,
65 ,
$user_info [ 'comments' ],
( $view_mode ? 'readonly="readonly"' : '' ),
true
);
// If we want to create a new user, skins displayed are the skins of the creator's group. If we want to update, skins displayed are the skins of the modified user.
$own_info = get_user_info ( $config [ 'id_user' ]);
if ( $own_info [ 'is_admin' ] || check_acl ( $config [ 'id_user' ], 0 , 'PM' )) {
$display_all_group = true ;
} else {
$display_all_group = false ;
}
2011-03-01 16:47:48 +01:00
2012-08-17 17:28:55 +02:00
if ( $new_user ) {
2019-01-30 16:18:44 +01:00
$usr_groups = ( users_get_groups ( $config [ 'id_user' ], 'AR' , $display_all_group ));
$id_usr = $config [ 'id_user' ];
} else {
$usr_groups = ( users_get_groups ( $id , 'AR' , $display_all_group ));
$id_usr = $id ;
2011-02-14 10:08:41 +01:00
}
2013-04-24 16:27:24 +02:00
if ( ! $meta ) {
2019-01-30 16:18:44 +01:00
// User only can change skins if has more than one group
if ( count ( $usr_groups ) > 1 ) {
if ( $isFunctionSkins !== ENTERPRISE_NOT_HOOK ) {
$table -> data [ 10 ][ 0 ] = __ ( 'Skin' );
$table -> data [ 10 ][ 1 ] = skins_print_select ( $id_usr , 'skin' , $user_info [ 'id_skin' ], '' , __ ( 'None' ), 0 , true );
}
}
2011-02-14 10:08:41 +01:00
}
2019-01-30 16:18:44 +01:00
if ( $meta ) {
$array_filters = get_filters_custom_fields_view ( 0 , true );
$table -> data [ 11 ][ 0 ] = __ ( 'Search custom field view' ) . ' ' . ui_print_help_tip ( __ ( 'Load by default the selected view in custom field view' ), true );
$table -> data [ 11 ][ 1 ] = html_print_select (
$array_filters ,
'default_custom_view' ,
$user_info [ 'default_custom_view' ],
'' ,
__ ( 'None' ),
0 ,
true ,
false ,
true ,
'' ,
false
);
}
$values = [
- 1 => __ ( 'Use global conf' ),
1 => __ ( 'Yes' ),
0 => __ ( 'No' ),
];
$table -> data [ 12 ][ 0 ] = __ ( 'Home screen' ) . ui_print_help_tip ( __ ( 'User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view' ), true );
$values = [
'Default' => __ ( 'Default' ),
'Visual console' => __ ( 'Visual console' ),
'Event list' => __ ( 'Event list' ),
'Group view' => __ ( 'Group view' ),
'Tactical view' => __ ( 'Tactical view' ),
'Alert detail' => __ ( 'Alert detail' ),
'External link' => __ ( 'External link' ),
'Other' => __ ( 'Other' ),
];
2017-10-24 17:03:35 +02:00
if ( enterprise_installed () && ! is_metaconsole ()) {
2019-01-30 16:18:44 +01:00
$values [ 'Dashboard' ] = __ ( 'Dashboard' );
2017-04-06 16:17:54 +02:00
}
2019-01-30 16:18:44 +01:00
2019-05-27 18:49:47 +02:00
2019-01-30 16:18:44 +01:00
$table -> data [ 12 ][ 1 ] = html_print_select ( $values , 'section' , io_safe_output ( $user_info [ 'section' ]), 'show_data_section();' , '' , - 1 , true , false , false );
2017-04-06 16:17:54 +02:00
if ( enterprise_installed ()) {
2019-01-30 16:18:44 +01:00
$dashboards = dashboard_get_dashboards ();
$dashboards_aux = [];
if ( $dashboards === false ) {
$dashboards = [ 'None' => 'None' ];
} else {
foreach ( $dashboards as $key => $dashboard ) {
$dashboards_aux [ $dashboard [ 'name' ]] = $dashboard [ 'name' ];
}
}
$table -> data [ 12 ][ 1 ] .= html_print_select ( $dashboards_aux , 'dashboard' , $user_info [ 'data_section' ], '' , '' , '' , true );
2017-04-06 16:17:54 +02:00
}
2019-01-30 16:18:44 +01:00
$layouts = visual_map_get_user_layouts ( $config [ 'id_user' ], true );
$layouts_aux = [];
2017-04-06 16:17:54 +02:00
if ( $layouts === false ) {
2019-01-30 16:18:44 +01:00
$layouts_aux = [ 'None' => 'None' ];
} else {
foreach ( $layouts as $layout ) {
$layouts_aux [ $layout ] = $layout ;
}
2017-04-06 16:17:54 +02:00
}
2019-01-30 16:18:44 +01:00
$table -> data [ 12 ][ 1 ] .= html_print_select ( $layouts_aux , 'visual_console' , $user_info [ 'data_section' ], '' , '' , '' , true );
$table -> data [ 12 ][ 1 ] .= html_print_input_text ( 'data_section' , $user_info [ 'data_section' ], '' , 60 , 255 , true , false );
2017-04-06 16:17:54 +02:00
$table -> data [ 13 ][ 0 ] = __ ( 'Block size for pagination' );
2019-01-30 16:18:44 +01:00
$table -> data [ 13 ][ 1 ] = html_print_input_text ( 'block_size' , $user_info [ 'block_size' ], '' , 5 , 5 , true );
2011-03-01 16:47:48 +01:00
2012-08-17 17:28:55 +02:00
if ( $id == $config [ 'id_user' ]) {
2019-01-30 16:18:44 +01:00
$table -> data [ 13 ][ 1 ] .= html_print_input_hidden ( 'quick_language_change' , 1 , true );
2011-07-26 12:32:13 +02:00
}
2013-01-23 15:20:54 +01:00
if ( enterprise_installed () && defined ( 'METACONSOLE' )) {
2019-01-30 16:18:44 +01:00
$user_info_metaconsole_access = 'only_console' ;
if ( isset ( $user_info [ 'metaconsole_access' ])) {
$user_info_metaconsole_access = $user_info [ 'metaconsole_access' ];
}
$table -> data [ 13 ][ 0 ] = __ ( 'Metaconsole access' ) . ' ' . ui_print_help_icon ( 'meta_access' , true );
$metaconsole_accesses = [
'basic' => __ ( 'Basic' ),
'advanced' => __ ( 'Advanced' ),
];
$table -> data [ 13 ][ 1 ] = html_print_select (
$metaconsole_accesses ,
'metaconsole_access' ,
$user_info_metaconsole_access ,
'' ,
'' ,
- 1 ,
true ,
false ,
false
);
2012-07-06 11:11:10 +02:00
}
2017-04-06 16:17:54 +02:00
$table -> data [ 14 ][ 0 ] = __ ( 'Not Login' );
$table -> data [ 14 ][ 0 ] .= ui_print_help_tip ( __ ( 'The user with not login set only can access to API.' ), true );
2019-01-30 16:18:44 +01:00
$table -> data [ 14 ][ 1 ] = html_print_checkbox ( 'not_login' , 1 , $user_info [ 'not_login' ], true );
2012-08-20 Miguel de Dios <miguel.dedios@artica.es>
* index.php, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
general/login_page.php, general/logon_failed.php,
godmode/users/configure_user.php, include/api.php,
include/auth/mysql.php, pandoradb.sql, pandoradb.postgreSQL.sql,
pandoradb.oracle.sql: added the feature to set any user with
"not login" for only the user can work across the API.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-08-20 20:06:04 +02:00
2016-11-23 10:13:02 +01:00
$table -> data [ 15 ][ 0 ] = __ ( 'Session Time' );
$table -> data [ 15 ][ 0 ] .= ui_print_help_tip ( __ ( 'This is defined in minutes, If you wish a permanent session should putting -1 in this field.' ), true );
2019-01-30 16:18:44 +01:00
$table -> data [ 15 ][ 1 ] = html_print_input_text ( 'session_time' , $user_info [ 'session_time' ], '' , 5 , 5 , true );
2017-04-05 17:44:24 +02:00
$event_filter_data = db_get_all_rows_sql ( 'SELECT id_name, id_filter FROM tevent_filter' );
2019-01-30 16:18:44 +01:00
if ( $event_filter_data === false ) {
$event_filter_data = [];
}
$event_filter = [];
2017-04-05 17:44:24 +02:00
$event_filter [ 0 ] = __ ( 'None' );
foreach ( $event_filter_data as $filter ) {
2019-01-30 16:18:44 +01:00
$event_filter [ $filter [ 'id_filter' ]] = $filter [ 'id_name' ];
2017-04-05 17:44:24 +02:00
}
2019-01-30 16:18:44 +01:00
2017-04-05 17:44:24 +02:00
$table -> data [ 16 ][ 0 ] = __ ( 'Default event filter' );
2019-01-30 16:18:44 +01:00
$table -> data [ 16 ][ 1 ] = html_print_select ( $event_filter , 'default_event_filter' , $user_info [ 'default_event_filter' ], '' , '' , __ ( 'None' ), true , false , false );
2019-07-09 14:08:06 +02:00
$table -> data [ 17 ][ 0 ] = __ ( 'Disabled newsletter' );
if ( $user_info [ 'middlename' ] >= 0 ) {
$middlename = false ;
} else {
$middlename = true ;
}
$table -> data [ 17 ][ 1 ] = html_print_checkbox (
'middlename' ,
- 1 ,
$middlename ,
true
);
2019-05-27 18:49:47 +02:00
if ( $config [ 'ehorus_user_level_conf' ]) {
2019-07-09 14:08:06 +02:00
$table -> data [ 18 ][ 0 ] = __ ( 'eHorus user acces enabled' );
$table -> data [ 18 ][ 1 ] = html_print_checkbox ( 'ehorus_user_level_enabled' , 1 , $user_info [ 'ehorus_user_level_enabled' ], true );
$table -> data [ 19 ][ 0 ] = __ ( 'eHorus user' );
$table -> data [ 20 ][ 0 ] = __ ( 'eHorus password' );
$table -> data [ 19 ][ 1 ] = html_print_input_text ( 'ehorus_user_level_user' , $user_info [ 'ehorus_user_level_user' ], '' , 15 , 45 , true );
$table -> data [ 20 ][ 1 ] = html_print_input_password ( 'ehorus_user_level_pass' , io_output_password ( $user_info [ 'ehorus_user_level_pass' ]), '' , 15 , 45 , true );
2019-05-27 18:49:47 +02:00
}
2019-01-30 16:18:44 +01:00
if ( $meta ) {
enterprise_include_once ( 'include/functions_metaconsole.php' );
$data = [];
$data [ 0 ] = __ ( 'Enable agents managment' );
$data [ 1 ] = html_print_checkbox ( 'metaconsole_agents_manager' , 1 , $user_info [ 'metaconsole_agents_manager' ], true );
$table -> rowclass [] = '' ;
$table -> rowstyle [] = 'font-weight: bold;' ;
$table -> data [ 'metaconsole_agents_manager' ] = $data ;
$data = [];
$data [ 0 ] = __ ( 'Assigned node' ) . ui_print_help_tip ( __ ( 'Server where the agents created of this user will be placed' ), true );
$servers = metaconsole_get_servers ();
$servers_for_select = [];
foreach ( $servers as $server ) {
$servers_for_select [ $server [ 'id' ]] = $server [ 'server_name' ];
}
$data [ 1 ] = html_print_select ( $servers_for_select , 'metaconsole_assigned_server' , $user_info [ 'metaconsole_assigned_server' ], '' , '' , - 1 , true , false , false );
$table -> rowclass [] = '' ;
$table -> rowstyle [] = 'font-weight: bold;' ;
$table -> data [ 'metaconsole_assigned_server' ] = $data ;
$data = [];
$data [ 0 ] = __ ( 'Enable node access' ) . ui_print_help_tip ( __ ( 'With this option enabled, the user will can access to nodes console' ), true );
$data [ 2 ] = html_print_checkbox ( 'metaconsole_access_node' , 1 , $user_info [ 'metaconsole_access_node' ], true );
$table -> rowclass [] = '' ;
$table -> rowstyle [] = '' ;
$table -> data [ 'metaconsole_access_node' ] = $data ;
2013-04-22 12:31:20 +02:00
}
2011-07-26 12:32:13 +02:00
echo '<form method="post" autocomplete="off">' ;
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_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_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_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_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
2019-01-30 16:18:44 +01:00
html_print_table ( $table );
2009-01-22 18:44:33 +01:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
echo '<div style="width: ' . $table -> width . '" class="action-buttons">' ;
2018-09-13 15:19:08 +02:00
if ( $config [ 'admin_can_add_user' ]) {
2019-01-30 16:18:44 +01:00
html_print_csrf_hidden ();
if ( $new_user ) {
html_print_input_hidden ( 'create_user' , 1 );
html_print_submit_button ( __ ( 'Create' ), 'crtbutton' , false , 'class="sub wand"' );
} else {
html_print_input_hidden ( 'update_user' , 1 );
html_print_submit_button ( __ ( 'Update' ), 'uptbutton' , false , 'class="sub upd"' );
}
2009-01-22 18:44:33 +01:00
}
2019-01-30 16:18:44 +01:00
2009-03-26 Esteban Sanchez <estebans@artica.es>
* godmode/users/configure_user.php: Complete rewritten to fix minor
errors and fit the Pandora style.
* include/auth/ldap.php: Removed process_user_isadmin(). Renamed
process_user_password() to update_user_password(). Renamed
process_user_info to update_user(). update_user_password() does not
require old password anymore.
* include/functions_db.php: Added empty checks on
create_user_profile().
* include/functions_ui.php: print_error_message() renamed to
print_result_message().
* godmode/agentes/configurar_agente.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/reporting_builder.php,
operation/agentes/alerts_status.php, operation/events/events.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/messages/message.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php: Renamed print_result_message(). Some
translatable strings reused to simplify i18n work.
* godmode/users/user_list.php: Renamed print_result_message(). Use
cross.png for deletion links. Style corrections.
* godmode/setup/news.php: Renamed print_result_message(). Use
process_sql_delete() instead of direct mysql_query.
* godmode/reporting/map_builder.php: Renamed print_result_message().
Style correction on process_sql_update().
* godmode/alerts/configure_alert_compound.php: Renamed
print_result_message(). Fixed steps_clean div.
* godmode/setup/setup.php: Return control to index instead of exit.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1567 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-26 12:14:49 +01:00
echo '</div>' ;
echo '</form>' ;
echo '<br />' ;
2009-01-22 18:44:33 +01:00
2019-01-30 16:18:44 +01:00
// Don't show anything else if we're creating an user
if ( ! empty ( $id ) && ! $new_user ) {
profile_print_profile_table ( $id );
2013-07-31 13:34:42 +02:00
}
2013-05-20 10:42:02 +02:00
enterprise_hook ( 'close_meta_frame' );
2013-03-14 17:52:05 +01:00
?>
2013-04-22 12:31:20 +02:00
< script type = " text/javascript " >
/* <![CDATA[ */
$ ( document ) . ready ( function () {
2019-01-30 16:18:44 +01:00
$ ( 'input:radio[name="is_admin"]' ) . change ( function () {
if ( $ ( '#radiobtn0002' ) . prop ( 'checked' )) {
$ ( '#user_configuration_table-metaconsole_agents_manager' ) . show ();
$ ( '#user_configuration_table-metaconsole_access_node' ) . show ();
if ( $ ( '#checkbox-metaconsole_agents_manager' ) . prop ( 'checked' )) {
$ ( '#user_configuration_table-metaconsole_assigned_server' ) . show ();
}
}
else {
$ ( '#user_configuration_table-metaconsole_agents_manager' ) . hide ();
$ ( '#user_configuration_table-metaconsole_access_node' ) . hide ();
$ ( '#user_configuration_table-metaconsole_assigned_server' ) . hide ();
}
});
$ ( '#checkbox-metaconsole_agents_manager' ) . change ( function () {
if ( $ ( '#checkbox-metaconsole_agents_manager' ) . prop ( 'checked' )) {
$ ( '#user_configuration_table-metaconsole_assigned_server' ) . show ();
}
else {
$ ( '#user_configuration_table-metaconsole_assigned_server' ) . hide ();
}
});
$ ( 'input:radio[name="is_admin"]' ) . trigger ( 'change' );
$ ( '#checkbox-metaconsole_agents_manager' ) . trigger ( 'change' );
show_data_section ();
2019-05-28 13:14:42 +02:00
$ ( '#checkbox-ehorus_user_level_enabled' ) . change ( function () {
2019-05-27 18:49:47 +02:00
switch_ehorus_conf ();
});
2019-05-28 13:14:42 +02:00
$ ( '#checkbox-ehorus_user_level_enabled' ) . trigger ( 'change' );
2019-05-27 18:49:47 +02:00
2013-04-22 12:31:20 +02:00
});
2017-04-06 16:17:54 +02:00
function show_data_section () {
2019-01-30 16:18:44 +01:00
section = $ ( " #section " ) . val ();
switch ( section ) {
case < ? php echo " ' " . 'Dashboard' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Visual console' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " " );
break ;
case < ? php echo " ' " . 'Event list' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Group view' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Tactical view' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Alert detail' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'External link' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Other' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
case < ? php echo " ' " . 'Default' . " ' " ; ?> :
$ ( " #text-data_section " ) . css ( " display " , " none " );
$ ( " #dashboard " ) . css ( " display " , " none " );
$ ( " #visual_console " ) . css ( " display " , " none " );
break ;
}
2017-04-06 16:17:54 +02:00
}
2019-05-27 18:49:47 +02:00
function switch_ehorus_conf ()
{
2019-05-28 13:14:42 +02:00
if ( ! $ ( '#checkbox-ehorus_user_level_enabled' ) . prop ( 'checked' ))
2019-05-27 18:49:47 +02:00
{
$ ( " #user_configuration_table-18 " ) . hide ();
$ ( " #user_configuration_table-19 " ) . hide ();
} else
{
$ ( " #user_configuration_table-18 " ) . show ();
$ ( " #user_configuration_table-19 " ) . show ()
}
}
2013-04-22 12:31:20 +02:00
/* ]]> */
</ script >