Remove old files.

This commit is contained in:
Miles Lott 2001-01-21 02:59:51 +00:00
parent 57e4a4440f
commit 7e79770cb1
6 changed files with 1 additions and 771 deletions

View File

@ -82,7 +82,7 @@
</td>
<td valign="top" width="5%">
<font face="'.$phpgw_info["theme"]["font"].'" size="2">
'.$phpgw->common->check_owner($myowner,"edit.php",lang("edit"),"ab_id=".$myid."&start=".$start."&sort=".$sort."&order=".$order).'
'.$phpgw->common->check_owner($myowner,"edit.php",lang("edit"),"ab_id=".$myid."&start=".$start."&sort=".$sort."&order=".$order."&query=".$query."&sort=".$sort).'
</font>
</td>
</tr>

View File

@ -1,135 +0,0 @@
<?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$ */
if ($submit || $AddVcard) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "addressbook";
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
if ($AddVcard){
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
"/addressbook/vcardin.php"));
}
else if ($add_email) {
list($fields["firstname"],$fields["lastname"]) = explode(" ", $name);
$fields["email"] = $add_email;
form("","add.php","Add",$fields);
} else if (! $submit && ! $add_email) {
form("","add.php","Add","","","");
} else {
if (! $bday_month && ! $bday_day && ! $bday_year) {
$bday = "";
} else {
$bday = "$bday_month/$bday_day/$bday_year";
}
if ($access != "private" && $access != "public") {
$access = $phpgw->accounts->array_to_string($access,$n_groups);
}
if ($url == "http://") {
$url = "";
}
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email,"
. "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city,"
. "ab_state,ab_zip,ab_bday,"
. "ab_notes,ab_company_id,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','"
. addslashes($firstname). "','"
. addslashes($lastname) . "','"
. addslashes($title) . "','"
. addslashes($email) . "','"
. addslashes($hphone) . "','"
. addslashes($wphone) . "','"
. addslashes($fax) . "','"
. addslashes($pager) . "','"
. addslashes($mphone) . "','"
. addslashes($ophone) . "','"
. addslashes($street) . "','"
. addslashes($address2) . "','"
. addslashes($city) . "','"
. addslashes($state) . "','"
. addslashes($zip) . "','"
. addslashes($bday) . "','"
. addslashes($notes) . "','"
. addslashes($company) . "','"
. addslashes($url) . "')";
} else {
$sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email,"
. "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city,"
. "ab_state,ab_zip,ab_bday,"
. "ab_notes,ab_company,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','"
. addslashes($firstname). "','"
. addslashes($lastname) . "','"
. addslashes($title) . "','"
. addslashes($email) . "','"
. addslashes($hphone) . "','"
. addslashes($wphone) . "','"
. addslashes($fax) . "','"
. addslashes($pager) . "','"
. addslashes($mphone) . "','"
. addslashes($ophone) . "','"
. addslashes($street) . "','"
. addslashes($address2) . "','"
. addslashes($city) . "','"
. addslashes($state) . "','"
. addslashes($zip) . "','"
. addslashes($bday) . "','"
. addslashes($notes) . "','"
. addslashes($company) . "','"
. addslashes($url) . "')";
}
$phpgw->db->query($sql);
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
"cd=14"));
}
?>
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
<TBODY>
<TR>
<TD>
<TABLE border="0" cellPadding="1" cellSpacing="1">
<TBODY>
<TR>
<TD align="left">
<INPUT type="submit" name="submit" value="<?php echo lang("OK"); ?>">
</TD>
<TD align="left">
<INPUT name="reset" type="reset" value="<?php echo lang("Clear"); ?>">
</TD>
<TD align="left">
<a href="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/") . "\">" . lang("Cancel"); ?></a>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</DIV>
</BODY>
</HTML>
<?php
$phpgw->common->phpgw_footer();
?>

View File

@ -1,53 +0,0 @@
<?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$ */
if ($confirm) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "addressbook";
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
if (! $ab_id) {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
}
if ($confirm != "true") {
$phpgw->db->query("select ab_owner from addressbook where ab_id='$ab_id'");
$phpgw->db->next_record();
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"])
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
?>
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
<center><?php echo lang("Are you sure you want to delete this entry ?"); ?><center>
<br><center><a href="<?php
echo $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
?>"><?php echo lang("NO"); ?></a> &nbsp; &nbsp; &nbsp; &nbsp;
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
?>"><?php echo lang("YES"); ?></a><center>
<?php
$phpgw->common->phpgw_footer();
} else {
$phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"]
. "' and ab_id='$ab_id'");
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
}
?>

View File

