本文整理汇总了PHP中Invitation::loadEmails方法的典型用法代码示例。如果您正苦于以下问题:PHP Invitation::loadEmails方法的具体用法?PHP Invitation::loadEmails怎么用?PHP Invitation::loadEmails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invitation
的用法示例。
在下文中一共展示了Invitation::loadEmails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strcmp
$withCode = 0 == strcmp(PARAM_WITHCODE, swwat_parse_string(html_entity_decode($_POST[PARAM_WITHCODE])));
$uniqueCode = 0 == strcmp(PARAM_UNIQUE, swwat_parse_string(html_entity_decode($_POST[PARAM_UNIQUE])));
$errorMessage = "";
// invite or upload file button?
$invite = isset($_POST[PARAM_SAVE]);
$upload = isset($_POST[PARAM_UPLOAD]);
//
// todo should be _enum(, get if we ever have anything other than 5degrees
// $uploadFileType = swwat_parse_string(html_entity_decode($_POST[PARAM_UPLOADFILETYPE]));
if ($invite) {
// get emails typed in
$emails = swwat_parse_string(html_entity_decode($_POST[PARAM_EMAIL]));
$emails = preg_replace('/\\s+/', ':', $emails);
logMessage("message", $emails);
// parse via whitespace
$invitationArray = Invitation::loadEmails($emails);
$existingWorkers = Worker::selectExpo($expo->expoid);
$checkWorkers = array();
foreach ($existingWorkers as $worker) {
$checkWorkers[] = $worker->workerid;
}
$existingWorkers = NULL;
$workerArray = array();
$unknownArray = array();
$index = 0;
foreach ($invitationArray as $invitation) {
$index += 1;
try {
if (!empty($invitation->email)) {
$worker = Worker::selectUsername($invitation->email);
if (!is_null($worker)) {