本文整理汇总了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: ');