本文整理汇总了PHP中tag::checkTagValidityBasic方法的典型用法代码示例。如果您正苦于以下问题:PHP tag::checkTagValidityBasic方法的具体用法?PHP tag::checkTagValidityBasic怎么用?PHP tag::checkTagValidityBasic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tag
的用法示例。
在下文中一共展示了tag::checkTagValidityBasic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: old
public function old()
{
$originator = $cleanData['originator'];
$destination = $cleanData['destination'];
$clientmessagereference = $cleanData['clientmessagereference'];
$date = $cleanData['date'];
$time = $cleanData['time'];
$body = $cleanData['body'];
$rbid = $cleanData['rbid'];
$log = new log_database();
$log->logTagActivation($cleanData);
$send['returnCSVString'] = false;
$send['clientBillingReference'] = '0';
$send['clientMessageReference'] = '1';
// create new reference using primary key from database
$send['originator'] = ORIGINATOR;
$send['destinations'] = '';
$send['validity'] = '1';
$send['characterSetID'] = 2;
$send['replyMethodID'] = 2;
$send['replyData'] = config::get('ta_replyemail');
$send['StatusNotificationUrl'] = '';
if (stristr($body, ORIGINATOR)) {
$body = trim(str_ireplace(ORIGINATOR, '', $body));
$tags = explode(',', $body);
//check PIN ID valid against expected format
$validity = parent::checkTagValidityBasic($tags);
if ($validity == false) {
$send['body'] = 'One or more tags are not being recognised by our system please check and try again.';
utils::recursiveCall('sendSMS', $send, 1, $live);
$valid = false;
} else {
//check PIN ID valid against database
$tagData = parent::checkTagValidityDatabase($tags);
if ($tagData == false) {
$send['body'] = 'There seems to be a problem please call XXXXXXX';
utils::recursiveCall('sendSMS', $send, 1, $live);
$valid = false;
} else {
$cost = $tagData['cost'];
$send['body'] = 'Tags are valid and ready to be activated, text YES to proceed or STOP to cancel, text cost £' . $cost . ' for 3 month membership for paper tags. Plastic tags attract a years membership for FREE';
utils::recursiveCall('sendSMS', $send, 1, $live);
$valid = true;
}
//else pins valid
}
//pins ok
} elseif (stristr($body, 'YES')) {
//creat user account using existing function
$username = '';
$password = '';
$send['body'] = 'Your account has been successfully created, please log in using username ' . $username . ' and password ' . $password . ' to enter your email address.';
utils::recursiveCall('sendSMS', $send, 1, $live);
$valid = true;
} elseif (stristr($body, 'STOP')) {
//opt out
//add recipient to suppression list. Use this list to ensure recipient is not contacted accidentily
echo "add recipient to suppression list. Use this list to ensure recipient is not contacted accidentily";
$valid = true;
} else {
//not a valid response. log details
echo "not a valid response. log details";
$valid = false;
}
debug::output($send['body']);
}