From 5f4b9d6a04435543a8be43b42e3b2b4ea56801ea Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 25 Sep 2000 22:35:09 +0000 Subject: [PATCH] Merging in more changes to the admin section --- admin/deletegroup.php | 10 +++++----- admin/editgroup.php | 20 ++++++++++---------- admin/newgroup.php | 20 ++++++++++---------- preferences/changepassword.php | 6 +++--- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/admin/deletegroup.php b/admin/deletegroup.php index f84a21082c..ecb0242f8b 100755 --- a/admin/deletegroup.php +++ b/admin/deletegroup.php @@ -21,9 +21,9 @@ if ((($group_id) && ($confirm)) || $removeusers) { if ($removeusers) { - $phpgw->db->query("select con,groups from accounts where groups like '%$group_id%'"); + $phpgw->db->query("select account_id,account_groups from accounts where account_groups like '%$group_id%'"); while ($phpgw->db->next_record()) { - $groups[$phpgw->db->f("con")] = $phpgw->db->f("groups"); + $groups[$phpgw->db->f("account_id")] = $phpgw->db->f("account_groups"); } while ($user = each($groups)) { @@ -31,7 +31,7 @@ if ($user_[1] == ",") { $user_[1] = ""; } - $phpgw->db->query("update accounts set groups='$user_[1]' where con='$user[0]'"); + $phpgw->db->query("update accounts set account_groups='$user_[1]' where account_id='$user[0]'"); } $confirm = True; } @@ -41,7 +41,7 @@ $group_name = $phpgw->db->f("group_name"); - $phpgw->db->query("select con,loginid from accounts where groups like '%$group_id%'"); + $phpgw->db->query("select account_id,account_lid from accounts where account_groups like '%$group_id%'"); if ($phpgw->db->num_rows()) { $phpgw->common->header(); $phpgw->common->navbar(); @@ -54,7 +54,7 @@ echo ''; + echo ''; } echo "
'; while ($phpgw->db->next_record()) { - echo '
' . $phpgw->db->f("loginid") . '
' . $phpgw->db->f("loginid") . '
"; echo "link("deletegroup.php","group_id=" . $group_id . "&removeusers=True") diff --git a/admin/editgroup.php b/admin/editgroup.php index 5e39b76414..2ace9c7bde 100755 --- a/admin/editgroup.php +++ b/admin/editgroup.php @@ -58,7 +58,7 @@ $user_groups = $phpgw->db->f("groups") . ",$group_con:0,"; $user_groups = ereg_replace(",,",",",$user_groups); - $phpgw->db->query("UPDATE accounts SET groups='$user_groups' WHERE con='" . $n_users[$i] ."'"); + $phpgw->db->query("UPDATE accounts SET account_groups='$user_groups' WHERE account_id='" . $n_users[$i] ."'"); } $sep = $phpgw->common->filesystem_separator(); @@ -107,7 +107,7 @@ $t->set_var("group_name_value",$phpgw->db->f("group_name")); - $phpgw->db->query("select con from accounts where groups like '%,$group_id:%'"); + $phpgw->db->query("select account_id from accounts where account_groups like '%,$group_id:%'"); while ($phpgw->db->next_record()) { $selected_users[$phpgw->db->f("con")] = " selected"; @@ -129,7 +129,7 @@ $t->set_var("lang_group_name",lang("group name")); $t->set_var("group_name_value",$phpgw->db->f("group_name")); - $phpgw->db->query("select count(*) from accounts where status !='L'"); + $phpgw->db->query("select count(*) from accounts where account_status !='L'"); $phpgw->db->next_record(); if ($phpgw->db->f(0) < 5) { @@ -139,14 +139,14 @@ } $t->set_var("lang_include_user",lang("Select users for inclusion")); - $phpgw->db->query("SELECT con,firstname,lastname, loginid FROM accounts where " - . "status != 'L' ORDER BY lastname,firstname,loginid asc"); + $phpgw->db->query("SELECT account_id,account_firstname,account_lastname,account_lid FROM accounts where " + . "account_status != 'L' ORDER BY account_lastname,account_firstname,account_lid asc"); while ($phpgw->db->next_record()) { - $user_list .= ""; + $user_list .= ""; } $t->set_var("user_list",$user_list); diff --git a/admin/newgroup.php b/admin/newgroup.php index 246c213085..e5fab9d8e4 100755 --- a/admin/newgroup.php +++ b/admin/newgroup.php @@ -43,12 +43,12 @@ $group_con = $phpgw->db->f("group_id"); for ($i=0; $idb->query("SELECT groups FROM accounts WHERE con=".$n_users[$i]); + $phpgw->db->query("SELECT account_groups FROM accounts WHERE account_id=".$n_users[$i]); $phpgw->db->next_record(); - $user_groups = $phpgw->db->f("groups") . ",$group_con,"; + $user_groups = $phpgw->db->f("account_groups") . ",$group_con,"; $user_groups = ereg_replace(",,",",",$user_groups); - $phpgw->db->query("UPDATE accounts SET groups='$user_groups' WHERE con='" . $n_users[$i] . "'"); + $phpgw->db->query("UPDATE accounts SET account_groups='$user_groups' WHERE account_id='" . $n_users[$i] . "'"); } $sep = $phpgw->common->filesystem_separator(); @@ -93,14 +93,14 @@ $selected_users[$n_users[$i]] = " selected"; } - $phpgw->db->query("SELECT con,firstname,lastname, loginid FROM accounts where " - . "status != 'L' ORDER BY lastname,firstname,loginid asc"); + $phpgw->db->query("SELECT account_id,account_firstname,account_lastname,account_lid FROM accounts where " + . "account_status != 'L' ORDER BY account_lastname,account_firstname,account_lid asc"); while ($phpgw->db->next_record()) { - $user_list .= ""; + $user_list .= ""; } $t->set_var("user_list",$user_list); diff --git a/preferences/changepassword.php b/preferences/changepassword.php index e0b3d49c82..ba5f2fa331 100755 --- a/preferences/changepassword.php +++ b/preferences/changepassword.php @@ -70,9 +70,9 @@ if (! $submit) { exit; } - $phpgw->db->query("update accounts set passwd='" . md5($n_passwd) . "', " - . "lastpasswd_change='" . time() . "' where loginid='" - . $phpgw_info["user"]["userid"] . "'"); + $phpgw->db->query("update accounts set account_pwd='" . md5($n_passwd) . "', " + . "account_lastpwd_change='" . time() . "' where account_lid='" + . $phpgw_info["user"]["userid"] . "'"); // Since they are logged in, we need to change the password in sessions // in case they decied to check there mail.