forked from extern/egroupware
Add home addr label, if appropriate, and custom phpgw field
This commit is contained in:
parent
8c5c2d1744
commit
f0c3e34a7f
@ -24,7 +24,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
$phpgw_info["flags"]["enable_contacts_class"] = True;
|
||||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
@ -118,6 +118,7 @@
|
|||||||
header("Content-Disposition: attachment; filename=$filename");
|
header("Content-Disposition: attachment; filename=$filename");
|
||||||
|
|
||||||
printf("BEGIN:VCARD\r\n");
|
printf("BEGIN:VCARD\r\n");
|
||||||
|
printf("X-PHPGROUPWARE-FILE-AS:phpGroupWare.org\r\n");
|
||||||
printf("N:%s;%s\r\n", $lastname, $firstname);
|
printf("N:%s;%s\r\n", $lastname, $firstname);
|
||||||
if (!$fullname) { printf("FN:%s %s\r\n", $firstname, $lastname); }
|
if (!$fullname) { printf("FN:%s %s\r\n", $firstname, $lastname); }
|
||||||
else { printf("FN:%s\r\n", $fullname); }
|
else { printf("FN:%s\r\n", $fullname); }
|
||||||
@ -152,10 +153,10 @@
|
|||||||
$astreet,$acity,$astate,$azip,$acountry);
|
$astreet,$acity,$astate,$azip,$acountry);
|
||||||
}
|
}
|
||||||
if ($label) {
|
if ($label) {
|
||||||
printf("LABEL;ENCODING=QUOTED-PRINTABLE:%s\r\n",$label);
|
printf("LABEL;WORK;QUOTED-PRINTABLE:%s\r\n",$label);
|
||||||
} else {
|
} else {
|
||||||
if ($address2 && $astreet && $acity && $astate && $azip && $acountry) {
|
if ($address2 && $astreet && $acity && $astate && $azip && $acountry) {
|
||||||
printf("LABEL;ENCODING=QUOTED-PRINTABLE:%s=0D=0A %s=0D=0A %s,%s %s=0D=0A %s\r\n",$address2,$astreet,$acity,$astate,$azip,$acountry);
|
printf("LABEL;WORK;QUOTED-PRINTABLE:%s=0A%s=0A%s,%s %s=0A%s\r\n",$address2,$astreet,$acity,$astate,$azip,$acountry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end 'A' grouping
|
// end 'A' grouping
|
||||||
@ -173,6 +174,13 @@
|
|||||||
printf("B.ADR%s;HOME:;;%s;%s;%s;%s;%s\r\n", $btype,$bstreet,
|
printf("B.ADR%s;HOME:;;%s;%s;%s;%s;%s\r\n", $btype,$bstreet,
|
||||||
$bcity,$bstate,$bzip,$bcountry);
|
$bcity,$bstate,$bzip,$bcountry);
|
||||||
}
|
}
|
||||||
|
if ($bstreet && $bcity && $bstate && $bzip && $bcountry) {
|
||||||
|
printf("LABEL;HOME;QUOTED-PRINTABLE:%s=0A%s,%s %s=0A%s\r\n",$bstreet,$bcity,$bstate,$bzip,$bcountry);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($url) {
|
||||||
|
printf("URL:%s\r\n",$url);
|
||||||
|
}
|
||||||
// end 'B' grouping
|
// end 'B' grouping
|
||||||
|
|
||||||
if($bday != "" && $bday != "//") /* Birthday */
|
if($bday != "" && $bday != "//") /* Birthday */
|
||||||
|
Loading…
Reference in New Issue
Block a user