@ -1,159 +0,0 @@
<?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$ */
if ($submit || ! $ab_id) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "addressbook";
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
if (! $ab_id) {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
$phpgw->common->phpgw_exit();
}
if (! $submit) {
$phpgw->db->query("SELECT * FROM addressbook WHERE ab_owner='"
. $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id");
$phpgw->db->next_record();
$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"),
'title' => $phpgw->db->f("ab_title"),
'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"),
'address2' => $phpgw->db->f("ab_address2"),
'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"),
'company_id' => $phpgw->db->f("ab_company_id"),
'notes' => $phpgw->db->f("ab_notes")
,
'url' => $phpgw->db->f("ab_url")
);
form("","edit.php","Edit",$fields);
} else {
if ($url == "http://") {
$url = "";
}
if (! $bday_month && ! $bday_day && ! $bday_year) {
$bday = "";
} else {
$bday = "$bday_month/$bday_day/$bday_year";
}
if ($access != "private" && $access != "public") {
$access = $phpgw->accounts->array_to_string($access,$n_groups);
}
if($phpgw_info["apps"]["timetrack"]["enabled"]) {
$sql = "UPDATE addressbook set ab_email='" . addslashes($email)
. "', ab_firstname='" . addslashes($firstname)
. "', ab_lastname='" . addslashes($lastname)
. "', ab_title='" . addslashes($title)
. "', ab_hphone='" . addslashes($hphone)
. "', ab_wphone='" . addslashes($wphone)
. "', ab_fax='" . addslashes($fax)
. "', ab_pager='" . addslashes($pager)
. "', ab_mphone='" . addslashes($mphone)
. "', ab_ophone='" . addslashes($ophone)
. "', ab_street='" . addslashes($street)
. "', ab_address2='" . addslashes($address2)
. "', ab_city='" . addslashes($city)
. "', ab_state='" . addslashes($state)
. "', ab_zip='" . addslashes($zip)
. "', ab_bday='" . addslashes($bday)
. "', ab_notes='" . addslashes($notes)
. "', ab_company_id='" . addslashes($company)
. "', ab_access='" . addslashes($access)
. "', ab_url='" . addslashes($url)
. "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id";
} else {
$sql = "UPDATE addressbook set ab_email='" . addslashes($email)
. "', ab_firstname='". addslashes($firstname)
. "', ab_lastname='" . addslashes($lastname)
. "', ab_title='" . addslashes($title)
. "', ab_hphone='" . addslashes($hphone)
. "', ab_wphone='" . addslashes($wphone)
. "', ab_fax='" . addslashes($fax)
. "', ab_pager='" . addslashes($pager)
. "', ab_mphone='" . addslashes($mphone)
. "', ab_ophone='" . addslashes($ophone)
. "', ab_street='" . addslashes($street)
. "', ab_address2='" . addslashes($address2)
. "', ab_city='" . addslashes($city)
. "', ab_state='" . addslashes($state)
. "', ab_zip='" . addslashes($zip)
. "', ab_bday='" . addslashes($bday)
. "', ab_notes='" . addslashes($notes)
. "', ab_company='" . addslashes($company)
. "', ab_access='" . addslashes($access)
. "', ab_url='" . addslashes($url)
. "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id";
}
$phpgw->db->query($sql);
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter="
. "$filter&start=$start"));
$phpgw->common->phpgw_exit();
}
?>
<input type="hidden" name="ab_id" value="<? echo $ab_id; ?>">
<input type="hidden" name="sort" value="<? echo $sort; ?>">
<input type="hidden" name="order" value="<? echo $order; ?>">
<input type="hidden" name="filter" value="<? echo $filter; ?>">
<input type="hidden" name="start" value="<? echo $start; ?>">
<TABLE border="0" cellPadding="1" cellSpacing="1" width="95%">
<TBODY>
<tr>
<TD align="left" width="7%">
<input type="submit" name="submit" value="<?php echo lang("Submit"); ?>">
</TD>
<TD align="left" width="7%">
<a href="<?php echo $phpgw->link("view.php","ab_id=$ab_id") . "\">" . lang("Cancel"); ?></a>
</TD>
<TD align="right">
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id") . "\">" . lang("Delete"); ?></a>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</BODY>
</HTML>
<?php
$phpgw->common->phpgw_footer();
?>

View File

