forked from extern/egroupware
Changing tabs to spaces, hope this still works.
This commit is contained in:
parent
2aea2d586c
commit
d6ea3f792f
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if ($submit || $AddVcard) {
|
if ($submit || $AddVcard) {
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
@ -22,15 +22,14 @@
|
|||||||
|
|
||||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||||
$t->set_file(array( "add" => "add.tpl"));
|
$t->set_file(array("add" => "add.tpl"));
|
||||||
|
|
||||||
$this = CreateObject("phpgwapi.contacts");
|
$this = CreateObject("phpgwapi.contacts");
|
||||||
|
|
||||||
if ($AddVcard){
|
if ($AddVcard){
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
||||||
"/addressbook/vcardin.php"));
|
"/addressbook/vcardin.php"));
|
||||||
}
|
} else if ($add_email) {
|
||||||
else if ($add_email) {
|
|
||||||
list($fields["firstname"],$fields["lastname"]) = explode(" ", $name);
|
list($fields["firstname"],$fields["lastname"]) = explode(" ", $name);
|
||||||
$fields["email"] = $add_email;
|
$fields["email"] = $add_email;
|
||||||
form("","add.php","Add",$fields);
|
form("","add.php","Add",$fields);
|
||||||
@ -59,7 +58,7 @@
|
|||||||
if ($prefix) { $pspc = " "; }
|
if ($prefix) { $pspc = " "; }
|
||||||
if ($middle) { $mspc = " "; }
|
if ($middle) { $mspc = " "; }
|
||||||
if ($suffix) { $sspc = " "; }
|
if ($suffix) { $sspc = " "; }
|
||||||
$fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
|
$fields["fn"] = $prefix.$pspc.$firstname.$mspc.$middle.$mspc.$lastname.$sspc.$suffix;
|
||||||
$fields["d_email"] = $email;
|
$fields["d_email"] = $email;
|
||||||
$fields["d_emailtype"] = $email_type;
|
$fields["d_emailtype"] = $email_type;
|
||||||
$fields["title"] = $title;
|
$fields["title"] = $title;
|
||||||
@ -83,8 +82,7 @@
|
|||||||
|
|
||||||
$this->add($phpgw_info["user"]["account_id"],$fields);
|
$this->add($phpgw_info["user"]["account_id"],$fields);
|
||||||
|
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/","cd=14"));
|
||||||
"cd=14"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$t->set_var("lang_ok",lang("ok"));
|
$t->set_var("lang_ok",lang("ok"));
|
||||||
|
@ -27,14 +27,14 @@ class outlook_conv {
|
|||||||
var $currentrecord; //used for buffering to allow uid lines to go first
|
var $currentrecord; //used for buffering to allow uid lines to go first
|
||||||
|
|
||||||
var $outlook = array(
|
var $outlook = array(
|
||||||
"Title" => "TITLE",
|
"Title" => "title",
|
||||||
"First Name" => "N_Given",
|
"First Name" => "n_given",
|
||||||
"Middle Name" => "N_Middle",
|
"Middle Name" => "n_middle",
|
||||||
"Last Name" => "N_Family",
|
"Last Name" => "n_family",
|
||||||
"Suffix" => "N_Suffix",
|
"Suffix" => "n_suffix",
|
||||||
"Company" => "ORG_Name", //objectclass: organization
|
"Company" => "org_name", //objectclass: organization
|
||||||
"Department" => "ORG_Unit", //objectclass: organizationalPerson
|
"Department" => "org_unit", //objectclass: organizationalPerson
|
||||||
"Job Title" => "TITLE", //objectclass: organizationalPerson
|
"Job Title" => "title", //objectclass: organizationalPerson
|
||||||
"Business Street" => "address2",
|
"Business Street" => "address2",
|
||||||
"Business Street 2" => "",
|
"Business Street 2" => "",
|
||||||
"Business Street 3" => "",
|
"Business Street 3" => "",
|
||||||
@ -42,11 +42,11 @@ class outlook_conv {
|
|||||||
"Business State" => "",
|
"Business State" => "",
|
||||||
"Business Postal Code" => "",
|
"Business Postal Code" => "",
|
||||||
"Business Country" => "",
|
"Business Country" => "",
|
||||||
"Home Street" => "ADR_Street",
|
"Home Street" => "adr_street",
|
||||||
"Home City" => "ADR_Locality",
|
"Home City" => "adr_locality",
|
||||||
"Home State" => "ADR_Region",
|
"Home State" => "adr_region",
|
||||||
"Home Postal Code" => "ADR_PostalCode",
|
"Home Postal Code" => "adr_postalcode",
|
||||||
"Home Country" => "ADR_CountryName",
|
"Home Country" => "adr_countryname",
|
||||||
"Home Street 2" => "",
|
"Home Street 2" => "",
|
||||||
"Home Street 3" => "",
|
"Home Street 3" => "",
|
||||||
"Other Street" => "",
|
"Other Street" => "",
|
||||||
@ -55,14 +55,14 @@ class outlook_conv {
|
|||||||
"Other Postal Code" => "",
|
"Other Postal Code" => "",
|
||||||
"Other Country" => "",
|
"Other Country" => "",
|
||||||
"Assistant's Phone" => "",
|
"Assistant's Phone" => "",
|
||||||
"Business Fax" => "C_TEL",
|
"Business Fax" => "c_tel",
|
||||||
"Business Phone" => "B_TEL",
|
"Business Phone" => "b_tel",
|
||||||
"Business Phone 2" => "ophone",
|
"Business Phone 2" => "ophone",
|
||||||
"Callback" => "",
|
"Callback" => "",
|
||||||
"Car Phone" => "",
|
"Car Phone" => "",
|
||||||
"Company Main Phone" => "",
|
"Company Main Phone" => "",
|
||||||
"Home Fax" => "",
|
"Home Fax" => "",
|
||||||
"Home Phone" => "A.TEL",
|
"Home Phone" => "a.tel",
|
||||||
"Home Phone 2" => "", //This will make another homePhone entry
|
"Home Phone 2" => "", //This will make another homePhone entry
|
||||||
"ISDN" => "",
|
"ISDN" => "",
|
||||||
"Mobile Phone" => "mphone", //newPilotPerson
|
"Mobile Phone" => "mphone", //newPilotPerson
|
||||||
@ -81,7 +81,7 @@ class outlook_conv {
|
|||||||
"Categories" => "",
|
"Categories" => "",
|
||||||
"Children" => "",
|
"Children" => "",
|
||||||
"Directory Server" => "",
|
"Directory Server" => "",
|
||||||
"E-mail Address" => "D_EMAIL",
|
"E-mail Address" => "d_email",
|
||||||
"E-mail Display Name" => "",
|
"E-mail Display Name" => "",
|
||||||
"E-mail 2 Address" => "",
|
"E-mail 2 Address" => "",
|
||||||
"E-mail 2 Display Name" => "",
|
"E-mail 2 Display Name" => "",
|
||||||
|
@ -28,12 +28,12 @@ class outlook_conv {
|
|||||||
|
|
||||||
var $outlook = array(
|
var $outlook = array(
|
||||||
"Title" => "TITLE",
|
"Title" => "TITLE",
|
||||||
"First Name" => "N.Given",
|
"First Name" => "N_Given",
|
||||||
"Middle Name" => "N.Middle",
|
"Middle Name" => "N_Middle",
|
||||||
"Last Name" => "N.Family",
|
"Last Name" => "N_Family",
|
||||||
"Suffix" => "N.Suffix",
|
"Suffix" => "N_Suffix",
|
||||||
"Company" => "ORG.Name", //objectclass: organization
|
"Company" => "ORG_Name", //objectclass: organization
|
||||||
"Department" => "ORG.Unit", //objectclass: organizationalPerson
|
"Department" => "ORG_Unit", //objectclass: organizationalPerson
|
||||||
"Job Title" => "TITLE", //objectclass: organizationalPerson
|
"Job Title" => "TITLE", //objectclass: organizationalPerson
|
||||||
"Business Street" => "address2",
|
"Business Street" => "address2",
|
||||||
"Business Street 2" => "",
|
"Business Street 2" => "",
|
||||||
@ -42,11 +42,11 @@ class outlook_conv {
|
|||||||
"Business State" => "",
|
"Business State" => "",
|
||||||
"Business Postal Code" => "",
|
"Business Postal Code" => "",
|
||||||
"Business Country" => "",
|
"Business Country" => "",
|
||||||
"Home Street" => "ADR.Street",
|
"Home Street" => "ADR_Street",
|
||||||
"Home City" => "ADR.Locality",
|
"Home City" => "ADR_Locality",
|
||||||
"Home State" => "ADR.Region",
|
"Home State" => "ADR_Region",
|
||||||
"Home Postal Code" => "ADR.PostalCode",
|
"Home Postal Code" => "ADR_PostalCode",
|
||||||
"Home Country" => "ADR.Country",
|
"Home Country" => "ADR_CountryName",
|
||||||
"Home Street 2" => "",
|
"Home Street 2" => "",
|
||||||
"Home Street 3" => "",
|
"Home Street 3" => "",
|
||||||
"Other Street" => "",
|
"Other Street" => "",
|
||||||
@ -55,8 +55,8 @@ class outlook_conv {
|
|||||||
"Other Postal Code" => "",
|
"Other Postal Code" => "",
|
||||||
"Other Country" => "",
|
"Other Country" => "",
|
||||||
"Assistant's Phone" => "",
|
"Assistant's Phone" => "",
|
||||||
"Business Fax" => "C.TEL",
|
"Business Fax" => "C_TEL",
|
||||||
"Business Phone" => "B.TEL",
|
"Business Phone" => "B_TEL",
|
||||||
"Business Phone 2" => "ophone",
|
"Business Phone 2" => "ophone",
|
||||||
"Callback" => "",
|
"Callback" => "",
|
||||||
"Car Phone" => "",
|
"Car Phone" => "",
|
||||||
@ -81,7 +81,7 @@ class outlook_conv {
|
|||||||
"Categories" => "",
|
"Categories" => "",
|
||||||
"Children" => "",
|
"Children" => "",
|
||||||
"Directory Server" => "",
|
"Directory Server" => "",
|
||||||
"E-mail Address" => "D.EMAIL",
|
"E-mail Address" => "D_EMAIL",
|
||||||
"E-mail Display Name" => "",
|
"E-mail Display Name" => "",
|
||||||
"E-mail 2 Address" => "",
|
"E-mail 2 Address" => "",
|
||||||
"E-mail 2 Display Name" => "",
|
"E-mail 2 Display Name" => "",
|
||||||
@ -146,7 +146,7 @@ function outlook_end_record($buffer,$private="private") {
|
|||||||
for ($i=0;$i<count($lines)-1;$i++) {
|
for ($i=0;$i<count($lines)-1;$i++) {
|
||||||
list($name, $value) = split("%%",$lines[$i]);
|
list($name, $value) = split("%%",$lines[$i]);
|
||||||
$row++;
|
$row++;
|
||||||
$namelist = $namelist.array($name => $value);
|
$namelist .= array($name => $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $buffer.$namelist;
|
return $buffer.$namelist;
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if ($confirm) {
|
if ($confirm) {
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
@ -46,12 +46,10 @@
|
|||||||
$t->pparse("out","delete");
|
$t->pparse("out","delete");
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->account_id=$phpgw_info["user"]["account_id"];
|
$this->account_id=$phpgw_info["user"]["account_id"];
|
||||||
$this->delete($ab_id);
|
$this->delete($ab_id);
|
||||||
|
|
||||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if ($submit || ! $ab_id) {
|
if ($submit || ! $ab_id) {
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
@ -25,15 +25,14 @@
|
|||||||
$t->set_file(array( "edit" => "edit.tpl"));
|
$t->set_file(array( "edit" => "edit.tpl"));
|
||||||
|
|
||||||
if (! $ab_id) {
|
if (! $ab_id) {
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
|
||||||
$phpgw->common->phpgw_exit();
|
$phpgw->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this = CreateObject("phpgwapi.contacts");
|
$this = CreateObject("phpgwapi.contacts");
|
||||||
|
|
||||||
if (! $submit) {
|
if (!$submit) {
|
||||||
// merge in what are now extra fields
|
// merge in extra fields
|
||||||
$extrafields = array ("pager" => "pager",
|
$extrafields = array ("pager" => "pager",
|
||||||
"mphone" => "mphone",
|
"mphone" => "mphone",
|
||||||
"ophone" => "ophone",
|
"ophone" => "ophone",
|
||||||
@ -68,7 +67,7 @@
|
|||||||
if ($prefix) { $pspc = " "; }
|
if ($prefix) { $pspc = " "; }
|
||||||
if ($middle) { $mspc = " "; }
|
if ($middle) { $mspc = " "; }
|
||||||
if ($suffix) { $sspc = " "; }
|
if ($suffix) { $sspc = " "; }
|
||||||
$fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
|
$fields["fn"] = $prefix.$pspc.$firstname.$mspc.$middle.$mspc.$lastname.$sspc.$suffix;
|
||||||
$fields["d_email"] = $email;
|
$fields["d_email"] = $email;
|
||||||
$fields["d_emailtype"] = $email_type;
|
$fields["d_emailtype"] = $email_type;
|
||||||
$fields["title"] = $title;
|
$fields["title"] = $title;
|
||||||
@ -92,8 +91,7 @@
|
|||||||
|
|
||||||
$this->update($ab_id,$phpgw_info["user"]["account_id"],$fields);
|
$this->update($ab_id,$phpgw_info["user"]["account_id"],$fields);
|
||||||
|
|
||||||
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter="
|
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start"));
|
||||||
. "$filter&start=$start"));
|
|
||||||
$phpgw->common->phpgw_exit();
|
$phpgw->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare API - Accounts manager for SQL *
|
* phpGroupWare API - Accounts manager for SQL *
|
||||||
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* View and manipulate contact records using SQL *
|
* View and manipulate contact records using SQL *
|
||||||
* Copyright (C) 2001 Joseph Engo *
|
* Copyright (C) 2001 Joseph Engo *
|
||||||
* -------------------------------------------------------------------------*
|
* -------------------------------------------------------------------------*
|
||||||
* This library is part of the phpGroupWare API *
|
* This library is part of the phpGroupWare API *
|
||||||
* http://www.phpgroupware.org/api *
|
* http://www.phpgroupware.org/api *
|
||||||
* ------------------------------------------------------------------------ *
|
* ------------------------------------------------------------------------ *
|
||||||
* This library is free software; you can redistribute it and/or modify it *
|
* This library is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU Lesser General Public License as published by *
|
* under the terms of the GNU Lesser General Public License as published by *
|
||||||
* the Free Software Foundation; either version 2.1 of the License, *
|
* the Free Software Foundation; either version 2.1 of the License, *
|
||||||
* or any later version. *
|
* or any later version. *
|
||||||
* This library is distributed in the hope that it will be useful, but *
|
* This library is distributed in the hope that it will be useful, but *
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* See the GNU Lesser General Public License for more details. *
|
* See the GNU Lesser General Public License for more details. *
|
||||||
* You should have received a copy of the GNU Lesser General Public License *
|
* You should have received a copy of the GNU Lesser General Public License *
|
||||||
* along with this library; if not, write to the Free Software Foundation, *
|
* along with this library; if not, write to the Free Software Foundation, *
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
phpgw_addressbook_extra (
|
phpgw_addressbook_extra (
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@mail.com> *
|
* Written by Joseph Engo <jengo@mail.com> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
// NOTE: This entire file needs to be rewritten. There is a great deal of code not being used
|
|
||||||
// anymore. This should also be converted to templates while where at it (jengo)
|
|
||||||
|
|
||||||
$abc = array("fn" => "full name", //'firstname lastname'
|
$abc = array("fn" => "full name", //'firstname lastname'
|
||||||
"sound" => "",
|
"sound" => "",
|
||||||
@ -156,7 +153,6 @@
|
|||||||
if (strlen($bday) > 2) {
|
if (strlen($bday) > 2) {
|
||||||
list( $month, $day, $year ) = split( '/', $bday );
|
list( $month, $day, $year ) = split( '/', $bday );
|
||||||
$temp_month[$month] = "SELECTED";
|
$temp_month[$month] = "SELECTED";
|
||||||
|
|
||||||
$bday_month = "<select name=bday_month>"
|
$bday_month = "<select name=bday_month>"
|
||||||
. "<option value=\"\" $temp_month[0]> </option>"
|
. "<option value=\"\" $temp_month[0]> </option>"
|
||||||
. "<option value=1 $temp_month[1]>January</option>"
|
. "<option value=1 $temp_month[1]>January</option>"
|
||||||
@ -251,8 +247,7 @@
|
|||||||
. $phpgw->accounts->convert_string_to_names($access);
|
. $phpgw->accounts->convert_string_to_names($access);
|
||||||
} else {
|
} else {
|
||||||
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>'
|
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>'
|
||||||
. '<td colspan="3"><font size="-1">'
|
. '<td colspan="3"><font size="-1">' . $access;
|
||||||
. $access;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>
|
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>
|
||||||
@ -370,22 +365,20 @@
|
|||||||
$t->pparse("out","form");
|
$t->pparse("out","form");
|
||||||
} //end form function
|
} //end form function
|
||||||
|
|
||||||
function parsevcard($filename,$access)
|
function parsevcard($filename,$access) {
|
||||||
{
|
|
||||||
global $phpgw;
|
global $phpgw;
|
||||||
global $phpgw_info;
|
global $phpgw_info;
|
||||||
|
|
||||||
$vcard = fopen($filename, "r");
|
$vcard = fopen($filename, "r");
|
||||||
if (!$vcard) // Make sure we have a file to read.
|
// Make sure we have a file to read.
|
||||||
{
|
if (!$vcard) {
|
||||||
fclose($vcard);
|
fclose($vcard);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep running through this to support vcards
|
// Keep running through this to support vcards
|
||||||
// with multiple entries.
|
// with multiple entries.
|
||||||
while (!feof($vcard))
|
while (!feof($vcard)) {
|
||||||
{
|
|
||||||
if(!empty($varray))
|
if(!empty($varray))
|
||||||
unset($varray);
|
unset($varray);
|
||||||
|
|
||||||
@ -394,8 +387,7 @@
|
|||||||
// begining of the file. Those will fail here.
|
// begining of the file. Those will fail here.
|
||||||
$vline = fgets($vcard,20);
|
$vline = fgets($vcard,20);
|
||||||
$vline = strtolower($vline);
|
$vline = strtolower($vline);
|
||||||
if(strcmp("begin:vcard", substr($vline, 0, strlen("begin:vcard")) ) != 0)
|
if(strcmp("begin:vcard", substr($vline, 0, strlen("begin:vcard")) ) != 0) {
|
||||||
{
|
|
||||||
fclose($vcard);
|
fclose($vcard);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -407,19 +399,16 @@
|
|||||||
$varray[0] = "begin";
|
$varray[0] = "begin";
|
||||||
$varray[1] = "vcard";
|
$varray[1] = "vcard";
|
||||||
$i=2;
|
$i=2;
|
||||||
while(!feof($vcard) && strcmp("end:vcard", strtolower(substr($vline, 0, strlen("end:vcard"))) ) !=0 )
|
while(!feof($vcard) && strcmp("end:vcard", strtolower(substr($vline, 0, strlen("end:vcard"))) ) !=0 ) {
|
||||||
{
|
|
||||||
$vline = fgets($vcard,4096);
|
$vline = fgets($vcard,4096);
|
||||||
// Check for folded lines and escaped colons '\:'
|
// Check for folded lines and escaped colons '\:'
|
||||||
$la = explode(":", $vline);
|
$la = explode(":", $vline);
|
||||||
|
|
||||||
if (count($la) > 1)
|
if (count($la) > 1) {
|
||||||
{
|
|
||||||
$varray[$i] = strtolower($la[0]);
|
$varray[$i] = strtolower($la[0]);
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
for($j=1;$j<=count($la);$j++)
|
for($j=1;$j<=count($la);$j++) {
|
||||||
{
|
|
||||||
$varray[$i] .= $la[$j];
|
$varray[$i] .= $la[$j];
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
@ -430,7 +419,6 @@
|
|||||||
|
|
||||||
fillab($varray,$access); // Add this entry to the addressbook before
|
fillab($varray,$access); // Add this entry to the addressbook before
|
||||||
// moving on to the next one.
|
// moving on to the next one.
|
||||||
|
|
||||||
} // while(!feof($vcard))
|
} // while(!feof($vcard))
|
||||||
|
|
||||||
fclose($vcard);
|
fclose($vcard);
|
||||||
@ -438,20 +426,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fillab($varray,$access)
|
function fillab($varray,$access) {
|
||||||
{
|
|
||||||
global $phpgw;
|
global $phpgw;
|
||||||
global $phpgw_info;
|
global $phpgw_info;
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
while($i < count($varray)) // incremented by 2
|
// incremented by 2
|
||||||
{
|
while($i < count($varray)) {
|
||||||
$k = explode(";",$varray[$i]); // Key
|
$k = explode(";",$varray[$i]); // Key
|
||||||
$v = explode(";",$varray[$i+1]); // Values
|
$v = explode(";",$varray[$i+1]); // Values
|
||||||
for($h=0;$h<count($k);$h++)
|
for($h=0;$h<count($k);$h++) {
|
||||||
{
|
switch($k[$h]) {
|
||||||
switch($k[$h])
|
|
||||||
{
|
|
||||||
case "fn":
|
case "fn":
|
||||||
$formattedname = $v[0];
|
$formattedname = $v[0];
|
||||||
break;
|
break;
|
||||||
@ -475,8 +460,8 @@
|
|||||||
!ereg("fax",$varray[$i]) && !ereg("cell",$varray[$i]) &&
|
!ereg("fax",$varray[$i]) && !ereg("cell",$varray[$i]) &&
|
||||||
!ereg("pager",$varray[$i]) && !ereg("bbs",$varray[$i]) &&
|
!ereg("pager",$varray[$i]) && !ereg("bbs",$varray[$i]) &&
|
||||||
!ereg("modem",$varray[$i]) && !ereg("car",$varray[$i]) &&
|
!ereg("modem",$varray[$i]) && !ereg("car",$varray[$i]) &&
|
||||||
!ereg("isdn",$varray[$i]) && !ereg("video",$varray[$i]) )
|
!ereg("isdn",$varray[$i]) && !ereg("video",$varray[$i]) ) {
|
||||||
{ // There isn't a seperate home entry.
|
// There isn't a seperate home entry.
|
||||||
// Use this number.
|
// Use this number.
|
||||||
$hphone = $v[0];
|
$hphone = $v[0];
|
||||||
}
|
}
|
||||||
@ -525,8 +510,7 @@
|
|||||||
$notes .= $v[0] . "\n";
|
$notes .= $v[0] . "\n";
|
||||||
break;
|
break;
|
||||||
case "email":
|
case "email":
|
||||||
if(!ereg("internet",$varray[$i]))
|
if(!ereg("internet",$varray[$i])) {
|
||||||
{
|
|
||||||
$email = $v[0];
|
$email = $v[0];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -538,11 +522,9 @@
|
|||||||
break;
|
break;
|
||||||
case "org":
|
case "org":
|
||||||
$company = $v[0];
|
$company = $v[0];
|
||||||
if(count($v) > 1)
|
if(count($v) > 1) {
|
||||||
{
|
|
||||||
$notes .= $v[0] . "\n";
|
$notes .= $v[0] . "\n";
|
||||||
for($j=1;$j<count($v);$j++)
|
for($j=1;$j<count($v);$j++) {
|
||||||
{
|
|
||||||
$notes .= $v[$j] . "\n";
|
$notes .= $v[$j] . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,18 +12,18 @@
|
|||||||
/* $ Id $ */
|
/* $ Id $ */
|
||||||
{
|
{
|
||||||
echo "<p>\n";
|
echo "<p>\n";
|
||||||
$imgfile = $phpgw->common->get_image_dir("addressbook")."/" . $appname .".gif";
|
$imgfile = $phpgw->common->get_image_dir($appname)."/" . $appname .".gif";
|
||||||
if (file_exists($imgfile)) {
|
if (file_exists($imgfile)) {
|
||||||
$imgpath = $phpgw->common->get_image_path("addressbook")."/" . $appname .".gif";
|
$imgpath = $phpgw->common->get_image_path($appname)."/" . $appname .".gif";
|
||||||
} else {
|
} else {
|
||||||
$imgfile = $phpgw->common->get_image_dir("addressbook")."/navbar.gif";
|
$imgfile = $phpgw->common->get_image_dir($appname)."/navbar.gif";
|
||||||
if (file_exists($imgfile)) {
|
if (file_exists($imgfile)) {
|
||||||
$imgpath = $phpgw->common->get_image_path("addressbook")."/navbar.gif";
|
$imgpath = $phpgw->common->get_image_path($appname)."/navbar.gif";
|
||||||
} else {
|
} else {
|
||||||
$imgpath = "";
|
$imgpath = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
section_start("Address Book",$imgpath);
|
section_start(ucfirst($appname),$imgpath);
|
||||||
|
|
||||||
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php");
|
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php");
|
||||||
echo "<a href=".$pg.">" . lang("Addressbook preferences") . "</a><br>";
|
echo "<a href=".$pg.">" . lang("Addressbook preferences") . "</a><br>";
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
$phpgw_info["flags"] = array("currentapp" =>
|
||||||
"enable_contacts_class" => True,
|
"addressbook","enable_contacts_class" => True,
|
||||||
"enable_nextmatchs_class" => True);
|
"enable_nextmatchs_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
@ -44,8 +44,7 @@
|
|||||||
if (! $start)
|
if (! $start)
|
||||||
$start = 0;
|
$start = 0;
|
||||||
|
|
||||||
if($phpgw_info["user"]["preferences"]["common"]["maxmatchs"] &&
|
if($phpgw_info["user"]["preferences"]["common"]["maxmatchs"] && $phpgw_info["user"]["preferences"]["common"]["maxmatchs"] > 0) {
|
||||||
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"] > 0) {
|
|
||||||
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
||||||
} else {
|
} else {
|
||||||
$offset = 30;
|
$offset = 30;
|
||||||
@ -69,15 +68,10 @@
|
|||||||
// read the entry list
|
// read the entry list
|
||||||
$entries = $this->read($start,$offset,$qcols,$query,$qfilter,$sort,$order);
|
$entries = $this->read($start,$offset,$qcols,$query,$qfilter,$sort,$order);
|
||||||
|
|
||||||
$search_filter = $phpgw->nextmatchs->show_tpl("index.php",
|
$search_filter = $phpgw->nextmatchs->show_tpl("index.php",$start, $this->total_records,"&order=$order&filter=$filter&sort=$sort&query=$query","75%", $phpgw_info["theme"]["th_bg"]);
|
||||||
$start, $this->total_records,
|
|
||||||
"&order=$order&filter=$filter&sort=$sort&query=$query",
|
|
||||||
"75%", $phpgw_info["theme"]["th_bg"]);
|
|
||||||
|
|
||||||
if ($this->total_records > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
if ($this->total_records > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||||
$lang_showing=lang("showing x - x of x",($start + 1),
|
$lang_showing=lang("showing x - x of x",($start + 1),($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),$this->total_records);
|
||||||
($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),
|
|
||||||
$this->total_records);
|
|
||||||
} else {
|
} else {
|
||||||
$lang_showing=lang("showing x",$this->total_records);
|
$lang_showing=lang("showing x",$this->total_records);
|
||||||
}
|
}
|
||||||
@ -116,9 +110,7 @@
|
|||||||
for ($i=0;$i<count($entries);$i++) { // each entry
|
for ($i=0;$i<count($entries);$i++) { // each entry
|
||||||
if ( ($entries[$i]["access"] == $filter) ||
|
if ( ($entries[$i]["access"] == $filter) ||
|
||||||
($entries[$i]["access"] == "," . $filter . ",") ||
|
($entries[$i]["access"] == "," . $filter . ",") ||
|
||||||
($filter == "") ||
|
($filter == "") || ($filter == "none")) {
|
||||||
($filter == "none")) {
|
|
||||||
//strpos(' ,'.$entries[$i]["access"].', ',','.$filter.',')
|
|
||||||
$t->set_var(columns,"");
|
$t->set_var(columns,"");
|
||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
$t->set_var(row_tr_color,$tr_color);
|
$t->set_var(row_tr_color,$tr_color);
|
||||||
@ -134,11 +126,10 @@
|
|||||||
$data=$coldata.'</a>';
|
$data=$coldata.'</a>';
|
||||||
} elseif ($column[0] == "email") {
|
} elseif ($column[0] == "email") {
|
||||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||||
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
|
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"] . "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
||||||
. "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
|
||||||
} else {
|
} else {
|
||||||
//changed frmo a patch posted on sf, have not fully tested. Seek3r, Jan 30 2001
|
//changed frmo a patch posted on sf, have not fully tested. Seek3r, Jan 30 2001
|
||||||
// $ref='<a href="mailto:"'.$coldata.'">'.$coldata.'</a>';
|
// $ref='<a href="mailto:"'.$coldata.'">'.$coldata.'</a>';
|
||||||
$ref='<a href="mailto:'.$coldata.'">';
|
$ref='<a href="mailto:'.$coldata.'">';
|
||||||
}
|
}
|
||||||
$data=$coldata."</a>";
|
$data=$coldata."</a>";
|
||||||
@ -158,7 +149,6 @@
|
|||||||
|
|
||||||
$t->parse("rows","row",True);
|
$t->parse("rows","row",True);
|
||||||
$t->pparse("out","row");
|
$t->pparse("out","row");
|
||||||
|
|
||||||
reset($columns_to_display); // If we don't reset it, our inside while won't loop
|
reset($columns_to_display); // If we don't reset it, our inside while won't loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||||
"enable_contact_class" => True,
|
"enable_contact_class" => True,
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - Address Book *
|
* phpGroupWare - Address Book *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
$phpgw_info["flags"] = array("noheader" => True,
|
$phpgw_info["flags"] = array("noheader" => True,
|
||||||
"nonavbar" => True,
|
"nonavbar" => True,
|
||||||
"currentapp" => "addressbook",
|
"currentapp" => "addressbook",
|
||||||
@ -66,7 +67,7 @@
|
|||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||||
while (list($col, $descr) = each($this->stock_contact_fields)) {
|
while (list($col, $descr) = each($this->stock_contact_fields)) {
|
||||||
// echo "<br>test: $col - $i $j - " . count($abc);
|
// echo "<br>test: $col - $i $j - " . count($abc);
|
||||||
$i++; $j++;
|
$i++; $j++;
|
||||||
$showcol = display_name($descr);
|
$showcol = display_name($descr);
|
||||||
if ($showcol) {
|
if ($showcol) {
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - E-Mail *
|
* phpGroupWare - E-Mail *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
if ($action == "Load Vcard"){
|
if ($action == "Load Vcard"){
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "addressbook", "enable_addressbook_class" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
}else{
|
} else {
|
||||||
$phpgw_info["flags"] = array("currentapp" => "addressbook", "enable_addressbook_class" => True);
|
$phpgw_info["flags"] = array("currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
echo '<body bgcolor="' . $phpgw_info["theme"]["bg_color"] . '">';
|
echo '<body bgcolor="' . $phpgw_info["theme"]["bg_color"] . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some of the methods where borrowed from
|
// Some of the methods where borrowed from
|
||||||
// Squirrelmail <Luke Ehresman> http://www.squirrelmail.org
|
// Squirrelmail <Luke Ehresman> http://www.squirrelmail.org
|
||||||
@ -31,8 +31,7 @@ if ($action == "Load Vcard"){
|
|||||||
|
|
||||||
if ($action == "Load Vcard") {
|
if ($action == "Load Vcard") {
|
||||||
if($uploadedfile == "none" || $uploadedfile == "") {
|
if($uploadedfile == "none" || $uploadedfile == "") {
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/vcardin.php","action=GetFile"));
|
||||||
"/addressbook/vcardin.php","action=GetFile"));
|
|
||||||
} else {
|
} else {
|
||||||
srand((double)microtime()*1000000);
|
srand((double)microtime()*1000000);
|
||||||
$random_number = rand(100000000,999999999);
|
$random_number = rand(100000000,999999999);
|
||||||
@ -68,7 +67,6 @@ if ($action == "Load Vcard"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form ENCTYPE="multipart/form-data" method="POST" action="<?php echo $phpgw->link("vcardin.php")?>">
|
<form ENCTYPE="multipart/form-data" method="POST" action="<?php echo $phpgw->link("vcardin.php")?>">
|
||||||
<table border=0>
|
<table border=0>
|
||||||
<tr>
|
<tr>
|
||||||
@ -116,7 +114,6 @@ if ($action == "Load Vcard"){
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
if ($action != "Load Vcard")
|
||||||
if ($action != "Load Vcard")
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if ($nolname || $nofname) {
|
if ($nolname || $nofname) {
|
||||||
$phpgw_info["flags"] = array("noheader" => False, "nonavbar" => False);
|
$phpgw_info["flags"] = array("noheader" => False, "nonavbar" => False);
|
||||||
@ -61,16 +61,13 @@
|
|||||||
$access = $fields[0]["access"];
|
$access = $fields[0]["access"];
|
||||||
$url = $fields[0]["url"];
|
$url = $fields[0]["url"];
|
||||||
|
|
||||||
if(!$nolname && !$nofname)
|
if(!$nolname && !$nofname) {
|
||||||
{
|
/* First name and last must be in the vcard. */
|
||||||
/* First name and last must be in the vcard. */
|
if($lastname == "") {
|
||||||
if($lastname == "")
|
|
||||||
{
|
|
||||||
/* Run away here. */
|
/* Run away here. */
|
||||||
Header("Location: " . $phpgw->link("vcardout.php","nolname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
Header("Location: " . $phpgw->link("vcardout.php","nolname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
||||||
}
|
}
|
||||||
if($firstname == "" )
|
if($firstname == "" ) {
|
||||||
{
|
|
||||||
Header("Location: " . $phpgw->link("vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
Header("Location: " . $phpgw->link("vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +75,6 @@
|
|||||||
$fn = explode("@",$email);
|
$fn = explode("@",$email);
|
||||||
$filename = sprintf("%s.vcf", $fn[0]);
|
$filename = sprintf("%s.vcf", $fn[0]);
|
||||||
|
|
||||||
|
|
||||||
header("Content-Disposition: attachment; filename=$filename");
|
header("Content-Disposition: attachment; filename=$filename");
|
||||||
|
|
||||||
printf("BEGIN:VCARD\r\n");
|
printf("BEGIN:VCARD\r\n");
|
||||||
@ -110,8 +106,7 @@
|
|||||||
$state != "" || /* State */
|
$state != "" || /* State */
|
||||||
$zip != "") /* Zip */
|
$zip != "") /* Zip */
|
||||||
printf("ADR:;%s;%s;%s;%s;%s;%s\r\n", $address2,
|
printf("ADR:;%s;%s;%s;%s;%s;%s\r\n", $address2,
|
||||||
$street,$city,$state,$zip,$country
|
$street,$city,$state,$zip,$country);
|
||||||
);
|
|
||||||
|
|
||||||
if($bday != "" && $bday != "//") /* Birthday */
|
if($bday != "" && $bday != "//") /* Birthday */
|
||||||
printf("BDAY:%s\r\n", $bday); /* This is not the right format. */
|
printf("BDAY:%s\r\n", $bday); /* This is not the right format. */
|
||||||
@ -127,8 +122,7 @@
|
|||||||
printf("END:VCARD\r\n");
|
printf("END:VCARD\r\n");
|
||||||
} /* !nolname && !nofname */
|
} /* !nolname && !nofname */
|
||||||
|
|
||||||
if($nofname)
|
if($nofname) {
|
||||||
{
|
|
||||||
echo "<BR><BR><CENTER>";
|
echo "<BR><BR><CENTER>";
|
||||||
echo lang("This person's first name was not in the address book.") ."<BR>";
|
echo lang("This person's first name was not in the address book.") ."<BR>";
|
||||||
echo lang("Vcards require a first name entry.") . "<BR><BR>";
|
echo lang("Vcards require a first name entry.") . "<BR><BR>";
|
||||||
@ -136,8 +130,7 @@
|
|||||||
echo "</CENTER>";
|
echo "</CENTER>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($nolname)
|
if($nolname) {
|
||||||
{
|
|
||||||
echo "<BR><BR><CENTER>";
|
echo "<BR><BR><CENTER>";
|
||||||
echo lang("This person's last name was not in the address book.") . "<BR>";
|
echo lang("This person's last name was not in the address book.") . "<BR>";
|
||||||
echo lang("Vcards require a last name entry.") . "<BR><BR>";
|
echo lang("Vcards require a last name entry.") . "<BR><BR>";
|
||||||
@ -147,6 +140,5 @@
|
|||||||
|
|
||||||
if($nolname || $nofname)
|
if($nolname || $nofname)
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
|
|
||||||
/* End of php. */
|
/* End of php. */
|
||||||
?>
|
?>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - addressbook *
|
* phpGroupWare - addressbook *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.phpgroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* 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 *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if ($submit || ! $ab_id) {
|
if ($submit || ! $ab_id) {
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
@ -39,19 +39,20 @@
|
|||||||
$colname[$column[0]] = $column[1];
|
$colname[$column[0]] = $column[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// merge in what are now extra fields
|
// merge in extra fields
|
||||||
$extrafields = array ("pager" => "pager",
|
$extrafields = array ("pager" => "pager",
|
||||||
"mphone" => "mphone",
|
"mphone" => "mphone",
|
||||||
"ophone" => "ophone",
|
"ophone" => "ophone",
|
||||||
"address2" => "address2",
|
"address2" => "address2",
|
||||||
"bday" => "bday",
|
"bday" => "bday",
|
||||||
"url" => "url",
|
"url" => "url",
|
||||||
"notes" => "notes");
|
"notes" => "notes",
|
||||||
|
"access" => "access");
|
||||||
$qfields = $this->stock_contact_fields + $extrafields;
|
$qfields = $this->stock_contact_fields + $extrafields;
|
||||||
$fields = $this->read_single_entry($ab_id,$qfields);
|
$fields = $this->read_single_entry($ab_id,$qfields);
|
||||||
|
|
||||||
//$access = $fields[0]["access"];
|
|
||||||
$owner = $fields[0]["owner"];
|
$owner = $fields[0]["owner"];
|
||||||
|
$access = $fields[0]["access"];
|
||||||
|
|
||||||
$view_header = "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
$view_header = "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
||||||
$view_header .= '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
$view_header .= '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
||||||
@ -78,21 +79,24 @@
|
|||||||
$columns_html .= "<td>" . $ref . $data . "</td>";
|
$columns_html .= "<td>" . $ref . $data . "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($access == "private") {
|
||||||
|
$access_link .= lang("Record Access") . " - " . $access;
|
||||||
|
} elseif ($access != "private" && $access != "public") {
|
||||||
|
$access_link .= lang("Group access") . " - " . $phpgw->accounts->convert_string_to_names_access($access);
|
||||||
|
} else {
|
||||||
|
$access_link ="";
|
||||||
|
}
|
||||||
|
|
||||||
$columns_html .= '<tr><td colspan="4"> </td></tr>'
|
$columns_html .= '<tr><td colspan="4"> </td></tr>'
|
||||||
. '<tr><td><b>' . lang("Record owner") . '</b></td><td>'
|
. '<tr><td><b>' . lang("Record owner") . '</b></td><td>'
|
||||||
. $phpgw->common->grab_owner_name($owner) . '</td><td><b>'
|
. $phpgw->common->grab_owner_name($owner) . '</td><td><b>'
|
||||||
. lang("Record Access") . '</b></td><td></table>';
|
. $access_link . '</b></td><td></table>';
|
||||||
|
|
||||||
if ($access != "private" && $access != "public") {
|
|
||||||
$access_link .= lang("Group access") . " - " . $phpgw->accounts->convert_string_to_names_access($access);
|
|
||||||
} else {
|
|
||||||
$access_link .= $access;
|
|
||||||
}
|
|
||||||
|
|
||||||
$editlink = $phpgw->common->check_owner($owner,"edit.php",lang("edit"),"ab_id=" . $ab_id . "&start=".$start."&sort=".$sort."&order=".$order);
|
$editlink = $phpgw->common->check_owner($owner,"edit.php",lang("edit"),"ab_id=" . $ab_id . "&start=".$start."&sort=".$sort."&order=".$order);
|
||||||
$vcardlink = '<form action="'.$phpgw->link("vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
$vcardlink = '<form action="'.$phpgw->link("vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
||||||
$donelink = '<form action="'.$phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
$donelink = '<form action="'.$phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
||||||
|
|
||||||
|
$t->set_var("access_link",$access_link);
|
||||||
$t->set_var("ab_id",$ab_id);
|
$t->set_var("ab_id",$ab_id);
|
||||||
$t->set_var("sort",$sort);
|
$t->set_var("sort",$sort);
|
||||||
$t->set_var("order",$order);
|
$t->set_var("order",$order);
|
||||||
|
Loading…
Reference in New Issue
Block a user