diff --git a/Application/Admin/Controller/SuperSignController.class.php b/Application/Admin/Controller/SuperSignController.class.php new file mode 100644 index 000000000..c0e7b827e --- /dev/null +++ b/Application/Admin/Controller/SuperSignController.class.php @@ -0,0 +1,73 @@ + + */ +class SuperSignController extends ThinkController +{ + public function lists($p = 1) { + + + + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $map =[]; + if (I('account')) { + $map['tab_user.account'] = I('account'); + } + + if (I('order_id')) { + $map['order_id'] = I('order_id'); + } + + if (I('start')&&I('end')) { + $map['pay_time'] = ['between',[strtotime(I('start')),strtotime(I('end'))]]; + } else if(I('start')&&!I('end')) { + $map['pay_time'] = ['egt',strtotime(I('start'))]; + } else if (!I('start')&&I('end')) { + $map['pay_time'] = ['elt',strtotime(I('end'))]; + } + + if (I('game_name')) { + $map['game_name'] = ['like',I('game_name').'%']; + } + + if (I('promote_id')||I('promote_id')==0) { + $map['tab_user.promote_id'] = I('promote_id'); + } + + $map['tab_game_supersign.pay_status'] = 1; + + $data = M('game_supersign','tab_') + ->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price") + ->join("left join tab_user on tab_game_supersign.user_id = tab_user.id") + ->join("left join tab_game on tab_game_supersign.game_id = tab_game.id") + ->page($p, $row) + ->where($map) + ->select(); + + foreach ($data as $key => $Value) { + $data[$key]['pay_time'] = date('Y-m-d H:i:s',$Value['pay_time']); + } + + $count = M('game_supersign','tab_') + ->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price") + ->join("left join tab_user on tab_game_supersign.user_id = tab_user.id") + ->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")->where($map)->count(); + + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } + $this->m_title = '推广员列表'; + $this->assign('data',$data); + $this->display(); + + } +} diff --git a/Application/Admin/Controller/TestWhiteListController.class.php b/Application/Admin/Controller/TestWhiteListController.class.php new file mode 100644 index 000000000..a74e16fad --- /dev/null +++ b/Application/Admin/Controller/TestWhiteListController.class.php @@ -0,0 +1,192 @@ + + */ +class TestWhiteListController extends ThinkController +{ + public function lists($p = 1) { + + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $map =[]; + if (I('account')) { + $map['account'] = array('like',I('account').'%'); + } + + $data = M('test_white_list','tab_') + ->page($p, $row) + ->where($map) + ->select(); + + foreach ($data as $key => $Value) { +// $data[$key]['show_status'] = $data[$key]['show_status']?'显示':'锁定'; + $data[$key]['create_ime'] = date('Y-m-d H:i:s',$Value['create_ime']); + } + + $count = M('test_white_list','tab_') + ->where($map) + ->count(); + + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } + $this->m_title = '测试白名单'; + $this->assign('data',$data); + $this->display(); + + } + + public function add() { + $this->m_title = '测试白名单添加'; + $this->assign('title','新增'); + $this->display(); + } + + public function edit() { + $this->m_title = '测试白名单编辑'; + $this->assign('title','编辑'); + $this->display("add"); + } + + public function edit_user() { + $data = I(''); + + if (!$data['user_id']) { + $this->error('请填写测试账号'); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where(array('id'=>$data['user_id']))->find(); + + if (!$user) { + $this->error('账号不存在'); + } + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData); + if ($userAdd) { + $whitedata['show_status'] = $data['status']?$data['status']:0; + $whitedata['account'] = $data['account']; + + $whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata); +// echo M('test_white_list','tab_')->_sql();die(); + + if($whiteList) { + $this->success('修改白名单成功',U('TestWhiteList/lists')); + } else { + $this->error('修改白名单失败'); + } + + } else { + $this->error('修改用户失败'); + } + } + + public function edit_user1() { + $data = $_GET; + + if (!$data['user_id']) { + $this->ajaxReturn(['status'=>0,'msg'=>"请填写测试账号"]); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where(array('id'=>$data['user_id']))->find(); + + if (!$user) { + $this->ajaxReturn(['status'=>0,'msg'=>"账号不存在"]); + } + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData); + if ($userAdd) { + $whitedata['show_status'] = $data['status']?$data['status']:0; + $whitedata['account'] = $data['account']; + + $whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata); +// echo M('test_white_list','tab_')->_sql();die(); + + if($whiteList) { + $this->ajaxReturn(['status'=>1,'msg'=>"修改白名单成功"]); + } else { + $this->ajaxReturn(['status'=>0,'msg'=>"修改白名单成功"]); + } + + } else { + $this->ajaxReturn(['status'=>0,'msg'=>"修改用户失败"]); + } + } + + public function add_user() { + $data = I(''); + + if (!$data['account']) { + $this->error('请填写测试账号'); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where($userData)->find(); + + if ($user) { + $this->error('账号已经存在'); + } + + $userData['password'] = md5(sha1('123456') . UC_AUTH_KEY); + $userData['promote_id'] = 0; + $userData['promote_account'] = '官方渠道'; + $userData['register_time'] = time(); + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->add($userData); + if ($userAdd) { + $data['user_id'] = $userAdd; + $data['show_status'] = $data['status']?$data['status']:0; + $data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username']; + $data['create_ime'] = time(); + + $whiteList = M('test_white_list','tab_')->add($data); + if($whiteList) { + $this->success('添加白名单成功',U('TestWhiteList/lists')); + } else { + $this->error('添加白名单失败'); + } + + } else { + $this->error('添加用户失败'); + } + + } + + public function freezeSupport() { + $supportId = I('status'); + + $data = [ + 'check_status' => $supportId + ]; + + $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); + + if ($supportId == 1) { + $msg = '启用'; + } else if ($supportId == 0) { + $msg = '锁定'; + } + + if ($isFreeze) { + $this->ajaxReturn(['status'=>1, 'msg'=> $msg.'成功']); + } else { + $this->ajaxReturn(['status'=>0, 'msg'=> $msg.'失败']); + } + } + +} diff --git a/Application/Admin/View/SuperSign/lists.html b/Application/Admin/View/SuperSign/lists.html new file mode 100644 index 000000000..34665878c --- /dev/null +++ b/Application/Admin/View/SuperSign/lists.html @@ -0,0 +1,438 @@ + + + + + + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + - +
+ + +
+
+
+ +
+ + +
+ + - +
+
+ +
+ + +
+ 搜索 +
+
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
支付订单号超级签授权码购买时间玩家账号游戏名称所属推广员实付金额购买方式
aOh! 暂时还没有内容!
{$data.order_id}{$data.ticket}{$data.pay_time}{$data.account}{$data.game_name} + + 官方渠道 + + {$data.promote_account} + + + + {$data.pay_price}
+
+
+
+ + {$_page|default=''} +
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + diff --git a/Application/Admin/View/TestWhiteList/add.html b/Application/Admin/View/TestWhiteList/add.html new file mode 100644 index 000000000..3ef69716c --- /dev/null +++ b/Application/Admin/View/TestWhiteList/add.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + + +
+ + + + + + + + + + + +
测试账号: + + + +
显示状态: + + + + + + +
+
+ +
+ + + 返回 + +
+ +
+
+ + + +
+ + + + + + diff --git a/Application/Admin/View/TestWhiteList/lists.html b/Application/Admin/View/TestWhiteList/lists.html new file mode 100644 index 000000000..ff8368900 --- /dev/null +++ b/Application/Admin/View/TestWhiteList/lists.html @@ -0,0 +1,250 @@ + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+ + +
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
测试账号显示状态添加人添加时间操作
aOh! 暂时还没有内容!
{$data['account']} 锁定 正常 {$data.add_user}{$data.create_ime} + 编辑 + + 锁定 + + 开启 + +
+
+
+
+ {$_page|default=''} +
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + +