From 2f36d3eb1c04833e066586e75ea4838d31df9bfe Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Wed, 25 Dec 2019 15:27:41 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9Ebata=E9=93=BE=E6=8E=A5?=
=?UTF-8?q?=E5=92=8C=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/GameController.class.php | 5 +++++
Application/Admin/View/Game/edit.html | 22 +++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php
index 5638da792..0f5e8e217 100644
--- a/Application/Admin/Controller/GameController.class.php
+++ b/Application/Admin/Controller/GameController.class.php
@@ -298,6 +298,9 @@ class GameController extends ThinkController
$this->error('一句话简介不能超过30个字!');
exit;
}
+ if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
+ return $this->error("请填写正确的Bata链接");
+ }
/*if($_POST['apply_status']==0&&$_POST['game_status']==1){
$this->error('游戏未审核不允许显示');//游戏添加完成
}*/
@@ -349,6 +352,8 @@ class GameController extends ThinkController
$phone['flooring_page_video'] = $sibling['flooring_page_video'];
$phone['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
$phone['supersign_status'] = $sibling['supersign_status'];
+ $phone['beta_url'] = $_POST['beta_url'];
+ $phone['beta_status'] = $_POST['beta_status'];
M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣
$set_fidel['status'] = 1;
diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html
index 595e67d20..f3ff9f62d 100644
--- a/Application/Admin/View/Game/edit.html
+++ b/Application/Admin/View/Game/edit.html
@@ -429,6 +429,28 @@
+
+ Bata版本链接: |
+
+
+ |
+
+
+
+ Bata版本是否开启 |
+
+
+
+
+
+
+ |
+
+
From d3ccc3bb5b44ee742996ec3de021fc25a52bbdeb Mon Sep 17 00:00:00 2001
From: chenzhi
Date: Wed, 25 Dec 2019 15:36:09 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Common/extend.php | 70 +++++++++----------
.../Controller/MemberController.class.php | 56 ++++++++++++++-
Application/Admin/View/Member/user_info.html | 4 +-
3 files changed, 92 insertions(+), 38 deletions(-)
diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php
index 899ff82ec..d832441f3 100644
--- a/Application/Admin/Common/extend.php
+++ b/Application/Admin/Common/extend.php
@@ -1734,40 +1734,40 @@ function getOffspringByPromoteId($promote_id = null) {
* @return void
*/
function data2csv(&$data,$title,$fields){
- set_time_limit(0);
- ini_set('memory_limit', '-1'); //设置内存不受限制
- $filename = $title .'.csv';
- $fp = fopen($filename, 'w'); //生成临时文件
- fwrite($fp, chr(0xEF).chr(0xBB).chr(0xBF));//转码,防止乱码
- $field = array_keys($fields);
- //生成首行
- $header = array_values($fields);
- fputcsv($fp, $header);
-
- $index = 0;
- foreach ($data as $row) {
- $a = [];
- foreach($field as $k=>$v){
- // $a[$v] = $row[$v] . "\t";//防止格式错误
- $a[$v] = $row[$v];
- }
- if ($index == 10000) { //每次写入1000条数据清除内存
- $index = 0;
- ob_flush();//清除内存
- flush();
- }
- $index++;
- fputcsv($fp, $a);
- }
- ob_flush();
- fclose($fp); //每生成一个文件关闭
- //下载
- header('Content-Type: application/vnd.ms-excel;charset=utf-8');
- header('Content-Disposition: attachment;filename="' . $title . '.csv"');
- header('Cache-Control: max-age=0');
- header('Content-Length: ' . filesize($filename));
- @readfile($filename);
- unlink($filename);
- die();
+ set_time_limit(0);
+ ini_set('memory_limit', '-1'); //设置内存不受限制
+ $csvFileName = $title.'.csv';
+ //设置好告诉浏览器要下载excel文件的headers
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/vnd.ms-excel;charset=utf-8');
+ header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate');
+ header('Pragma: public');
+ $fp = fopen('php://output', 'a');//打开output流
+ fwrite($fp, chr(0xEF).chr(0xBB).chr(0xBF));//转码,防止乱码
+ $field = array_keys($fields);
+ //生成首行
+ $header = array_values($fields);
+ fputcsv($fp, $header);
+
+ $index = 0;
+ foreach ($data as $row) {
+ $a = [];
+ foreach($field as $k=>$v){
+ // $a[$v] = $row[$v] . "\t";//防止格式错误
+ $a[$v] = $row[$v];
+ }
+ if ($index == 10000) { //每次写入1000条数据清除内存
+ $index = 0;
+ ob_flush();//清除内存
+ flush();
+ }
+ $index++;
+ fputcsv($fp, $a);
+ }
+ ob_flush();
+ fclose($fp); //每生成一个文件关闭
+ die();
}
?>
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index c56c787d4..6badf7cd0 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -131,14 +131,17 @@ class MemberController extends ThinkController
}
}
}
-
+
//计算用户列表
$data = M("user","tab_")
->field("tab_user.id,`device_number`,`age_status`,`account`,`balance`,`gold_coin`,`alipay`,tab_user.promote_id,`register_type`,tab_user.promote_account,`register_time`,`lock_status`,`register_way`,`register_ip`,`login_time`,`check_status`,IFNULL(sum(ss.pay_amount), 0) AS recharge_total")
->where($map)
->group("tab_user.id")
- ->page($page, $row)
+ // ->page($page, $row)
->order($order);
+ if(!isset($_REQUEST['export'])){
+ $data ->page($page, $row);
+ }
if($havs){
$data->having($havs);
}
@@ -158,6 +161,55 @@ class MemberController extends ThinkController
$data->join("tab_spend AS ss ON ss.user_id = tab_user.id AND ss.pay_status = 1","left");
}
$data = $data->select();
+ if(isset($_REQUEST['export'])){
+ $isadmin = is_administrator();
+ //获取等级
+ $tool = M('tool',"tab_")->field('config,status')->where(['name'=>'viplevel'])->find();
+ $viplevel = false;
+ if(!empty($tool) && $tool['status']==1){
+ $viplevel = json_decode($tool['config'],true);
+ $len = count($viplevel);
+ if(empty($viplevel)) {$viplevel = false;}
+ }
+
+ foreach ($data as $k => &$v) {
+ $v['register_type'] = get_registertype($v['register_type']);
+ if(!$isadmin){
+ $v['account'] = encryptStr($v['account']);
+ $v['promote_account'] = encryptStr($v['promote_account']);
+ $v['device_number'] = encryptStr($v['device_number']);
+ }
+ empty($v['alipay']) && $v['alipay']="--";
+ empty($v['small_count']) && $v['small_count']="--";
+ $v['gold_coin']?:'0.00';
+
+ if($viplevel){
+ $vl=0;
+ $money = intval($v['recharge_total']*10000);
+ foreach($viplevel as $k=>$value) {
+ $i = intval(str_replace('vip','',$k));
+ if($money"账号ID","account"=>"玩家账号","promote_account"=>"所属推广员","balance"=>"账户平台币","recharge_total"=>"累计充值","gold_coin"=>"金币",
+ "alipay"=>"绑定支付宝","small_count"=>"小号","vip_level"=>"VIP等级","register_type"=>"注册方式","register_time"=>"注册时间","register_ip"=>"注册IP","login_time"=>"最后登录时间",
+ "device_number"=>"设备号","lock_status"=>"账号状态","check_status"=>"拉黑状态"
+ );
+ data2csv($data,"玩家_玩家列表",$field);
+ }
if($havs){
//判断是否需要vip等级分类
diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html
index 1249b6e9b..bbf5e941f 100644
--- a/Application/Admin/View/Member/user_info.html
+++ b/Application/Admin/View/Member/user_info.html
@@ -354,7 +354,9 @@
- 导出
+ 导出
+
{$_page|default=''}
From 82afa60d12f94ee3b78da7cd98a516608a483e04 Mon Sep 17 00:00:00 2001
From: chenzhi
Date: Wed, 25 Dec 2019 15:37:34 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=8E=A9=E5=AE=B6?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AF=BC=E5=87=BA2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Common/extend.php | 70 ++++++++++++++---------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php
index d832441f3..aa9ee0cc8 100644
--- a/Application/Admin/Common/extend.php
+++ b/Application/Admin/Common/extend.php
@@ -1734,40 +1734,40 @@ function getOffspringByPromoteId($promote_id = null) {
* @return void
*/
function data2csv(&$data,$title,$fields){
- set_time_limit(0);
- ini_set('memory_limit', '-1'); //设置内存不受限制
- $csvFileName = $title.'.csv';
- //设置好告诉浏览器要下载excel文件的headers
- header('Content-Description: File Transfer');
- header('Content-Type: application/vnd.ms-excel;charset=utf-8');
- header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
- header('Expires: 0');
- header('Cache-Control: must-revalidate');
- header('Pragma: public');
- $fp = fopen('php://output', 'a');//打开output流
- fwrite($fp, chr(0xEF).chr(0xBB).chr(0xBF));//转码,防止乱码
- $field = array_keys($fields);
- //生成首行
- $header = array_values($fields);
- fputcsv($fp, $header);
-
- $index = 0;
- foreach ($data as $row) {
- $a = [];
- foreach($field as $k=>$v){
- // $a[$v] = $row[$v] . "\t";//防止格式错误
- $a[$v] = $row[$v];
- }
- if ($index == 10000) { //每次写入1000条数据清除内存
- $index = 0;
- ob_flush();//清除内存
- flush();
- }
- $index++;
- fputcsv($fp, $a);
- }
- ob_flush();
- fclose($fp); //每生成一个文件关闭
- die();
+ set_time_limit(0);
+ ini_set('memory_limit', '-1'); //设置内存不受限制
+ $csvFileName = $title.'.csv';
+ //设置好告诉浏览器要下载excel文件的headers
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/vnd.ms-excel;charset=utf-8');
+ header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate');
+ header('Pragma: public');
+ $fp = fopen('php://output', 'a');//打开output流
+ fwrite($fp, chr(0xEF).chr(0xBB).chr(0xBF));//转码,防止乱码
+ $field = array_keys($fields);
+ //生成首行
+ $header = array_values($fields);
+ fputcsv($fp, $header);
+
+ $index = 0;
+ foreach ($data as $row) {
+ $a = [];
+ foreach($field as $k=>$v){
+ // $a[$v] = $row[$v] . "\t";//防止格式错误
+ $a[$v] = $row[$v];
+ }
+ if ($index == 10000) { //每次写入1000条数据清除内存
+ $index = 0;
+ ob_flush();//清除内存
+ flush();
+ }
+ $index++;
+ fputcsv($fp, $a);
+ }
+ ob_flush();
+ fclose($fp); //每生成一个文件关闭
+ die();
}
?>
From 469db018643583563246db21a8be1eb314c984c1 Mon Sep 17 00:00:00 2001
From: chenzhi
Date: Wed, 25 Dec 2019 16:07:22 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=8E=A9=E5=AE=B6?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/View/Member/user_info.html | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html
index bbf5e941f..42450fb62 100644
--- a/Application/Admin/View/Member/user_info.html
+++ b/Application/Admin/View/Member/user_info.html
@@ -37,7 +37,7 @@
玩家列表
- 说明:此列表数据以平台账号为统计基数
+ 说明:此列表统计平台账号总数,当筛选条件为游戏不含区服时为该游戏的玩家数量,含区服时为玩家创建角色数量
说明:游客登录,默认属于第三方用户;当用户通过SDK设置了用户名以后,记录变换到本站用户列表里,账户自动更换为设置的账号!
@@ -354,7 +354,7 @@
- 导出
@@ -395,6 +395,15 @@