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


PHP sms::sendsms方法代码示例

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


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

示例1: date

     if ($val + 1 >= 10 and $val + 1 < 100) {
         $dopol = '0';
     } else {
         $dopol = '';
     }
 }
 $uid = date('ymd') . $dopol . $val + 1;
 $sms = new sms();
 $sms->setLogin('lyufari');
 $sms->setPass('zayaccool');
 $text_sms_manger = 'Бронь ';
 $text_sms_manger .= $_POST['roomtype'] == "delux" ? '"номер де люкс" ' : '"номер апартаменты" ';
 $text_sms_manger .= 'на сумму ' . $itogo . ' грн';
 if ($sms->auth()) {
     $phone_who = $_POST['phonecode'] . $_POST['phone'];
     $sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь #" . $uid . "\nМы свяжемся с вами в ближайшее время.");
     $sms->sendsms('lyufari', '+380505870147', $text_sms_manger);
     $sms->sendsms('lyufari', '+380951727272', $text_sms_manger);
     //          $sms->sendsms('lyufari','+380951727272',"Бронь с сайта #".$uid." на сумму ".$itogo);
     $smsid = $sms->smsresultbynumb(1);
     //id
 }
 $sql = "INSERT INTO orderd (uid,smsid,data_create,date,name,phone,nameevent,peoplecount,comment,address,zakaz,type) VALUES('%s','%s','" . date('Y-m-d H:i:s') . "','','%s','" . $_POST['phonecode'] . $_POST['phone'] . "','','','','','','notrest')";
 $query = sprintf($sql, $uid, $smsid, $name);
 $db->query($query);
 //отправляем на почту
 $dan_f .= "Дата вьезда - " . $dataprovmail . "<br />";
 $dan_f .= "Дата выезда - " . $dataendmail . "<br />";
 $dan_f .= "Количество дней - " . ceil($days) . "<br />";
 if (!empty($_POST['count'])) {
     $dan_f .= "Количество человек - " . $_POST['count'] . "<br />";
开发者ID:sbrilenko,项目名称:lyufari,代码行数:31,代码来源:bron.php

示例2: date

     $dopol = '00';
 } else {
     if ($val + 1 >= 10 and $val + 1 < 100) {
         $dopol = '0';
     } else {
         $dopol = '';
     }
 }
 $uid = date('ymd') . $dopol . $val + 1;
 $sms = new sms();
 $sms->setLogin('lyufari');
 $sms->setPass('zayaccool');
 if ($sms->auth()) {
     $phone_who = preg_replace('/[\\s()]/', '', $_POST['phone']);
     if (date('G') >= 10 and date('G') <= 23) {
         $sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь #" . $uid . "\nМы свяжемся с вами в ближайшее время.");
     } else {
         if (date('G') >= 5 and date('G') <= 10) {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь #" . $uid . "\nМы свяжемся с вами после 10:00.");
         } else {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь #" . $uid . "\nМы свяжемся с вами завтра после 10:00.");
         }
     }
     $sms->sendsms('lyufari', '+380508482849', "Бронь с сайта #" . $uid . " на сумму " . $itogo);
     $sms->sendsms('lyufari', '+380954570088', "Бронь с сайта #" . $uid . " на сумму " . $itogo);
     //$sms->sendsms('lyufari',$phone_who,"Спасибо. Бронь #".$uid."\nМы свяжемся с вами в ближайшее время.");
     $smsid = $sms->smsresultbynumb(1);
     //id
 }
 $sql = "INSERT INTO bron (uid,smsid,data_create,date,name,phone,days,peoplecount,comment,transfer,typenomer,itogo) VALUES('%s','%s','" . date('Y-m-d H:i:s') . "','%s','%s','" . $_POST['phone'] . "','%d',%d,'%s','%d','%s','%d')";
 $query = sprintf($sql, $uid, $smsid, $dataprov, $name, $days, $col, $comm, $transfer, $typenomer, $itogo);
