Updated viewaccounts to new accounts table and fixed a few parse errors

This commit is contained in:
jengo 2000-10-03 06:58:01 +00:00
parent 7876b477f3
commit a490cdcf5c

View File

@ -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");
?>
<center>
@ -35,21 +42,21 @@
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
<td width="40%"><?php echo lang("LoginID"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("loginid"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("account_lid"); ?></td>
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td width="40%"><?php echo lang("First Name"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("firstname"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("account_firstname"); ?></td>
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
<td width="40%"><?php echo lang("Last Name"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("lastname"); ?></td>
<td width="60%"><?php echo $phpgw->db->f("account_lastname"); ?></td>
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td width="40%"><?php echo lang("permissions"); ?></td>
<td width="40%"><?php echo lang("account_permissions"); ?></td>
<?php
$i = 0;
@ -64,7 +71,7 @@
echo "<tr bgcolor=\"" . $phpgw_info["theme"]["row_on"] . "\"><td>"
. lang("account active") . "</td> <td>";
if ($phpgw->db->f("status") == "A")
if ($phpgw->db->f("account_status") == "A")
echo lang("yes");
else
echo "<b>" . lang("no") . "</b>";
@ -73,7 +80,7 @@
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td>Groups: </td>
<td><?php
$user_groups = $phpgw->accounts->read_group_names($phpgw->db->f("loginid"));
$user_groups = $phpgw->accounts->read_group_names($phpgw->db->f("account_lid"));
for ($i=0;$i<count($user_groups); $i++) {
echo $user_groups[$i][1];
@ -85,15 +92,15 @@
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
<td>Last login</td><td> <?php
if (! $phpgw->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);
?></td></tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td>Last login from</td>
<td><?php echo $phpgw->db->f("lastloginfrom"); ?>&nbsp;</td>
<td><?php echo $account_lastloginfrom; ?>&nbsp;</td>
</tr>
</table>
</center>