非管理员数据加密显示

master
zhengchanglong 5 years ago
parent cc6d095a1c
commit 9a2a7df2e6

@ -674,6 +674,7 @@ class UserController extends AdminController
$this->m_title = '角色查询';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/rolelist', 'status' => 1])->find());
$this->assign("is_admin",is_administrator());
$this->display();

@ -1,79 +1,79 @@
<extend name="Public/base" />
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
.select2-container--default .select2-selection--single {
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
.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;}
.badge {
position: relative;
display: inline-block;
padding: 0 6px;
font-size: 12px;
text-align: center;
background-color: #1E9FFF;
color: #fff;
border-radius: 2px;
height: 18px;
line-height: 18px;
margin-right: 10px;
}
</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;}
.badge {
position: relative;
display: inline-block;
padding: 0 6px;
font-size: 12px;
text-align: center;
background-color: #1E9FFF;
color: #fff;
border-radius: 2px;
height: 18px;
line-height: 18px;
margin-right: 10px;
}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">角色查询</h3>
<p class="description_text">说明:角色查询仅作为玩家角色查询的辅助工具,使用此功能需先保证游戏对接已经获取相关参数</p>
</div>
<div class="cf top_nav_list">
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<div class="input-list">
<input type="text" name="user_account" class="" value="{:I('user_account')}" placeholder="玩家账号">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list">
<input type="text" name="role_name" class="" value="{:I('role_name')}" placeholder="角色名称">&nbsp;&nbsp;&nbsp;
</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>
<input type="text" name="role_name" class="" value="{:I('role_name')}" placeholder="角色名称">&nbsp;&nbsp;&nbsp;
</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_id" name="server_id" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
@ -101,63 +101,75 @@
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="创角开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="创角结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="创角结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('rolelist',array('row'=>I('row')))}">搜索</a>
</div>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<table class="">
<thead>
<tr>
<th class="">创角时间</th>
<th class="">玩家账号</th>
<th class="">游戏名称</th>
<th class="">游戏区服ID</th>
<th class="">游戏区服</th>
<th class="">角色ID</th>
<th class="">角色名</th>
<th class="">游戏等级</th>
<th class="">所属推广员</th>
<th class="">最后登录时间</th>
<th class="">最后登录IP</th>
<!-- <th class="">操作</th> -->
</tr>
</thead>
<tbody>
<notempty name="list">
<volist name="list" id="data">
<tr>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.user_account} </td>
<?php $gamename = trim($data['game_name']);
$servername = trim($data['server_name']);
$rolename = trim($data['role_name']);?>
<td><notempty name="gamename">{$gamename}<else /></notempty></td>
<td><span class="badge">{$data['server_id']}</span></td>
<td><notempty name="servername">{$servername}<else /></notempty></td>
<td><span class="badge">{$data['role_id']}</span></td>
<td><notempty name="rolename">{$rolename}<else /></notempty></td>
<td>{$data.role_level}</td>
<td>{$data.promote_account}</td>
<td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td>
<td>{$data.play_ip}</td>
<!-- <td><a class="ajax-get" href="{:U('user_update',['ids'=>$data['id']])}">更新</a></td> -->
</tr>
</volist>
<else/>
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
</notempty>
</tbody>
</table>
</div>
<table class="">
<thead>
<tr>
<th class="">创角时间</th>
<th class="">玩家账号</th>
<th class="">游戏名称</th>
<th class="">游戏区服ID</th>
<th class="">游戏区服</th>
<th class="">角色ID</th>
<th class="">角色名</th>
<th class="">游戏等级</th>
<th class="">所属推广员</th>
<th class="">最后登录时间</th>
<th class="">最后登录IP</th>
<!-- <th class="">操作</th> -->
</tr>
</thead>
<tbody>
<notempty name="list">
<volist name="list" id="data">
<tr>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td>
<if condition="$is_admin eq true ">
{$data.user_account}
<else />
{$data.user_account|encryptStr}
</if>
</td>
<?php $gamename = trim($data['game_name']);
$servername = trim($data['server_name']);
$rolename = trim($data['role_name']);?>
<td><notempty name="gamename">{$gamename}<else /></notempty></td>
<td><span class="badge">{$data['server_id']}</span></td>
<td><notempty name="servername">{$servername}<else /></notempty></td>
<td><span class="badge">{$data['role_id']}</span></td>
<td><notempty name="rolename">{$rolename}<else /></notempty></td>
<td>{$data.role_level}</td>
<td>
<if condition="$is_admin eq true ">
{$data.promote_account}
<else />
{$data.promote_account|encryptStr}
</if>
</td>
<td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td>
<td>{$data.play_ip}</td>
<!-- <td><a class="ajax-get" href="{:U('user_update',['ids'=>$data['id']])}">更新</a></td> -->
</tr>
</volist>
<else/>
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
</notempty>
</tbody>
</table>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/expUser',array(
<a class="sch-btn" href="{:U('Export/expUser',array(
'id'=>1,
'user_account'=>I('user_account'),
'game_name'=>I('game_name'),
@ -173,24 +185,24 @@
{$_page}
</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="User/rolelist">
</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="User/rolelist">
</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>
<block name="script">
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
@ -198,159 +210,159 @@ $(".select_gallery").select2();
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
var start = $("#time_start").val();
var end = $("#time_end").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
<script type="text/javascript">
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
var start = $("#time_start").val();
var end = $("#time_end").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
//回车搜索
$(".search-input").keyup(function(e){
if(e.keyCode === 13){
$("#search").click();
return false;
}
});
//导航高亮
highlight_subnav('{:U('User/rolelist')}');
if('{$Think.get.game_name}'!=''){
$('#select2-game_id-container').text('{$Think.get.game_name}');
}
window.location.href = url;
});
//回车搜索
$(".search-input").keyup(function(e){
if(e.keyCode === 13){
$("#search").click();
return false;
}
});
//导航高亮
highlight_subnav('{:U('User/rolelist')}');
if('{$Think.get.game_name}'!=''){
$('#select2-game_id-container').text('{$Think.get.game_name}');
}
if('{$Think.get.server_id}'!=''){
$('#select2-server_id-container').text('{:get_server_name(I("server_id"))}');
}
if('{$Think.get.server_id}'!=''){
$('#select2-server_id-container').text('{:get_server_name(I("server_id"))}');
}
$(".jssearch").find(".drop-down1").hover(function(){
$("#sub-sch-menu").removeClass("hidden");
},function(){
$("#sub-sch-menu").addClass("hidden");
});
$(".jssearch").find(".drop-down1").hover(function(){
$("#sub-sch-menu").removeClass("hidden");
},function(){
$("#sub-sch-menu").addClass("hidden");
});
get_sever($("#game_id").find("option:selected").attr('game-id'));
get_sever($("#game_id").find("option:selected").attr('game-id'));
$("#game_id").change(function(){
get_sever($(this).find("option:selected").attr('game-id'));
})
//时间
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true
});
$("#game_id").change(function(){
get_sever($(this).find("option:selected").attr('game-id'));
})
//时间
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
pickerPosition:'bottom-left'
})
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
pickerPosition:'bottom-left'
})
function get_sever(game_id){
//var game_id = game_id;//$("this").find("option:selected").attr('game-id');
if(!game_id) {return;}
$.ajax({
url:"{:U('User/get_server_lists')}",
type:"post",
dataType:"json",
data:{game_id:game_id},
success:function(result){
//$("#server_id").append("<option value='0'>请选择</option>");
if(result.status == 1){
var data = result.data;
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
for ( var i = 0; i < data.length; i++) {
var server_id = data[i].id;
var server_name = data[i].server_name;
$("#server_id").append("<option value="+server_id+">" + server_name + "</option>");
function get_sever(game_id){
//var game_id = game_id;//$("this").find("option:selected").attr('game-id');
if(!game_id) {return;}
$.ajax({
url:"{:U('User/get_server_lists')}",
type:"post",
dataType:"json",
data:{game_id:game_id},
success:function(result){
//$("#server_id").append("<option value='0'>请选择</option>");
if(result.status == 1){
var data = result.data;
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
for ( var i = 0; i < data.length; i++) {
var server_id = data[i].id;
var server_name = data[i].server_name;
$("#server_id").append("<option value="+server_id+">" + server_name + "</option>");
}
}else{
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
}
}else{
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
}
},
error:function(){
alert("??");
}
})
}
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevelOther')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
// '<option value="UC"'+(promote_id && 'UC' == promote_id?'selected':'')+'>UC渠道</option>' +
'';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</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>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
var game_id = "{:I('server_id')}";
$("#game_type").change(function(){
var game_name = $("#game_name option:selected").val();
if(game_name != ''){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_id+"' "+(game_id && data[i].server_id == game_id?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}else{
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
},
error:function(){
alert("??");
}
})
}
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevelOther')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
// '<option value="UC"'+(promote_id && 'UC' == promote_id?'selected':'')+'>UC渠道</option>' +
'';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</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>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
var game_id = "{:I('server_id')}";
$("#game_type").change(function(){
var game_name = $("#game_name option:selected").val();
if(game_name != ''){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_id+"' "+(game_id && data[i].server_id == game_id?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
}else{
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
}
});
});
$("#game_name").change(function(){
$("#game_type").change();
});
$("#game_name").change();
</script>
$("#game_name").change(function(){
$("#game_type").change();
});
$("#game_name").change();
</script>
</block>

Loading…
Cancel
Save