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


PHP utils::recursiveCall方法代码示例

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


在下文中一共展示了utils::recursiveCall方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logValidationErrors

 public function logValidationErrors($send, $errors)
 {
     $error = utils::captureString($errors);
     $sql = "INSERT INTO log_validation_errors (destinations, error, datetime, ip) VALUES ('{$send['destinations']}', '{$error}', NOW() ,INET_ATON('{$this->ip}') ) \n";
     mysql::i()->query($sql);
     $send['destinations'] = utils::formatPhoneNumber($send['originator']);
     $send['body'] = 'There was an error. Please check and try again or call ' . config::get('lost_bag_number');
     utils::recursiveCall('sendSMS', $send, 1);
 }
开发者ID:Git-Host,项目名称:sms,代码行数:9,代码来源:log_database.class.php

示例2: api

 public function api()
 {
     //unfinished
     echo $sql = "SELECT clientMessageReference FROM log_outbound_sms WHERE received=false AND status='LIVE'  \n";
     //and clientMessageReference = 191
     $q = mysql::i()->query($sql);
     while ($r = mysql::i()->fetch_array($q)) {
         $class = utils::recursiveCall('getSMSStatus', $r, 1);
         //$class->
         sleep(1);
         //unset($class);
     }
 }
开发者ID:Git-Host,项目名称:sms,代码行数:13,代码来源:smsstatus.class.php

示例3: define

