Merge branch 'dev' of 47.111.118.107:wmtx/platform into dev

master
ELF 5 years ago
commit 4ae7fab2bf

@ -1736,8 +1736,15 @@ function getOffspringByPromoteId($promote_id = null) {
function data2csv(&$data,$title,$fields){
set_time_limit(0);
ini_set('memory_limit', '-1'); //设置内存不受限制
$filename = $title .'.csv';
$fp = fopen($filename, 'w'); //生成临时文件
$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);
//生成首行
@ -1761,13 +1768,6 @@ function data2csv(&$data,$title,$fields){
}
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();
}
?>

@ -241,6 +241,7 @@ class FinancePromoteController extends AdminController
foreach($senddata as $k=>$v){
if(empty($v['company_name'])) $v['company_name']= "万盟天下科技";
if(empty($v['promote_account'])) $v['promote_account']= "官方渠道";
if(!array_key_exists('cash_count',$v)) $v['cash_count']=0;
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;

@ -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;

@ -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<intval($value*10000)) {$vl = $i-1;break;}
if($i == $len) {$vl = $i;}
}
$v['vip_level'] = $vl;
}else{
$v['vip_level'] = 0;
}
$v['register_time'] = date('Y-m-d H:i:s',$v['register_time']);
$v['login_time'] = date('Y-m-d H:i:s',$v['login_time']);
$v['lock_status'] = get_info_status($v['lock_status'],4);
$v['check_status'] = $v['check_status']==1 ? "正常" :"拉黑";
// $data[$k] = $v;
}
$field = array(
"id"=>"账号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等级分类

@ -227,7 +227,9 @@ class PromoteController extends ThinkController
if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) {
$this->error('账号只能是6-15位字母或数字');
}
if (empty($company_id)) {
$this->error('请选择推广公司');
}
$promoteService = new PromoteService();
$status = $promoteService->addPromote($data);
if ($status) {
@ -278,7 +280,8 @@ class PromoteController extends ThinkController
$data['account'] = I('post.account');
$map1['id'] = array('neq',$_POST['id']);
$map1['account'] = $data['account'];
if ($this->accountExist($data['account'])) {
if ($this->accountExist($data['account'], $_POST['id'])) {
$this->error('该账号已存在');
}
$pdata = D('Promote')->where($map1)->find();

@ -95,8 +95,8 @@ class ServerNoticeController extends ThinkController {
}else{
$this->meta_title = '新增区服管理';
$this->m_title = '区服预告';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Server/lists','status'=>1])->find());
$this->m_title = '区服预告';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Server/lists','status'=>1])->find());
$this->display();
}

@ -64,6 +64,7 @@ class BatchImportExcelEvent extends Controller{
if($currentColumn == "C"){
$currentvalue = $sheet->getCell($address)->getValue();
if (empty($currentvalue)) {
continue;
unlink($file);
throw new \Exception($address.' 数据为空');
}
@ -86,6 +87,7 @@ class BatchImportExcelEvent extends Controller{
}else{
$currentvalue = $sheet->getCell($address)->getValue();
if (empty($currentvalue)) {
continue;
unlink($file);
throw new \Exception($address.' 数据为空');
}

@ -429,6 +429,28 @@
</if>
</tr>
<tr>
<td class="l" >Bata版本链接</td>
<td class="r" colspan="3">
<input type="text" class="txt " name="beta_url" value="{$data['beta_url']}" placeholder="请输入Bata版本下载链接">
</td>
</tr>
<tr>
<td class="l">Bata版本是否开启</td>
<td class="r" >
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="beta_status" <?php if ($data['beta_status'] == 0):?>checked='checked'<?php endif;?> > 关闭
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="beta_status" <?php if ($data['beta_status'] == 1):?>checked='checked'<?php endif;?> > 开启
</label>
</span>
</td>
</tr>
<notempty name="data.accredit_img">

@ -37,7 +37,7 @@
</div>
<h3 class="page_title">玩家列表</h3>
<if condition="(I('type',1) eq 1) ">
<p class="description_text">说明:此列表数据以平台账号为统计基数</p>
<p class="description_text">说明:此列表统计平台账号总数,当筛选条件为游戏不含区服时为该游戏的玩家数量,含区服时为玩家创建角色数量</p>
<else/>
<p class="description_text">说明游客登录默认属于第三方用户当用户通过SDK设置了用户名以后记录变换到本站用户列表里账户自动更换为设置的账号</p>
</if>
@ -354,7 +354,9 @@
</div>
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a>
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a> -->
</if>
{$_page|default=''}
</div>
@ -393,6 +395,15 @@
<script type="text/javascript">
$(function(){
$(".select_gallery").select2();
$(".export-btn").on("click",function(e){
e.preventDefault();
var cont = {$user_count};
if(cont < 50000){
window.location.href=$(this).attr("href")
}else{
layer.msg('为保证导出效率大于50000条数据暂不支持导出请更换检索条件后再次尝试');
}
})
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');

@ -38,6 +38,19 @@
<span class="notice-text">密码长度必须大于6位</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>所属推广公司</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
<!-- <span class="notice-text">设置该推广员所属的推广公司</span>-->
</td>
</tr>
<tr>
<td class="l">账号状态:</td>
<td class="r table_radio">
@ -83,19 +96,6 @@
</tr>
<tr>
<td class="l">所属推广公司</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
<!-- <span class="notice-text">设置该推广员所属的推广公司</span>-->
</td>
</tr>
</tbody>
</table>
</div>

@ -42,7 +42,7 @@
<tbody>
<tr>
<td class="r"> Execl模板:</td>
<td><a href="/Uploads/excel/区服列表-游戏名称.xls">下载模板</a></td>
<td><a href="/Public/Admin/excel/区服列表-游戏名称.xls">下载模板</a></td>
</tr>
<tr>
<td class="r">导入模板</td>

@ -42,12 +42,13 @@
<tbody>
<tr>
<td class="r"> Execl模板:</td>
<td><a href="/Uploads/excel/区服列表-游戏名称.xls">下载模板</a></td>
<td><a href="/Public/Admin/excel/区服列表-游戏名称.xls">下载模板</a></td>
</tr>
<tr>
<td class="r">导入模板</td>
<td class="r"><input type="file" name="fileExcel" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"></td>
</tr>
</tbody>
</table>
<table id="batch" border="0" cellspacing="0" cellpadding="0" style="display:none">

@ -157,7 +157,7 @@
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: ['admin.php?s=/SuperStatistical/lists' + params , 'no']
content: 'admin.php?s=/SuperStatistical/lists' + params
});
});
$("#role1").click(function () {
@ -167,7 +167,7 @@
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: ['admin.php?s=/SuperStatistical/lists' + params , 'no']
content: 'admin.php?s=/SuperStatistical/lists' + params
});
});
$("#superDetail").click(function () {
@ -177,7 +177,7 @@
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: ['admin.php?s=/SuperStatistical/superDetail' + params , 'no']
content: 'admin.php?s=/SuperStatistical/superDetail' + params
});
});
//搜索功能

@ -17,6 +17,9 @@
<script type="text/javascript" src="__JS__/select2.min.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
@ -42,7 +45,7 @@
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 92.5%;">
<div id="main" class="main" style="min-height: 342px;width: 97%;">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">

@ -17,6 +17,9 @@
<script type="text/javascript" src="__JS__/select2.min.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
@ -42,7 +45,7 @@
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 92.5%;">
<div id="main" class="main" style="min-height: 342px;width: 96%;">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">

Loading…
Cancel
Save