0) { ui_print_result_message ($return, __('User info successfully updated'), __('Error updating user info')); } $user_info = $upd_info; } echo '
'; echo ''; echo ''; echo '"; // Show "Picture" (in future versions, why not, allow users to upload it's own avatar here. echo "
'.__('User ID').''; echo "$id"; echo ""; if (is_user_admin ($id)) { echo print_image('images/people_1.png', true); } else { echo print_image('images/people_2.png', true); } echo '
'.__('Full (display) name').''; print_input_text_extended ("fullname", $user_info["fullname"], '', '', 35, 100, $view_mode, '', 'class="input"'); // Not used anymore. In 3.0 database schema continues storing it, but will be removed in the future, or we will 'reuse' // the database fields for anything more useful. /* echo '
'.__('First name').''; print_input_text_extended ("firstname", $user_info["firstname"], '', '', 25, 100, $view_mode, '', 'class="input"'); echo '
'.__('Last name').''; print_input_text_extended ("lastname", $user_info["lastname"], '', '', 25, 100, $view_mode, '', 'class="input"'); */ if ($view_mode === false) { if ($config["user_can_update_password"]) { echo '
'.__('New Password').''; print_input_text_extended ("password_new", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true); echo '
'.__('Password confirmation').''; print_input_text_extended ("password_conf", "", '', '', '15', '25', $view_mode, '', 'class="input"', false, true); } else { echo ''.__('You can not change your password from Pandora FMS under the current authentication scheme').''; } } echo '
'.__('E-mail').''; print_input_text_extended ("email", $user_info["email"], '', '', '40', '100', $view_mode, '', 'class="input"'); echo '
'.__('Phone number').''; print_input_text_extended ("phone", $user_info["phone"], '', '', '10', '30', $view_mode, '', 'class="input"'); echo '
'.__('Language').''; echo print_select_from_sql ('SELECT id_language, name FROM tlanguage', 'language', $user_info["language"], '', '', '', true); echo '
'.__('Comments').''; print_textarea ("comments", 2, 60, $user_info["comments"], ($view_mode ? 'readonly="readonly"' : '')); $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; $usr_groups = (get_user_groups($config['id_user'], 'AR', $display_all_group)); $id_usr = $config['id_user']; // User only can change skins if has more than one group if (count($usr_groups) > 1){ $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { echo '
' . __('Skin') . ''; echo print_select_skins($id_usr,'skin', $user_info['id_skin'], '', __('None'), 0, true); } } echo '
'.__('Flash charts').''; $values = array(-1 => __('Default'),1 => __('Yes'),0 => __('No')); echo print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false); echo '
'.__('Block size for pagination').''; echo print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true); echo '
'; echo '
'; if (!$config["user_can_update_info"]) { echo ''.__('You can not change your user info from Pandora FMS under the current authentication scheme').''; } else { print_submit_button (__('Update'), 'uptbutton', $view_mode, 'class="sub upd"'); } echo '
'; echo '

'.__('Profiles/Groups assigned to this user').'

'; $table->width = '50%'; $table->data = array (); $table->head = array (); $table->align = array (); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->style[1] = 'font-weight: bold'; $table->head[0] = __('Profile name'); $table->head[1] = __('Group'); $table->data = array (); $result = get_db_all_rows_field_filter ("tusuario_perfil", "id_usuario", $id); if ($result === false) { $result = array (); } foreach ($result as $profile) { $data[0] = ''.get_profile_name ($profile["id_perfil"]).''; $data[1] = ui_print_group_icon ($profile["id_grupo"], true).' '.get_group_name ($profile["id_grupo"], true).''; array_push ($table->data, $data); } if (!empty ($table->data)) { print_table ($table); } else { echo '
'.__('This user doesn\'t have any assigned profile/group').'
'; } ?>