非管理员数据导出隐藏

master
zhengchanglong 5 years ago
parent a3f2edb3e1
commit dba78c08cd

@ -1094,7 +1094,7 @@ class MemberController extends ThinkController
$this->m_title = '登录记录';
$this->assign('user_count',$count[0]['count']);
$this->assign("is_admin",is_administrator());
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Member/login_record', 'status' => 1])->find());
parent::lists("UserLoginRecord", $p, $extend['map']);

@ -91,6 +91,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '游戏注册统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -172,6 +173,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '游戏充值统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -253,6 +255,7 @@ class PlatformController extends ThinkController
$this->meta_title = '注册方式统计列表';
$this->assign('list_data', $data);
$this->assign('total', $total);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -335,6 +338,7 @@ class PlatformController extends ThinkController
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '充值方式统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -459,6 +463,7 @@ class PlatformController extends ThinkController
//用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度)
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '渠道注册统计列表';
$this->assign("is_admin",is_administrator());
$this->assign('list_data', $data);
$this->assign('total', $total);
$this->display();
@ -509,14 +514,14 @@ class PlatformController extends ThinkController
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote);
$data =array();
for ($i=0; $i < count($promote); $i++) {
# code...
$proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select();
$str = '';
for($k=0; $k<count($proid); $k++){
for($k=0; $k<count($proid); $k++){
# code...
$str .= ($proid[$k]['id'].",");
}
@ -529,26 +534,26 @@ class PlatformController extends ThinkController
unset($_REQUEST['server_id']);
}
$dbdata = $spend
->field('
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map)
->where("pay_time".$pay_time)
->find();
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
} else {
$dbdata = $spend
->field('
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map)
->where("pay_time".$pay_time)
->find();
->where($map)
->where("pay_time".$pay_time)
->find();
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
}
@ -582,13 +587,14 @@ class PlatformController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
$data = my_sort($data, $data_order_type, (int)$data_order);
$size = $row;//每页显示的记录数
$pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数
$this->meta_title = '渠道充值统计列表';
$this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display();
}
@ -679,8 +685,8 @@ class PlatformController extends ThinkController
unset($_REQUEST['promote_id']);
}
$data = $spend->field('t.pid as promote_id,t.promote_account,sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth')
->join("inner JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
->join("inner JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
$count = count($data);
foreach ($data as $key => $value) {
static $i = 0;

@ -144,7 +144,7 @@ class RechargeSumController extends ThinkController
$this->assign('total', $total);
$this->assign('startDate', $startDateTime);
$this->assign('endDate', $endDateTime);
$this->assign("is_admin",is_administrator());
$this->m_title = '充值汇总';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'RechargeSum/summation', 'status' => 1])->find());

@ -5,37 +5,37 @@
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.page a {
float: left;
height: 28px;
border: 1px solid #DDD;
text-align: center;
line-height: 30px;
color: #3399d5;
padding: 0 14px;
width: auto;
}
</style>
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.page a {
float: left;
height: 28px;
border: 1px solid #DDD;
text-align: center;
line-height: 30px;
color: #3399d5;
padding: 0 14px;
width: auto;
}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">登录记录</h3>
@ -51,7 +51,7 @@
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
<label>搜索:</label>
</div>
{:W('Search/game_list')}
<div class="input-list">
@ -67,26 +67,26 @@
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <?php echo $vo.relation_game_name == I('game_name') ? 'selected':''; ?> >{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="server_name" name="server_name" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <?php echo $vo.relation_game_name == I('game_name') ? 'selected':''; ?> >{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1" <?php echo I('game_type') == 1 ? "selected" : ''?>>安卓</option>
<option value="2" <?php echo I('game_type') == 2 ? "selected" : ''?>>苹果</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="server_name" name="server_name" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
</select>
</div>
<div class="input-list">
<input type="text" name="login_ip" class="" placeholder="登录IP" value="{:I('login_ip')}">
</div>
@ -143,7 +143,13 @@
<volist name="list_data" id="data">
<tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td>
<td>{$data.user_account}</td>
<td>
<if condition="$is_admin eq true ">
{$data.user_account}
<else />
{$data.user_account|encryptStr}
</if>
</td>
<?php $gamename=trim(get_game_name($data['game_id'],'id'));?>
<td><notempty name="gamename">{$gamename}
</notempty></td>
@ -165,18 +171,20 @@
</div>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/login_record',array_merge(['xlsname'=>'玩家_登录记录'],I('get.')))}">导出</a>
<if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/login_record',array_merge(['xlsname'=>'玩家_登录记录'],I('get.')))}">导出</a>
</if>
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Member/login_record">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Member/login_record">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
@ -199,8 +207,8 @@
$(function () {
<volist name = ":I('get.')" id = "vo" > Think.setValue('{$key}', "{$vo}");
</volist >
<volist name = ":I('get.')" id = "vo" > Think.setValue('{$key}', "{$vo}");
</volist >
$(".select_gallery").select2();
//搜索功能
@ -307,8 +315,8 @@
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"

Loading…
Cancel
Save