forked from extern/egroupware
Changing tabs to spaces, hope this still works.
This commit is contained in:
parent
2aea2d586c
commit
d6ea3f792f
@ -1,98 +1,96 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit || $AddVcard) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
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");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array("add" => "add.tpl"));
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
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 = "";
|
||||
}
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||
include("../header.inc.php");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "add" => "add.tpl"));
|
||||
$fields["org_name"] = $company;
|
||||
$fields["org_unit"] = $department;
|
||||
$fields["n_given"] = $firstname;
|
||||
$fields["n_family"] = $lastname;
|
||||
$fields["n_middle"] = $middle;
|
||||
$fields["n_prefix"] = $prefix;
|
||||
$fields["n_suffix"] = $suffix;
|
||||
if ($prefix) { $pspc = " "; }
|
||||
if ($middle) { $mspc = " "; }
|
||||
if ($suffix) { $sspc = " "; }
|
||||
$fields["fn"] = $prefix.$pspc.$firstname.$mspc.$middle.$mspc.$lastname.$sspc.$suffix;
|
||||
$fields["d_email"] = $email;
|
||||
$fields["d_emailtype"] = $email_type;
|
||||
$fields["title"] = $title;
|
||||
$fields["a_tel"] = $wphone;
|
||||
$fields["b_tel"] = $hphone;
|
||||
$fields["c_tel"] = $fax;
|
||||
$fields["pager"] = $pager;
|
||||
$fields["mphone"] = $mphone;
|
||||
$fields["ophone"] = $ophone;
|
||||
$fields["adr_street"] = $street;
|
||||
$fields["address2"] = $address2;
|
||||
$fields["adr_locality"] = $city;
|
||||
$fields["adr_region"] = $state;
|
||||
$fields["adr_postalcode"] = $zip;
|
||||
$fields["adr_Countryname"] = $country;
|
||||
$fields["tz"] = $timezone;
|
||||
$fields["bday"] = $bday;
|
||||
$fields["url"] = $url;
|
||||
$fields["notes"] = $notes;
|
||||
$fields["access"] = $access;
|
||||
|
||||
$this->add($phpgw_info["user"]["account_id"],$fields);
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/","cd=14"));
|
||||
}
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
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 = "";
|
||||
}
|
||||
|
||||
$fields["org_name"] = $company;
|
||||
$fields["org_unit"] = $department;
|
||||
$fields["n_given"] = $firstname;
|
||||
$fields["n_family"] = $lastname;
|
||||
$fields["n_middle"] = $middle;
|
||||
$fields["n_prefix"] = $prefix;
|
||||
$fields["n_suffix"] = $suffix;
|
||||
if ($prefix) { $pspc = " "; }
|
||||
if ($middle) { $mspc = " "; }
|
||||
if ($suffix) { $sspc = " "; }
|
||||
$fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
|
||||
$fields["d_email"] = $email;
|
||||
$fields["d_emailtype"] = $email_type;
|
||||
$fields["title"] = $title;
|
||||
$fields["a_tel"] = $wphone;
|
||||
$fields["b_tel"] = $hphone;
|
||||
$fields["c_tel"] = $fax;
|
||||
$fields["pager"] = $pager;
|
||||
$fields["mphone"] = $mphone;
|
||||
$fields["ophone"] = $ophone;
|
||||
$fields["adr_street"] = $street;
|
||||
$fields["address2"] = $address2;
|
||||
$fields["adr_locality"] = $city;
|
||||
$fields["adr_region"] = $state;
|
||||
$fields["adr_postalcode"] = $zip;
|
||||
$fields["adr_Countryname"] = $country;
|
||||
$fields["tz"] = $timezone;
|
||||
$fields["bday"] = $bday;
|
||||
$fields["url"] = $url;
|
||||
$fields["notes"] = $notes;
|
||||
$fields["access"] = $access;
|
||||
|
||||
$this->add($phpgw_info["user"]["account_id"],$fields);
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
|
||||
"cd=14"));
|
||||
}
|
||||
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("cancel_url",$phpgw->link("index.php?sort=$sort&order=$order&filter=$filter&start=$start"));
|
||||
$t->parse("out","add");
|
||||
$t->pparse("out","add");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("cancel_url",$phpgw->link("index.php?sort=$sort&order=$order&filter=$filter&start=$start"));
|
||||
$t->parse("out","add");
|
||||
$t->pparse("out","add");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -27,14 +27,14 @@ class outlook_conv {
|
||||
var $currentrecord; //used for buffering to allow uid lines to go first
|
||||
|
||||
var $outlook = array(
|
||||
"Title" => "TITLE",
|
||||
"First Name" => "N_Given",
|
||||
"Middle Name" => "N_Middle",
|
||||
"Last Name" => "N_Family",
|
||||
"Suffix" => "N_Suffix",
|
||||
"Company" => "ORG_Name", //objectclass: organization
|
||||
"Department" => "ORG_Unit", //objectclass: organizationalPerson
|
||||
"Job Title" => "TITLE", //objectclass: organizationalPerson
|
||||
"Title" => "title",
|
||||
"First Name" => "n_given",
|
||||
"Middle Name" => "n_middle",
|
||||
"Last Name" => "n_family",
|
||||
"Suffix" => "n_suffix",
|
||||
"Company" => "org_name", //objectclass: organization
|
||||
"Department" => "org_unit", //objectclass: organizationalPerson
|
||||
"Job Title" => "title", //objectclass: organizationalPerson
|
||||
"Business Street" => "address2",
|
||||
"Business Street 2" => "",
|
||||
"Business Street 3" => "",
|
||||
@ -42,11 +42,11 @@ class outlook_conv {
|
||||
"Business State" => "",
|
||||
"Business Postal Code" => "",
|
||||
"Business Country" => "",
|
||||
"Home Street" => "ADR_Street",
|
||||
"Home City" => "ADR_Locality",
|
||||
"Home State" => "ADR_Region",
|
||||
"Home Postal Code" => "ADR_PostalCode",
|
||||
"Home Country" => "ADR_CountryName",
|
||||
"Home Street" => "adr_street",
|
||||
"Home City" => "adr_locality",
|
||||
"Home State" => "adr_region",
|
||||
"Home Postal Code" => "adr_postalcode",
|
||||
"Home Country" => "adr_countryname",
|
||||
"Home Street 2" => "",
|
||||
"Home Street 3" => "",
|
||||
"Other Street" => "",
|
||||
@ -55,14 +55,14 @@ class outlook_conv {
|
||||
"Other Postal Code" => "",
|
||||
"Other Country" => "",
|
||||
"Assistant's Phone" => "",
|
||||
"Business Fax" => "C_TEL",
|
||||
"Business Phone" => "B_TEL",
|
||||
"Business Fax" => "c_tel",
|
||||
"Business Phone" => "b_tel",
|
||||
"Business Phone 2" => "ophone",
|
||||
"Callback" => "",
|
||||
"Car Phone" => "",
|
||||
"Company Main Phone" => "",
|
||||
"Home Fax" => "",
|
||||
"Home Phone" => "A.TEL",
|
||||
"Home Phone" => "a.tel",
|
||||
"Home Phone 2" => "", //This will make another homePhone entry
|
||||
"ISDN" => "",
|
||||
"Mobile Phone" => "mphone", //newPilotPerson
|
||||
@ -81,7 +81,7 @@ class outlook_conv {
|
||||
"Categories" => "",
|
||||
"Children" => "",
|
||||
"Directory Server" => "",
|
||||
"E-mail Address" => "D_EMAIL",
|
||||
"E-mail Address" => "d_email",
|
||||
"E-mail Display Name" => "",
|
||||
"E-mail 2 Address" => "",
|
||||
"E-mail 2 Display Name" => "",
|
||||
|
@ -28,12 +28,12 @@ class outlook_conv {
|
||||
|
||||
var $outlook = array(
|
||||
"Title" => "TITLE",
|
||||
"First Name" => "N.Given",
|
||||
"Middle Name" => "N.Middle",
|
||||
"Last Name" => "N.Family",
|
||||
"Suffix" => "N.Suffix",
|
||||
"Company" => "ORG.Name", //objectclass: organization
|
||||
"Department" => "ORG.Unit", //objectclass: organizationalPerson
|
||||
"First Name" => "N_Given",
|
||||
"Middle Name" => "N_Middle",
|
||||
"Last Name" => "N_Family",
|
||||
"Suffix" => "N_Suffix",
|
||||
"Company" => "ORG_Name", //objectclass: organization
|
||||
"Department" => "ORG_Unit", //objectclass: organizationalPerson
|
||||
"Job Title" => "TITLE", //objectclass: organizationalPerson
|
||||
"Business Street" => "address2",
|
||||
"Business Street 2" => "",
|
||||
@ -42,11 +42,11 @@ class outlook_conv {
|
||||
"Business State" => "",
|
||||
"Business Postal Code" => "",
|
||||
"Business Country" => "",
|
||||
"Home Street" => "ADR.Street",
|
||||
"Home City" => "ADR.Locality",
|
||||
"Home State" => "ADR.Region",
|
||||
"Home Postal Code" => "ADR.PostalCode",
|
||||
"Home Country" => "ADR.Country",
|
||||
"Home Street" => "ADR_Street",
|
||||
"Home City" => "ADR_Locality",
|
||||
"Home State" => "ADR_Region",
|
||||
"Home Postal Code" => "ADR_PostalCode",
|
||||
"Home Country" => "ADR_CountryName",
|
||||
"Home Street 2" => "",
|
||||
"Home Street 3" => "",
|
||||
"Other Street" => "",
|
||||
@ -55,8 +55,8 @@ class outlook_conv {
|
||||
"Other Postal Code" => "",
|
||||
"Other Country" => "",
|
||||
"Assistant's Phone" => "",
|
||||
"Business Fax" => "C.TEL",
|
||||
"Business Phone" => "B.TEL",
|
||||
"Business Fax" => "C_TEL",
|
||||
"Business Phone" => "B_TEL",
|
||||
"Business Phone 2" => "ophone",
|
||||
"Callback" => "",
|
||||
"Car Phone" => "",
|
||||
@ -81,7 +81,7 @@ class outlook_conv {
|
||||
"Categories" => "",
|
||||
"Children" => "",
|
||||
"Directory Server" => "",
|
||||
"E-mail Address" => "D.EMAIL",
|
||||
"E-mail Address" => "D_EMAIL",
|
||||
"E-mail Display Name" => "",
|
||||
"E-mail 2 Address" => "",
|
||||
"E-mail 2 Display Name" => "",
|
||||
@ -146,7 +146,7 @@ function outlook_end_record($buffer,$private="private") {
|
||||
for ($i=0;$i<count($lines)-1;$i++) {
|
||||
list($name, $value) = split("%%",$lines[$i]);
|
||||
$row++;
|
||||
$namelist = $namelist.array($name => $value);
|
||||
$namelist .= array($name => $value);
|
||||
}
|
||||
|
||||
return $buffer.$namelist;
|
||||
|
@ -1,57 +1,55 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
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");
|
||||
$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 (! $ab_id) {
|
||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
}
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array("delete" => "delete.tpl"));
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array("delete" => "delete.tpl"));
|
||||
|
||||
|
||||
if ($confirm != "true") {
|
||||
$fields = $this->read($ab_id, array("owner" => $owner));
|
||||
if ($confirm != "true") {
|
||||
$fields = $this->read($ab_id, array("owner" => $owner));
|
||||
|
||||
if ($fielfs["owner"] != $phpgw_info["user"]["account_id"]) {
|
||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
}
|
||||
if ($fielfs["owner"] != $phpgw_info["user"]["account_id"]) {
|
||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
}
|
||||
|
||||
$t->set_var(lang_sure,lang("Are you sure you want to delete this entry ?"));
|
||||
$t->set_var(no_link,$phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
$t->set_var(lang_no,lang("NO"));
|
||||
$t->set_var(yes_link,$phpgw->link("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
$t->set_var(lang_yes,lang("YES"));
|
||||
$t->pparse("out","delete");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$t->set_var(lang_sure,lang("Are you sure you want to delete this entry ?"));
|
||||
$t->set_var(no_link,$phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
$t->set_var(lang_no,lang("NO"));
|
||||
$t->set_var(yes_link,$phpgw->link("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
$t->set_var(lang_yes,lang("YES"));
|
||||
$t->pparse("out","delete");
|
||||
|
||||
} else {
|
||||
$this->account_id=$phpgw_info["user"]["account_id"];
|
||||
$this->delete($ab_id);
|
||||
$phpgw->common->phpgw_footer();
|
||||
} else {
|
||||
$this->account_id=$phpgw_info["user"]["account_id"];
|
||||
$this->delete($ab_id);
|
||||
|
||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
}
|
||||
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
}
|
||||
?>
|
||||
|
@ -1,117 +1,115 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit || ! $ab_id) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
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");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "edit" => "edit.tpl"));
|
||||
$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();
|
||||
}
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "edit" => "edit.tpl"));
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
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) {
|
||||
// merge in what are now extra fields
|
||||
$extrafields = array ("pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"access" => "access",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes");
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
$fields = $this->read_single_entry($ab_id,$qfields);
|
||||
form("","edit.php","Edit",$fields[0]);
|
||||
} 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);
|
||||
}
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
if (!$submit) {
|
||||
// merge in extra fields
|
||||
$extrafields = array ("pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"access" => "access",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes");
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
$fields = $this->read_single_entry($ab_id,$qfields);
|
||||
form("","edit.php","Edit",$fields[0]);
|
||||
} 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);
|
||||
}
|
||||
|
||||
$fields["org_name"] = $company;
|
||||
$fields["org_unit"] = $department;
|
||||
$fields["n_given"] = $firstname;
|
||||
$fields["n_family"] = $lastname;
|
||||
$fields["n_middle"] = $middle;
|
||||
$fields["n_prefix"] = $prefix;
|
||||
$fields["n_suffix"] = $suffix;
|
||||
if ($prefix) { $pspc = " "; }
|
||||
if ($middle) { $mspc = " "; }
|
||||
if ($suffix) { $sspc = " "; }
|
||||
$fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
|
||||
$fields["d_email"] = $email;
|
||||
$fields["d_emailtype"] = $email_type;
|
||||
$fields["title"] = $title;
|
||||
$fields["a_tel"] = $wphone;
|
||||
$fields["b_tel"] = $hphone;
|
||||
$fields["c_tel"] = $fax;
|
||||
$fields["pager"] = $pager;
|
||||
$fields["mphone"] = $mphone;
|
||||
$fields["ophone"] = $ophone;
|
||||
$fields["adr_street"] = $street;
|
||||
$fields["address2"] = $address2;
|
||||
$fields["adr_locality"] = $city;
|
||||
$fields["adr_region"] = $state;
|
||||
$fields["adr_postalcode"] = $zip;
|
||||
$fields["adr_countryname"] = $country;
|
||||
$fields["tz"] = $timezone;
|
||||
$fields["bday"] = $bday;
|
||||
$fields["url"] = $url;
|
||||
$fields["notes"] = $notes;
|
||||
$fields["access"] = $access;
|
||||
$fields["org_name"] = $company;
|
||||
$fields["org_unit"] = $department;
|
||||
$fields["n_given"] = $firstname;
|
||||
$fields["n_family"] = $lastname;
|
||||
$fields["n_middle"] = $middle;
|
||||
$fields["n_prefix"] = $prefix;
|
||||
$fields["n_suffix"] = $suffix;
|
||||
if ($prefix) { $pspc = " "; }
|
||||
if ($middle) { $mspc = " "; }
|
||||
if ($suffix) { $sspc = " "; }
|
||||
$fields["fn"] = $prefix.$pspc.$firstname.$mspc.$middle.$mspc.$lastname.$sspc.$suffix;
|
||||
$fields["d_email"] = $email;
|
||||
$fields["d_emailtype"] = $email_type;
|
||||
$fields["title"] = $title;
|
||||
$fields["a_tel"] = $wphone;
|
||||
$fields["b_tel"] = $hphone;
|
||||
$fields["c_tel"] = $fax;
|
||||
$fields["pager"] = $pager;
|
||||
$fields["mphone"] = $mphone;
|
||||
$fields["ophone"] = $ophone;
|
||||
$fields["adr_street"] = $street;
|
||||
$fields["address2"] = $address2;
|
||||
$fields["adr_locality"] = $city;
|
||||
$fields["adr_region"] = $state;
|
||||
$fields["adr_postalcode"] = $zip;
|
||||
$fields["adr_countryname"] = $country;
|
||||
$fields["tz"] = $timezone;
|
||||
$fields["bday"] = $bday;
|
||||
$fields["url"] = $url;
|
||||
$fields["notes"] = $notes;
|
||||
$fields["access"] = $access;
|
||||
|
||||
$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="
|
||||
. "$filter&start=$start"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
$t->set_var("ab_id",$ab_id);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("lang_delete",lang("delete"));
|
||||
$t->set_var("lang_submit",lang("submit"));
|
||||
$t->set_var("cancel_link",'<form action="'.$phpgw->link("index.php","sort=$sort&order=$order&filter=$filter&start=$start") . '">');
|
||||
$t->set_var("delete_link",'<form action="'.$phpgw->link("delete.php","ab_id=$ab_id") . '">');
|
||||
|
||||
$t->parse("out","edit");
|
||||
$t->pparse("out","edit");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$t->set_var("ab_id",$ab_id);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("lang_delete",lang("delete"));
|
||||
$t->set_var("lang_submit",lang("submit"));
|
||||
$t->set_var("cancel_link",'<form action="'.$phpgw->link("index.php","sort=$sort&order=$order&filter=$filter&start=$start") . '">');
|
||||
$t->set_var("delete_link",'<form action="'.$phpgw->link("delete.php","ab_id=$ab_id") . '">');
|
||||
|
||||
$t->parse("out","edit");
|
||||
$t->pparse("out","edit");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,48 +1,48 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare API - Accounts manager for SQL *
|
||||
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* View and manipulate contact records using SQL *
|
||||
* Copyright (C) 2001 Joseph Engo *
|
||||
* -------------------------------------------------------------------------*
|
||||
* This library is part of the phpGroupWare API *
|
||||
* http://www.phpgroupware.org/api *
|
||||
* ------------------------------------------------------------------------ *
|
||||
* 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 *
|
||||
* the Free Software Foundation; either version 2.1 of the License, *
|
||||
* or any later version. *
|
||||
* This library is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU Lesser General Public License for more details. *
|
||||
* 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, *
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* phpGroupWare API - Accounts manager for SQL *
|
||||
* This file written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* View and manipulate contact records using SQL *
|
||||
* Copyright (C) 2001 Joseph Engo *
|
||||
* -------------------------------------------------------------------------*
|
||||
* This library is part of the phpGroupWare API *
|
||||
* http://www.phpgroupware.org/api *
|
||||
* ------------------------------------------------------------------------ *
|
||||
* 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 *
|
||||
* the Free Software Foundation; either version 2.1 of the License, *
|
||||
* or any later version. *
|
||||
* This library is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU Lesser General Public License for more details. *
|
||||
* 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, *
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
phpgw_addressbook_extra (
|
||||
contact_id int,
|
||||
contact_owner int,
|
||||
contact_name varchar(255),
|
||||
contact_value varchar(255)
|
||||
);
|
||||
*/
|
||||
/*
|
||||
phpgw_addressbook_extra (
|
||||
contact_id int,
|
||||
contact_owner int,
|
||||
contact_name varchar(255),
|
||||
contact_value varchar(255)
|
||||
);
|
||||
*/
|
||||
|
||||
/* ldap is a copy of sql for now */
|
||||
/* ldap is a copy of sql for now */
|
||||
|
||||
class contacts_
|
||||
{
|
||||
var $db;
|
||||
var $std_table="phpgw_addressbook";
|
||||
var $ext_table="phpgw_addressbook_extra";
|
||||
var $account_id;
|
||||
var $stock_contact_fields; // This is an array of almost the fields in the phpgw_addressbook table, except id,owner,lid,tid
|
||||
var $email_types; // VCard email type array
|
||||
var $total_records; // This will contain numrows for data retrieved
|
||||
class contacts_
|
||||
{
|
||||
var $db;
|
||||
var $std_table="phpgw_addressbook";
|
||||
var $ext_table="phpgw_addressbook_extra";
|
||||
var $account_id;
|
||||
var $stock_contact_fields; // This is an array of almost the fields in the phpgw_addressbook table, except id,owner,lid,tid
|
||||
var $email_types; // VCard email type array
|
||||
var $total_records; // This will contain numrows for data retrieved
|
||||
|
||||
function contacts_()
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,18 +12,18 @@
|
||||
/* $ Id $ */
|
||||
{
|
||||
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)) {
|
||||
$imgpath = $phpgw->common->get_image_path("addressbook")."/" . $appname .".gif";
|
||||
$imgpath = $phpgw->common->get_image_path($appname)."/" . $appname .".gif";
|
||||
} else {
|
||||
$imgfile = $phpgw->common->get_image_dir("addressbook")."/navbar.gif";
|
||||
$imgfile = $phpgw->common->get_image_dir($appname)."/navbar.gif";
|
||||
if (file_exists($imgfile)) {
|
||||
$imgpath = $phpgw->common->get_image_path("addressbook")."/navbar.gif";
|
||||
$imgpath = $phpgw->common->get_image_path($appname)."/navbar.gif";
|
||||
} else {
|
||||
$imgpath = "";
|
||||
}
|
||||
}
|
||||
section_start("Address Book",$imgpath);
|
||||
section_start(ucfirst($appname),$imgpath);
|
||||
|
||||
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php");
|
||||
echo "<a href=".$pg.">" . lang("Addressbook preferences") . "</a><br>";
|
||||
|
@ -1,168 +1,158 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||
"enable_contacts_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
include("../header.inc.php");
|
||||
$phpgw_info["flags"] = array("currentapp" =>
|
||||
"addressbook","enable_contacts_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
include("../header.inc.php");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "addressbook_header" => "header.tpl",
|
||||
"column" => "column.tpl",
|
||||
"row" => "row.tpl",
|
||||
"addressbook_footer" => "footer.tpl" ));
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "addressbook_header" => "header.tpl",
|
||||
"column" => "column.tpl",
|
||||
"row" => "row.tpl",
|
||||
"addressbook_footer" => "footer.tpl" ));
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
while ($column = each($this->stock_contact_fields)) {
|
||||
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) &&
|
||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
|
||||
$showcol = display_name($column[0]);
|
||||
$cols .= " <td height=\"21\">\n";
|
||||
$cols .= ' <font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
$cols .= $phpgw->nextmatchs->show_sort_order($sort, $column[0],$order,"index.php",lang($showcol));
|
||||
$cols .= "</font>\n </td>";
|
||||
$cols .= "\n";
|
||||
|
||||
// To be used when displaying the rows
|
||||
$columns_to_display[$column[0]] = True;
|
||||
}
|
||||
}
|
||||
while ($column = each($this->stock_contact_fields)) {
|
||||
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) &&
|
||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
|
||||
$showcol = display_name($column[0]);
|
||||
$cols .= " <td height=\"21\">\n";
|
||||
$cols .= ' <font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
$cols .= $phpgw->nextmatchs->show_sort_order($sort, $column[0],$order,"index.php",lang($showcol));
|
||||
$cols .= "</font>\n </td>";
|
||||
$cols .= "\n";
|
||||
|
||||
// To be used when displaying the rows
|
||||
$columns_to_display[$column[0]] = True;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $start)
|
||||
$start = 0;
|
||||
if (! $start)
|
||||
$start = 0;
|
||||
|
||||
if($phpgw_info["user"]["preferences"]["common"]["maxmatchs"] &&
|
||||
$phpgw_info["user"]["preferences"]["common"]["maxmatchs"] > 0) {
|
||||
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
||||
} else {
|
||||
$offset = 30;
|
||||
}
|
||||
if($phpgw_info["user"]["preferences"]["common"]["maxmatchs"] && $phpgw_info["user"]["preferences"]["common"]["maxmatchs"] > 0) {
|
||||
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
|
||||
} else {
|
||||
$offset = 30;
|
||||
}
|
||||
|
||||
// insert acl stuff here in lieu of old access perms
|
||||
// following sets up the filter for read, then restores the filter string for later checking
|
||||
if ($filter == "none") { $filter = ""; }
|
||||
$savefilter = $filter;
|
||||
if ($filter != "" ) { $filter = "access=$filter"; }
|
||||
|
||||
$qfilter = $filter;
|
||||
$filter = $savefilter;
|
||||
|
||||
if (!$columns_to_display ) {
|
||||
$columns_to_display = array("n_given","n_family","org_name");
|
||||
$noprefs=lang("Please set your preferences for this app");
|
||||
}
|
||||
$qcols = $columns_to_display + array("access");
|
||||
// insert acl stuff here in lieu of old access perms
|
||||
// following sets up the filter for read, then restores the filter string for later checking
|
||||
if ($filter == "none") { $filter = ""; }
|
||||
$savefilter = $filter;
|
||||
if ($filter != "" ) { $filter = "access=$filter"; }
|
||||
|
||||
$qfilter = $filter;
|
||||
$filter = $savefilter;
|
||||
|
||||
if (!$columns_to_display ) {
|
||||
$columns_to_display = array("n_given","n_family","org_name");
|
||||
$noprefs=lang("Please set your preferences for this app");
|
||||
}
|
||||
$qcols = $columns_to_display + array("access");
|
||||
|
||||
// read the entry list
|
||||
$entries = $this->read($start,$offset,$qcols,$query,$qfilter,$sort,$order);
|
||||
// read the entry list
|
||||
$entries = $this->read($start,$offset,$qcols,$query,$qfilter,$sort,$order);
|
||||
|
||||
$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"]);
|
||||
$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"]);
|
||||
|
||||
if ($this->total_records > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||
$lang_showing=lang("showing x - x of x",($start + 1),
|
||||
($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),
|
||||
$this->total_records);
|
||||
} else {
|
||||
$lang_showing=lang("showing x",$this->total_records);
|
||||
}
|
||||
if ($this->total_records > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]) {
|
||||
$lang_showing=lang("showing x - x of x",($start + 1),($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),$this->total_records);
|
||||
} else {
|
||||
$lang_showing=lang("showing x",$this->total_records);
|
||||
}
|
||||
|
||||
// set basic vars and parse the header
|
||||
$t->set_var(font,$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("lang_view",lang("View"));
|
||||
$t->set_var("lang_vcard",lang("VCard"));
|
||||
$t->set_var("lang_edit",lang("Edit"));
|
||||
// set basic vars and parse the header
|
||||
$t->set_var(font,$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("lang_view",lang("View"));
|
||||
$t->set_var("lang_vcard",lang("VCard"));
|
||||
$t->set_var("lang_edit",lang("Edit"));
|
||||
|
||||
$t->set_var(searchreturn,$noprefs . " " . $searchreturn);
|
||||
$t->set_var(lang_showing,$lang_showing);
|
||||
$t->set_var(search_filter,$search_filter);
|
||||
$t->set_var("lang_addressbook",lang("Address book"));
|
||||
$t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$t->set_var("th_font",$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("th_text",$phpgw_info["theme"]["th_text"]);
|
||||
$t->set_var("lang_add",lang("Add"));
|
||||
$t->set_var("lang_addvcard",lang("AddVCard"));
|
||||
$t->set_var("lang_import",lang("Import File"));
|
||||
$t->set_var("import_url",$phpgw->link("import.php"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("qfield",$qfield);
|
||||
$t->set_var("query",$query);
|
||||
$t->set_var("actionurl",$phpgw->link("add.php","sort=$sort&order=$order&filter=$filter&start=$start"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("cols",$cols);
|
||||
|
||||
$t->pparse("out","addressbook_header");
|
||||
|
||||
// Show the entries
|
||||
for ($i=0;$i<count($entries);$i++) { // each entry
|
||||
if ( ($entries[$i]["access"] == $filter) ||
|
||||
($entries[$i]["access"] == "," . $filter . ",") ||
|
||||
($filter == "") || ($filter == "none")) {
|
||||
$t->set_var(columns,"");
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var(row_tr_color,$tr_color);
|
||||
$myid = $entries[$i]["id"];
|
||||
$myowner = $entries[$i]["owner"];
|
||||
|
||||
$t->set_var(searchreturn,$noprefs . " " . $searchreturn);
|
||||
$t->set_var(lang_showing,$lang_showing);
|
||||
$t->set_var(search_filter,$search_filter);
|
||||
$t->set_var("lang_addressbook",lang("Address book"));
|
||||
$t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$t->set_var("th_font",$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("th_text",$phpgw_info["theme"]["th_text"]);
|
||||
$t->set_var("lang_add",lang("Add"));
|
||||
$t->set_var("lang_addvcard",lang("AddVCard"));
|
||||
$t->set_var("lang_import",lang("Import File"));
|
||||
$t->set_var("import_url",$phpgw->link("import.php"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("qfield",$qfield);
|
||||
$t->set_var("query",$query);
|
||||
$t->set_var("actionurl",$phpgw->link("add.php","sort=$sort&order=$order&filter=$filter&start=$start"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("cols",$cols);
|
||||
|
||||
$t->pparse("out","addressbook_header");
|
||||
|
||||
// Show the entries
|
||||
for ($i=0;$i<count($entries);$i++) { // each entry
|
||||
if ( ($entries[$i]["access"] == $filter) ||
|
||||
($entries[$i]["access"] == "," . $filter . ",") ||
|
||||
($filter == "") ||
|
||||
($filter == "none")) {
|
||||
//strpos(' ,'.$entries[$i]["access"].', ',','.$filter.',')
|
||||
$t->set_var(columns,"");
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var(row_tr_color,$tr_color);
|
||||
$myid = $entries[$i]["id"];
|
||||
$myowner = $entries[$i]["owner"];
|
||||
|
||||
while ($column = each($columns_to_display)) { // each entry column
|
||||
$ref=$data="";
|
||||
$coldata = $entries[$i][$column[0]];
|
||||
// Some fields require special formatting.
|
||||
if ($column[0] == "url") {
|
||||
$ref='<a href="'.$coldata.'" target="_new">';
|
||||
$data=$coldata.'</a>';
|
||||
} elseif ($column[0] == "email") {
|
||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
||||
} else {
|
||||
//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.'">';
|
||||
}
|
||||
$data=$coldata."</a>";
|
||||
} else { // But these do not
|
||||
$ref=""; $data=$coldata;
|
||||
}
|
||||
$t->set_var(col_data,$ref.$data);
|
||||
$t->parse("columns","column",True);
|
||||
}
|
||||
while ($column = each($columns_to_display)) { // each entry column
|
||||
$ref=$data="";
|
||||
$coldata = $entries[$i][$column[0]];
|
||||
// Some fields require special formatting.
|
||||
if ($column[0] == "url") {
|
||||
$ref='<a href="'.$coldata.'" target="_new">';
|
||||
$data=$coldata.'</a>';
|
||||
} elseif ($column[0] == "email") {
|
||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"] . "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
||||
} else {
|
||||
//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.'">';
|
||||
}
|
||||
$data=$coldata."</a>";
|
||||
} else { // But these do not
|
||||
$ref=""; $data=$coldata;
|
||||
}
|
||||
$t->set_var(col_data,$ref.$data);
|
||||
$t->parse("columns","column",True);
|
||||
}
|
||||
|
||||
$t->set_var(row_view_link,$phpgw->link("view.php","ab_id=$myid&start=$start&order=$order&filter="
|
||||
. "$filter&query=$query&sort=$sort"));
|
||||
$t->set_var(row_vcard_link,$phpgw->link("vcardout.php","ab_id=$myid&start=$start&order=$order&filter="
|
||||
. "$filter&query=$query&sort=$sort"));
|
||||
$t->set_var(row_edit_link,$phpgw->common->check_owner($myowner,"edit.php",lang("edit"),"ab_id="
|
||||
.$myid."&start=".$start."&sort=".$sort."&order=".$order."&query=".$query."&sort=".$sort));
|
||||
$t->set_var(row_view_link,$phpgw->link("view.php","ab_id=$myid&start=$start&order=$order&filter="
|
||||
. "$filter&query=$query&sort=$sort"));
|
||||
$t->set_var(row_vcard_link,$phpgw->link("vcardout.php","ab_id=$myid&start=$start&order=$order&filter="
|
||||
. "$filter&query=$query&sort=$sort"));
|
||||
$t->set_var(row_edit_link,$phpgw->common->check_owner($myowner,"edit.php",lang("edit"),"ab_id="
|
||||
.$myid."&start=".$start."&sort=".$sort."&order=".$order."&query=".$query."&sort=".$sort));
|
||||
|
||||
$t->parse("rows","row",True);
|
||||
$t->pparse("out","row");
|
||||
reset($columns_to_display); // If we don't reset it, our inside while won't loop
|
||||
}
|
||||
}
|
||||
|
||||
$t->parse("rows","row",True);
|
||||
$t->pparse("out","row");
|
||||
|
||||
reset($columns_to_display); // If we don't reset it, our inside while won't loop
|
||||
}
|
||||
}
|
||||
|
||||
$t->pparse("out","addressbook_footer");
|
||||
$phpgw->common->phpgw_footer();
|
||||
$t->pparse("out","addressbook_footer");
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,30 +1,30 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||
"enable_contact_class" => True,
|
||||
"noheader" => True, "nonavbar" => True);
|
||||
include("../header.inc.php");
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||
"enable_contact_class" => True,
|
||||
"noheader" => True, "nonavbar" => True);
|
||||
include("../header.inc.php");
|
||||
|
||||
if($access == "group")
|
||||
$access = $n_groups;
|
||||
//echo $access . "<BR>";
|
||||
if($access == "group")
|
||||
$access = $n_groups;
|
||||
//echo $access . "<BR>";
|
||||
|
||||
parsevcard($filename,$access);
|
||||
// Delete the temp file.
|
||||
unlink($filename);
|
||||
unlink($filename . ".info");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14"));
|
||||
parsevcard($filename,$access);
|
||||
// Delete the temp file.
|
||||
unlink($filename);
|
||||
unlink($filename . ".info");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14"));
|
||||
?>
|
||||
|
@ -1,101 +1,102 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Address Book *
|
||||
* 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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Address Book *
|
||||
* 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$ */
|
||||
$phpgw_info["flags"] = array("noheader" => True,
|
||||
"nonavbar" => True,
|
||||
"currentapp" => "addressbook",
|
||||
"enable_addressbook_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("noheader" => True,
|
||||
"nonavbar" => True,
|
||||
"currentapp" => "addressbook",
|
||||
"enable_addressbook_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
|
||||
include("../header.inc.php");
|
||||
include("../header.inc.php");
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
if ($submit) {
|
||||
$totalerrors = 0;
|
||||
if (! count($ab_selected)) {
|
||||
$errors[$totalerrors++] = lang("You must select at least 1 column to display");
|
||||
}
|
||||
if (! $totalerrors) {
|
||||
$phpgw->preferences->read_repository();
|
||||
while (list($pref[0]) = each($this->stock_contact_fields)) {
|
||||
if ($ab_selected["$pref[0]"]) {
|
||||
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||
} else {
|
||||
$phpgw->preferences->delete("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||
}
|
||||
}
|
||||
if ($submit) {
|
||||
$totalerrors = 0;
|
||||
if (! count($ab_selected)) {
|
||||
$errors[$totalerrors++] = lang("You must select at least 1 column to display");
|
||||
}
|
||||
if (! $totalerrors) {
|
||||
$phpgw->preferences->read_repository();
|
||||
while (list($pref[0]) = each($this->stock_contact_fields)) {
|
||||
if ($ab_selected["$pref[0]"]) {
|
||||
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||
} else {
|
||||
$phpgw->preferences->delete("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mainscreen_showbirthdays) {
|
||||
$phpgw->preferences->delete("addressbook","mainscreen_showbirthdays");
|
||||
$phpgw->preferences->add("addressbook","mainscreen_showbirthdays");
|
||||
} else {
|
||||
$phpgw->preferences->delete("addressbook","mainscreen_showbirthdays");
|
||||
}
|
||||
if ($mainscreen_showbirthdays) {
|
||||
$phpgw->preferences->delete("addressbook","mainscreen_showbirthdays");
|
||||
$phpgw->preferences->add("addressbook","mainscreen_showbirthdays");
|
||||
} else {
|
||||
$phpgw->preferences->delete("addressbook","mainscreen_showbirthdays");
|
||||
}
|
||||
|
||||
$phpgw->preferences->save_repository(True);
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
||||
}
|
||||
}
|
||||
$phpgw->preferences->save_repository(True);
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
||||
}
|
||||
}
|
||||
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
if ($totalerrors) {
|
||||
echo "<p><center>" . $phpgw->common->error_list($errors) . "</center>";
|
||||
}
|
||||
if ($totalerrors) {
|
||||
echo "<p><center>" . $phpgw->common->error_list($errors) . "</center>";
|
||||
}
|
||||
|
||||
echo "<p><b>" . lang("Addressbook preferences") . ":" . "</b><hr><p>";
|
||||
echo "<p><b>" . lang("Addressbook preferences") . ":" . "</b><hr><p>";
|
||||
?>
|
||||
<form method="POST" action="<?php echo $phpgw->link(); ?>">
|
||||
<table border="0" align="center" cellspacing="1" cellpadding="1">
|
||||
<?php
|
||||
// I need to create a common function to handle displaying multiable columns
|
||||
// I need to create a common function to handle displaying multiable columns
|
||||
|
||||
echo "<tr bgcolor=\"" . $phpgw_info["theme"]["th_bg"] . "\"><td colspan=\"3\"> </td></tr>\n";
|
||||
$i = 0; $j = 0;
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||
while (list($col, $descr) = each($this->stock_contact_fields)) {
|
||||
// echo "<br>test: $col - $i $j - " . count($abc);
|
||||
$i++; $j++;
|
||||
$showcol = display_name($descr);
|
||||
if ($showcol) {
|
||||
echo "\t<td><input type=\"checkbox\" name=\"ab_selected[" . $col . "]\" value=\"True\""
|
||||
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($showcol)
|
||||
. "</option></td>\n";
|
||||
} else {
|
||||
$i--;
|
||||
next;
|
||||
}
|
||||
if ($i == 3) {
|
||||
echo "</tr>\n";
|
||||
$i = 0;
|
||||
}
|
||||
if ($i == 0 && $showcol) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||
}
|
||||
if ($j == count($this->stock_contact_fields)) {
|
||||
if ($i == 1) {
|
||||
echo "\t<td> </td><td> </td>\n";
|
||||
}
|
||||
if ($i == 2) {
|
||||
echo "\t<td> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
echo "<tr bgcolor=\"" . $phpgw_info["theme"]["th_bg"] . "\"><td colspan=\"3\"> </td></tr>\n";
|
||||
$i = 0; $j = 0;
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||
while (list($col, $descr) = each($this->stock_contact_fields)) {
|
||||
// echo "<br>test: $col - $i $j - " . count($abc);
|
||||
$i++; $j++;
|
||||
$showcol = display_name($descr);
|
||||
if ($showcol) {
|
||||
echo "\t<td><input type=\"checkbox\" name=\"ab_selected[" . $col . "]\" value=\"True\""
|
||||
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($showcol)
|
||||
. "</option></td>\n";
|
||||
} else {
|
||||
$i--;
|
||||
next;
|
||||
}
|
||||
if ($i == 3) {
|
||||
echo "</tr>\n";
|
||||
$i = 0;
|
||||
}
|
||||
if ($i == 0 && $showcol) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
echo "<tr bgcolor=\"" . $tr_color . "\">\n";
|
||||
}
|
||||
if ($j == count($this->stock_contact_fields)) {
|
||||
if ($i == 1) {
|
||||
echo "\t<td> </td><td> </td>\n";
|
||||
}
|
||||
if ($i == 2) {
|
||||
echo "\t<td> </td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
?>
|
||||
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||
<td colspan="2"><?php echo lang("show birthday reminders on main screen"); ?></td>
|
||||
@ -109,5 +110,5 @@
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
$phpgw->common->phpgw_footer();
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,74 +1,72 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - E-Mail *
|
||||
* http://www.phpgroupware.org *
|
||||
* This file 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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - E-Mail *
|
||||
* http://www.phpgroupware.org *
|
||||
* This file 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
if ($action == "Load Vcard"){
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||
include("../header.inc.php");
|
||||
}else{
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||
include("../header.inc.php");
|
||||
echo '<body bgcolor="' . $phpgw_info["theme"]["bg_color"] . '">';
|
||||
}
|
||||
if ($action == "Load Vcard"){
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||
include("../header.inc.php");
|
||||
} else {
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook", "enable_addressbook_class" => True);
|
||||
include("../header.inc.php");
|
||||
echo '<body bgcolor="' . $phpgw_info["theme"]["bg_color"] . '">';
|
||||
}
|
||||
|
||||
// Some of the methods where borrowed from
|
||||
// Squirrelmail <Luke Ehresman> http://www.squirrelmail.org
|
||||
// Some of the methods where borrowed from
|
||||
// Squirrelmail <Luke Ehresman> http://www.squirrelmail.org
|
||||
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
|
||||
$uploaddir = $phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"] . $sep;
|
||||
$uploaddir = $phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"] . $sep;
|
||||
|
||||
if ($action == "Load Vcard") {
|
||||
if($uploadedfile == "none" || $uploadedfile == "") {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
||||
"/addressbook/vcardin.php","action=GetFile"));
|
||||
} else {
|
||||
srand((double)microtime()*1000000);
|
||||
$random_number = rand(100000000,999999999);
|
||||
$newfilename = md5("$uploadedfile, $uploadedfile_name, " . $phpgw_info["user"]["sessionid"]
|
||||
. time() . getenv("REMOTE_ADDR") . $random_number );
|
||||
if ($action == "Load Vcard") {
|
||||
if($uploadedfile == "none" || $uploadedfile == "") {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/vcardin.php","action=GetFile"));
|
||||
} else {
|
||||
srand((double)microtime()*1000000);
|
||||
$random_number = rand(100000000,999999999);
|
||||
$newfilename = md5("$uploadedfile, $uploadedfile_name, " . $phpgw_info["user"]["sessionid"]
|
||||
. time() . getenv("REMOTE_ADDR") . $random_number );
|
||||
|
||||
copy($uploadedfile, $uploaddir . $newfilename);
|
||||
$ftp = fopen($uploaddir . $newfilename . ".info","w");
|
||||
fputs($ftp,"$uploadedfile_type\n$uploadedfile_name\n");
|
||||
fclose($ftp);
|
||||
copy($uploadedfile, $uploaddir . $newfilename);
|
||||
$ftp = fopen($uploaddir . $newfilename . ".info","w");
|
||||
fputs($ftp,"$uploadedfile_type\n$uploadedfile_name\n");
|
||||
fclose($ftp);
|
||||
|
||||
// This has to be non-interactive in case of a multi-entry vcard.
|
||||
$filename = $uploaddir . $newfilename;
|
||||
$n_groups = $phpgw->accounts->array_to_string($access,$n_groups);
|
||||
// This has to be non-interactive in case of a multi-entry vcard.
|
||||
$filename = $uploaddir . $newfilename;
|
||||
$n_groups = $phpgw->accounts->array_to_string($access,$n_groups);
|
||||
|
||||
if($access == "group")
|
||||
$access = $n_groups;
|
||||
//echo $access . "<BR>";
|
||||
if($access == "group")
|
||||
$access = $n_groups;
|
||||
//echo $access . "<BR>";
|
||||
|
||||
parsevcard($filename,$access);
|
||||
// Delete the temp file.
|
||||
unlink($filename);
|
||||
unlink($filename . ".info");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14"));
|
||||
}
|
||||
}
|
||||
parsevcard($filename,$access);
|
||||
// Delete the temp file.
|
||||
unlink($filename);
|
||||
unlink($filename . ".info");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14"));
|
||||
}
|
||||
}
|
||||
|
||||
if (! file_exists($phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"]))
|
||||
mkdir($phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"],0700);
|
||||
if (! file_exists($phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"]))
|
||||
mkdir($phpgw_info["server"]["temp_dir"] . $sep . $phpgw_info["user"]["sessionid"],0700);
|
||||
|
||||
if ($action == "GetFile"){
|
||||
echo "<B><CENTER>You must select a vcard. (*.vcf)</B></CENTER><BR><BR>";
|
||||
}
|
||||
if ($action == "GetFile"){
|
||||
echo "<B><CENTER>You must select a vcard. (*.vcf)</B></CENTER><BR><BR>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form ENCTYPE="multipart/form-data" method="POST" action="<?php echo $phpgw->link("vcardin.php")?>">
|
||||
<table border=0>
|
||||
<tr>
|
||||
@ -116,7 +114,6 @@ if ($action == "Load Vcard"){
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if ($action != "Load Vcard")
|
||||
$phpgw->common->phpgw_footer();
|
||||
if ($action != "Load Vcard")
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,152 +1,144 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
if ($nolname || $nofname) {
|
||||
$phpgw_info["flags"] = array("noheader" => False, "nonavbar" => False);
|
||||
} else {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
if ($nolname || $nofname) {
|
||||
$phpgw_info["flags"] = array("noheader" => False, "nonavbar" => False);
|
||||
} else {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||
include("../header.inc.php");
|
||||
|
||||
if (! $ab_id) {
|
||||
Header("Location: " . $phpgw->link("index.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
if (! $ab_id) {
|
||||
Header("Location: " . $phpgw->link("index.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
if ($filter != "private")
|
||||
$filtermethod = " or ab_access='public' " . $phpgw->accounts->sql_search("ab_access");
|
||||
|
||||
$fields = $this->read_single_entry($ab_id,$this->stock_contact_fields);
|
||||
|
||||
$email = $fields[0]["d_email"];
|
||||
$fullname = $fields[0]["fn"];
|
||||
$prefix = $fields[0]["n_prefix"];
|
||||
$firstname = $fields[0]["n_given"];
|
||||
$middle = $fields[0]["n_middle"];
|
||||
$lastname = $fields[0]["n_family"];
|
||||
$suffix = $fields[0]["n_suffix"];
|
||||
$title = $fields[0]["title"];
|
||||
$hphone = $fields[0]["a_tel"];
|
||||
$wphone = $fields[0]["b_tel"];
|
||||
$fax = $fields[0]["c_tel"];
|
||||
$pager = $fields[0]["pager"];
|
||||
$mphone = $fields[0]["mphone"];
|
||||
$ophone = $fields[0]["ophone"];
|
||||
$street = $fields[0]["adr_street"];
|
||||
$address2 = $fields[0]["address2"];
|
||||
$city = $fields[0]["adr_locality"];
|
||||
$state = $fields[0]["adr_region"];
|
||||
$zip = $fields[0]["adr_postalcode"];
|
||||
$country = $fields[0]["adr_countryname"];
|
||||
$company = $fields[0]["org_name"];
|
||||
$dept = $fields[0]["org_unit"];
|
||||
$bday = $fields[0]["bday"];
|
||||
$notes = $fields[0]["notes"];
|
||||
$access = $fields[0]["access"];
|
||||
$url = $fields[0]["url"];
|
||||
|
||||
if(!$nolname && !$nofname) {
|
||||
/* First name and last must be in the vcard. */
|
||||
if($lastname == "") {
|
||||
/* 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"));
|
||||
}
|
||||
if($firstname == "" ) {
|
||||
Header("Location: " . $phpgw->link("vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
||||
}
|
||||
|
||||
if ($filter != "private")
|
||||
$filtermethod = " or ab_access='public' " . $phpgw->accounts->sql_search("ab_access");
|
||||
|
||||
$fields = $this->read_single_entry($ab_id,$this->stock_contact_fields);
|
||||
header("Content-type: text/X-VCARD");
|
||||
$fn = explode("@",$email);
|
||||
$filename = sprintf("%s.vcf", $fn[0]);
|
||||
|
||||
$email = $fields[0]["d_email"];
|
||||
$fullname = $fields[0]["fn"];
|
||||
$prefix = $fields[0]["n_prefix"];
|
||||
$firstname = $fields[0]["n_given"];
|
||||
$middle = $fields[0]["n_middle"];
|
||||
$lastname = $fields[0]["n_family"];
|
||||
$suffix = $fields[0]["n_suffix"];
|
||||
$title = $fields[0]["title"];
|
||||
$hphone = $fields[0]["a_tel"];
|
||||
$wphone = $fields[0]["b_tel"];
|
||||
$fax = $fields[0]["c_tel"];
|
||||
$pager = $fields[0]["pager"];
|
||||
$mphone = $fields[0]["mphone"];
|
||||
$ophone = $fields[0]["ophone"];
|
||||
$street = $fields[0]["adr_street"];
|
||||
$address2 = $fields[0]["address2"];
|
||||
$city = $fields[0]["adr_locality"];
|
||||
$state = $fields[0]["adr_region"];
|
||||
$zip = $fields[0]["adr_postalcode"];
|
||||
$country = $fields[0]["adr_countryname"];
|
||||
$company = $fields[0]["org_name"];
|
||||
$dept = $fields[0]["org_unit"];
|
||||
$bday = $fields[0]["bday"];
|
||||
$notes = $fields[0]["notes"];
|
||||
$access = $fields[0]["access"];
|
||||
$url = $fields[0]["url"];
|
||||
header("Content-Disposition: attachment; filename=$filename");
|
||||
|
||||
printf("BEGIN:VCARD\r\n");
|
||||
printf("N:%s;%s\r\n", $lastname, $firstname);
|
||||
if (!$fullname) { printf("FN:%s %s\r\n", $firstname, $lastname); }
|
||||
else { printf("FN:%s\r\n", $fullname); }
|
||||
|
||||
if(!$nolname && !$nofname)
|
||||
{
|
||||
/* First name and last must be in the vcard. */
|
||||
if($lastname == "")
|
||||
{
|
||||
/* 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"));
|
||||
}
|
||||
if($firstname == "" )
|
||||
{
|
||||
Header("Location: " . $phpgw->link("vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort"));
|
||||
}
|
||||
/* This stuff is optional. */
|
||||
if($title != "") /* Title */
|
||||
printf("TITLE:%s\r\n",$title);
|
||||
if($email != "") /* E-mail */
|
||||
printf("EMAIL;INTERNET:%s\r\n", $email);
|
||||
if($hphone != "") /* Home Phone */
|
||||
printf("TEL;HOME:%s\r\n", $hphone);
|
||||
if($wphone != "") /* Work Phone */
|
||||
printf("TEL;WORK:%s\r\n", $wphone);
|
||||
if($mphone != "") /* Mobile Phone */
|
||||
printf("TEL;CELL:%s\r\n", $mphone);
|
||||
if($fax != "") /* Fax Number */
|
||||
printf("TEL;FAX:%s\r\n", $fax);
|
||||
if($pager != "") /* Pager Number */
|
||||
printf("TEL;PAGER:%s\r\n", $pager);
|
||||
//if($ophone != "") /* Other Phone */
|
||||
//$NOTES .= "Other Phone: " . $ophone;
|
||||
/* The address one is pretty icky. Send it if ANY of the fields are present. */
|
||||
if($address2 != "" || /* Street Line 1 */
|
||||
$street != "" || /* Street Line 2 */
|
||||
$city != "" || /* City */
|
||||
$state != "" || /* State */
|
||||
$zip != "") /* Zip */
|
||||
printf("ADR:;%s;%s;%s;%s;%s;%s\r\n", $address2,
|
||||
$street,$city,$state,$zip,$country);
|
||||
|
||||
header("Content-type: text/X-VCARD");
|
||||
$fn = explode("@",$email);
|
||||
$filename = sprintf("%s.vcf", $fn[0]);
|
||||
if($bday != "" && $bday != "//") /* Birthday */
|
||||
printf("BDAY:%s\r\n", $bday); /* This is not the right format. */
|
||||
if($company != "") /* Company Name (Really isn't company_name?) */
|
||||
printf("ORG:%s %s\r\n", $company, $dept);
|
||||
if($notes != "") /* Notes */
|
||||
$NOTES .= $notes;
|
||||
|
||||
if($NOTES != "") /* All of the notes. */
|
||||
printf("NOTE:%s\r\n", $NOTES);
|
||||
/* End of Stuff. */
|
||||
printf("VERSION:2.1\r\n");
|
||||
printf("END:VCARD\r\n");
|
||||
} /* !nolname && !nofname */
|
||||
|
||||
header("Content-Disposition: attachment; filename=$filename");
|
||||
if($nofname) {
|
||||
echo "<BR><BR><CENTER>";
|
||||
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 "<a href=" . $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort") . ">OK</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
||||
printf("BEGIN:VCARD\r\n");
|
||||
printf("N:%s;%s\r\n", $lastname, $firstname);
|
||||
if (!$fullname) { printf("FN:%s %s\r\n", $firstname, $lastname); }
|
||||
else { printf("FN:%s\r\n", $fullname); }
|
||||
if($nolname) {
|
||||
echo "<BR><BR><CENTER>";
|
||||
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 "<a href=" . $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort") . ">OK</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
||||
/* This stuff is optional. */
|
||||
if($title != "") /* Title */
|
||||
printf("TITLE:%s\r\n",$title);
|
||||
if($email != "") /* E-mail */
|
||||
printf("EMAIL;INTERNET:%s\r\n", $email);
|
||||
if($hphone != "") /* Home Phone */
|
||||
printf("TEL;HOME:%s\r\n", $hphone);
|
||||
if($wphone != "") /* Work Phone */
|
||||
printf("TEL;WORK:%s\r\n", $wphone);
|
||||
if($mphone != "") /* Mobile Phone */
|
||||
printf("TEL;CELL:%s\r\n", $mphone);
|
||||
if($fax != "") /* Fax Number */
|
||||
printf("TEL;FAX:%s\r\n", $fax);
|
||||
if($pager != "") /* Pager Number */
|
||||
printf("TEL;PAGER:%s\r\n", $pager);
|
||||
//if($ophone != "") /* Other Phone */
|
||||
//$NOTES .= "Other Phone: " . $ophone;
|
||||
/* The address one is pretty icky. Send it if ANY of the fields are present. */
|
||||
if($address2 != "" || /* Street Line 1 */
|
||||
$street != "" || /* Street Line 2 */
|
||||
$city != "" || /* City */
|
||||
$state != "" || /* State */
|
||||
$zip != "") /* Zip */
|
||||
printf("ADR:;%s;%s;%s;%s;%s;%s\r\n", $address2,
|
||||
$street,$city,$state,$zip,$country
|
||||
);
|
||||
|
||||
if($bday != "" && $bday != "//") /* Birthday */
|
||||
printf("BDAY:%s\r\n", $bday); /* This is not the right format. */
|
||||
if($company != "") /* Company Name (Really isn't company_name?) */
|
||||
printf("ORG:%s %s\r\n", $company, $dept);
|
||||
if($notes != "") /* Notes */
|
||||
$NOTES .= $notes;
|
||||
|
||||
if($NOTES != "") /* All of the notes. */
|
||||
printf("NOTE:%s\r\n", $NOTES);
|
||||
/* End of Stuff. */
|
||||
printf("VERSION:2.1\r\n");
|
||||
printf("END:VCARD\r\n");
|
||||
} /* !nolname && !nofname */
|
||||
|
||||
if($nofname)
|
||||
{
|
||||
echo "<BR><BR><CENTER>";
|
||||
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 "<a href=" . $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort") . ">OK</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
||||
if($nolname)
|
||||
{
|
||||
echo "<BR><BR><CENTER>";
|
||||
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 "<a href=" . $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort") . ">OK</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
||||
if($nolname || $nofname)
|
||||
$phpgw->common->phpgw_footer();
|
||||
|
||||
/* End of php. */
|
||||
if($nolname || $nofname)
|
||||
$phpgw->common->phpgw_footer();
|
||||
/* End of php. */
|
||||
?>
|
||||
|
@ -1,116 +1,120 @@
|
||||
<?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. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* 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$ */
|
||||
/* $Id$ */
|
||||
|
||||
if ($submit || ! $ab_id) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
if ($submit || ! $ab_id) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||
"enable_contacts_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
$phpgw_info["flags"] = array("currentapp" => "addressbook",
|
||||
"enable_contacts_class" => True,
|
||||
"enable_nextmatchs_class" => True);
|
||||
|
||||
include("../header.inc.php");
|
||||
include("../header.inc.php");
|
||||
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "view" => "view.tpl"));
|
||||
#$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
|
||||
$t->set_file(array( "view" => "view.tpl"));
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
|
||||
if (! $ab_id) {
|
||||
Header("Location: " . $phpgw->link("index.php"));
|
||||
}
|
||||
|
||||
$this = CreateObject("phpgwapi.contacts");
|
||||
while ($column = each($this->stock_contact_fields)) {
|
||||
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) &&
|
||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) {
|
||||
$columns_to_display[$column[0]] = True;
|
||||
$colname[$column[0]] = $column[1];
|
||||
}
|
||||
}
|
||||
// merge in extra fields
|
||||
$extrafields = array ("pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes",
|
||||
"access" => "access");
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
$fields = $this->read_single_entry($ab_id,$qfields);
|
||||
|
||||
$owner = $fields[0]["owner"];
|
||||
$access = $fields[0]["access"];
|
||||
|
||||
$view_header = "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
||||
$view_header .= '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
||||
|
||||
while ($column = each($columns_to_display)) { // each entry column
|
||||
$columns_html .= "<tr><td><b>" . lang(display_name($colname[$column[0]])) . "</b>:</td>";
|
||||
$ref=$data="";
|
||||
$coldata = $fields[0][$column[0]];
|
||||
// Some fields require special formatting.
|
||||
if ($column[0] == "url") {
|
||||
$ref='<a href="'.$coldata.'" target="_new">';
|
||||
$data=$coldata.'</a>';
|
||||
} elseif ($column[0] == "email") {
|
||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
||||
} else {
|
||||
$ref='<a href="mailto:'.$coldata.'">';
|
||||
}
|
||||
$data=$coldata."</a>";
|
||||
} else { // But these do not
|
||||
$ref=""; $data=$coldata;
|
||||
}
|
||||
$columns_html .= "<td>" . $ref . $data . "</td>";
|
||||
}
|
||||
|
||||
if (! $ab_id) {
|
||||
Header("Location: " . $phpgw->link("index.php"));
|
||||
}
|
||||
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 ="";
|
||||
}
|
||||
|
||||
while ($column = each($this->stock_contact_fields)) {
|
||||
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) &&
|
||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) {
|
||||
$columns_to_display[$column[0]] = True;
|
||||
$colname[$column[0]] = $column[1];
|
||||
}
|
||||
}
|
||||
// merge in what are now extra fields
|
||||
$extrafields = array ("pager" => "pager",
|
||||
"mphone" => "mphone",
|
||||
"ophone" => "ophone",
|
||||
"address2" => "address2",
|
||||
"bday" => "bday",
|
||||
"url" => "url",
|
||||
"notes" => "notes");
|
||||
$qfields = $this->stock_contact_fields + $extrafields;
|
||||
$fields = $this->read_single_entry($ab_id,$qfields);
|
||||
|
||||
//$access = $fields[0]["access"];
|
||||
$owner = $fields[0]["owner"];
|
||||
|
||||
$view_header = "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
||||
$view_header .= '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
||||
|
||||
while ($column = each($columns_to_display)) { // each entry column
|
||||
$columns_html .= "<tr><td><b>" . lang(display_name($colname[$column[0]])) . "</b>:</td>";
|
||||
$ref=$data="";
|
||||
$coldata = $fields[0][$column[0]];
|
||||
// Some fields require special formatting.
|
||||
if ($column[0] == "url") {
|
||||
$ref='<a href="'.$coldata.'" target="_new">';
|
||||
$data=$coldata.'</a>';
|
||||
} elseif ($column[0] == "email") {
|
||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||
$ref='<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/email/compose.php","to=" . urlencode($coldata)).'" target="_new">';
|
||||
} else {
|
||||
$ref='<a href="mailto:'.$coldata.'">';
|
||||
}
|
||||
$data=$coldata."</a>";
|
||||
} else { // But these do not
|
||||
$ref=""; $data=$coldata;
|
||||
}
|
||||
$columns_html .= "<td>" . $ref . $data . "</td>";
|
||||
}
|
||||
|
||||
$columns_html .= '<tr><td colspan="4"> </td></tr>'
|
||||
. '<tr><td><b>' . lang("Record owner") . '</b></td><td>'
|
||||
. $phpgw->common->grab_owner_name($owner) . '</td><td><b>'
|
||||
. lang("Record Access") . '</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);
|
||||
$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").'">';
|
||||
|
||||
$t->set_var("ab_id",$ab_id);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("view_header",$view_header);
|
||||
$t->set_var("cols",$columns_html);
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_done",lang("done"));
|
||||
$t->set_var("lang_edit",lang("edit"));
|
||||
$t->set_var("lang_submit",lang("submit"));
|
||||
$t->set_var("lang_vcard",lang("vcard"));
|
||||
$t->set_var("done_link",$donelink);
|
||||
$t->set_var("edit_link",$editlink);
|
||||
$t->set_var("vcard_link",$vcardlink);
|
||||
|
||||
$t->parse("out","view");
|
||||
$t->pparse("out","view");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$columns_html .= '<tr><td colspan="4"> </td></tr>'
|
||||
. '<tr><td><b>' . lang("Record owner") . '</b></td><td>'
|
||||
. $phpgw->common->grab_owner_name($owner) . '</td><td><b>'
|
||||
. $access_link . '</b></td><td></table>';
|
||||
|
||||
$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").'">';
|
||||
$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("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("view_header",$view_header);
|
||||
$t->set_var("cols",$columns_html);
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_done",lang("done"));
|
||||
$t->set_var("lang_edit",lang("edit"));
|
||||
$t->set_var("lang_submit",lang("submit"));
|
||||
$t->set_var("lang_vcard",lang("vcard"));
|
||||
$t->set_var("done_link",$donelink);
|
||||
$t->set_var("edit_link",$editlink);
|
||||
$t->set_var("vcard_link",$vcardlink);
|
||||
|
||||
$t->parse("out","view");
|
||||
$t->pparse("out","view");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user