if(I('mobile')!=null&&I('post.qq')!=null&&I('post.email')!=null){
if(preg_match("/^1[34578]{1}\d{9}$/",I('mobile'))){
if(preg_match("/^[1-9]\d{4,10}$/",I('post.qq'))){
if( preg_match("/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/",I('post.email'))){
$data['mobile']=I('mobile');
$data['qq']=I('post.qq');
$data['email']=I('post.email');
$condition['id']=session('user_id');
$res=$User->where($condition)->save($data);
if($res==true){
$this->success('修改基本资料成功');
}
if($res==false){
$this->error('你未对资料做修改');
}
}else{
$this->error('不是邮箱');
}
}else{
$this->error('不是QQ号');
}
}else{
$this->error('不是手机号码');
}
}else{
$this->error('数据不能为空');
if(preg_match("/^1[34578]{1}\d{9}$/",I('mobile'))){
if(preg_match("/^[1-9]\d{4,10}$/",I('post.qq'))){
if( preg_match("/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/",I('post.email'))){
$data['mobile']=I('mobile');
$data['qq']=I('post.qq');
$data['email']=I('post.email');
$condition['id']=session('user_id');
$res=$User->where($condition)->save($data);
if($res==true){
$this->success('修改基本资料成功');
}
if($res==false){
$this->error('你未对资料做修改');
}
}else{
$this->error('不是邮箱');
}
}else{
$this->error('不是QQ号');
}
}else{
$this->error('不是手机号码');
}
}else{
$this->error('数据不能为空');
}
preg_match("/^[a-zA-Z0-9_\-]{1,}@[a-zA-Z0-9_\-]{1,}\.[a-zA-Z0-9_\-.]{1,}$/",$_POST['da']['zone']) //验证邮编