2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - administration *
|
|
|
|
* http://www.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$ */
|
|
|
|
|
2000-11-21 01:41:31 +01:00
|
|
|
$phpgw_info = array();
|
2000-11-16 09:00:18 +01:00
|
|
|
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
2000-08-18 05:24:22 +02:00
|
|
|
include("../header.inc.php");
|
2001-02-06 18:13:48 +01:00
|
|
|
include(PHPGW_APP_INC . "/accounts_".$phpgw_info["server"]["account_repository"].".inc.php");
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
|
|
|
|
|
|
|
$p->set_file(array("list" => "accounts.tpl",
|
2000-11-22 07:58:08 +01:00
|
|
|
"row" => "accounts_row.tpl"));
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2000-11-17 22:16:49 +01:00
|
|
|
$total = account_total();
|
2000-08-19 08:17:20 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("bg_color",$phpgw_info["theme"]["bg_color"]);
|
|
|
|
$p->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("left_next_matchs",$phpgw->nextmatchs->left("accounts.php",$start,$total));
|
|
|
|
$p->set_var("lang_user_accounts",lang("user accounts"));
|
|
|
|
$p->set_var("right_next_matchs",$phpgw->nextmatchs->right("accounts.php",$start,$total));
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("lang_loginid",$phpgw->nextmatchs->show_sort_order($sort,"account_lid",$order,"accounts.php",lang("LoginID")));
|
|
|
|
$p->set_var("lang_lastname",$phpgw->nextmatchs->show_sort_order($sort,"account_lastname",$order,"accounts.php",lang("last name")));
|
|
|
|
$p->set_var("lang_firstname",$phpgw->nextmatchs->show_sort_order($sort,"account_firstname",$order,"accounts.php",lang("first name")));
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("lang_edit",lang("Edit"));
|
|
|
|
$p->set_var("lang_delete",lang("Delete"));
|
|
|
|
$p->set_var("lang_view",lang("View"));
|
2000-08-19 08:17:20 +02:00
|
|
|
|
2000-10-20 07:14:53 +02:00
|
|
|
$account_info = account_read($method,$start,$sort,$order);
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-10-20 07:14:53 +02:00
|
|
|
while (list($null,$account) = each($account_info)) {
|
2000-10-26 03:16:10 +02:00
|
|
|
// while (list($key) = each($account_info[0])) {
|
|
|
|
// for ($i=0; $i<count($account_info);$i++) {
|
|
|
|
// echo "<br>0: " . $account_info[1][$key];
|
|
|
|
// echo "<br>1: " . $a[2];
|
|
|
|
// echo "<br>2: " . $b[1];
|
|
|
|
|
|
|
|
$lastname = $account["account_lastname"];
|
|
|
|
$firstname = $account["account_firstname"];
|
|
|
|
$account_id = $account["account_id"];
|
|
|
|
$loginid = $account["account_lid"];
|
|
|
|
|
2000-11-22 06:31:20 +01:00
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("tr_color",$tr_color);
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-10-26 03:16:10 +02:00
|
|
|
// $lastname = $account["account_lastname"];
|
|
|
|
// $firstname = $account["account_firstname"];
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
if (! $lastname) $lastname = ' ';
|
|
|
|
if (! $firstname) $firstname = ' ';
|
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("row_loginid",$loginid);
|
|
|
|
$p->set_var("row_firstname",$firstname);
|
|
|
|
$p->set_var("row_lastname",$lastname);
|
|
|
|
$p->set_var("row_edit",'<a href="'.$phpgw->link("editaccount.php","account_id="
|
2000-11-22 06:36:47 +01:00
|
|
|
. $account_id) . '"> ' . lang("Edit") . ' </a>');
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2000-10-20 07:14:53 +02:00
|
|
|
if ($phpgw_info["user"]["userid"] != $account["account_lid"]) {
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("row_delete",'<a href="' . $phpgw->link("deleteaccount.php",'account_id='
|
2000-10-26 03:16:10 +02:00
|
|
|
. $account_id) . '"> '.lang("Delete").' </a>');
|
2000-08-21 07:15:45 +02:00
|
|
|
} else {
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("row_delete"," ");
|
2000-08-21 07:15:45 +02:00
|
|
|
}
|
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("row_view",'<a href="' . $phpgw->link("viewaccount.php", "account_id="
|
2000-11-22 06:36:47 +01:00
|
|
|
. $account_id) . '"> ' . lang("View") . ' </a>');
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->parse("rows","row",True);
|
2000-08-18 05:24:22 +02:00
|
|
|
}
|
2000-08-19 08:17:20 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->set_var("actionurl",$phpgw->link("newaccount.php"));
|
|
|
|
$p->set_var("lang_add",lang("add"));
|
|
|
|
$p->set_var("lang_search",lang("search"));
|
2000-08-21 07:15:45 +02:00
|
|
|
|
2001-02-09 03:45:06 +01:00
|
|
|
$p->pparse("out","list");
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-10-20 07:59:25 +02:00
|
|
|
account_close();
|
2001-01-07 18:25:25 +01:00
|
|
|
$phpgw->common->phpgw_footer();
|
2000-09-28 04:25:19 +02:00
|
|
|
?>
|