egroupware_official/admin/viewaccount.php

124 lines
4.3 KiB
PHP
Raw Normal View History

2000-08-18 05:24:22 +02:00
<?php
/**************************************************************************\
* phpGroupWare - administration *
* http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
if (! $account_id) {
$phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True);
}
$phpgw_info["flags"]["currentapp"] = "admin";
$phpgw_info["flags"]["parent_page"] = "accounts.php";
2000-08-18 05:24:22 +02:00
include("../header.inc.php");
2000-10-23 07:44:39 +02:00
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
. $phpgw_info["server"]["auth_type"] . ".inc.php");
if (! $account_id) {
Header("Location: " . $phpgw->link("accounts.php"));
}
2000-08-18 05:24:22 +02:00
2000-11-06 01:27:52 +01:00
$userData = $phpgw->accounts->read_userData($account_id);
$loginid = $userData["account_lid"];
$account_lastlogin = $userData["account_lastlogin"];
$account_lastloginfrom = $userData["account_lastloginfrom"];
$account_status = $userData["account_status"];
2000-10-23 07:44:39 +02:00
$db_perms = $phpgw->accounts->read_apps($loginid);
2000-11-06 01:27:52 +01:00
#$phpgw->db->query("select account_lid from accounts where account_id='$account_id'");
#$phpgw->db->next_record();
#$loginid = $phpgw->db->f("account_lid");
#$account_info = account_view($loginid);
#$phpgw->db->query("select account_lastlogin,account_lastloginfrom,account_status from accounts "
# . "where account_id='$account_id'");
#$phpgw->db->next_record();
2000-08-18 05:24:22 +02:00
?>
<center>
<p><table border=0 width=50%>
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
2000-09-07 22:49:55 +02:00
<td width="40%"><?php echo lang("LoginID"); ?></td>
2000-10-23 07:44:39 +02:00
<td width="60%"><?php echo $loginid; ?></td>
2000-08-18 05:24:22 +02:00
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
2000-09-07 22:49:55 +02:00
<td width="40%"><?php echo lang("First Name"); ?></td>
2000-11-06 01:27:52 +01:00
<td width="60%"><?php echo $userData["firstname"]; ?>&nbsp;</td>
2000-08-18 05:24:22 +02:00
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
2000-09-07 22:49:55 +02:00
<td width="40%"><?php echo lang("Last Name"); ?></td>
2000-11-06 01:27:52 +01:00
<td width="60%"><?php echo $userData["lastname"]; ?>&nbsp;</td>
2000-08-18 05:24:22 +02:00
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td width="40%"><?php echo lang("account_permissions"); ?>&nbsp;</td>
2000-08-18 05:24:22 +02:00
<?php
$i = 0;
while ($permission = each($db_perms)) {
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
2000-09-07 22:49:55 +02:00
$perm_display[$i] = lang($phpgw_info["apps"][$permission[0]]["title"]);
2000-08-18 05:24:22 +02:00
$i++;
}
}
echo "<td>" . implode(", ", $perm_display) . "</td></tr>";
echo "<tr bgcolor=\"" . $phpgw_info["theme"]["row_on"] . "\"><td>"
2000-09-07 22:49:55 +02:00
. lang("account active") . "</td> <td>";
2000-11-06 01:27:52 +01:00
if ($userData["status"] == "A")
2000-09-07 22:49:55 +02:00
echo lang("yes");
2000-08-18 05:24:22 +02:00
else
2000-09-07 22:49:55 +02:00
echo "<b>" . lang("no") . "</b>";
2000-08-18 05:24:22 +02:00
?></td></tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td>Groups: </td>
<td><?php
2000-11-06 01:27:52 +01:00
$user_groups = $phpgw->accounts->read_group_names($userData["account_lid"]);
2000-08-18 05:24:22 +02:00
for ($i=0;$i<count($user_groups); $i++) {
echo $user_groups[$i][1];
if (count($user_groups) !=0 && $i != count($user_groups)-1)
echo ", ";
}
?>&nbsp;</td>
</tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
<td>Last login</td><td> <?php
2000-11-06 01:27:52 +01:00
if (! $userData["lastlogin"])
echo lang("Never");
2000-08-18 05:24:22 +02:00
else
2000-11-06 01:27:52 +01:00
echo $phpgw->common->show_date($userData["lastlogin"]);
2000-08-18 05:24:22 +02:00
?></td></tr>
<tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
<td>Last login from</td>
2000-11-06 01:27:52 +01:00
<td><?php echo $userData["lastloginfrom"]; ?>&nbsp;</td>
2000-08-18 05:24:22 +02:00
</tr>
</table>
</center>
<?php
$phpgw->common->phpgw_footer();
?>