批量更新
This commit is contained in:
@@ -0,0 +1,219 @@
|
||||
<?php /*a:3:{s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\bewadmin\userinfo.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="header">
|
||||
<span>管理员列表</span>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<div></div>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>真实姓名</th>
|
||||
<th>账户</th>
|
||||
<th>手机</th>
|
||||
<th>QQ</th>
|
||||
<th>角色</th>
|
||||
<th>性别</th>
|
||||
<th>状态</th>
|
||||
<th>登陆次数</th>
|
||||
<th>登陆时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['name']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['account']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['phone']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['qq']); ?></td>
|
||||
<td><?php echo isset($group[$vo['group_id']])?$group[$vo['group_id']]['group_name']:''; ?></td>
|
||||
<td>
|
||||
<?php if($vo['sex']==1): ?>
|
||||
<span style="color:red;">男</span>
|
||||
<?php elseif($vo['sex'] == 2): ?>
|
||||
<span style="color:green;">女</span>
|
||||
<?php else: ?>
|
||||
未知
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['times_login']); ?></td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['time_last']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['uid']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['uid']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'],function(){
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加管理员',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/useradd"
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
function edit(uid){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑管理员',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/useredit?uid="+uid
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function del(uid){
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/userdel",{'uid':uid},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg);
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,314 @@
|
||||
<?php /*a:3:{s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\bewtest\test_list.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="header">
|
||||
<span>演示列表-方法渲染</span>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-useradmin-formlist" style="height:100%;">
|
||||
<div class="layui-form-item" id="search"></div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbar">
|
||||
<div class="layui-btn-container">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="edit">
|
||||
<i class="layui-icon layui-icon-edit"></i>修改
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary" lay-event="del">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<table class="layui-hide" id="datalist" lay-filter="datalist"></table>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','table'],function(){
|
||||
table = layui.table;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
get_data();
|
||||
|
||||
table.on('row(datalist)',function(obj){
|
||||
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
||||
obj.tr.find("div.layui-unselect.layui-form-radio")[0].click();
|
||||
});
|
||||
table.on('toolbar(datalist)',function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
var data = checkStatus.data;
|
||||
var datas = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
|
||||
switch(obj.event){
|
||||
case 'add':
|
||||
layer.full(layer.open({
|
||||
title: '添加',
|
||||
type: 2,
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewtest/test_add",
|
||||
maxmin: true,
|
||||
area: ['70%','70%'],
|
||||
btn: ['确定','关闭'],
|
||||
yes: function(index,layero){
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var test_img =[];
|
||||
body.find("input[name='test_img']").each(function(){
|
||||
test_img.push($(this).val());
|
||||
})
|
||||
var dataj = {
|
||||
test_input : form.test_input.value,
|
||||
test_reference : form.test_reference.value,
|
||||
test_time : form.test_time.value,
|
||||
test_data : form.test_data.value,
|
||||
test_datatime : form.test_datatime.value,
|
||||
test_img : test_img,
|
||||
test_rich : form.test_rich.value,
|
||||
test_rich_baidu : form.test_rich_baidu.value,
|
||||
test_url : form.test_url.value
|
||||
};
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>bewtest/test_add',dataj,function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
get_data();
|
||||
layer.close(index);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}))
|
||||
break;
|
||||
case 'edit':
|
||||
if(!data[0]){
|
||||
layer.msg('请选择一条数据',{'icon':2});
|
||||
return false;
|
||||
}
|
||||
layer.full(layer.open({
|
||||
title: '修改',
|
||||
type: 2,
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewtest/test_edit?test_id="+data[0].test_id,
|
||||
maxmin: true,
|
||||
area: ['70%','70%'],
|
||||
btn: ['确定','关闭'],
|
||||
yes: function(index,layero){
|
||||
var form = layero.find('iframe')[0].contentWindow;
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
var test_img =[];
|
||||
body.find("input[name='test_img']").each(function(){
|
||||
test_img.push($(this).val());
|
||||
})
|
||||
var dataj = {
|
||||
test_id : data[0].test_id,
|
||||
test_input : form.test_input.value,
|
||||
test_reference : form.test_reference.value,
|
||||
test_time : form.test_time.value,
|
||||
test_data : form.test_data.value,
|
||||
test_datatime : form.test_datatime.value,
|
||||
test_img : test_img,
|
||||
test_rich : form.test_rich.value,
|
||||
test_rich_baidu : form.test_rich_baidu.value,
|
||||
test_url : form.test_url.value
|
||||
};
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>bewtest/test_edit',dataj,function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
get_data();
|
||||
layer.close(index);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}))
|
||||
break;
|
||||
case 'del':
|
||||
if(!data[0]){
|
||||
layer.msg('请选择一条数据',{'icon':2});
|
||||
return false;
|
||||
}
|
||||
layer.confirm('确定要删除吗?',{
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
},function(){
|
||||
$.post('<?php echo htmlentities((string) $config["admin_route"]); ?>bewtest/test_del',{'test_id':data[0].test_id},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg);
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
function get_data(){
|
||||
table.render({
|
||||
elem: '#datalist',
|
||||
method : 'post'
|
||||
,url:"<?php echo htmlentities((string) $config['admin_route']); ?>bewtest/test_list"
|
||||
,toolbar: '#toolbar'
|
||||
,defaultToolbar: ['filter', 'print', 'exports', {
|
||||
title: '提示'
|
||||
,layEvent: 'LAYTABLE_TIPS'
|
||||
,icon: 'layui-icon-tips'
|
||||
}]
|
||||
,title: '演示列表'
|
||||
,page: true
|
||||
,cols: [[
|
||||
{type:'checkbox'},
|
||||
{type:'radio'}
|
||||
,{field:'test_id', width:50, title:'ID'}
|
||||
,{field:'test_input', width:100, title: '文本'}
|
||||
,{field:'test_rich', width:100, title: '富文本'}
|
||||
,{field:'test_rich_baidu', width:120, title: '百度文本'}
|
||||
,{field:'test_img', width:100, title: '图片',templet:function(res){
|
||||
return '<img style="width:30px;height:30px;" onmouseover="show_img(this)" onmouseleave="hide_img()" src="'+res.test_img+'"';
|
||||
}}
|
||||
,{field:'test_reference', width:100, title: '参照',templet:function(res){
|
||||
if(res.test_reference == 1){
|
||||
return '<span style="color:green;">开启</span>';
|
||||
}else{
|
||||
return '<span style="color:grey;">关闭</span>';
|
||||
}
|
||||
}}
|
||||
,{field:'test_time', width:100, title: '时间戳'}
|
||||
,{field:'test_data', width:100, title: '日期'}
|
||||
,{field:'test_datatime', width:150, title: '日期时间'}
|
||||
,{field:'test_url', width:150, title: '网址链接',templet:function(res){
|
||||
return '<a href="'+res.test_url+'" target="_blank">'+res.test_url+'</a>';
|
||||
}}
|
||||
]]
|
||||
,data:[]
|
||||
,limit :10
|
||||
,limits:[10,20,30]
|
||||
,height: 'full-100'
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php /*a:1:{s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\login\index.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="bew">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/bews/css/login.css">
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
|
||||
<div class="layadmin-user-login-main">
|
||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||
<img src="<?php echo htmlentities((string) $config['logo']); ?>"/>
|
||||
<h2><?php echo htmlentities((string) $config['admin_name']); ?></h2>
|
||||
</div>
|
||||
<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
|
||||
<form class="layui-form login-form">
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-username" for="account"></label>
|
||||
<input type="text" id="account" name="account" placeholder="邮箱" class="layui-input" value="428188207@qq.com">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="password"></label>
|
||||
<input type="password" name="password" class="layui-input" placeholder="密码" class="layui-input" value="123456">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs7">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="code"></label>
|
||||
<input type="text" name="code" placeholder="图形验证码" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<div style="margin-left:10px;">
|
||||
<img src="<?php echo captcha_src(); ?>" class="layadmin-user-login-codeimg" id="img" onclick="reloadImg()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||
<input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" onclick="login()">登 陆</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form'],function(){
|
||||
var form = layui.form;
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
// 用户名控件获取焦点
|
||||
$('#account').focus();
|
||||
// 回车登录
|
||||
$('input').keydown(function(e){
|
||||
if(e.keyCode == 13){
|
||||
login();
|
||||
}
|
||||
});
|
||||
});
|
||||
// 登陆
|
||||
function login(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>login/login",$('form').serialize(),function(res){
|
||||
if(res.code>0){
|
||||
reloadImg();
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){window.location.href="<?php echo htmlentities((string) $config['admin_route']); ?>index/index";},1000);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
// 重新生成验证码
|
||||
function reloadImg(){
|
||||
$('#img').attr('src','<?php echo captcha_src(); ?>?rand='+Math.random());
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php /*a:3:{s:65:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\bewadmin\groupinfo.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="header">
|
||||
<span>部门列表</span>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<div></div>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>部门名</th>
|
||||
<th>状态</th>
|
||||
<th>添加时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($group) || $group instanceof \think\Collection || $group instanceof \think\Paginator): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['group_name']); ?></td>
|
||||
<td><?php echo $vo['status']==1 ? '开启' : '<span style="color:red;">禁用</span>'; ?></td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['time_add']); ?></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['group_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['group_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'],function(){
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加部门',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/groupadd"
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
function edit(group_id){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑部门',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/groupedit?group_id="+group_id
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function del(group_id){
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>bewadmin/groupdel",{'group_id':group_id},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg,{icon:1});
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,225 @@
|
||||
<?php /*a:3:{s:71:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\bewtest\test_static_list.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div class="header">
|
||||
<span>演示列表-静态表格</span>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加
|
||||
</button>
|
||||
<div></div>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>文本</th>
|
||||
<th>富文本</th>
|
||||
<th>百度文本</th>
|
||||
<th>图片</th>
|
||||
<th>参照</th>
|
||||
<th>时间戳</th>
|
||||
<th>日期</th>
|
||||
<th>日期时间</th>
|
||||
<th>网址链接</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(is_array($lists) || $lists instanceof \think\Collection || $lists instanceof \think\Paginator): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities((string) $vo['test_id']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_input']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_rich']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_rich_baidu']); ?></td>
|
||||
<td>
|
||||
<img style="width:30px;height:30px;" onmouseover="show_img(this)" onmouseleave="hide_img()" src="<?php echo htmlentities((string) $vo['test_img']); ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if(($vo['test_reference'] == 1)): ?>
|
||||
<span style="color:green;">开启</span>
|
||||
<?php else: ?>
|
||||
<span style="color:grey;">关闭</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo date('Y-m-d H:i:s',$vo['test_time']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_data']); ?></td>
|
||||
<td><?php echo htmlentities((string) $vo['test_datatime']); ?></td>
|
||||
<td><a href="<?php echo htmlentities((string) $vo['test_url']); ?>" target="_blank"><?php echo htmlentities((string) $vo['test_url']); ?></a></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit(<?php echo htmlentities((string) $vo['test_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-edit"></i>编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="del(<?php echo htmlentities((string) $vo['test_id']); ?>)">
|
||||
<i class="layui-icon layui-icon-delete"></i>删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div><?php echo $lists; ?></div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer'],function(){
|
||||
layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
});
|
||||
// 添加
|
||||
function add(){
|
||||
layer.full(
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加',
|
||||
shade: 0.3,
|
||||
maxmin: true,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>Bewtest/test_static_add"
|
||||
})
|
||||
);
|
||||
}
|
||||
// 编辑
|
||||
function edit(test_id){
|
||||
layer.full(layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
shade: 0.3,
|
||||
area: ['450px','550px'],
|
||||
content: "<?php echo htmlentities((string) $config['admin_route']); ?>Bewtest/test_static_edit?test_id="+test_id
|
||||
}));
|
||||
}
|
||||
// 删除
|
||||
function del(test_id){
|
||||
layer.confirm('确定要删除吗?', {
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.post("<?php echo htmlentities((string) $config['admin_route']); ?>Bewtest/test_del",{'test_id':test_id},function(res){
|
||||
if(res.code>0){
|
||||
layer.alert(res.msg,{icon:2});
|
||||
}else{
|
||||
layer.msg(res.msg,{icon:1});
|
||||
setTimeout(function(){window.location.reload();},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?php /*a:1:{s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\index\index.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="/static/bews/css/index.css" media="all">
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/static/bews/js/admin.js"></script>
|
||||
<style>
|
||||
.layadmin-side-shrink .layui-layout-admin .layui-logo {
|
||||
width: 60px;
|
||||
background-image:url("/static/bews/images/logob32.jpg");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body layadmin-themealias="default" class="layui-layout-body">
|
||||
<div id="LAY_app" class="layadmin-tabspage-none">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<!-- 头部区域 -->
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item layadmin-flexible" lay-unselect onclick="shrink()">
|
||||
<a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
|
||||
<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect title="全屏" onclick="fullScreen()">
|
||||
<a href="javascript:;" layadmin-event="fullscreen">
|
||||
<i class="layui-icon layui-icon-screen-full"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a href="javascript:;">
|
||||
<cite><?php echo htmlentities((string) $aUser['name']); ?></cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a lay-href="" onclick="menuFire('bewadmin/admininfo',1)">个人中心</a></dd>
|
||||
<hr>
|
||||
<dd layadmin-event="logout" style="text-align:center;" onclick="logout()">
|
||||
<a>退出</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 侧边菜单 -->
|
||||
<div class="layui-side layui-side-menu">
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo" lay-href="">
|
||||
<span><?php echo htmlentities((string) $config['admin_name']); ?></span>
|
||||
</div>
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
|
||||
<?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
|
||||
<li data-name="" data-jump="" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="<?php echo htmlentities((string) $vo['label']); ?>" lay-direction="2">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $vo['icon_class']); ?>"></i>
|
||||
<cite><?php echo htmlentities((string) $vo['label']); ?></cite>
|
||||
</a>
|
||||
<?php if((isset($vo['children']) && $vo['children'])): ?>
|
||||
<dl class="layui-nav-child">
|
||||
<?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cvo): $mod = ($i % 2 );++$i;?>
|
||||
<dd data-name="" data-jump="/">
|
||||
<?php if($cvo['type'] == 1): ?>
|
||||
<a href="javascript:;" onclick="menuFire('<?php echo htmlentities((string) $cvo['src']); ?>',1)">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php elseif($cvo['type'] == 2): ?>
|
||||
<a href="<?php echo htmlentities((string) $cvo['src']); ?>" target="_blank">
|
||||
<i class="layui-icon layui-icons <?php echo htmlentities((string) $cvo['icon_class']); ?>"></i><?php echo htmlentities((string) $cvo['label']); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 主体内容 -->
|
||||
<div class="layui-body" id="LAY_app_body">
|
||||
<div class="layadmin-tabsbody-item layui-show">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<iframe src="<?php echo htmlentities((string) $config['admin_route']); ?>index/welcome" onload="resetMainHeight(this)" style="width:100%;height:100%;" frameborder="0" scrolling="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade" onclick="shrink()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 辅助元素,一般用于移动设备下遮罩 -->
|
||||
<div class="layadmin-body-shade" layadmin-event="shade"></div>
|
||||
</div></div>
|
||||
<script type="text/javascript">
|
||||
layui.use(['element','layer','jquery'], function(){
|
||||
var element = layui.element;
|
||||
$ = layui.jquery;
|
||||
layer = layui.layer;
|
||||
setter = layui.setter;
|
||||
$('#clearcache').on('click',function(){
|
||||
$.ajax({
|
||||
url: "<?php echo htmlentities((string) $config['admin_route']); ?>index/clear",
|
||||
success: function (res) {
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){parent.window.location.reload();},1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
// 重新设置主操作页面高度
|
||||
function resetMainHeight(obj){
|
||||
// parent 上级
|
||||
// clientHeight 元素的像素高度,包含元素的高度+内边距,不包含水平滚动条,边框和外边距
|
||||
var height = parent.document.documentElement.clientHeight - 80;
|
||||
$(obj).parent('div').height(height);
|
||||
}
|
||||
// 菜单点击
|
||||
function menuFire(obj,num){
|
||||
if(num == 1){
|
||||
$('iframe').attr('src',"<?php echo htmlentities((string) $config['admin_route']); ?>"+obj);
|
||||
}
|
||||
var width = screen();
|
||||
if(width < 2){
|
||||
shrink();
|
||||
}
|
||||
}
|
||||
// 退出
|
||||
function logout(){
|
||||
layer.confirm('确定要退出吗?', {
|
||||
icon:3,
|
||||
btn: ['确定','取消']
|
||||
}, function(){
|
||||
$.get("<?php echo htmlentities((string) $config['admin_route']); ?>login/logout",function(res){
|
||||
if(res.code>0){
|
||||
layer.msg(res.msg,{'icon':2});
|
||||
}else{
|
||||
layer.msg(res.msg,{'icon':1});
|
||||
setTimeout(function(){window.location.href="<?php echo htmlentities((string) $config['admin_route']); ?>login/index";},1000);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php /*a:3:{s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\index\welcome.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<div style="text-align: center;color:gray;">
|
||||
<h1>欢迎使用<?php echo htmlentities((string) $config['admin_name']); ?></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,203 @@
|
||||
<?php /*a:3:{s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\bewtest\icon_list.php";i:1745482530;s:60:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\header.php";i:1745482530;s:58:"E:\Demos\DemoOwns\PHP\yunzer\app\bews\view\public\tail.php";i:1745482530;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities((string) $config['admin_name']); ?></title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/third/layui/css/layui.css" media="all"/>
|
||||
<style type="text/css">
|
||||
.header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;}
|
||||
.header div{border-bottom:solid 2px #009688;margin-top: 8px;}
|
||||
.header button{float:right;margin-top:-5px;}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
z-index: 2;
|
||||
color: #23527c;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: #337ab7;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > span:hover,
|
||||
.pagination > .disabled > span:focus,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.close-img { background: url(/static/bews/images/close_img.png); background-size: 20px 20px; width:20px; height: 20px; position: absolute; right: 5px; top: 5px; z-index: 2;}
|
||||
</style>
|
||||
<script type="text/javascript" src="/static/third/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','form','table','laydate','element','upload'],function(){
|
||||
layer = layui.layer; // layui 弹框
|
||||
form = layui.form; // layui form表单
|
||||
table = layui.table; // layui 表格
|
||||
laydate = layui.laydate; // layui 时间框
|
||||
element = layui.element; // layui element
|
||||
upload = layui.upload; // layui 上传
|
||||
$ = layui.jquery; // layui jquery
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:10px; box-sizing: border-box;">
|
||||
<style type="text/css">
|
||||
ul {
|
||||
display: block;
|
||||
list-style-type: disc;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
/* padding-inline-start: 40px; */
|
||||
}
|
||||
.site-doc-icon {
|
||||
margin-bottom: 50px;
|
||||
font-size: 0;
|
||||
}
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
.site-doc-icon li {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 132px;
|
||||
height: 105px;
|
||||
line-height: 25px;
|
||||
padding: 20px 0;
|
||||
margin-right: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid #e2e2e2;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
transition: all .3s;
|
||||
-webkit-transition: all .3s;
|
||||
}
|
||||
.site-doc-icon li .layui-icon {
|
||||
display: inline-block;
|
||||
font-size: 36px;
|
||||
}
|
||||
.site-doc-icon li .doc-icon-name, .site-doc-icon li .doc-icon-code {
|
||||
color: #c2c2c2;
|
||||
}
|
||||
.site-doc-icon li .doc-icon-fontclass {
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
padding: 0 5px;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
<div class="header" style="margin-bottom:20px;">
|
||||
<span>图标</span>
|
||||
<div></div>
|
||||
</div>
|
||||
<pre id="pre" class="layui-code">
|
||||
<!-- 图标 -->
|
||||
<i class="layui-icon layui-icon-face-smile"></i>
|
||||
<!-- 图标,设置颜色、大小 -->
|
||||
<i class="layui-icon layui-icon-face-smile" style="font-size:30px;color:#1E9FFF;"></i>
|
||||
<!-- 图标,设置旋转 -->
|
||||
<i class="layui-icon layui-icon-face-smile layui-anim layui-anim-rotate layui-anim-loop"></i>
|
||||
</pre>
|
||||
<ul class="site-doc-icon" style="text-align: center;">
|
||||
<?php foreach($lists as $lists_v): ?>
|
||||
<li>
|
||||
<i class="layui-icon <?php echo htmlentities((string) $lists_v['icon_css']); if(($lists_v['icon_name']=='loading')): ?> layui-anim layui-anim-rotate layui-anim-loop<?php endif; ?>"></i>
|
||||
<div class="doc-icon-name"><?php echo htmlentities((string) $lists_v['icon_name']); ?></div>
|
||||
<div class="doc-icon-code"><?php echo htmlentities((string) $lists_v['icon_html']); ?></div>
|
||||
<div class="doc-icon-fontclass"><?php echo htmlentities((string) $lists_v['icon_css']); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
layui.use('code', function(){
|
||||
layui.code({
|
||||
elem:'#pre'
|
||||
,title: '使用方法'
|
||||
,encode: true
|
||||
,skin: 'notepad' //如果要默认风格,不用设定该key。
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
// 显示图片
|
||||
function show_img(obj){
|
||||
var imgurl = $(obj).attr('src');
|
||||
var res = getMousePos();
|
||||
var html = '<div style="background:#fff;position:absolute;width:200px;border:solid 1px #cdcdcd;border-radius:6px;padding:2px;left:'+res.x+'px;top:'+res.y+'px;z-index:1000" id="preview">\
|
||||
<img style="width:100%;border-radius:6px;" src="'+imgurl+'">\
|
||||
</div>';
|
||||
$('body').append(html);
|
||||
}
|
||||
// 隐藏图片
|
||||
function hide_img(){
|
||||
$('#preview').remove();
|
||||
}
|
||||
// 图片位置计算
|
||||
function getMousePos(event) {
|
||||
var e = event || window.event;
|
||||
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
var x = e.pageX || e.clientX + scrollX;
|
||||
var y = e.pageY || e.clientY + scrollY;
|
||||
return { 'x': x, 'y': y };
|
||||
}
|
||||
// 删除图片
|
||||
function deleteImage(path,obj){
|
||||
$(obj).closest('.upload_pic_li').remove();
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user