X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fusers.php;h=52058b298df7d36a3d12bc6f7d5e995b2847d5db;hb=0bf933423b9645bcb57390c478d4fdaf0c895049;hp=afca5d6c0e9b25e005581db3d8d5affd4a13e8ec;hpb=e5536a0814ee5ce77c9cccfd4ec74a0ebd1973d0;p=fa-stable.git diff --git a/admin/users.php b/admin/users.php index afca5d6c..52058b29 100644 --- a/admin/users.php +++ b/admin/users.php @@ -9,11 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security=15; -$path_to_root=".."; +$page_security = 'SA_USERS'; +$path_to_root = ".."; include_once($path_to_root . "/includes/session.inc"); -page(_("Users")); +page(_($help_context = "Users")); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/ui.inc"); @@ -83,7 +83,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') 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']); + user_graphic_links(), $_POST['language'], sticky_doc_date(), user_startup_tab()); display_notification_centered(_("A new user has been added.")); } @@ -113,12 +113,8 @@ $result = get_users(check_value('show_inactive')); start_form(); start_table($table_style); -//if ($_SESSION["wa_current_user"]->access == 2) - $th = array(_("User login"), _("Full Name"), _("Phone"), - _("E-mail"), _("Last Visit"), _("Access Level"), "", ""); -//else -// $th = array(_("User login"), _("Full Name"), _("Phone"), -// _("E-mail"), _("Last Visit"), _("Access Level"), ""); +$th = array(_("User login"), _("Full Name"), _("Phone"), + _("E-mail"), _("Last Visit"), _("Access Level"), "", ""); inactive_control_column($th); table_header($th); @@ -133,15 +129,14 @@ while ($myrow = db_fetch($result)) $last_visit_date = sql2date($myrow["last_visit_date"]); /*The security_headings array is defined in config.php */ - $not_me = strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) && - $_SESSION["wa_current_user"]->access == 2; + $not_me = strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username); label_cell($myrow["user_id"]); label_cell($myrow["real_name"]); label_cell($myrow["phone"]); email_cell($myrow["email"]); label_cell($last_visit_date, "nowrap"); - label_cell($security_headings[$myrow["full_access"]]); + label_cell($myrow["role"]); if ($not_me) inactive_control_cell($myrow["id"], $myrow["inactive"], 'users', 'id'); @@ -174,7 +169,7 @@ if ($selected_id != -1) $_POST['real_name'] = $myrow["real_name"]; $_POST['phone'] = $myrow["phone"]; $_POST['email'] = $myrow["email"]; - $_POST['Access'] = $myrow["full_access"]; + $_POST['Access'] = $myrow["role_id"]; $_POST['language'] = $myrow["language"]; $_POST['profile'] = $myrow["print_profile"]; $_POST['rep_popup'] = $myrow["rep_popup"]; @@ -211,7 +206,7 @@ text_row_ex(_("Telephone No.:"), 'phone', 30); email_row_ex(_("Email Address:"), 'email', 50); -security_headings_list_row(_("Access Level:"), 'Access', null); +security_roles_list_row(_("Access Level:"), 'Access', null); languages_list_row(_("Language:"), 'language', null);