Beispiel #1
0
 $arrValidMobiles = array();
 foreach ($arrMobiles as $v) {
     $v = trim($v);
     if (check::CheckMobilePhone($v)) {
         $arrValidMobiles[] = $v;
     }
 }
 if (count($arrValidMobiles) == 0) {
     check::AlertExit("错误:填写的手机号都不合法!", -1);
 }
 $strMobiles = implode(";", $arrValidMobiles);
 //解析手机号完成
 $objSms = new BizSMS();
 $objSms->setParam($yx_arrMBizParam);
 //设置商务领航短信接口的基本参数
 $strResult = $objSms->sendShortMessage($strMobiles, $_POST['content']);
 //从页面中获取手机号和短信内容
 $strReturnCode = substr($strResult, 0, 1);
 if ($strReturnCode == "0") {
     check::Alert("发送成功!");
 } else {
     if ($strReturnCode == "1") {
         check::Alert("用户名或密码错误!", -1);
     } else {
         if ($strReturnCode == "2") {
             check::Alert("余额不足!", -1);
         } else {
             if ($strReturnCode == "3") {
                 check::Alert("超过发送最大量100条!", -1);
             } else {
                 if ($strReturnCode == "4") {
Beispiel #2
0
//翻页参数
$objWebInit->arrGPage = $arrGPage;
$objWebInit->db();
$arrWhere = array();
$arrLink = array();
$arrWhere[] = "pass='******'";
$strLink = '';
if (empty($_GET['page'])) {
    $intPage = 1;
} else {
    $intPage = intval($_GET['page']);
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = 'where ' . $strWhere;
if ($_GET['code'] == 'domobilecode') {
    setcookie('intMobile', $_GET['title'], time() + 1);
    $intMobileCode = rand(10000, 99999);
    if ($_COOKIE['intMobile']) {
        //弹出js警告
        echo json_encode(array("status" => "-1", "data" => "", "msg" => "请在两分钟以后再获取手机验证码"));
        exit;
    } else {
        //发手机验证码信息
        $objSms = new BizSMS();
        $objSms->setParam($arrMBizParam);
        //设置商务领航短信接口的基本参数
        $strResult = $objSms->sendShortMessage($_GET['title'], '您好,您现在正在获取手机验证码,您的短信验证码是:' . $intMobileCode);
        echo json_encode(array("status" => "1", "data" => $intMobileCode, "msg" => "验证码已发送至您的手机,请注意查收"));
        exit;
    }
}