Add array and function to normalize column display names

This commit is contained in:
Miles Lott 2001-02-04 03:55:35 +00:00
parent 469b60f4bf
commit 6075633a25

View File

@ -15,25 +15,65 @@
// NOTE: This entire file needs to be rewritten. There is a great deal of code not being used // 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) // anymore. This should also be converted to templates while where at it (jengo)
/* $abc = array('company' => 'company', // AddressBook Columns and their descriptions $abc = array("FN" => "full name", //'firstname lastname'
'firstname' => 'first name', "SOUND" => "",
'lastname' => 'last name', "ORG_Name" => "company", //company
'email' => 'email', "ORG_Unit" => "department", //division
'wphone' => 'work phone', "TITLE" => "title",
'hphone' => 'home phone', "N_Given" => "first name", //firstname
'fax' => 'fax', "N_Family" => "last name", //lastname
'pager' => 'pager', "N_Middle" => "middle",
'title' => 'title', "N_Prefix" => "prefix",
'mphone' => 'mobile phone', "N_Suffix" => "suffix",
'ophone' => 'other phone', "LABEL" => "label",
'street' => 'street', "ADR_Street" => "street",
'city' => 'city', "ADR_Locality" => "city", //city
'state' => 'state', "ADR_Region" => "state", //state
'zip' => 'zip code', "ADR_PostalCode" => "zip", //zip
'bday' => 'birthday', "ADR_CountryName" => "country",
'url' => 'URL' "ADR_Work" => "", //yn
); "ADR_Home" => "", //yn
*/ "ADR_Parcel" => "", //yn
"ADR_Postal" => "", //yn
"TZ" => "timezone",
"GEO" => "",
"A_TEL" => "home phone",
"A_TEL_Work" => "", //yn
"A_TEL_Home" => "", //yn
"A_TEL_Voice" => "", //yn
"A_TEL_Msg" => "", //yn
"A_TEL_Fax" => "", //yn
"A_TEL_Prefer" => "", //yn
"B_TEL" => "work phone",
"B_TEL_Work" => "", //yn
"B_TEL_Home" => "", //yn
"B_TEL_Voice" => "", //yn
"B_TEL_Msg" => "", //yn
"B_TEL_Fax" => "", //yn
"B_TEL_Prefer" => "", //yn
"C_TEL" => "fax",
"C_TEL_Work" => "", //yn
"C_TEL_Home" => "", //yn
"C_TEL_Voice" => "", //yn
"C_TEL_Msg" => "", //yn
"C_TEL_Fax" => "", //yn
"C_TEL_Prefer" => "", //yn
"D_EMAIL" => "email",
"D_EMAILTYPE" => "email type", //'INTERNET','CompuServe',etc...
"D_EMAIL_Work" => "", //yn
"D_EMAIL_Home" => "", //yn
"bday" => "birthday",
"url" => "URL",
"access" => "access"
);
function display_name($column) {
global $abc;
while($name = each($abc) ) {
if ($column == $name[0]) { return $name[1]; }
}
}
function form($format,$action,$title,$fields) { // used for add/edit function form($format,$action,$title,$fields) { // used for add/edit
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;