当前位置: 首页>>代码示例>>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;未经允许,请勿转载。