2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - addressbook *
|
|
|
|
* 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$ */
|
|
|
|
|
2000-09-18 22:00:25 +02:00
|
|
|
if ($submit || ! $ab_id) {
|
2000-09-05 20:36:13 +02:00
|
|
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
2000-08-18 05:24:22 +02:00
|
|
|
}
|
|
|
|
|
2000-09-05 20:36:13 +02:00
|
|
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
2000-08-18 05:24:22 +02:00
|
|
|
include("../header.inc.php");
|
2000-09-18 22:00:25 +02:00
|
|
|
|
|
|
|
if (! $ab_id) {
|
|
|
|
Header("Location: " . $phpgw->link("index.php"));
|
|
|
|
}
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
if ($filter != "private")
|
2000-09-18 22:00:25 +02:00
|
|
|
$filtermethod = " or ab_access='public' " . $phpgw->accounts->sql_search("ab_access");
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-09-18 22:00:25 +02:00
|
|
|
$phpgw->db->query("SELECT * FROM addressbook WHERE ab_id='$ab_id' AND (ab_owner='"
|
2000-09-05 05:14:08 +02:00
|
|
|
. $phpgw_info["user"]["userid"] . "' $filtermethod)");
|
2000-08-18 05:24:22 +02:00
|
|
|
$phpgw->db->next_record();
|
|
|
|
|
2000-09-18 22:00:25 +02:00
|
|
|
$fields = array('ab_id' => $phpgw->db->f("ab_id"),
|
|
|
|
'owner' => $phpgw->db->f("ab_owner"),
|
|
|
|
'access' => $phpgw->db->f("ab_access"),
|
|
|
|
'firstname' => $phpgw->db->f("ab_firstname"),
|
|
|
|
'lastname' => $phpgw->db->f("ab_lastname"),
|
|
|
|
'email' => $phpgw->db->f("ab_email"),
|
|
|
|
'hphone' => $phpgw->db->f("ab_hphone"),
|
|
|
|
'wphone' => $phpgw->db->f("ab_wphone"),
|
|
|
|
'fax' => $phpgw->db->f("ab_fax"),
|
|
|
|
'pager' => $phpgw->db->f("ab_pager"),
|
|
|
|
'mphone' => $phpgw->db->f("ab_mphone"),
|
|
|
|
'ophone' => $phpgw->db->f("ab_ophone"),
|
|
|
|
'street' => $phpgw->db->f("ab_street"),
|
|
|
|
'city' => $phpgw->db->f("ab_city"),
|
|
|
|
'state' => $phpgw->db->f("ab_state"),
|
|
|
|
'zip' => $phpgw->db->f("ab_zip"),
|
|
|
|
'bday' => $phpgw->db->f("ab_bday"),
|
|
|
|
'company' => $phpgw->db->f("ab_company"),
|
|
|
|
'notes' => $phpgw->db->f("ab_notes")
|
|
|
|
);
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-09-18 22:00:25 +02:00
|
|
|
$owner = $phpgw->db->f("ab_owner");
|
|
|
|
$ab_id = $phpgw->db->f("ab_id");
|
2000-08-18 05:24:22 +02:00
|
|
|
|
|
|
|
form("view","","View",$fields);
|
|
|
|
?>
|
|
|
|
<TABLE border=0 cellPadding=0 cellSpacing=0 width="95%">
|
|
|
|
<TBODY>
|
|
|
|
<TR>
|
|
|
|
<TD>
|
|
|
|
<TABLE border=0 cellPadding=1 cellSpacing=1>
|
|
|
|
<TBODY>
|
|
|
|
<TR>
|
|
|
|
<TD align=left>
|
|
|
|
<?php
|
2000-09-18 22:00:25 +02:00
|
|
|
echo $phpgw->common->check_owner($ab_id,$owner,"Edit");
|
2000-08-18 05:24:22 +02:00
|
|
|
?>
|
|
|
|
</TD>
|
|
|
|
<TD align=left>
|
|
|
|
<a href="<?php echo $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>">Done</a>
|
|
|
|
</TD>
|
|
|
|
</TR>
|
|
|
|
</TBODY>
|
|
|
|
</TABLE>
|
|
|
|
</TD>
|
|
|
|
</TR>
|
|
|
|
</TBODY>
|
|
|
|
</TABLE>
|
|
|
|
</DIV>
|
2000-09-18 22:00:25 +02:00
|
|
|
<?php include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); ?>
|