当前位置: 首页>>代码示例>>PHP>>正文


PHP tag::checkTagValidityDatabase方法代码示例

本文整理汇总了PHP中tag::checkTagValidityDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP tag::checkTagValidityDatabase方法的具体用法?PHP tag::checkTagValidityDatabase怎么用?PHP tag::checkTagValidityDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tag的用法示例。


在下文中一共展示了tag::checkTagValidityDatabase方法的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']);
 }
开发者ID:Git-Host,项目名称:sms,代码行数:66,代码来源:smsRegister.class.php


注:本文中的tag::checkTagValidityDatabase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。