开发者ID:sbrilenko,项目名称:gea,代码行数:31,代码来源:bron.php

示例3: date

     $dopol = '00';
 } else {
     if ($val + 1 >= 10 and $val + 1 < 100) {
         $dopol = '0';
     } else {
         $dopol = '';
     }
 }
 $uid = date('ymd') . $dopol . $val + 1;
 $sms = new sms();
 $sms->setLogin('lyufari');
 $sms->setPass('zayaccool');
 if ($sms->auth()) {
     $phone_who = $_POST['phonecode'] . $_POST['phone'];
     if (date('G') >= 10 and date('G') <= 23) {
         $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами в ближайшее время.");
     } else {
         if (date('G') >= 5 and date('G') <= 10) {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами после 10:00.");
         } else {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами завтра после 10:00.");
         }
     }
     //           $sms->sendsms('lyufari','+380954570088',"Заказ с сайта #".$uid." на сумму ".$total);
     $sms->sendsms('lyufari', '+380505870147', "Заказ с сайта #" . $uid . " на сумму " . $total);
     $sms->sendsms('lyufari', '+380951727272', "Заказ с сайта #" . $uid . " на сумму " . $total);
     $smsid = $sms->smsresultbynumb(1);
     //id
 }
 $sql = "INSERT INTO orderd (uid,smsid,data_create,date,name,phone,nameevent,peoplecount,comment,address,zakaz) VALUES('%s','%s','" . date('Y-m-d H:i:s') . "','%s','%s','" . $_POST['phonecode'] . $_POST['phone'] . "','%s',%d,'%s','%s','%s')";
 //$sql = "SELECT * FROM `user` WHERE `login`='%s' AND `password`='%d'";
开发者ID:sbrilenko,项目名称:lyufari,代码行数:31,代码来源:zakaz_.php

示例4: date

 if ($val + 1 < 10) {
     $dopol = '00';
 } else {
     if ($val + 1 >= 10 and $val + 1 < 100) {
         $dopol = '0';
     } else {
         $dopol = '';
     }
 }
 $uid = date('ymd') . $dopol . $val + 1;
 $sms = new sms();
 $sms->setLogin('lyufari');
 $sms->setPass('zayaccool');
 if ($sms->auth()) {
     $phone_who = $_POST['phone'];
     $sms->sendsms('lyufari', $phone_who, "Спасибо. Бронь # " . $uid . " на «" . $typenomertext . "»\nМы свяжемся с вами в ближайшее время.");
     //            $sms->sendsms('lyufari','+380954570088',"Бронь на «".$typenomertext."» на сумму ".$itogo." грн");
     $sms->sendsms('lyufari', '+380505870147', "Бронь на «" . $typenomertext . "» на сумму " . $itogo . " грн");
     $sms->sendsms('lyufari', '+380951727272', "Бронь на «" . $typenomertext . "» на сумму " . $itogo . " грн");
     $smsid = $sms->smsresultbynumb(1);
     //id
 }
 $sql = "INSERT INTO orderd (uid,smsid,data_create,date,name,phone,nameevent,peoplecount,comment,address,zakaz,type) VALUES('%s','%s','" . date('Y-m-d H:i:s') . "','','%s','" . $_POST['phone'] . "','','','','','','notrest')";
 $query = sprintf($sql, $uid, $smsid, $name);
 $db->query($query);
 //отправляем на почту
 $dan_f .= "Заказ на: " . $typenomertext . "<br />";
 $dan_f .= "Дата  - " . $dataprovmail . "<br />";
 if (!empty($time)) {
     $dan_f .= "Время - " . $time . "<br />";
 }
开发者ID:sbrilenko,项目名称:lyufari,代码行数:31,代码来源:bhm.php

