Merging in more changes to the admin section

This commit is contained in:
jengo 2000-09-25 22:35:09 +00:00
parent 066b5ff4fe
commit 5f4b9d6a04
4 changed files with 28 additions and 28 deletions

View File

@ -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 '<table border="0"><tr><td>';
while ($phpgw->db->next_record()) {
echo '<tr><td><a href="' . $phpgw->link("editaccount.php","con=" . $phpgw->db->f("con")) . '">' . $phpgw->db->f("loginid") . '</a></tr></td>';
echo '<tr><td><a href="' . $phpgw->link("editaccount.php","account_=" . $phpgw->db->f("account_id")) . '">' . $phpgw->db->f("loginid") . '</a></tr></td>';
}
echo "</table></center>";
echo "<a href=\"" . $phpgw->link("deletegroup.php","group_id=" . $group_id . "&removeusers=True")

View File

@ -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 .= "<option value=\"" . $phpgw->db->f("con") . "\""
. $selected_users[$phpgw->db->f("con")] . ">"
. $phpgw->common->display_fullname($phpgw->db->f("loginid"),
$phpgw->db->f("firstname"),
$phpgw->db->f("lastname")) . "</option>";
$user_list .= "<option value=\"" . $phpgw->db->f("account_id") . "\""
. $selected_users[$phpgw->db->f("account_id")] . ">"
. $phpgw->common->display_fullname($phpgw->db->f("account_lid"),
$phpgw->db->f("account_firstname"),
$phpgw->db->f("account_lastname")) . "</option>";
}
$t->set_var("user_list",$user_list);

View File

@ -43,12 +43,12 @@
$group_con = $phpgw->db->f("group_id");
for ($i=0; $i<count($n_users);$i++) {
$phpgw->db->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 .= "<option value=\"" . $phpgw->db->f("con") . "\""
. $selected_users[$phpgw->db->f("con")] . ">"
. $phpgw->common->display_fullname($phpgw->db->f("loginid"),
$phpgw->db->f("firstname"),
$phpgw->db->f("lastname")) . "</option>";
$user_list .= "<option value=\"" . $phpgw->db->f("account_id") . "\""
. $selected_users[$phpgw->db->f("account_id")] . ">"
. $phpgw->common->display_fullname($phpgw->db->f("account_lid"),
$phpgw->db->f("account_firstname"),
$phpgw->db->f("account_lastname")) . "</option>";
}
$t->set_var("user_list",$user_list);

View File

@ -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.