Commit 7ca9958e by 冷斌

fix bug

parent eda2f9cb
......@@ -161,40 +161,43 @@ class InviteController extends HomebaseController {
$rs = array('code' => 0, 'msg' => '发送成功,请注意查收', 'info' => array());
$limit = ip_limit();
if( $limit == 1){
$rs['code']=1003;
$rs['msg']='您已当日发送次数过多';
$this->ajaxReturn($rs);
}
$mobile = checkNull(I("mobile"));
$ismobile=checkMobile($mobile);
if(!$ismobile){
$rs['code']=1001;
$rs['msg']='请输入正确的手机号';
$this->ajaxReturn($rs);
}
$where="user_login='{$mobile}'";
$checkuser = checkUser($where);
if($checkuser){
$rs['code']=1004;
$rs['msg']='该手机号已注册,请登录';
$this->ajaxReturn($rs);
}
if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){
$rs['code']=1002;
$rs['msg']='验证码5分钟有效,请勿多次发送';
$this->ajaxReturn($rs);
}
// $limit = ip_limit();
// if( $limit == 1){
// $rs['code']=1003;
// $rs['msg']='您已当日发送次数过多';
// $this->ajaxReturn($rs);
// }
//
// $mobile = checkNull(I("mobile"));
// $ismobile=checkMobile($mobile);
// if(!$ismobile){
// $rs['code']=1001;
// $rs['msg']='请输入正确的手机号';
// $this->ajaxReturn($rs);
// }
//
// $where="user_login='{$mobile}'";
//
// $checkuser = checkUser($where);
//
// if($checkuser){
// $rs['code']=1004;
// $rs['msg']='该手机号已注册,请登录';
// $this->ajaxReturn($rs);
// }
//
// if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){
// $rs['code']=1002;
// $rs['msg']='验证码5分钟有效,请勿多次发送';
// $this->ajaxReturn($rs);
// }
$mobile_code = random(6,1);
echo "aaaaa";
//密码可以使用明文密码或使用32位MD5加密
$result = sendCode($mobile,$mobile_code,630425);
var_dump($result);
die;
if($result['code']===0){
$_SESSION['reg_mobile'] = $mobile;
$_SESSION['reg_mobile_code'] = $mobile_code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment