public function user_info_get() { if (!session('user')) { $this->error("没有登录", 'index/index'); return; } $data['status'] = 1; $data['user'] = session('user'); $data['user'] = user_info_format($data['user']); $this->ajaxReturn($data); }
public function audit() { $admin = session('admin'); if (!$admin['priaudit']) { $data['status'] = 0; $data['info'] = '本管理员没有权限审核用户'; $this->ajaxReturn($data); return; } if ($_GET['id']) { $query['id'] = $_GET['id']; } else { $this->ajaxReturn("get error"); return; } //读取用户表 $vip = M("vip"); $user = $vip->where($query)->select(); if (!$user) { $this->ajaxReturn("no this error"); return; } $user = user_info_format($user[0]); $this->assign('user', $user); //读取小号数据 $query = []; $query['ownerid'] = $_GET['id']; $tb = M("account"); $tb_accout = $tb->where($query)->select(); if ($tb_accout) { foreach ($tb_accout as $key => $value) { $tb_accout[$key] = acc_info_format($value); } $this->assign('tb', $tb_accout); } //读取店铺数据 $shop = M("shop"); $sh = $shop->where($query)->select(); if ($sh) { $this->assign('sh', $sh[0]); } //读取电脑配置数据 $hardware = M("hardware"); $hd = $hardware->where($query)->select(); if ($hd) { $this->assign('hd', $hd[0]); } $this->show(); }