當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。