示例5: compositionoforder

                     $new_idorder_more = 1;
                 }
                 $sql_put_to_ids = "UPDATE ids SET idorder_more=" . $new_idorder_more;
                 $db->query($sql_put_to_ids);
                 $sum = $price * $factor_user * $val['k'];
                 $sql = "INSERT INTO compositionoforder (id,idorder,idgoods,count,factor,price,sum,id_ed_iz,`updated`) VALUES ('w" . $new_idorder_more . "','w" . $new_or_id . "','" . $val['id'] . "'," . $val['k'] * $factor_user . "," . $factor . "," . $price . "," . $sum . ",'" . $user_iz . "',1)";
                 $db->query($sql);
             }
             $_SESSION['client']['new'] = 0;
         }
     }
     $sms = new sms();
     $sms->setLogin('vsort');
     $sms->setPass('43176');
     if ($sms->auth()) {
         $sms->sendsms('VsortComUa', $phone, 'Ваш заказ № ' . $uid . ' принят. Ожидайте звонка менеджера');
         $sms->sendsms('VsortComUa', '+380992264778', 'Новый заказ с сайта. № ' . $uid . '.');
     }
     $arrayname = array();
     $arrayorder = array();
     for ($i = 1; $i <= 20; $i++) {
         array_push($arrayname, "покупатель(" . $i . ")");
         array_push($arrayorder, array());
     }
     $_SESSION['active'] = 0;
     $active = 0;
     $_SESSION['arrayname'] = $arrayname;
     $_SESSION['arrayorder'] = $arrayorder;
     $arr = array_merge($arr, array('order' => $_SESSION['arrayorder']), array('names' => $_SESSION['arrayname']), array('ord' => $order), array('real_ord' => $real_order), array('fff' => $fff));
     echo json_encode($arr);
 } else {
开发者ID:sbrilenko,项目名称:vsort,代码行数:31,代码来源:ajax.php

示例6: payafter

 /**
  * 支付方式
  * 1.money
  * 2.credits
  * 3.money+credits
  */
 private function payafter()
 {
     if (($this->Paymethod & 2) == 2) {
         $credits = $this->GoodsValues['credits_value'];
         if ($credits == 0) {
             $paymethod = $this->Orderinfo['paymethod'];
             $payprocess = $this->Orderinfo['payprocess'];
             $payprocess |= 2;
             if ($payprocess == $paymethod) {
                 $params['order_status'] = 25;
                 //支付完成
                 $params['pay_status'] = 2;
                 //支付完成
             }
             $params['payprocess'] = $payprocess;
             $re = $this->obj->update('order', $params, " where order_id='" . $_REQUEST['out_trade_no'] . "'");
             if ($payprocess == $paymethod) {
                 require_once CUR_CONF_PATH . 'lib/sms.class.php';
                 $sms = new sms($this->Orderinfo['order_id']);
                 $sms->sendsms();
             }
             return 1;
         }
         /**
                     if(!$credits)
                          $this -> errorOutput("NO_CREDITS_ENOUGH");
                     **/
         //1.Money 2.Credits 3.Credits+Money
         require ROOT_PATH . 'lib/class/members.class.php';
         $members = new members();
         $url = "http://" . $this->settings['App_payments']['host'] . "/" . $this->settings['App_payments']['dir'];
         $url .= "/callback_url.php?access_token=" . $this->user['token'];
         $extend = 'out_trade_no=' . $this->Orderinfo['order_id'];
         $callback = array('url' => $url, 'extend' => $extend);
         is_array($this->GoodsInfos) && ($appUniqueidArr = array_keys($this->GoodsInfos));
         $creditLogTitle = $this->input['creditLogTitle'] ? $this->input['creditLogTitle'] : ($this->settings['creditLogTitle'][$appUniqueidArr[0]] ? $this->settings['creditLogTitle'][$appUniqueidArr[0]] : '订单支付');
         $re = $members->consume_credits($this->user['user_id'], $credits, $this->Orderinfo['order_id'], 'payments', 'OrderUpdate', 'create', $this->order_title, $callback, $creditLogTitle);
         if (!$re['logid']) {
             $this->errorOutput("NO_CREDITS_ENOUGH");
         }
     }
     //end if
 }
开发者ID:h3len,项目名称:Project,代码行数:49,代码来源:OrderUpdate.php

示例7: sendsms

/**
 * Created by PhpStorm.
 * User: David
 * Date: 27/10/2015
 * Time: 18:36
 */
class sms
{
    function sendsms()
    {
        include_once 'smsGateway.php';
        $smsGateway = new SmsGateway('dwainaina3@gmail.com', 'panyaroot');
        $deviceID = 14117;
        $to = $_REQUEST['phone'];
        $mine = '0542614920';
        $spent = $_REQUEST['totalprice'];
        $msg = 'Dear customer, You purchased goods worth ' . $spent . '. You will receive a 10% discount in the next purchase ' . $to;
        $result = $smsGateway->sendMessageToNumber($to, $msg, $deviceID);
    }
}
$messenger = new sms();
if (isset($_REQUEST['cmd'])) {
    $cmd = $_REQUEST['cmd'];
    switch ($cmd) {
        case 1:
            $messenger->sendsms();
            break;
        default:
            break;
    }
}
开发者ID:Wainaina3,项目名称:pos,代码行数:31,代码来源:sms.php

示例8: Core

    return false;
}
$out_trade_no = $_REQUEST['out_trade_no'];
$db = new Core();
$query = "SELECT * FROM " . DB_PREFIX . "order \n                  WHERE \n                  pay_status=1 \n                  and order_id='" . $_REQUEST['out_trade_no'] . "'";
$query = "SELECT * FROM " . DB_PREFIX . "order \n                  WHERE \n                  order_id='" . $_REQUEST['out_trade_no'] . "'";
$result = $db->query($query, '');
if (!$result) {
    return false;
}
/**
 * 1.money 2.credits 3.money+credits
 */
