當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XString::isMobileNew方法代碼示例

本文整理匯總了PHP中XString::isMobileNew方法的典型用法代碼示例。如果您正苦於以下問題:PHP XString::isMobileNew方法的具體用法?PHP XString::isMobileNew怎麽用?PHP XString::isMobileNew使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XString的用法示例。


在下文中一共展示了XString::isMobileNew方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: doctorAuthApplication

 /**
     * @brief 醫生認證申請
     * @author cs
     * @exampleUrl 
     *
     * @Param $userId
     * @Param $name
     * @Param $hospitalName
     * @Param $facultyName
     * @Param $hospitalProvince
     * @Param $hospitalCity
     * @Param $isPublic
     * @Param $workCard
     * @Param $certificate
     *
     * @Returns   
  */
 public function doctorAuthApplication($userId, $name, $hospitalName, $facultyName, $hospitalProvince='', $hospitalCity='', $isPublic='', $workCardAttachmentIds='', $certificateAttachmentIds='', $mobile='', $captcha = '', $grade = '')
 {/*{{{*/
     $user = DAL::get()->find('user', $userId);
     if ($user->isNull())
     {
         $this->setErrorCode(1221);
         return 0;
     }
     if ($mobile || $captcha)
     {
         if ($mobile == '13800138000')
         {
             $this->setErrorCode(828);
             return 0;
         }
         if(false == XString::isMobileNew($mobile))
         {
             $this->setErrorCode(827);
             return 0;
         }
         if(!User::validKeyForRegister($mobile, strtolower($captcha)))
         {
             $this->setErrorCode(1181);
             return 0;
         }
         UserClient::getInstance()->setMobile($user->id, $mobile);
     }
     if ($name == '')
     {
         $this->setErrorCode(830);
         return 0;
     }
     if ($hospitalName == '')
     {
         $this->setErrorCode(804);
         return 0;
     }
     if ($facultyName == '')
     {
         $this->setErrorCode(8041);
         return 0;
     }
     $workCardIds = $certificateIds = array();
     if (!empty($workCardAttachmentIds))
     {
         $token = strtok($workCardAttachmentIds, ',');
         while($token !== false)
         {
             $workCardIds[] = $token;
             $token = strtok(',');
         }
     }
     if(!empty($certificateAttachmentIds))
     {
         $token = strtok($certificateAttachmentIds, ',');
         while($token !== false)
         {
             $certificateIds[] = $token;
             $token = strtok(',');
         }
     }
     $preDoctor = DAL::get()->find_by_userid('predoctor', $user->id);
     if (false == $preDoctor->isNull())
     {
         if ($preDoctor->isInit())
         {
             $this->setErrorCode(803);
             return 0;
         }
         if ($preDoctor->isConfirmed())
         {
             $this->setErrorCode(802);
             return 0;
         }
     }
     $params = array();
     $params['name'] = $name;
     $params['hospitalName'] = $hospitalName;
     $params['facultyName'] = $facultyName;
     $params['hospitalProvince'] = $hospitalProvince;
     $params['hospitalCity'] = $hospitalCity;
     $params['isPublic'] = $isPublic;
     $params['workCard'] = $workCardIds;
//.........這裏部分代碼省略.........
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:101,代碼來源:doctoruserdatabucket.php

示例2: sendDocotrAppDownSMS

    public function sendDocotrAppDownSMS($request, $response)
    {/*{{{*/

        $mobile = $request->mobile;
        if(false == XString::isMobileNew($mobile))
        {
            $result = '{"code":"error_mobile"}';
        }
        else if(Captcha::verify($request->door, XIpLocation::getIp(), $request->kind, 0, $request->token) == false)
        {
            $result = '{"code":"error_door"}';
        }
        else
        {
            $content = "全新的醫生專用版客戶端下載地址:http://m.haodf.com/sd ,建議在Wi-Fi環境下下載。如您在使用過程中遇到問題,請與醫生助理聯係010-56707226";
            SMSClient::getInstance()->sendSMSNoSignature(array($mobile) , $content);
            $result = '{"code":"success"}';
        }
        $callback = $request->callback;
        if ($callback) {
            $result = $callback.'('.$result.');';
            header('Content-Type: text/javascript;'); 
        } else {
            header('Content-Type: application/json;'); 
        }
        header("Content-Type: text/html; charset=GBK");
        echo $result;
        return parent::DIRECT_OUTPUT;
    }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:29,代碼來源:mobilecontroller.php


注:本文中的XString::isMobileNew方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。