diff --git a/Application/Admin/Controller/UserPayWhiteListController.class.php b/Application/Admin/Controller/UserPayWhiteListController.class.php new file mode 100644 index 000000000..b9e551ae7 --- /dev/null +++ b/Application/Admin/Controller/UserPayWhiteListController.class.php @@ -0,0 +1,126 @@ +where($map) + ->page($page,$row) + ->select(); + + foreach ($data as $key => $value) { + if ($value['status']==2) { + $data[$key]['time_status'] = '永久'; + } else { + $data[$key]['time_status'] = '有效期至'.date('Y-m-d H:i:s',$value['update_time']+$value['time']); + } + + $data[$key]['update_time'] = date('Y-m-d H:i:s',$value['update_time']); + + } + + $count = M('user_pay_whitelist','tab_')->where($map)->count(); + + $this->assign('data',$data); + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + } + + $this->assign('data',$data); + $this->meta_title = '玩家支付限制白名单'; + + $this->display(); + + } + + public function add() { + + if (IS_POST) { + + $post = $_POST; + + if($post['account']!=$post['account_check']) { + $this->ajaxReturn(['status'=>0,'msg'=>'两次输入不一致']); + exit(); + } + + $hav_user = M('user','tab_')->where(['account'=>$post['account']])->find(); + + if(!$hav_user) { + $this->ajaxReturn(['status'=>0,'msg'=>'账号不存在']); + exit(); + } + + $whiteList = M('user_pay_whitelist','tab_')->where(['user_id'=>$hav_user['id']])->find(); + + $insert = []; + + $insert['user_id'] = $hav_user['id']; + $insert['user_account'] = $hav_user['account']; + + if(!$whiteList) { + + $insert['status'] = 0; + $insert['time'] = 7*86400; + $insert['create_time'] = time(); + $insert['update_time'] = time(); + + $is_success = M('user_pay_whitelist','tab_')->add($insert); + + } else { + $insert['update_time'] = time(); + if($whiteList['status']==0) { + $insert['status'] = 1; + $insert['time'] = 30*86400; + } elseif($whiteList['status']==1) { + $insert['status'] = 2; + $insert['time'] = 1; + + } + + if($whiteList['sstatus']==2) { + $this->ajaxReturn(['status'=>0,'msg'=>'该账号已经是永久无需再进行操作']); + exit(); + } + + $is_success = M('user_pay_whitelist','tab_')->where(['user_id'=>$hav_user['id']])->save($insert); + } + + if($is_success) { + $this->ajaxReturn(['status'=>1,'msg'=>'操作成功']); + exit(); + } else { + $this->ajaxReturn(['status'=>0,'msg'=>'操作失败']); + exit(); + } + + } + + $this->meta_title = '新增支付限制白名单账号'; + + $this->display(); + + } + + + +} diff --git a/Application/Admin/View/UserPayWhiteList/add.html b/Application/Admin/View/UserPayWhiteList/add.html new file mode 100644 index 000000000..90db5feb0 --- /dev/null +++ b/Application/Admin/View/UserPayWhiteList/add.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + 新增支付限制白名单账号 + + + + + + + + + + + + + + + + 账号: + + + + + + + + 账号确认: + + + + + + + + + + + + + + + 保存 + + + 返回 + + + + + + + + + + + + + 已添加添加至常用设置 + + + + + + + + + + diff --git a/Application/Admin/View/UserPayWhiteList/index.html b/Application/Admin/View/UserPayWhiteList/index.html new file mode 100644 index 000000000..4ed00da2b --- /dev/null +++ b/Application/Admin/View/UserPayWhiteList/index.html @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + 结算单管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加允许支付账号 + 查看允许支付白名单 + + + + + + + + + + + + 序号 + 账号 + 状态 + 有效时间 + 时间 + 操作 + + + + + + + + aOh! 暂时还没有内容! + + + + + + + + {$data.id} + {$data.user_account} + 7天允许支付30天允许支付永久允许支付下游个人结算单 + {$data.time_status} + {$data.update_time} + + + + + + + + + + + + + 导出 + + {$_page|default=''} + + + + + + + + 已添加添加至常用设置 + + + + + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + + +