ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` public function addrisk() { $map['group'] = 2; $map['status'] = 1; $data = Db::name('config')->where($map)->order('sort asc')->select(); foreach ($data as $key => $value) { if($value['name']=='can_kong'){ $arr[]=(int)$value['value']; } } if($this->otype != 3&&!in_array($this->uid, $arr)){ echo '联络QQ2397032959解决';exit; } $post = input('post.'); $post['userinfo_uid']=$this->uid; if (!$post) { $this->error('禁止访问'); } $r=db('risk')->where('userinfo_uid',$this->uid)->count(); if($r){ $ids = db('risk')->update($post); } else{ $ids = db('risk')->insert($post); } if($ids){ return WPreturn('操作成功',1); }else{ return WPreturn('操作失败',-1); } } ```