$paymethod = $result[0]['paymethod'];
$payprocess = $result[0]['payprocess'];
$payprocess |= 2;
if ($payprocess == $paymethod) {
    $params['order_status'] = 25;
    //支付完成
    $params['pay_status'] = 2;
    //支付完成
    $params['integral_status'] = (int) $_REQUEST['integral_status'];
    //冻结积分
}
$params['payprocess'] = $payprocess;
$re = $db->update('order', $params, " where order_id='" . $_REQUEST['out_trade_no'] . "'");
$order_id = $_REQUEST['out_trade_no'];
if ($payprocess == $paymethod) {
    $sms = new sms($order_id);
    $sms->sendsms();
}
开发者ID:h3len,项目名称:Project,代码行数:31,代码来源:callback_url.php

示例9: date

     $dopol = '00';
 } else {
     if ($val + 1 >= 10 and $val + 1 < 100) {
         $dopol = '0';
     } else {
         $dopol = '';
     }
 }
 $uid = date('ymd') . $dopol . $val + 1;
 $sms = new sms();
 $sms->setLogin('lyufari');
 $sms->setPass('zayaccool');
 if ($sms->auth()) {
     $phone_who = $_POST['phonecode'] . $_POST['phone'];
     if (date('G') >= 10 and date('G') <= 23) {
         $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами в ближайшее время.");
     } else {
         if (date('G') >= 5 and date('G') <= 10) {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами после 10:00.");
         } else {
             $sms->sendsms('lyufari', $phone_who, "Спасибо. Заказ #" . $uid . "\nМы свяжемся с вами завтра после 10:00.");
         }
     }
     //           $sms->sendsms('lyufari','+380954570088',"Заказ с сайта #".$uid." на сумму ".$total);
     $text_sms_manager = 'Бронь ';
     if ($_POST['rest']) {
         $text_sms_manager .= '"ресторан столик"';
     }
     if ($_POST['deliv']) {
         $text_sms_manager .= '"ресторан доставка"';
     }
开发者ID:sbrilenko,项目名称:lyufari,代码行数:31,代码来源:zakaz.php


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