本文整理匯總了PHP中CustomFields::getCustomFieldByModule方法的典型用法代碼示例。如果您正苦於以下問題:PHP CustomFields::getCustomFieldByModule方法的具體用法?PHP CustomFields::getCustomFieldByModule怎麽用?PHP CustomFields::getCustomFieldByModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CustomFields
的用法示例。
在下文中一共展示了CustomFields::getCustomFieldByModule方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sprintf
$text .= sprintf("\"%s\",,,,,,,,\"\",\"0/0/00\",", '' . $contact['contact_mobile']);
// Fields 51- 60
if ($contact['contact_type'] != '') {
$categories = "web2Project; " . $contact['contact_type'];
} else {
$categories = "web2Project;";
}
$text .= sprintf(",,\"%s\",\"%s\",,,\"%s\",\"%s\",\"%s\",,", $contact['contact_birthday'], $categories, $contact['contact_email'], "SMTP", $contact['contact_first_name'] . " " . $contact['contact_last_name']);
// Fields 61- 70
$text .= sprintf(",,,,,\"Unspecified\",,,,,");
// Fields 71- 80
$notes = mb_str_replace("\"", "\"\"", $contact['contact_notes']);
$text .= sprintf("\"\",\"\",\"\",,,\"%s\",,,,\"Normal\",", $notes);
// Fields 81- 90
$text .= sprintf("\"False\",,,\"Normal\",,,,,,,");
$custom_fields = CustomFields::getCustomFieldByModule($AppUI, 'contacts', $contact['contact_id']);
if (count($custom_fields) > 0) {
foreach ($custom_fields as $f) {
if ($f['value_intvalue']) {
$text .= sprintf("%s", $f['list_value'] . ",");
} else {
$text .= sprintf("%s", "\"" . mb_str_replace("\r\n", " ", $f['value_charvalue']) . "\",");
}
}
}
$text .= sprintf("%s\r\n", '');
}
//send http-output in csv format
// BEGIN extra headers to resolve IE caching bug (JRP 9 Feb 2003)
// [http://bugs.php.net/bug.php?id=16173]
header('Pragma: ');