From a490cdcf5c9dfeb1af16fe8c7c9d1e1dc1208506 Mon Sep 17 00:00:00 2001 From: jengo Date: Tue, 3 Oct 2000 06:58:01 +0000 Subject: [PATCH] Updated viewaccounts to new accounts table and fixed a few parse errors --- admin/viewaccount.php | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/admin/viewaccount.php b/admin/viewaccount.php index 4730e625af..df5a3ef9ff 100755 --- a/admin/viewaccount.php +++ b/admin/viewaccount.php @@ -12,18 +12,25 @@ /* $Id$ */ + if (! $account_id) { + $phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True); + } $phpgw_info["flags"]["currentapp"] = "admin"; include("../header.inc.php"); - if (! $con) + if (! $account_id) { Header("Location: " . $phpgw->link("accounts.php")); + } - $phpgw->db->query("select loginid from accounts where con='$con'"); + $phpgw->db->query("select account_lid from accounts where account_id='$account_id'"); $phpgw->db->next_record(); - $db_perms = $phpgw->accounts->read_apps($phpgw->db->f("loginid")); + $db_perms = $phpgw->accounts->read_apps($phpgw->db->f("account_lid")); - $phpgw->db->query("select * from accounts where con='$con'"); + $phpgw->db->query("select * from accounts where account_id='$account_id'"); $phpgw->db->next_record(); + + $account_lastlogin = $phpgw->db->f("account_lastlogin"); + $account_lastloginfrom = $phpgw->db->f("account_lastloginfrom"); ?>
@@ -35,21 +42,21 @@ "> - db->f("loginid"); ?> + db->f("account_lid"); ?> "> - db->f("firstname"); ?> + db->f("account_firstname"); ?> "> - db->f("lastname"); ?> + db->f("account_lastname"); ?> "> - + " . lang("account active") . " "; - if ($phpgw->db->f("status") == "A") + if ($phpgw->db->f("account_status") == "A") echo lang("yes"); else echo "" . lang("no") . ""; @@ -73,7 +80,7 @@ "> Groups: accounts->read_group_names($phpgw->db->f("loginid")); + $user_groups = $phpgw->accounts->read_group_names($phpgw->db->f("account_lid")); for ($i=0;$i"> Last login db->f("lastlogin")) + if (! $account_lastlogin) echo "Never"; else - echo $phpgw->common->show_date($phpgw->db->f("lastlogin")); + echo $phpgw->common->show_date($account_lastlogin); ?> "> Last login from - db->f("lastloginfrom"); ?>  +