define("SITE", "");
include_once 'init.inc.php';
$lock = 'nolock';
config::set('process_name', "Text Anywhere - TEST Send SMS");
include_once 'start.inc.php';
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
try {
    $vars['clientMessageReference'] = '999';
    // create new reference using primary key from database
    $vars['destinations'] = '';
    $vars['body'] = 'This is a test message';
    utils::recursiveCall('sendSMS', $vars, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.inc.php';
开发者ID:Git-Host,项目名称:sms,代码行数:31,代码来源:testsendsms.php

示例4: chdir

chdir('../');
include_once 'init.inc.php';
config::set('process_name', "Text Anywhere - Test Service");
include_once 'start.inc.php';
//config::set('script_folder',SITE);
//set_include_path(SET_INCLUDE_PATH.PATH.'api'.PATH.'api'.DIR.'textanywhere'.PATH);
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
//include('start.php');
try {
    $vars['returnCSVString'] = false;
    echo getcwd();
    utils::recursiveCall('testService', $vars, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    $status->status(CRITICAL);
}
include 'end.inc.php';
开发者ID:Git-Host,项目名称:sms,代码行数:31,代码来源:testservice.php

示例5: chdir

<?php

chdir('C:/xampp/htdocs/');
include_once 'init.php';
config::set('process_name', "Text Anywhere - Get Premium SMS Inbound");
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
include 'start.php';
try {
    $vars['returnCSVString'] = false;
    $vars['shortcode'] = '555';
    $vars['keyword'] = 'SOME KEYWORD';
    utils::recursiveCall('getPremiumSMSInbound', $vars, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.php';
开发者ID:Git-Host,项目名称:sms,代码行数:31,代码来源:getpremiumsmsinbound.php

示例6: chdir

chdir('../');
include_once 'init.inc.php';
config::set('process_name', "Text Anywhere - Send Premium SMS");
include_once 'start.inc.php';
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
try {
    $log = new log_database();
    $send['rbid'] = '879762236';
    $send['body'] = 'This is a test message';
    $send['clientMessageReference'] = $log->logOutboundSMS($send);
    utils::recursiveCall('sendPremiumSMS', $send, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.inc.php';
开发者ID:Git-Host,项目名称:sms,代码行数:30,代码来源:sendpremiumsms.php

示例7: chdir

<?php

chdir('C:/xampp/htdocs/tag/');
include_once 'init.php';
config::set('process_name', "Text Anywhere - Get SMS Status");
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
include 'start.php';
try {
    $vars['returnCSVString'] = false;
    $vars['clientMessageReference'] = '1';
    // create new reference using primary key from database
    utils::recursiveCall('getSMSStatus', $vars, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.php';
开发者ID:Git-Host,项目名称:sms,代码行数:31,代码来源:getsmsstatus.old.php

示例8: chdir

<?php

chdir('C:/xampp/htdocs/');
include_once 'init.php';
config::set('process_name', "Text Anywhere - Get Credits Left");
if ($_GET['argv1']) {
    $arg = $_GET['argv1'];
} else {
    $arg = $argv[1];
}
switch ($arg) {
    case "test":
        $live = false;
        break;
    case "live":
        $live = true;
        break;
    default:
        $live = false;
}
include 'start.php';
try {
    $vars['returnCSVString'] = false;
    utils::recursiveCall('getCreditsLeft', $vars, 1, $live);
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.php';
开发者ID:Git-Host,项目名称:sms,代码行数:29,代码来源:getcreditsleft.php

示例9: sendSMStoCustomer

 private function sendSMStoCustomer($row, $message, $expirydate = '')
 {
     $tag_type = strtolower(trim($row['tag_type']));
     debug::output("SMS: {$row['telephone']}, {$row['tag_type']}");
     //$clientMessageReference = $thos->log->logSMS('sendSMS', $telephone);
     $send['destinations'] = utils::formatPhoneNumber($row['telephone']);
     switch ($message) {
         case "INACTIVE":
             switch ($tag_type) {
                 case "paper":
                     $send['body'] = "Tag {$row['tag_no']} has expired. Text PIN RENEW {$row['tag_no']} to renew for 3 months, or text PIN CANCEL {$row['tag_no']}. Text cost £1.50";
                     break;
                 case "plastic":
                     $send['body'] = "Tag {$row['tag_no']} has expired. Text PIN RENEW {$row['tag_no']} to renew for 12 months, or text PIN CANCEL {$row['tag_no']}. Text cost £3.00";
                     //$send['body'] = 'Text YES to renew for 12 months, text cost £tbc, text NO to cancel';
                     break;
                 default:
             }
             break;
         case "DURATION":
             switch ($tag_type) {
                 case "paper":
                     $send['body'] = "Tag {$row['tag_no']} will expire on {$expirydate}. Text PIN RENEW {$row['tag_no']} to renew for 3 months, or text PIN CANCEL {$row['tag_no']}. Text cost £1.50";
                     //$send['body'] = 'Text YES to renew for 3 months, text cost £1.50, text NO to cancel';
                     break;
                 case "plastic":
                     $send['body'] = "Tag {$row['tag_no']} will expire on {$expirydate}. Text PIN RENEW {$row['tag_no']} to renew for 12 months, or text PIN CANCEL {$row['tag_no']}. Text cost £3.00";
                     //$send['body'] = 'Text YES to renew for 12 months, text cost £tbc, text NO to cancel';
                     break;
                 default:
             }
             break;
         default:
     }
     utils::recursiveCall('sendSMS', $send, 1, $live);
 }
开发者ID:Git-Host,项目名称:sms,代码行数:36,代码来源:tagExpiryReminder.class.php

示例10: sendSMS

 protected function sendSMS($debug = '')
 {
     utils::recursiveCall('sendSMS', $this->send, 1, $debug);
     sleep(1);
 }
开发者ID:Git-Host,项目名称:sms,代码行数:5,代码来源:sms.class.php

示例11: checkTagValidityDatabase

 public function checkTagValidityDatabase($tags, $phone_number, $live)
 {
     foreach ($this->valid_tags as $tag) {
         $tag_no = utils::extractTagNo($tag);
         echo $sql = "SELECT * FROM group_tags WHERE tag = '{$tag_no}' \n";
         $q = mysql::i()->query($sql);
         $r = mysql::i()->fetch_array($q);
         if (empty($r)) {
             unset($this->valid_tags[$tag]);
             $this->invalid_tags[$tag] = $tag;
             $send['destinations'] = $phone_number;
             echo $send['body'] = 'Tag ' . $tag . ' is not recognised by our system please. Please check and try again or call ' . config::get('lost_bag_number');
             utils::recursiveCall('sendSMS', $send, 1, $live);
             $valid = false;
         }
         if ($r['action'] == 'USED') {
             unset($this->valid_tags[$tag]);
             $this->invalid_tags[$tag] = $tag;
             $send['destinations'] = $phone_number;
             echo $send['body'] = 'Tag ' . $tag . ' is already in use. Please check and try again or call ' . config::get('lost_bag_number');
             utils::recursiveCall('sendSMS', $send, 1, $live);
             $valid = false;
         }
         $type = $r['tag_type'];
         if ($type == 'paper') {
             $cost += '1.50';
         } else {
             $cost = 0;
         }
         $this->valid_tags[$tag] = $r;
         $this->valid_tags[$tag]['cost'] = $cost;
         //$this->tagData[$tag]['type'] = $type;
         //$this->tagData[$tag]['authorised'] = 1;
         unset($cost);
     }
     //foreach
     //$this->tagData['cost'] = $cost;
     return $valid;
 }
开发者ID:Git-Host,项目名称:sms,代码行数:39,代码来源:tag.class.php

示例12: chdir

<?php

chdir('../');
include_once 'init.inc.php';
$lock = 'nolock';
config::set('process_name', "Inbox - Register Email Address Reminder");
include_once 'start.inc.php';
try {
    $sql = "SELECT * FROM customer WHERE email='' AND approved=1 AND telephone<>'' AND username<>'' \n";
    $q = mysql::i()->query($sql);
    while ($r = mysql::i()->fetch_array($q)) {
        $send['destinations'] = utils::formatPhoneNumber($r['telephone']);
        $send['body'] = "Account {$r['username']} does not have a valid email address to recieve lost bag reports. Please log on to example.com to update your details. Text PIN STOP to cancel";
        utils::recursiveCall('sendSMS', $send, 1);
    }
} catch (emailException $e) {
    debug::output($e->getMessage());
} catch (Exception $e) {
    debug::output($e->getMessage());
    //$status->status(CRITICAL);
}
include 'end.inc.php';
开发者ID:Git-Host,项目名称:sms,代码行数:22,代码来源:registerEmailReminder.php

示例13: 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 &pound;' . $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


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