|
|
|
@ -91,7 +91,7 @@ class Api_SquirrelController extends Ctrl_Api{ |
|
|
|
|
$data['number'] =empty($this->POST['number'])||!isset($this->POST['number'])?Tool_Fnc::apiMsg('请输入编号', '500'):Tool_Fnc::safe_string($this->POST['number']); |
|
|
|
|
$number = $this->Squirrelmodel->field("type")->where("number='{$data['number']}'")->fRow(); |
|
|
|
|
if(!empty($number)) Tool_Fnc::apiMsg('该编号已存在', '500'); |
|
|
|
|
$data['sex'] =empty($this->POST['sex'])||!isset($this->POST['sex'])?Tool_Fnc::apiMsg('请选择性别', '500'):Tool_Fnc::safe_string($this->POST['sex']); |
|
|
|
|
$data['sex'] =empty($this->POST['sex'])||!isset($this->POST['sex'])?0:Tool_Fnc::safe_string($this->POST['sex']); |
|
|
|
|
$data['birthday'] =empty($this->POST['birthday'])||!isset($this->POST['birthday'])?Tool_Fnc::apiMsg('请填写生日', '500'):Tool_Fnc::safe_string($this->POST['birthday']); |
|
|
|
|
$data['father'] = empty($this->POST['father'])||!isset($this->POST['father'])?0:Tool_Fnc::safe_string($this->POST['father']); |
|
|
|
|
$data['mother'] = empty($this->POST['mother'])||!isset($this->POST['father'])?0:Tool_Fnc::safe_string($this->POST['mother']); |
|
|
|
@ -174,7 +174,7 @@ class Api_SquirrelController extends Ctrl_Api{ |
|
|
|
|
public function editAction(){ |
|
|
|
|
$data['uid'] = empty($this->POST['uid'])||!isset($this->POST['uid'])?Tool_Fnc::apiMsg('请先登录', '500'):Tool_Fnc::safe_string($this->POST['id']); |
|
|
|
|
$data['id'] = empty($this->POST['id'])||!isset($this->POST['id'])?Tool_Fnc::apiMsg('系统错误', '500'):Tool_Fnc::safe_string($this->POST['id']); |
|
|
|
|
$data['sex'] =empty($this->POST['sex'])||!isset($this->POST['sex'])?Tool_Fnc::apiMsg('请选择性别', '500'):Tool_Fnc::safe_string($this->POST['sex']); |
|
|
|
|
$data['sex'] =empty($this->POST['sex'])||!isset($this->POST['sex'])?0:Tool_Fnc::safe_string($this->POST['sex']); |
|
|
|
|
$data['birthday'] =empty($this->POST['birthday'])||!isset($this->POST['birthday'])?Tool_Fnc::apiMsg('请填写生日', '500'):Tool_Fnc::safe_string($this->POST['birthday']); |
|
|
|
|
$data['father'] = empty($this->POST['father'])||!isset($this->POST['father'])?0:Tool_Fnc::safe_string($this->POST['father']); |
|
|
|
|
$data['mother'] = empty($this->POST['mother'])||!isset($this->POST['father'])?0:Tool_Fnc::safe_string($this->POST['mother']); |
|
|
|
|