@ -1,282 +0,0 @@
<?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$ */
$phpgw_info["flags"] = array("currentapp" => "addressbook", "enable_addressbook_class" => True,
"enable_nextmatchs_class" => True);
include("../header.inc.php");
echo "<center>" . lang("Address book");
//echo "<br>Time track = " . $phpgw_info["apps"]["timetrack"]["enabled"];
if (! $start)
$start = 0;
$limit =$phpgw->nextmatchs->sql_limit($start);
if ($order)
$ordermethod = "order by $order $sort";
else
$ordermethod = "order by ab_lastname,ab_firstname,ab_email asc";
if (! $filter) {
$filter = "none";
}
if ($filter != "private") {
if ($filter != "none") {
$filtermethod = " ab_access like '%,$filter,%' ";
} else {
$filtermethod = " (ab_owner='" . $phpgw_info["user"]["account_id"] ."' OR ab_access='public' "
. $phpgw->accounts->sql_search("ab_access") . " ) ";
}
} else {
$filtermethod = " ab_owner='" . $phpgw_info["user"]["account_id"] . "' ";
}
if ($query) {
if ($phpgw_info["apps"]["timetrack"]["enabled"]){
$phpgw->db->query("SELECT count(*) "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id "
. "AND $filtermethod AND (a.ab_lastname like '"
. "%$query%' OR a.ab_firstname like '%$query%' OR a.ab_email like '%$query%' OR "
. "a.ab_street like '%$query%' OR a.ab_city like '%$query%' OR a.ab_state "
. "like '%$query%' OR a.ab_zip like '%$query%' OR a.ab_notes like "
. "'%$query%' OR c.company_name like '%$query%' OR a.ab_url like '%$query%')",__LINE__,__FILE__);
// . "'%$query%' OR c.company_name like '%$query%')"
// . " $ordermethod limit $limit");
} else {
$phpgw->db->query("SELECT count(*) "
. "from addressbook "
. "WHERE $filtermethod AND (ab_lastname like '"
. "%$query%' OR ab_firstname like '%$query%' OR ab_email like '%$query%' OR "
. "ab_street like '%$query%' OR ab_city like '%$query%' OR ab_state "
. "like '%$query%' OR ab_zip like '%$query%' OR ab_notes like "
. "'%$query%' OR ab_company like '%$query%' OR ab_url like '%$query$%')",__LINE__,__FILE__);
// . "'%$query%' OR ab_company like '%$query%')"
// . " $ordermethod limit $limit");
}
$phpgw->db->next_record();
if ($phpgw->db->f(0) == 1)
echo "<br>" . lang("your search returned 1 match");
else
echo "<br>" . lang("your search returned x matchs",$phpgw->db->f(0));
} else {
$phpgw->db->query("select count(*) from addressbook where $filtermethod",__LINE__,__FILE__);
$phpgw->db->next_record();
}
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$company_sortorder = "c.company_name";
} else {
$company_sortorder = "ab_company";
}
//$phpgw->db->next_record();
if ($phpgw->db->f(0) > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"])
echo "<br>" . lang("showing x - x of x",($start + 1),
($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),$phpgw->db->f(0));
else
echo "<br>" . lang("showing x",$phpgw->db->f(0));
?>
<?php
$phpgw->nextmatchs->show("index.php",$start,$phpgw->db->f(0),"&order=$order&filter=$filter&sort="
. "$sort&query=$query", "75%", $phpgw_info["theme"]["th_bg"]);
?>
<table width=75% border=0 cellspacing=1 cellpadding=3>
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
<?php
while ($column = each($abc)) {
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) &&
$phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) {
echo '<td height="21">';
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_" . $column[0],$order,"index.php",lang($column[1]));
echo '</font></td>';
echo "\n";
// To be used when displaying the rows
$columns_to_display[$column[0]] = True;
}
}
?>
<td width="3%" height="21">
<font face="Arial, Helvetica, sans-serif" size="-1">
<?php echo lang("View"); ?>
</font>
</td>
<td width="3%" height="21">
<font face="Arial, Helvetica, sans-serif" size="-1">
Vcard
</font>
</td>
<td width="5%" height="21">
<font face="Arial, Helvetica, sans-serif" size="-1">
<?php echo lang("Edit"); ?>
</font>
</td>
</tr>
</form>
<?php
if (isset($query) && $query) {
if (isset($phpgw_info["apps"]["timetrack"]["enabled"]) &&
$phpgw_info["apps"]["timetrack"]["enabled"]) {
$phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,a.ab_company_id,"
. "a.ab_email,a.ab_wphone,c.company_name,a.ab_hphone,a.ab_fax,a.ab_mphone "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id "
. "AND $filtermethod AND (a.ab_lastname like '"
. "%$query%' OR a.ab_firstname like '%$query%' OR a.ab_email like '%$query%' OR "
. "a.ab_street like '%$query%' OR a.ab_city like '%$query%' OR a.ab_state "
. "like '%$query%' OR a.ab_zip like '%$query%' OR a.ab_notes like "
. "'%$query%' OR c.company_name like '%$query%') $ordermethod limit $limit",__LINE__,__FILE__);
} else {
$phpgw->db->query("SELECT * from addressbook WHERE $filtermethod AND (ab_lastname like '"
. "%$query%' OR ab_firstname like '%$query%' OR ab_email like '%$query%' OR "
. "ab_street like '%$query%' OR ab_city like '%$query%' OR ab_state "
. "like '%$query%' OR ab_zip like '%$query%' OR ab_notes like "
. "'%$query%' OR ab_company like '%$query%') $ordermethod limit $limit",__LINE__,__FILE__);
}
} else {
if ($phpgw_info["apps"]["timetrack"]["enabled"]){
$phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,"
. "a.ab_email,a.ab_wphone,c.company_name "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id "
. "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);
} else {
$phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);
}
} // else $query
while ($phpgw->db->next_record()) {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
echo '<tr bgcolor="#' . $tr_color . '">';
$ab_id = $phpgw->db->f("ab_id");
while ($column = each($columns_to_display)) {
if ($column[0] == "company") {
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$field = $phpgw->db->f("company_name");
} else {
$field = $phpgw->db->f("ab_company");
}
} else {
$field = $phpgw->db->f("ab_" . $column[0]);
}
/*
while ($column = each($columns_to_display)) {
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
if ($column[0] == "company") {
$field = $phpgw->db->f("company_name");
} else {
$field = $phpgw->db->f("ab_company");
}
} else {
$field = $phpgw->db->f("ab_" . $column[0]);
} */
$field = htmlentities($field);
// Some fields require special formating.
if ($column[0] == "url") {
if (! ereg("^http://",$field)) {
$data = "http://" . $field;
}
echo '<td valign="top"><font face="' . $phpgw_info["theme"]["font"] . '" size="2">'
. '<a href="' . $field . '" target="_new">' . $field. '</a>&nbsp;</font></td>';
} else if ($column[0] == "email") {
if ($phpgw_info["user"]["apps"]["email"]) {
echo '<td valign="top"><font face="' . $phpgw_info["theme"]["font"] . '" size="2">'
. '<a href="' . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/email/compose.php",
"to=" . urlencode($field)) . '" target="_new">' . $field . '</a>&nbsp;</font></td>';
} else {
echo '<td valign="top"><font face="' . $phpgw_info["theme"]["font"] . '" size="2">'
. '<a href="mailto:' . $field . '">' . $field. '</a>&nbsp;</font></td>';
}
} else {
echo '<td valign="top"><font face="' . $phpgw_info["theme"]["font"] . '" size="2">'
. $field . '&nbsp;</font></td>';
}
}
reset($columns_to_display); // If we don't reset it, our inside while won't loop
?>
<td valign="top" width="3%">
<font face="<?php echo $phpgw_info["theme"]["font"]; ?>" size="2">
<a href="<?php echo $phpgw->link("view.php","ab_id=$ab_id&start=$start&order=$order&filter="
. "$filter&query=$query&sort=$sort");
?>"> <?php echo lang("View"); ?> </a>
</font>
</td>
<td valign=top width=3%>
<font face="<?php echo $phpgw_info["theme"]["font"]; ?>" size=2>
<a href="<?php echo $phpgw->link("vcardout.php","ab_id=$ab_id&start=$start&order=$order&filter="
. "$filter&query=$query&sort=$sort");
?>">Vcard</a>
</font>
</td>
<td valign="top" width="5%">
<font face="<?php echo $phpgw_info["theme"]["font"]; ?>" size="2">
<?php echo $phpgw->common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")); ?>
</font>
</td>
</tr>
<?php
}
?>
</table>
<form method="POST" action="<?php echo $phpgw->link("add.php"); ?>">
<?php if(isset($sort) && $sort) { ?>
<input type="hidden" name="sort" value="<?php echo $sort; ?>">
<?php } ?>
<?php if(isset($order) && $order) { ?>
<input type="hidden" name="order" value="<?php echo $order; ?>">
<?php } ?>
<?php if(isset($query) && $query) { ?>
<input type="hidden" name="query" value="<?php echo $query; ?>">
<?php } ?>
<input type="hidden" name="start" value="<?php echo $start; ?>">
<?php if(isset($filter) && $filter) { ?>
<input type="hidden" name="filter" value="<?php echo $filter; ?>">
<?php } ?>
<table width="75%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="4%">
<div align="right">
<input type="submit" name="Add" value="<?php echo lang("Add"); ?>">
</div>
</td>
<td width="8%">
<div align="right">
<input type="submit" name="AddVcard" value="Add Vcard">
</div>
</td>
<td width="64%">&nbsp;</td>
<td width="24%">&nbsp;</td>
</tr>
</table>
</form>
</center>
<?php
$phpgw->common->phpgw_footer();
?>

