X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fusers.php;h=775cc813e52684efce278629d9945bdb3b52d368;hb=c4eae7a18f0eb824e6eda7be2ba6fa820e9e58c9;hp=889d89ba24845bd98ec006a9f7b32ca73749b0e4;hpb=7d9150f4f6ba547f19c789abb7a506bbd4c2bdf4;p=fa-stable.git diff --git a/admin/users.php b/admin/users.php index 889d89ba..775cc813 100644 --- a/admin/users.php +++ b/admin/users.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=15; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -55,7 +64,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { update_user($_POST['user_id'], $_POST['real_name'], $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'], - $_POST['profile'], check_value('rep_popup')); + $_POST['profile'], check_value('rep_popup'), $_POST['pos']); if ($_POST['password'] != "") update_user_password($_POST['user_id'], md5($_POST['password'])); @@ -66,7 +75,16 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { add_user($_POST['user_id'], $_POST['real_name'], md5($_POST['password']), $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'], - $_POST['profile'], check_value('rep_popup')); + $_POST['profile'], check_value('rep_popup'), $_POST['pos']); + + // use current user display preferences as start point for new user + update_user_display_prefs($_POST['user_id'], + user_price_dec(), user_qty_dec(), user_exrate_dec(), + user_percent_dec(), user_show_gl_info(), user_show_codes(), + user_date_format(), user_date_sep(), user_tho_sep(), + user_dec_sep(), user_theme(), user_pagesize(), user_hints(), + $_POST['profile'], check_value('rep_popup'), user_query_size(), + user_graphic_links(), $_POST['language']); display_notification_centered(_("A new user has been added.")); } @@ -116,13 +134,13 @@ while ($myrow = db_fetch($result)) label_cell($myrow["user_id"]); label_cell($myrow["real_name"]); label_cell($myrow["phone"]); - label_cell($myrow["email"]); + email_cell($myrow["email"]); label_cell($last_visit_date, "nowrap"); label_cell($security_headings[$myrow["full_access"]]); edit_button_cell("Edit".$myrow["user_id"], _("Edit")); if (strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) && $_SESSION["wa_current_user"]->access == 2) - edit_button_cell("Delete".$myrow["user_id"], _("Delete")); + delete_button_cell("Delete".$myrow["user_id"], _("Delete")); else label_cell(''); end_row(); @@ -137,6 +155,8 @@ echo '
'; start_form(); start_table($table_style2); + +$_POST['email'] = ""; if ($selected_id != '') { if ($Mode == 'Edit') { @@ -151,6 +171,7 @@ if ($selected_id != '') $_POST['language'] = $myrow["language"]; $_POST['profile'] = $myrow["print_profile"]; $_POST['rep_popup'] = $myrow["rep_popup"]; + $_POST['pos'] = $myrow["pos"]; } hidden('selected_id', $selected_id); hidden('user_id'); @@ -161,7 +182,10 @@ if ($selected_id != '') else { //end of if $selected_id only do the else when a new record is being entered text_row(_("User Login:"), "user_id", null, 22, 20); - $_POST['rep_popup'] = 1; + $_POST['language'] = user_language(); + $_POST['profile'] = user_print_profile(); + $_POST['rep_popup'] = user_rep_popup(); + $_POST['pos'] = user_pos(); } $_POST['password'] = ""; start_row(); @@ -178,12 +202,14 @@ text_row_ex(_("Full Name").":", 'real_name', 50); text_row_ex(_("Telephone No.:"), 'phone', 30); -text_row_ex(_("Email Address:"), 'email', 50); +email_row_ex(_("Email Address:"), 'email', 50); security_headings_list_row(_("Access Level:"), 'Access', null); languages_list_row(_("Language:"), 'language', null); +pos_list_row(_("User's POS"). ':', 'pos', null); + print_profiles_list_row(_("Printing profile"). ':', 'profile', null, _('Browser printing support')); @@ -192,7 +218,7 @@ check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'], end_table(1); -submit_add_or_update_center($selected_id == '', '', true); +submit_add_or_update_center($selected_id == '', '', 'both'); end_form(); end_page();