getInfo(); if (!$info) { # 未提交资料 return -1; } return $info['status']; } # 获取认证信息 public function getInfo($uid) { return Dever::db('user/auth')->find(array('uid' => $uid)); } # 更新 public function update($id, $uid, $name, $idcard, $idcard_front, $idcard_back, $type = 1, $tel = '', $email = '', $area = '', $address = '') { if ($name) { $update['name'] = $name; } else { Dever::alert('请输入真实姓名'); } if ($idcard) { $update['idcard'] = $idcard; } else { Dever::alert('请输入身份证号'); } if ($idcard_front) { $update['idcard_front'] = $city; } else { Dever::alert('请上传身份证正面'); } if ($idcard_back) { $update['idcard_back'] = $county; } else { Dever::alert('请上传身份证背面'); } if ($tel) { $update['tel'] = $tel; } if ($email) { $update['email'] = $email; } if ($area) { $update['area'] = $area; } if ($address) { $update['address'] = $address; } $update['type'] = $type; $update['status'] = 1; if ($id) { $update['where_id'] = $id; Dever::db('user/auth')->update($update); } else { $update['uid'] = $uid; $id = Dever::db('user/auth')->insert($update); } return $id; } public function manage_update($id, $name, $param) { $area = Dever::param('area', $param); $audit_status = Dever::param('audit_status', $param); if ($audit_status) { $admin = Dever::load('manage/auth.info'); $update['where_id'] = $id; $update['status'] = $audit_status; $update['audit_date'] = time(); if ($admin) { $update['audit_admin'] = $admin['id']; } Dever::db('user/auth')->update($update); } } }