View File

@ -1,141 +0,0 @@
<?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$ */
if ($submit || ! $ab_id) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["currentapp"] = "addressbook";
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
function checkfor_specialformat($field,$data)
{
global $phpgw_info, $phpgw;
if ($field == "email") {
if ($phpgw_info["user"]["apps"]["email"]) {
$s = '<a href="' . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/email/compose.php",
"to=" . urlencode($data)) . '" target="_new">' . $data . '</a>';
} else {
$s = '<a href="mailto:' . $data . '">' . $data . '</a>';
}
} else if ($field == "URL") {
if (! ereg("^http://",$data)) {
$data = "http://" . $data;
}
$s = '<a href="' . $data . '" target="_new">' . $data . '</a>';
} else if ($field == "birthday") {
$date = explode("/",$data);
$s = $phpgw->common->dateformatorder($date[2],$date[1],$date[0],True);
} else {
$s = $data . "&nbsp;";
}
return $s;
}
if (! $ab_id) {
Header("Location: " . $phpgw->link("index.php"));
}
if ($filter != "private") {
$filtermethod = " or ab_access='public' " . $phpgw->accounts->sql_search("ab_access");
}
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$phpgw->db->query("SELECT * FROM addressbook as a, customers as c WHERE a.ab_company_id = c.company_id "
. "AND ab_id=$ab_id AND (ab_owner='"
. $phpgw_info["user"]["account_id"] . "' $filtermethod)");
} else {
$phpgw->db->query("SELECT * FROM addressbook WHERE ab_id=$ab_id AND (ab_owner='"
. $phpgw_info["user"]["account_id"] . "' $filtermethod)");
}
$phpgw->db->next_record();
echo "<p>&nbsp;<b>" . lang("Address book - view") . "</b><hr><p>";
$i = 0;
while ($column = each($abc)) {
if ($phpgw->db->f("ab_" . $column[0])) {
$columns_to_display[$i]["field_name"] = $column[1];
$columns_to_display[$i]["field_value"] = $phpgw->db->f("ab_" . $column[0]);
$i++;
}
}
if ($phpgw->db->f("ab_notes")) {
$columns_to_display[$i]["field_name"] = "Notes";
$columns_to_display[$i]["field_value"] = $phpgw->db->f("ab_notes");
}
echo '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
if (! $columns_to_display[$i]["field_name"]) break;
$columns_html .= "<tr><td><b>" . lang($columns_to_display[$i]["field_name"]) . "</b>:</td>"
. "<td>" . checkfor_specialformat($columns_to_display[$i]["field_name"],$columns_to_display[$i]["field_value"])
. "</td>";
$i++;
if (! $columns_to_display[$i]["field_name"]) break;
$columns_html .= "<tr><td><b>" . lang($columns_to_display[$i]["field_name"]) . "</b>:</td>"
. "<td>" . checkfor_specialformat($columns_to_display[$i]["field_name"],$columns_to_display[$i]["field_value"])
. "</td>";
$i++;
$columns_html .= "</td></tr>";
}
$access = $phpgw->db->f("ab_access");
$owner = $phpgw->db->f("ab_owner");
$ab_id = $phpgw->db->f("ab_id");
echo $columns_html . '<tr><td colspan="4">&nbsp;</td></tr>';
echo "<tr><td><b>" . lang("Record owner") . "</b></td><td>"
. $phpgw->common->grab_owner_name($owner) . "</td><td><b>"
. lang("Record Access") . "</b></td><td>";
if ($access != "private" && $access != "public") {
echo lang("Group access") . " - " . $phpgw->accounts->convert_string_to_names_access($access);
} else {
echo $access;
}
echo "</td></tr></table>";
?>
<TABLE border="0" cellpadding="1" cellspacing="1">
<TR>
<TD align="left">
<?php
echo $phpgw->common->check_owner($owner,"edit.php","Edit","ab_id=$ab_id");
?>
</TD>
<TD align=left>
<form action="<?php echo $phpgw->link("vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>" method="post" name="Vcardform">
<input type="submit" value="Vcard">
</form>
</TD>
<TD align="left">
<form action="<?php echo $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>" method="post" name="Doneform">
<input type="submit" value="Done">
</form>
</TD>
</TR>
</TABLE>
<?php
$phpgw->common->phpgw_footer();
?>