Initial project files: BESCMS full source
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
{template "header.html"}
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="{THEME_PATH}assets/js/avatar/iscroll-zoom.js"></script>
|
||||
<script src="{THEME_PATH}assets/js/avatar/hammer.js"></script>
|
||||
<script src="{THEME_PATH}assets/js/avatar/lrz.all.bundle.js"></script>
|
||||
<script src="{THEME_PATH}assets/js/avatar/jquery.photoClip.js"></script>
|
||||
<style>
|
||||
|
||||
#clipArea {
|
||||
margin: 20px;
|
||||
height: 300px;
|
||||
}
|
||||
#file,
|
||||
#clipBtn {
|
||||
margin: 5px;
|
||||
}
|
||||
#view {
|
||||
margin: 0 auto;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="margin-top: -20px;">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="view"><img class="img-circle" width="100" height="100" src="{dr_avatar($member.uid)}?cache={SYS_TIME}">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div id="clipArea"></div>
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 text-center">
|
||||
<div class="fileinput fileinput-new" data-provides="fileinput">
|
||||
<span class="btn green btn-file">
|
||||
<span class="fileinput-new"> {dr_lang('选择图片')} </span>
|
||||
<input type="file" id="file">
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-info" id="clipBtn"> {dr_lang('保存头像')}</button>
|
||||
<button type="button" class="btn btn-info red" onclick="clear_avatar()" id="clipBtn2"> {dr_lang('清空头像')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var clipArea = new bjj.PhotoClip("#clipArea", {
|
||||
size: [200, 200],
|
||||
outputSize: [200, 200],
|
||||
file: "#file",
|
||||
view: "#view",
|
||||
ok: "#clipBtn",
|
||||
loadStart: function() {
|
||||
//console.log("照片读取中");
|
||||
},
|
||||
loadComplete: function() {
|
||||
//console.log("照片读取完成");
|
||||
},
|
||||
clipFinish: function(dataURL) {
|
||||
$('#dr_file').val(dataURL);
|
||||
dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{FC_NOW_URL}&r={rand(0, 9999)}');
|
||||
}
|
||||
});
|
||||
function clear_avatar() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: '{dr_url('api/avatar_del', ['id'=>$member.uid])}',
|
||||
success: function (json) {
|
||||
dr_cmf_tips(json.code, json.msg);
|
||||
setTimeout("window.location.href = '{FC_NOW_URL}&r={rand(0, 9999)}'", 2000);
|
||||
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,51 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
<p>服务器的相关配置,最好是联系服务商专业的技术为您配置环境</p>
|
||||
</div>
|
||||
|
||||
<p>php.ini文件位置不固定,每个主机的目录不一样,需要咨询服务商此文件的位置</p>
|
||||
|
||||
|
||||
|
||||
post_max_size
|
||||
<p>
|
||||
表单提交最大数值,此项不是限制上传单个文件的大小,而是针对整个表单的提交数据进行限制的
|
||||
默认为8M,设置为自己需要的值,此参数建议要设置比upload_max_filesize大一些
|
||||
</p>
|
||||
|
||||
|
||||
upload_max_filesize
|
||||
<p>
|
||||
允许上传文件大小的最大值,默认为2M,设置为自己需要的值此参数建议不要超过post_max_size值,因为它受控于post_max_size值(就算upload_max_filesize设置了1G,而post_max_size只设置了2M时,大于2M的文件照样传不上去,因为它受控于post_max_size值)
|
||||
</p>
|
||||
|
||||
|
||||
max_input_vars
|
||||
<p>
|
||||
用来限制提交的表单数量,默认值为 1000, 如果你栏目太多的话,而且需要配置用户权限的时候会发现无法保存,这时候说明这个值太小了,设置10000一般够用。
|
||||
</p>
|
||||
|
||||
|
||||
max_execution_time
|
||||
<p>
|
||||
每个PHP页面运行的最大时间值(秒),默认30秒
|
||||
</p>
|
||||
|
||||
max_input_time
|
||||
<p>
|
||||
每个PHP页面接收数据所需的最大时间,默认60秒
|
||||
</p>
|
||||
|
||||
memory_limit
|
||||
<p>
|
||||
每个PHP页面所需要的最大内存,默认8M
|
||||
</p>
|
||||
|
||||
allow_url_fopen
|
||||
<p>
|
||||
使用QQ登录、微信、微博快捷登录、在线支付、下载远程图片等功能时必须开启allow_url_fopen,设置为 allow_url_fopen = On。
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,183 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{dr_lang('预览')}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<meta name="renderer" content="webkit">
|
||||
<script src="{THEME_PATH}assets/global/plugins/jquery.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<link href="{THEME_PATH}assets/icon/css/icon.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/css/admin{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">var admin_file = '{SELF}';var is_min = '{$is_min}'; var is_oemcms = '{IS_OEM_CMS}'; var is_mobile_cms = '{$is_mobile}'; var is_admin = '{if dr_in_array(1, $admin.roleid)}1{else}2{/if}';</script>
|
||||
<script src="{LANG_PATH}lang.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/scripts/app{if !IS_XRDEV}.min{/if}.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/js/cms.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
min-height: 100%;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.navbar-preview {
|
||||
height: 50px;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 0;
|
||||
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1030;
|
||||
|
||||
background: #40aae3;
|
||||
background: linear-gradient(270deg, #40aae3) center / cover;
|
||||
background-size: 800% 800%;
|
||||
-webkit-animation: navbaranimation 30s ease infinite;
|
||||
-moz-animation: navbaranimation 30s ease infinite;
|
||||
animation: navbaranimation 30s ease infinite;
|
||||
}
|
||||
|
||||
.navbar-preview a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar-preview .col-xs-6 {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.iframe-preview {
|
||||
position: absolute;
|
||||
height: calc(100% - 55px);
|
||||
width: 100%;
|
||||
border: none;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.iframe-preview-mobile {
|
||||
width: 400px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, .085);
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: .5rem 1rem;
|
||||
}
|
||||
|
||||
.nav-preview {
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nav-preview li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.nav-preview li > a, .nav-preview li > span {
|
||||
display: inline-block;
|
||||
padding: 0 14px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.nav-preview .popover-title {
|
||||
padding: 5px 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
@-webkit-keyframes navbaranimation {
|
||||
0% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes navbaranimation {
|
||||
0% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes navbaranimation {
|
||||
0% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{if $demo == 'pc'}
|
||||
<iframe class="iframe-preview " width="100%" src="{$url}"></iframe>
|
||||
{else}
|
||||
<iframe class="iframe-preview iframe-preview-mobile " width="100%" src="{$url}"></iframe>
|
||||
{/if}
|
||||
|
||||
<nav class="navbar navbar-preview">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-4 text-left">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4 ">
|
||||
<ul class="nav-preview" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link btn-desktop {if $demo=='pc'}active{/if}" href="javascript:" data-url="{SITE_URL}" data-toggle="tooltip" data-placement="left" title="PC端浏览" data-original-title="PC端浏览">
|
||||
<i class="fa fa-desktop"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link btn-mobile {if $demo=='mobile'}active{/if}" href="javascript:" data-url="{SITE_MURL}" data-toggle="tooltip" data-placement="right" title="移动端预览" data-original-title="移动端预览">
|
||||
<i class="fa fa-mobile fa-2x" style="font-size:1.4em;"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4 text-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$(document).on('click', ".nav-link", function (e) {
|
||||
$(".iframe-preview").toggleClass("iframe-preview-mobile", $(this).hasClass("btn-mobile"));
|
||||
$(".nav-link").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$(".iframe-preview").attr('src', $(this).data('url'));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{dr_clearhtml($msg)}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<link href="{ROOT_THEME_PATH}assets/icon/css/icon.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/css/admin.min.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/css/my.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">var admin_file = '{SELF}'; var assets_path = '{THEME_PATH}assets/';</script>
|
||||
<script src="{LANG_PATH}lang.js" type="text/javascript"></script>
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="{ROOT_THEME_PATH}assets/js/cms.js" type="text/javascript"></script>
|
||||
<script src="{ROOT_THEME_PATH}assets/global/scripts/app.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body style="background: #ffffff">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div style="padding: 20px;">
|
||||
<ul class="list-group">
|
||||
{loop $list $id $t}
|
||||
<li class="list-group-item" style="overflow: hidden">
|
||||
<input type="hidden" name="data[{$id}]" value="" id="aid_{$id}">
|
||||
<a href="{$t}" target="_blank">{$t}</a>
|
||||
<a id="content_{$id}" style="margin-top:0px;float: right;"> </a>
|
||||
</li>
|
||||
<script type="text/javascript">
|
||||
function dr_down_{$id}(){
|
||||
$('#content_{$id}').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif">');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "{$down_url}&id={$id}",
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#content_{$id}').addClass("badge badge-danger");
|
||||
$('#content_{$id}').html(json.msg);
|
||||
$('#content_{$id}').attr("onclick", "dr_down_{$id}()");
|
||||
} else {
|
||||
$('#content_{$id}').removeClass("badge-danger");
|
||||
$('#content_{$id}').addClass("badge badge-success");
|
||||
$('#content_{$id}').html('{dr_lang("成功")}');
|
||||
$('#aid_{$id}').val(json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function () {
|
||||
dr_down_{$id}();
|
||||
});
|
||||
</script>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Emoji</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/jquery.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dr_insert_emoji_value(e) {
|
||||
var html = $('#html_'+e).html();
|
||||
var value = parent.$('#dr_{$name}').val();
|
||||
parent.layer.closeAll();
|
||||
parent.$('#dr_{$name}').insertContent(html);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
a {
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
margin: 3px;
|
||||
padding: 5px;
|
||||
border: 1px #EEE solid;
|
||||
color:#000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a span {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{php $i=0;}
|
||||
{loop $emoji $name $t}
|
||||
<a href="javascript:dr_insert_emoji_value({$i});"><span id="html_{$i}">{dr_html2emoji($name)}</span></a>
|
||||
{php $i++;}
|
||||
{/loop}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div style=" padding: 20px 10px 0 10px">
|
||||
<textarea name="code" style="height:90%;width: 100%; padding: 6px 12px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #E4E6EF;
|
||||
color: #3F4254;
|
||||
background-clip: padding-box;
|
||||
border-radius: 4px;">{$data}</textarea>
|
||||
</div>
|
||||
</form>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,262 @@
|
||||
{template "header.html"}
|
||||
|
||||
<style>
|
||||
.api-join-wrap {
|
||||
--aj-primary: #3598dc;
|
||||
--aj-primary-hover: #2a7ab9;
|
||||
--aj-border: #e8ecf1;
|
||||
--aj-bg: #f7f9fc;
|
||||
--aj-text: #3d4a5c;
|
||||
--aj-muted: #8a96a8;
|
||||
--aj-radius: 6px;
|
||||
--aj-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
.api-join-wrap .api-join-search {
|
||||
background: var(--aj-bg);
|
||||
border: 1px solid var(--aj-border);
|
||||
border-radius: var(--aj-radius);
|
||||
padding: 12px 14px;
|
||||
margin-bottom: 14px;
|
||||
box-shadow: var(--aj-shadow);
|
||||
}
|
||||
.api-join-wrap .api-join-search form {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.api-join-wrap .api-join-search .search-input-wrap {
|
||||
flex: 1;
|
||||
min-width: 180px;
|
||||
position: relative;
|
||||
}
|
||||
.api-join-wrap .api-join-search .search-input-wrap .fa-search {
|
||||
position: absolute;
|
||||
left: 11px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--aj-muted);
|
||||
font-size: 13px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.api-join-wrap .api-join-search .form-control {
|
||||
height: 34px;
|
||||
padding-left: 32px;
|
||||
border-color: #dce3ed;
|
||||
border-radius: var(--aj-radius);
|
||||
box-shadow: none;
|
||||
transition: border-color .2s, box-shadow .2s;
|
||||
}
|
||||
.api-join-wrap .api-join-search .form-control:focus {
|
||||
border-color: var(--aj-primary);
|
||||
box-shadow: 0 0 0 3px rgba(53, 152, 220, 0.12);
|
||||
}
|
||||
.api-join-wrap .api-join-search .btn.blue {
|
||||
height: 34px;
|
||||
padding: 0 16px;
|
||||
border-radius: var(--aj-radius);
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.02em;
|
||||
transition: background-color .2s, transform .15s;
|
||||
}
|
||||
.api-join-wrap .api-join-search .btn.blue:hover {
|
||||
background-color: var(--aj-primary-hover);
|
||||
}
|
||||
.api-join-wrap .api-join-search .btn.blue:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.api-join-wrap .table-scrollable {
|
||||
border: 1px solid var(--aj-border);
|
||||
border-radius: var(--aj-radius);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--aj-shadow);
|
||||
background: #fff;
|
||||
}
|
||||
.api-join-wrap .api-join-table {
|
||||
margin-bottom: 0;
|
||||
border: 0;
|
||||
}
|
||||
.api-join-wrap .api-join-table thead tr.heading th {
|
||||
background: linear-gradient(180deg, #f9fbfd 0%, #f1f5f9 100%);
|
||||
color: var(--aj-text);
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid var(--aj-border);
|
||||
padding: 10px 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.api-join-wrap .api-join-table thead tr.heading th.myselect {
|
||||
width: 42px;
|
||||
text-align: center;
|
||||
}
|
||||
.api-join-wrap .api-join-table tbody td {
|
||||
padding: 9px 12px;
|
||||
color: var(--aj-text);
|
||||
font-size: 13px;
|
||||
vertical-align: middle;
|
||||
border-color: #eef2f6;
|
||||
transition: background-color .15s;
|
||||
}
|
||||
.api-join-wrap .api-join-table tbody tr:hover td {
|
||||
background-color: #f5f9fd;
|
||||
}
|
||||
.api-join-wrap .api-join-table tbody tr:nth-child(even) td {
|
||||
background-color: #fbfcfe;
|
||||
}
|
||||
.api-join-wrap .api-join-table tbody tr:nth-child(even):hover td {
|
||||
background-color: #f5f9fd;
|
||||
}
|
||||
.api-join-wrap .api-join-table tbody td:first-child + td {
|
||||
color: var(--aj-muted);
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
.api-join-wrap .api-join-table .myselect {
|
||||
text-align: center;
|
||||
}
|
||||
.api-join-wrap .api-join-table .mt-checkbox > span {
|
||||
border-radius: 3px;
|
||||
}
|
||||
.api-join-wrap .api-join-footer {
|
||||
padding: 14px 0 4px;
|
||||
margin: 0;
|
||||
}
|
||||
.api-join-wrap .api-join-footer .pagination {
|
||||
margin: 0;
|
||||
}
|
||||
.api-join-wrap .api-join-footer .pagination > li > a,
|
||||
.api-join-wrap .api-join-footer .pagination > li > span {
|
||||
border-radius: var(--aj-radius);
|
||||
margin: 0 2px;
|
||||
color: var(--aj-text);
|
||||
border-color: var(--aj-border);
|
||||
transition: all .15s;
|
||||
}
|
||||
.api-join-wrap .api-join-footer .pagination > li > a:hover {
|
||||
background: var(--aj-bg);
|
||||
border-color: #c5d3e3;
|
||||
color: var(--aj-primary);
|
||||
}
|
||||
.api-join-wrap .api-join-footer .pagination > .active > a,
|
||||
.api-join-wrap .api-join-footer .pagination > .active > a:hover,
|
||||
.api-join-wrap .api-join-footer .pagination > .active > a:focus,
|
||||
.api-join-wrap .api-join-footer .pagination > .active > span,
|
||||
.api-join-wrap .api-join-footer .pagination > .active > span:hover,
|
||||
.api-join-wrap .api-join-footer .pagination > .active > span:focus,
|
||||
.api-join-wrap .api-join-footer .pagination > li.active > a,
|
||||
.api-join-wrap .api-join-footer .pagination > li.active > a:hover,
|
||||
.api-join-wrap .api-join-footer .pagination > li.active > span {
|
||||
color: #fff;
|
||||
background: var(--aj-primary);
|
||||
border-color: var(--aj-primary);
|
||||
}
|
||||
.api-join-wrap .api-join-empty td {
|
||||
text-align: center;
|
||||
color: var(--aj-muted);
|
||||
padding: 36px 12px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.api-join-wrap .api-join-empty td:before {
|
||||
content: "\f07b";
|
||||
font-family: FontAwesome;
|
||||
display: block;
|
||||
font-size: 28px;
|
||||
color: #c5d0dc;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="api-join-wrap">
|
||||
<div class="api-join-search table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{$search}
|
||||
<div class="search-input-wrap">
|
||||
<i class="fa fa-search"></i>
|
||||
<input type="text" class="form-control" placeholder="{dr_lang('输入关键词搜索')}" value="{$param['keyword']}" name="keyword" />
|
||||
</div>
|
||||
<button type="submit" class="btn blue btn-sm onloading" name="submit">
|
||||
<i class="fa fa-search"></i> {dr_lang('搜索')}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<input type="hidden" name="isajax" value="1">
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable api-join-table">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="100">Id</th>
|
||||
{loop $field['setting']['option']['field'] $tt}
|
||||
{if $tt['field']}
|
||||
<th width="{$tt['width']}">{$tt['name']}</th>
|
||||
{/if}
|
||||
{/loop}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{table table=$table where=$where order=updatetime page=1 pagesize=$pagesize urlrule=$urlrule}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>{$t.id}</td>
|
||||
{loop $field['setting']['option']['field'] $tt}
|
||||
{if $tt['field']}
|
||||
<td>{dr_list_function($tt.func, $t[$tt['field']], $param, $t, NULL, NULL)}</td>
|
||||
{/if}
|
||||
{/loop}
|
||||
</tr>
|
||||
{/table}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row fc-list-footer api-join-footer">
|
||||
<div class="col-md-12 text-center">
|
||||
{$pages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
var $tbody = $('.api-join-table tbody');
|
||||
if ($tbody.children('tr').length === 0) {
|
||||
var colCount = $('.api-join-table thead th').length || 1;
|
||||
$tbody.append('<tr class="api-join-empty"><td colspan="' + colCount + '">' + '{dr_lang('暂无数据')}' + '</td></tr>');
|
||||
}
|
||||
|
||||
$('.pagination a').click(function () {
|
||||
if ($('.checkboxes').is(':checked')) {
|
||||
var url = $(this).attr('href');
|
||||
var msg = '{dr_lang('离开本页面后,当前选择的项目将被取消')}';
|
||||
layer.confirm(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index){
|
||||
window.location.href = url;
|
||||
return true;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,39 @@
|
||||
<div class="scroller_{$name}_files">
|
||||
<div class="scroller" data-inited="0" data-initialized="1" data-always-visible="1" data-rail-visible="1">
|
||||
<table class="table table-striped table-bordered fc-sku-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="90" style="border-left-width: 1px!important;">ID </th>
|
||||
{loop $field['setting']['option']['field'] $tt}
|
||||
{if $tt['field']}
|
||||
<th width="{$tt['width']}">{$tt['name']}</th>
|
||||
{/if}
|
||||
{/loop}
|
||||
{if !$is_show}
|
||||
<th width="70" style="text-align: center"><button type="button" class="btn blue btn-xs" onClick="dr_add_join_{$name}(this)"> <i class="fa fa-plus"></i><buttton> </th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="join_{$name}-sort-items" class="scroller_body">
|
||||
<!--list-->
|
||||
{loop $mylist $t}
|
||||
<tr id="dr_items_{$name}_{$t.id}">
|
||||
<td>{$t.id}
|
||||
<input type="hidden" name="data[{$name}][]" value="{$t.id}"></td>
|
||||
{loop $field['setting']['option']['field'] $tt}
|
||||
{if $tt['field']}
|
||||
<td>{dr_list_function($tt.func, $t[$tt['field']], $param, $t, NULL, NULL)}</td>
|
||||
{/if}
|
||||
{/loop}
|
||||
|
||||
|
||||
{if !$is_show}
|
||||
<td width="45" style="text-align: center"><a class="btn btn-xs red" href="javascript:;" onclick="$('#dr_items_{$name}_{$t.id}').remove()"><i class="fa fa-trash"></i></a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/loop}
|
||||
<!--list-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.finecms.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (App.isAngularJsApp() === false) {
|
||||
jQuery(document).ready(function() {
|
||||
if (jQuery().datepicker) {
|
||||
$('.date-picker').datepicker({
|
||||
rtl: App.isRTL(),
|
||||
orientation: "left",
|
||||
autoclose: true
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,22 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group" id="dr_row_username">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('账号')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_username" name="data[username]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_password">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('密码')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="password" class="form-control" id="dr_password" name="data[password]">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,105 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{$search}
|
||||
<div class="col-xs-12">
|
||||
{if $group}
|
||||
<label>
|
||||
<select name="groupid" class="form-control">
|
||||
<option value=""> {dr_lang('全部')} </option>
|
||||
{loop $group $t}
|
||||
<option value="{$t.id}" {if $param.groupid==$t.id}selected{/if}>{$t.name}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
{/if}
|
||||
<label>
|
||||
<select name="field" class="form-control">
|
||||
{loop $field $t}
|
||||
{if dr_is_admin_search_field($t)}
|
||||
<option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label><i class="fa fa-caret-right"></i></label>
|
||||
<label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>
|
||||
<label><button type="submit" class="btn blue btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<input type="hidden" name="isajax" value="1">
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th style="text-align:center" width="70" class="{dr_sorting('id')}" name="id">{dr_lang('头像')}</th>
|
||||
<th width="250" class="{dr_sorting('username')}" name="username">{dr_lang('账号 / 邮箱')}</th>
|
||||
<th >{dr_lang('注册时间')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{member where=$where order=id page=1 pagesize=$pagesize urlrule=$urlrule}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td style="text-align:center"> <img class="img-circle" src="{dr_avatar($t.id)}" style="width:50px;height:50px"> </td>
|
||||
<td class="member_info_p">
|
||||
<p>{$t.username}</p>
|
||||
<p>{$t.email}</p>
|
||||
</td>
|
||||
<td class="member_info_p">
|
||||
<p>{$t.regtime}</p>
|
||||
<p>{Function_list::ip($t.regip, 0, 0, 15)}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{/member}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
<div class="col-md-12 text-center">
|
||||
{$pages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(function () {
|
||||
$('.pagination a').click(function () {
|
||||
if ($('.checkboxes').is(':checked')) {
|
||||
var url = $(this).attr('href');
|
||||
var msg = '{dr_lang('离开本页面后,当前选择的项目将被取消')}';
|
||||
layer.confirm(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index){
|
||||
window.location.href = url;
|
||||
return true;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="scroller_{$name}_files">
|
||||
<div class="scroller" data-inited="0" data-initialized="1" data-always-visible="1" data-rail-visible="1">
|
||||
<table class="table table-striped table-striped table-bordered fc-sku-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="90" style="border-left-width: 1px!important;">Uid </th>
|
||||
<th>{dr_lang('用户')} </th>
|
||||
{if !$is_show}
|
||||
<th width="50" style="text-align: center"><button type="button" class="btn blue btn-xs" onClick="dr_add_rmember_{$name}()"> <i class="fa fa-plus"></i><buttton> </th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="rmember_{$name}-sort-items" class="scroller_body">
|
||||
<!--list-->
|
||||
{loop $mylist $t}
|
||||
<tr id="dr_items_{$name}_{$t.id}">
|
||||
<td>{$t.id}</td>
|
||||
<td><a class="fc_member_show" href="javascript:;" uid="{$t['id']}"><img class="img-circle" src="{dr_avatar($t['id'])}" style="width:30px;height:30px;margin-right:10px;">{$t['username']}</a>
|
||||
<input type="hidden" name="data[{$name}][]" value="{$t.id}">
|
||||
</td>
|
||||
{if !$is_show}
|
||||
<td width="45" style="text-align: center"><a class="btn btn-xs red" href="javascript:;" onclick="$('#dr_items_{$name}_{$t.id}').remove()"><i class="fa fa-trash"></i></a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/loop}
|
||||
<!--list-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{$meta_title}</title>
|
||||
<meta content="{$meta_keywords}" name="keywords" />
|
||||
<meta content="{$meta_description}" name="description" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<link href="{THEME_PATH}assets/global/css/admin.min.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="page-container-bg-solid" style=" background-color: #eef1f5;">
|
||||
<div class="page-content">
|
||||
|
||||
<div class="container" style="padding-top:110px">
|
||||
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-body">
|
||||
<div class="row fc-msg-body">
|
||||
|
||||
|
||||
<div class="col-md-12 text-center">
|
||||
|
||||
<div class="fc-msg-info">
|
||||
<p class="fc-msg-title">{$msg}</p>
|
||||
|
||||
<p>
|
||||
系统检测到前端缺失{$this->_filename}模板,本页面是临时的显示模板。
|
||||
</p>
|
||||
<p class="fc-msg-url">
|
||||
{if $url}
|
||||
<a href="{$url}">如果您的浏览器没有自动跳转,请点击这里</a>
|
||||
<meta http-equiv="refresh" content="{$time}; url={$url}">
|
||||
{else}
|
||||
<a href="{$backurl}" >[点击返回上一页]</a>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,168 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="note note-danger">
|
||||
<p>{dr_lang('添加快捷菜单可以出现在后台首页之中,方便快速进入管理')}</p>
|
||||
</div>
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<input type="hidden" id="dr_color" name="data[color]" value="{$admin.color}">
|
||||
<div class="row myfbody">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<span class="caption-subject ">{dr_lang('资料修改')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label "></label>
|
||||
<div class="col-md-9">
|
||||
<a href="javascript:dr_iframe_show('{dr_lang('头像设置')}', '{dr_url('api/avatar_edit', ['id'=>$member.id])}', '500px');"><img class="img-circle" src="{dr_avatar($member.id)}" style="width:50px;height:50px"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('账号')}</label>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control-static">{$admin.username}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('身份')}</label>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control-static">
|
||||
{if $is_post_user}<span class="label label-danger">{dr_lang('投稿者')}</span>{else}<span class="label label-success">{dr_lang('管理者')}</span>{/if}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('角色组')}</label>
|
||||
<div class="col-md-9">
|
||||
<label class="form-control-static">
|
||||
{loop $admin.role $t}
|
||||
<span class="label label-success"> {$t} </span>
|
||||
{/loop}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('后台字号')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[font_size]" value="0" {if empty($setting['font_size'])}checked{/if} /> {dr_lang('标准')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[font_size]" value="1" {if $setting['font_size']}checked{/if} /> {dr_lang('大字')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('针对后台的字体大小设置')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('登录密码')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input type="text" class="form-control input-large" name="password"></label>
|
||||
<span class="help-block"> {dr_lang('留空表示不修改密码')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('快捷链接')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="form-control-static">
|
||||
<a class="btn green btn-xs" title="{dr_lang('添加')}" href="javascript:;" onClick="add_menu()"> <i class="fa fa-plus"></i> </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div id="menu_body">
|
||||
{if !empty($admin['usermenu'])}
|
||||
{loop $admin['usermenu'] $k $t}
|
||||
<div class="menu-sort">
|
||||
<label><i class="fa fa-arrows"></i></label><label><input class="form-control" type="text" name="data[usermenu][name][{$k}]" value="{htmlspecialchars((string)$t['name'])}" /></label><label><select class="form-control" name="data[usermenu][color][{$k}]">
|
||||
{loop $color $tt}
|
||||
<option value="{$tt}" {if $tt == $t['color']} selected{/if}> {$tt} </option>
|
||||
{/loop}
|
||||
</select></label><label><select class="form-control" name="data[usermenu][target][{$k}]">
|
||||
{loop $target $ii $tt}
|
||||
<option value="{$ii}" {if $ii == $t['target']} selected{/if}> {$tt} </option>
|
||||
{/loop}
|
||||
</select></label><label><input class="form-control input-large" type="text" name="data[usermenu][url][{$k}]" value="{htmlspecialchars((string)$t['url'])}" /></label><label><a class="btn red btn-xs" title="{dr_lang('删除')}" href="javascript:;" onClick="remove_menu(this)"> <i class="fa fa-trash"></i> </a></label>
|
||||
</div>
|
||||
{/loop}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $oauth_data}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('快捷登录')}</label>
|
||||
<div class="col-md-4">
|
||||
<ul class="list-group">
|
||||
{loop $oauth_data $name}
|
||||
<li class="list-group-item">
|
||||
<img src="{THEME_PATH}assets/oauth/{$name}.png">
|
||||
{dr_html2emoji($oauth_list[$name]['nickname'])}
|
||||
{if $oauth_list[$name]}
|
||||
<a style="margin-top: 5px;" target="_blank" href="{dr_url('api/alogin', ['id' => $admin.uid, 'url' => dr_member_url('account/oauth')])}" class="badge badge-danger"> <i class="fa fa-user-times"></i> 解绑</a>
|
||||
{else}
|
||||
<a style="margin-top: 5px;" target="_blank" href="{dr_url('api/alogin', ['id' => $admin.uid, 'url' => dr_member_url('account/oauth')])}" class="badge badge-success"> <i class="fa fa-user-plus"></i> 绑定</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group" id="dr_row_code">
|
||||
<label class="col-md-2 control-label">{dr_lang('验证码')}</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group" style="width:300px;">
|
||||
<div class="input-icon">
|
||||
<input style="padding-left: 5px !important;"type="text" class="form-control placeholder-no-fix" autocomplete="off" placeholder="{dr_lang('验证码')}" name="code" id="dr_code" >
|
||||
</div>
|
||||
<div class="input-group-btn fc-code" style="border-radius: 0 4px 0 0;">
|
||||
{dr_code(120, 35)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存内容')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function add_menu() {
|
||||
var color = '{$select_color}';
|
||||
var target = '{$select_target}';
|
||||
var data = '<div class="menu-sort"><label><i class="fa fa-arrows"></i></label><label><input class="form-control" placeholder="{dr_lang('名称')}" type="text" name="data[usermenu][name][]" /></label><label><select class="form-control" name="data[usermenu][color][]">'+color+'</select></label><label><select class="form-control" name="data[usermenu][target][]">'+target+'</select></label><label><input placeholder="{dr_lang('URL')}" class="form-control input-large" type="text" name="data[usermenu][url][]" /></label><label><a class="btn red btn-xs" title="{dr_lang('删除')}" href="javascript:;" onClick="remove_menu(this)"> <i class="fa fa-trash"></i> </a></label></div>';
|
||||
$('#menu_body').append(data);
|
||||
}
|
||||
function remove_menu(_this) {
|
||||
$(_this).parent().parent().remove();
|
||||
}
|
||||
$("#menu_body").sortable({
|
||||
items: "div"
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,66 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="form-body" style="margin-top: -10px">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('测试文字')}</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="data[text]" class="form-control" style="height:100px; width:100%;"></textarea>
|
||||
<p class="help-block"> {dr_lang('填写需要测试验证的文字')} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('正则表达式')}</label>
|
||||
<div class="col-md-9">
|
||||
<textarea name="data[code]" id="dr_code" class="form-control" style="height:100px; width:100%;"></textarea>
|
||||
<p class="help-block"> {dr_lang('填写PHP格式的正则表达式代码,匹配函数preg_match')} </p>
|
||||
<label><select class="form-control" onchange="dr_add_code(this.value)">
|
||||
<option value="">{dr_lang('常用正则表达式')}</option>
|
||||
{loop $code $name $cc}
|
||||
<option value="{$cc}">{dr_lang($name)}</option>
|
||||
{/loop}
|
||||
</select></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<button type="button" onclick="dr_test_pattern()" class="btn green"> <i class="fa fa-send"></i> {dr_lang('立即测试')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function dr_add_code(v) {
|
||||
$('#dr_code').val(v);
|
||||
}
|
||||
function dr_test_pattern() {
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "{dr_now_url()}",
|
||||
data: $("#myform").serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
if (json.code) {
|
||||
dr_cmf_tips(1, json.msg, json.data.time);
|
||||
} else {
|
||||
dr_cmf_tips(0, json.msg, json.data.time);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,93 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{$search}
|
||||
<div class="col-xs-12">
|
||||
<label>
|
||||
{$select}
|
||||
</label>
|
||||
<label>
|
||||
<select name="field" class="form-control">
|
||||
{loop $field $t}
|
||||
{if dr_is_admin_search_field($t)}
|
||||
<option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label><i class="fa fa-caret-right"></i></label>
|
||||
<label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>
|
||||
|
||||
<label><button type="submit" class="btn blue btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<input type="hidden" name="isajax" value="1">
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="100">Id</th>
|
||||
<th width="200">{dr_lang('栏目')}</th>
|
||||
<th>{dr_lang('主题')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{module module=$mid siteid=$site where=$where order=updatetime page=1 pagesize=$pagesize urlrule=$urlrule}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>{$t.id}</td>
|
||||
<td>{dr_cat_value($site."-". $mid, $t.catid, 'name')}</td>
|
||||
<td><a href="{$t.url}" target="_blank">{$t.title}</a></td>
|
||||
</tr>
|
||||
{/module}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row fc-list-footer ">
|
||||
<div class="col-md-12 text-center">
|
||||
{$pages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(function () {
|
||||
$('.pagination a').click(function () {
|
||||
if ($('.checkboxes').is(':checked')) {
|
||||
var url = $(this).attr('href');
|
||||
var msg = '{dr_lang('离开本页面后,当前选择的项目将被取消')}';
|
||||
layer.confirm(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index){
|
||||
window.location.href = url;
|
||||
return true;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,31 @@
|
||||
<div class="scroller_{$name}_files">
|
||||
<div mid="{$mid}" class="scroller" data-inited="0" data-initialized="1" data-always-visible="1" data-rail-visible="1">
|
||||
<table class="table table-striped table-bordered fc-sku-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="90" style="border-left-width: 1px!important;">ID </th>
|
||||
<th>{$cname}</th>
|
||||
{if !$is_show}
|
||||
<th width="70" style="text-align: center"><button type="button" class="btn blue btn-xs" onClick="dr_add_related_{$name}()"> <i class="fa fa-plus"></i><buttton> </th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="related_{$name}-sort-items" class="scroller_body">
|
||||
<!--list-->
|
||||
{loop $mylist $t}
|
||||
<tr id="dr_items_{$name}_{$t.id}">
|
||||
<td>{$t.id}</td>
|
||||
<td>
|
||||
<a href="{dr_url_prefix($t.url)}" target="_blank">{$t.title}</a>
|
||||
<input type="hidden" name="data[{$name}][]" value="{$t.id}">
|
||||
</td>
|
||||
{if !$is_show}
|
||||
<td width="45" style="text-align: center"><a class="btn btn-xs red" href="javascript:;" onclick="$('#dr_items_{$name}_{$t.id}').remove()"><i class="fa fa-trash"></i></a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/loop}
|
||||
<!--list-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
{template header.html}
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="caption">
|
||||
<span class="caption-subject font-green sbold">{$name}</span>
|
||||
<span class="caption-helper">{dr_lang('需要在服务器中配置,不懂的可以咨询服务器空间商')}</span>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">{$note}</div>
|
||||
{if $code}
|
||||
<div style="margin-top: 10px"><textarea class="form-control" style="width:90%; height:{php echo $count * 25;}px;">{$code}</textarea></div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div style="margin-top: 10px">{dr_lang('伪静态URL解析规则配置文件')}:/config/rewrite.php </div>
|
||||
<div style="margin-top: 10px">{dr_lang('使用自定义URL之后必须要设置解析规则,否则是无法正常打开页面的')}</div>
|
||||
<style>
|
||||
#dr_code textarea{
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
{template footer.html}
|
||||
@@ -0,0 +1,87 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div class="text-center ">
|
||||
{if IS_USE_MEMBER}
|
||||
<a href="{dr_url('api/alogin', ['id'=>$m.id])}" target="_blank"><img src="{$m.avatar}" style="border-radius:40%;height: 70px!important;"></a>
|
||||
{else}
|
||||
<img src="{$m.avatar}" style="border-radius:40%;height: 70px!important;">
|
||||
{/if}
|
||||
</div>
|
||||
<div class="text-left fc-user-group">
|
||||
{loop $m.group $g}
|
||||
<h5 class=""> {$ci->member_cache['group'][$g.gid]['name']}
|
||||
{if $g.lid}
|
||||
<br>
|
||||
<span>
|
||||
{$ci->member_cache['group'][$g.gid]['level'][$g.lid]['name']}
|
||||
</span>
|
||||
{/if}</h5>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-9">
|
||||
<ul class="u-ul">
|
||||
<li>
|
||||
<label class="u-name">Id</label>
|
||||
<label class="u-value">{$m.id} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('账号')}</label>
|
||||
<label class="u-value">{$m.username} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('邮箱')}</label>
|
||||
<label class="u-value">{$m.email} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('手机')}</label>
|
||||
<label class="u-value">{$m.phone} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{MEMBER_CNAME}</label>
|
||||
<label class="u-value">{$m.name} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('余额')}</label>
|
||||
<label class="u-value">¥{$m.money} ({dr_lang('冻结')} ¥{$m.freeze})</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('消费')}</label>
|
||||
<label class="u-value">{$m.spend} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{SITE_SCORE}</label>
|
||||
<label class="u-value">{$m.score} </label>
|
||||
<label class="u-name">{SITE_EXPERIENCE}</label>
|
||||
<label class="u-value">{$m.experience} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('注册')}</label>
|
||||
<label class="u-value">{dr_date($m.regtime)} </label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="u-name">{dr_lang('随机码')}</label>
|
||||
<label class="u-value">{$m.randcode} </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.u-ul, .u-ul li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.u-ul li {
|
||||
line-height: 30px;
|
||||
}
|
||||
.u-ul .u-value {
|
||||
padding-left: 8px;
|
||||
}
|
||||
.u-ul .u-name {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,4 @@
|
||||
<font color="red">系统无法通过PHP获取网址数据:{$url}</font> <br><br>
|
||||
<p>如果手动访问此地址无任何问题时,你可以使用下方来手动开启HTTPS功能:</p>
|
||||
<p>1、打开文件cache/config/system.php(不能使用记事本等非法编辑器);</p>
|
||||
<p>2、将SYS_HTTPS值改为1,表示开启https了;如果手动开启登录或网站地址有异常时,可以设置为0表示关闭。</p>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="col-md-2 col-sm-2 col-xs-6 fc-upload-item" onclick="dr_select_ids({$tid}, {$t.id})">
|
||||
<div class="color-demo tooltips" data-original-title="{$t.filename} {dr_format_file_size($t.filesize)}">
|
||||
<div class="color-view bg-default bg-font-default div_ids{$tid} div_ids{$tid}_{$t.id}">
|
||||
{dr_file_list_preview_html($t)}
|
||||
</div>
|
||||
<a href="javascript:;" class="fc-upload-del" onclick="event.stopPropagation();dr_file_delete_tips(this, {$t.id});return false;" title="{dr_lang('删除')}"><i class="fa fa-trash"></i></a>
|
||||
<input type="hidden" class="select_ids{$tid}_{$t.id}" name="ids{$tid}[]" value="" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" {if !$t.file} disabled {/if} class="checkboxes" name="ids2[]" value="{$t.file}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{$t.icon} {$t.name}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,234 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform" style="margin-top:-20px;">
|
||||
{$form}
|
||||
<div class="portlet light " style="padding: 0">
|
||||
|
||||
<div class="portlet-title tabbable-line">
|
||||
<ul class="nav nav-tabs" style="float:left;">
|
||||
{if $unused}
|
||||
<li id="tab_nav_0" class="{if $pp==0}active{/if}">
|
||||
<a href="{$tab_url}&pp=0"><i class="fa fa-folder"></i> {dr_lang('未归档')} </a>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="dev {if $pp==1}active{/if}">
|
||||
<a href="{$tab_url}&pp=1"><i class="bi bi-folder-check"></i> {dr_lang('已归档')} </a>
|
||||
</li>
|
||||
{if $member.is_admin}
|
||||
<li class="dev {if $pp==2}active{/if}">
|
||||
<a href="{$tab_url}&pp=2"><i class="fa fa-folder-open"></i> {dr_lang('浏览')} </a>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="dev {if $pp==3}active{/if}">
|
||||
<a href="{$tab_url}&pp=3"><i class="fa fa-edit"></i> {dr_lang('录入')} </a>
|
||||
</li>
|
||||
{if $field}
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.js" type="text/javascript"></script>
|
||||
<li class="dev" id="fileupload">
|
||||
<a href="JavaScript:;" title="{$field.tips}" class="fileinput-button tooltips" data-container="body" data-placement="bottom" data-original-title="{$field.tips}"> <i class="fa fa-upload"></i> {dr_lang('上传')}<input type="file" multiple name="file_data"> </a>
|
||||
</li>
|
||||
<li class="dev">
|
||||
<input id="dr_file_count" value="0" type="hidden">
|
||||
<a class="fileupload-progress"></a>
|
||||
</li>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#fileupload").fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: "{$field.param.size}",
|
||||
url: "{$field.url}",
|
||||
dataType: "json",
|
||||
acceptFileTypes: "{$field.param.exts}",
|
||||
maxChunkSize: '{$field.param.chunk}',
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
$(".fileupload-progress").show();
|
||||
$(".fileupload-progress").html(""+progress+"%");
|
||||
},
|
||||
add: function (e, data) {
|
||||
$(".fileupload-progress").hide();
|
||||
data.submit();
|
||||
|
||||
},
|
||||
done: function (e, data) {
|
||||
var count = parseInt($('#dr_file_count').val()) + 1;
|
||||
$('#dr_file_count').val(count);
|
||||
$(".fileupload-progress").hide();
|
||||
if (data.result.code > 0) {
|
||||
dr_tips(data.result.code, data.result.msg);
|
||||
if (count == data.originalFiles.length) {
|
||||
setTimeout("window.location.href = '{$field.back}'", 2000);
|
||||
}
|
||||
//setTimeout("window.location.href = '{$field.back}'", 2000);
|
||||
} else {
|
||||
dr_tips(data.result.code, data.result.msg, -1);
|
||||
}
|
||||
},
|
||||
fail: function (e, data) {
|
||||
//console.log(data.errorThrown);
|
||||
dr_tips(0, "系统故障:"+data.errorThrown, -1);
|
||||
layer.closeAll('tips');
|
||||
$(".fileupload-progress").hide();
|
||||
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.table-fc-upload .fc-upload-item .color-demo { position: relative; }
|
||||
.table-fc-upload .fc-upload-del {
|
||||
position: absolute; right: 4px; top: 4px; z-index: 10;
|
||||
width: 24px; height: 24px; line-height: 24px; text-align: center;
|
||||
background: rgba(0,0,0,.5); color: #fff; border-radius: 4px;
|
||||
opacity: 0; transition: opacity .2s;
|
||||
display: block; text-decoration: none;
|
||||
}
|
||||
.table-fc-upload .fc-upload-item:hover .fc-upload-del { opacity: 1; }
|
||||
.table-fc-upload .fc-upload-del:hover { background: #d9534f; color: #fff; }
|
||||
</style>
|
||||
<div class="portlet-body table-finecms-upload">
|
||||
|
||||
{if $unused && $pp==0}
|
||||
<div role="presentation" class="table table-fc-upload table-striped clearfix">
|
||||
<div class="files row">
|
||||
{php $tid=0;}
|
||||
{table cache=0 table=attachment_unused where=$list.unused IN_fileext=$fileext order=id_desc pagefile=admin page=1 pagesize=$psize urlrule=$urlrule}
|
||||
{template "api_upload_data.html"}
|
||||
{/table}
|
||||
</div>
|
||||
</div>
|
||||
{elseif $pp==3}
|
||||
<div class="form-group" id="dr_row_url">
|
||||
<label class="col-xs-3 control-label ajax_name" style="padding-top: 0">{dr_lang('文件地址')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_url" name="data[url]" value="{$file}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_down">
|
||||
<label class="col-xs-3 control-label ajax_name" style="padding-top: 0">{dr_lang('下载文件')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[down]" value="1" {if $data['down']}checked{/if} /> {dr_lang('是')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[down]" value="0" {if empty($data['down'])}checked{/if} /> {dr_lang('否')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block"> {dr_lang('当目标文件过大或者对方服务器拒绝下载时会导致下载失败')} </span>
|
||||
</div>
|
||||
</div>
|
||||
{elseif $pp==2 && $member.is_admin}
|
||||
<div role="presentation" class="table table-fc-filelist table-striped clearfix">
|
||||
</div>
|
||||
<script>
|
||||
function dr_filelist(dir) {
|
||||
$.get('{$listurl}&dir='+dir, function (text){
|
||||
$('.table-fc-filelist').html(text);
|
||||
}, 'text');
|
||||
}
|
||||
function dr_file_select(file) {
|
||||
|
||||
}
|
||||
dr_filelist('');
|
||||
</script>
|
||||
{else}
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center margin-bottom-20">
|
||||
<label><select id="dr_field_name"class="form-control">
|
||||
{loop $sfield $i $t}
|
||||
<option value="{$i}" {if $param.name == $i} selected{/if}>{$t}</option>
|
||||
{/loop}
|
||||
</select></label>
|
||||
<label>
|
||||
<input type="text" class="form-control" value="{$param.value}" id="dr_field_value">
|
||||
</label>
|
||||
<label><a class="btn green btn-sm onloading" href="javascript:;" onclick="dr_fsearch()"> <i class="fa fa-search"></i> {dr_lang('搜索')}</a></label>
|
||||
</div>
|
||||
</div>
|
||||
<div role="presentation" class="table table-fc-upload table-striped clearfix">
|
||||
|
||||
<div class="files row">
|
||||
{php $tid=1;}
|
||||
{table cache=0 table=attachment_data where=$list.used IN_fileext=$fileext order=id_desc pagefile=admin page=1 pagesize=$psize urlrule=$urlrule}
|
||||
{template "api_upload_data.html"}
|
||||
{/table}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center margin-bottom-20 ">
|
||||
{$pages}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="is_ajax" value="1">
|
||||
<input type="hidden" name="is_page" id="dr_page" value="{$pp}">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function dr_fsearch() {
|
||||
var url = '{$search_url}&name='+$('#dr_field_name').val()+'&value='+$('#dr_field_value').val();
|
||||
window.location.href = url;
|
||||
}
|
||||
function dr_file_delete_tips(obj, id) {
|
||||
layer.confirm(
|
||||
"{dr_lang('确定要删除本文件吗?')}",
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
dr_file_delete(obj, id);
|
||||
setTimeout("window.location.reload(true)", 2000);
|
||||
});
|
||||
}
|
||||
function dr_select_ids(tid, id) {
|
||||
var obj = $('.div_ids'+tid+'_'+id);
|
||||
var select = $('.select_ids'+tid+'_'+id);
|
||||
if (obj.hasClass('on-view')) {
|
||||
obj.removeClass('on-view');
|
||||
select.val('');
|
||||
} else {
|
||||
obj.addClass('on-view');
|
||||
select.val(id);
|
||||
}
|
||||
}
|
||||
$(function (){
|
||||
// 懒加载缩略图:仅当图片进入视口时再加载,避免文件过多时同时请求导致卡顿
|
||||
var rsLoad = document.querySelectorAll(".rs-load");
|
||||
if (rsLoad.length && "IntersectionObserver" in window) {
|
||||
var io = new IntersectionObserver(function(entries) {
|
||||
entries.forEach(function(entry) {
|
||||
if (entry.isIntersecting) {
|
||||
var img = entry.target;
|
||||
var src = img.getAttribute("rs-src");
|
||||
if (src) {
|
||||
img.src = src;
|
||||
img.removeAttribute("rs-src");
|
||||
img.classList.remove("rs-load");
|
||||
io.unobserve(img);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, { rootMargin: "50px", threshold: 0.01 });
|
||||
rsLoad.forEach(function(img) { io.observe(img); });
|
||||
} else {
|
||||
$(".rs-load").each(function() {
|
||||
$(this).attr("src", $(this).attr("rs-src"));
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,34 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
{if !$one}
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name" style="padding-top: 0">{dr_lang('文件名称')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_name" name="data[name]" value="{$name}">
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group" id="dr_row_url">
|
||||
<label class="col-xs-3 control-label ajax_name" style="padding-top: 0">{dr_lang('文件地址')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_url" name="data[url]" value="{$file}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_down">
|
||||
<label class="col-xs-3 control-label ajax_name" style="padding-top: 0">{dr_lang('下载文件')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[down]" value="1" {if $data['down']}checked{/if} /> {dr_lang('是')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[down]" value="0" {if empty($data['down'])}checked{/if} /> {dr_lang('否')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block"> {dr_lang('当目标文件过大或者对方服务器拒绝下载时会导致下载失败')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,106 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<form action="" class="form-horizontal " method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="myfbody">
|
||||
<div class="portlet bordered light ">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<ul class="nav nav-tabs" style="float:left;">
|
||||
<li class="{if $page==0}active{/if}">
|
||||
<a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cloud"></i> {dr_lang('存储策略')} </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane {if $page==0}active{/if}" id="tab_0">
|
||||
<div class="form-body form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('名称')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control input-large" value="{htmlspecialchars((string)$data.name)}" name="data[name]" />
|
||||
<span class="help-block">{dr_lang('给它一个描述名称')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('存储类型')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
{loop $ci->type $i $n}
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[type]" onclick="dr_remote('{$i}')" value="{$i}" {if (int)$data['type'] == $i}checked{/if} /> {dr_lang($n.name)} <span></span> </label>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group r r0">
|
||||
<label class="col-md-2 control-label">{dr_lang('使用说明')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static"> {dr_lang('本地磁盘存储是将文件存储到本地的一块盘之中')} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group r r0">
|
||||
<label class="col-md-2 control-label">{dr_lang('本地存储路径')}</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="data[value][0][path]" value="{htmlspecialchars((string)$data['value']['path'])}" />
|
||||
<span class="help-block">{dr_lang('填写磁盘绝对路径或者相当于附件目录的目录路径,一定要以“/”结尾')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{loop $ci->load_file $tp}
|
||||
{load "$tp"}
|
||||
{/loop}
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件访问URL')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" class="form-control" value="{htmlspecialchars((string)$data.url)}" name="data[url]" />
|
||||
<span class="help-block">{dr_lang('浏览器可访问的URL地址,必须以http://或https://开头,要以“/”结尾')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<label><button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存')}</button></label>
|
||||
<label><button type="button" onclick="dr_test_attach()" class="btn red"> <i class="fa fa-cloud"></i> {dr_lang('测试')}</button></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
dr_remote({intval($data.type)});
|
||||
});
|
||||
function dr_test_attach() {
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 10000
|
||||
});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "{dr_url('api/test_attach')}",
|
||||
data: $("#myform").serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
dr_tips(json.code, json.msg, -1);
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_remote(i) {
|
||||
$('.r').hide();
|
||||
$('.r'+i).show();
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,221 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="note note-danger" id="table-search-tool">
|
||||
|
||||
{template "api_list_date_search.html"}
|
||||
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{dr_form_search_hidden(['field' => 'type'])}
|
||||
{if $remote}
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<select name="remote" class="form-control">
|
||||
<option value=""> - </option>
|
||||
{loop $remote $t}
|
||||
<option value="{$t.id}" {if $param.remote==$t.id}selected{/if}>{$t.name}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<select name="field" class="form-control">
|
||||
<option value="id"> Id </option>
|
||||
{loop $field $t}
|
||||
{if dr_is_admin_search_field($t)}
|
||||
<option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label><i class="fa fa-caret-right"></i></label>
|
||||
<label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<div class="input-group input-medium date-picker input-daterange" data-date="" data-date-format="yyyy-mm-dd">
|
||||
<input type="text" class="form-control" value="{$param.date_form}" name="date_form">
|
||||
<span class="input-group-addon"> {dr_lang('到')} </span>
|
||||
<input type="text" class="form-control" value="{$param.date_to}" name="date_to">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label><button type="submit" class="btn blue btn-sm " name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden(['table' => $table])}
|
||||
<div class="bootstrap-table bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
</label>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
{if $remote}
|
||||
<label style="margin-right: 5px">
|
||||
<select name="remote" class="form-control">
|
||||
<option value="-1"> -- </option>
|
||||
<option value="0"> {dr_lang('默认')} </option>
|
||||
{loop $remote $t}
|
||||
<option value="{$t.id}" {if $param.remote==$t.id}selected{/if}>{$t.name}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/type_edit', ['table'=>$table])}', '{dr_lang('需要手动将这些附件复制到储存策略的目录中,你确定要变更吗?')}', 1)" class="btn green btn-sm "> <i class="fa fa-cloud"></i> {dr_lang('变更储存策略')}</button>
|
||||
</label>
|
||||
{/if}
|
||||
{if $table == 'data'}
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.js" type="text/javascript"></script>
|
||||
<label class="dev" id="fileupload">
|
||||
<a href="JavaScript:;" class="fileinput-button btn blue"> <i class="fa fa-upload"></i> {dr_lang('上传')}<input type="file" multiple name="file_data"> </a>
|
||||
</label>
|
||||
<label class="dev">
|
||||
<input id="dr_file_count" value="0" type="hidden">
|
||||
<a class="fileupload-progress"></a>
|
||||
</label>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#fileupload").fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: "{$upload.param.size}",
|
||||
url: "{$upload.url}",
|
||||
dataType: "json",
|
||||
acceptFileTypes: "{$upload.param.exts}",
|
||||
maxChunkSize: '{$upload.param.chunk}',
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
$(".fileupload-progress").show();
|
||||
$(".fileupload-progress").html(""+progress+"%");
|
||||
},
|
||||
add: function (e, data) {
|
||||
$(".fileupload-progress").hide();
|
||||
data.submit();
|
||||
|
||||
},
|
||||
done: function (e, data) {
|
||||
var count = parseInt($('#dr_file_count').val()) + 1;
|
||||
$('#dr_file_count').val(count);
|
||||
$(".fileupload-progress").hide();
|
||||
if (data.result.code > 0) {
|
||||
dr_tips(data.result.code, data.result.msg);
|
||||
if (count == data.originalFiles.length) {
|
||||
setTimeout("window.location.href = '{$upload.back}'", 2000);
|
||||
}
|
||||
//setTimeout("window.location.href = '{$field.back}'", 2000);
|
||||
} else {
|
||||
dr_tips(data.result.code, data.result.msg, -1);
|
||||
}
|
||||
},
|
||||
fail: function (e, data) {
|
||||
//console.log(data.errorThrown);
|
||||
dr_tips(0, "系统故障:"+data.errorThrown, -1);
|
||||
layer.closeAll('tips');
|
||||
$(".fileupload-progress").hide();
|
||||
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{else}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/edit')}', '{dr_lang('你确定要强制归档它们吗?')}', 1)" class="btn blue btn-sm "> <i class="fa fa-database"></i> {dr_lang('归档')}</button>
|
||||
</label>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable deltable-clearfix">
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th style="text-align:center" width="90" class="{dr_sorting('id')}" name="id">Id</th>
|
||||
<th style="text-align:center" width="120" class="{dr_sorting('remote')}" name="remote">{dr_lang('储存策略')}</th>
|
||||
<th width="150" class="{dr_sorting('uid')}" name="uid">{dr_lang('账号')}</th>
|
||||
<th class="{dr_sorting('filename')}" name="filename">{dr_lang('名称')}</th>
|
||||
<th style="text-align:center" width="90" class="{dr_sorting('fileext')}" name="fileext">{dr_lang('扩展名')}</th>
|
||||
<th width="100" class="{dr_sorting('filesize')}" name="filesize">{dr_lang('大小')}</th>
|
||||
<th width="160" class="{dr_sorting('inputtime')}" name="inputtime">{dr_lang('上传时间')}</th>
|
||||
<th width="200">{dr_lang('附件归属')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<?php
|
||||
if (!$t.filename) {
|
||||
$t.filename = '未命名';
|
||||
}
|
||||
if (dr_is_image($t.fileext)) {
|
||||
$hs = 'dr_preview_image';
|
||||
} elseif ($t.fileext == 'mp4') {
|
||||
$hs = 'dr_preview_video';
|
||||
} else {
|
||||
$hs = 'dr_preview_url';
|
||||
}
|
||||
$t.url = 'javascript:'.$hs.'(\''.dr_get_file_url($t).'\');';
|
||||
?>
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
{$t.id}
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<label>{if !$t.remote}<span class="label label-sm label-info">{dr_lang('默认')}</span>
|
||||
{elseif !isset($remote[$t.remote])}<span class="label label-sm label-danger">{dr_lang('已失效')}</span>
|
||||
{else}<span class="label label-sm label-warning">{dr_lang($remote[$t.remote]['name'])}</span>{/if}</label>
|
||||
</td>
|
||||
<td>{Function_list::uid($t.uid)}</td>
|
||||
<td>
|
||||
<a href="{$t.url}">{Function_list::title($t.filename, $param)}</a>
|
||||
<a class="btn blue btn-xs" href="javascript:dr_iframe('{dr_lang('改名')}', '{dr_url('api/name_edit', ['id'=>$t.id])}', '350px', '220px');">{dr_lang('改名')}</a>
|
||||
<a class="btn green btn-xs" href="javascript:dr_iframe_show('{dr_lang('重新上传')}', '{dr_url('attachments/file_edit', ['id'=>$t.id])}', '350px', '220px');">{dr_lang('重传')}</a>
|
||||
{if $ci->_is_admin_auth() && in_array($t.fileext, ['jpg', 'gif', 'png', 'jpeg'])}<a class="btn red btn-xs" href="javascript:dr_iframe('{dr_lang('改图')}', '{dr_url('api/image_edit', ['id'=>$t.id])}', '80%');">{dr_lang('改图')}</a>{/if}
|
||||
</td>
|
||||
<td style="text-align:center">{$t.fileext}</td>
|
||||
<td>{dr_format_file_size($t.filesize)}</td>
|
||||
<td>{dr_date($t.inputtime, null, 'red')}</td>
|
||||
<td>{if $table == 'data'}{$t.related}{else}<a href="javascript:dr_layer_tips('{$t.attachinfo}');">{$t.attachinfo}</a>{/if}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
|
||||
<div class="col-md-12 fc-list-page">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,289 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="note note-info">
|
||||
<p><strong>{dr_lang('物理目录')}</strong>:{$dir}</p>
|
||||
<p class="mb-0"><strong>{dr_lang('访问地址')}</strong>:{$url}</p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<div class="row" style="margin-bottom:12px;">
|
||||
<div class="col-md-12">
|
||||
<ul class="list-inline" style="margin:0;padding:8px 12px;background:#f5f5f5;border-radius:4px;border:1px solid #e7e7e7;">
|
||||
{loop $breadcrumb $c}
|
||||
<li style="margin:0 2px;display:inline-block;">
|
||||
{if $c.path != $rel}
|
||||
<a href="{dr_url($uriprefix.'/index', ['path' => $c.path])}">{$c.name}</a>
|
||||
{else}
|
||||
<strong>{$c.name}</strong>
|
||||
{/if}
|
||||
</li>
|
||||
{if $c.path != $rel}
|
||||
<li style="margin:0 2px;display:inline-block;color:#999;">/</li>
|
||||
{/if}
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bootstrap-table bootstrap-table2" style="margin-bottom:12px;">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.js" type="text/javascript"></script>
|
||||
<form id="dir-replace-csrf" style="display:none;">{dr_form_hidden()}</form>
|
||||
{/if}
|
||||
<div class="dir-toolbar-btns" style="display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px;">
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<form id="dir-upload-form" style="display:inline-flex;align-items:center;margin:0;padding:0;border:0;background:transparent;vertical-align:middle;">
|
||||
{dr_form_hidden(['path' => $rel])}
|
||||
<label class="dev" id="dir-fileupload" style="margin:0;display:inline-flex;align-items:center;">
|
||||
<a href="javascript:;" class="fileinput-button btn blue btn-sm" style="margin:0;"><i class="fa fa-upload"></i> {dr_lang('上传')}<input type="file" multiple name="file_data"></a>
|
||||
</label>
|
||||
<span class="fileupload-progress text-muted" style="margin-left:4px;"></span>
|
||||
</form>
|
||||
<button type="button" class="btn green btn-sm" style="margin:0;flex-shrink:0;" onclick="dr_attachment_dir_mkdir();"><i class="fa fa-folder"></i> {dr_lang('新建文件夹')}</button>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<button type="button" class="btn red btn-sm" style="margin:0;flex-shrink:0;" onclick="dr_ajax_option('{$dir_delete_url}', '{$dir_js.confirm_del}', 0)"><i class="fa fa-trash"></i> {dr_lang('删除所选')}</button>
|
||||
{/if}
|
||||
<button type="button" class="btn default btn-sm" style="margin:0;flex-shrink:0;" onclick="window.location.reload(true);" title="{dr_lang('刷新')}"><i class="fa fa-refresh"></i> {dr_lang('刷新')}</button>
|
||||
</div>
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#dir-fileupload").fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: "{$upload.param.size}",
|
||||
url: "{$upload.url}",
|
||||
dataType: "json",
|
||||
acceptFileTypes: /./i,
|
||||
maxChunkSize: 2000000000,
|
||||
progressall: function (e, data) {
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
$("#dir-fileupload").closest("form").find(".fileupload-progress").show().html(progress + "%");
|
||||
},
|
||||
add: function (e, data) {
|
||||
$("#dir-fileupload").closest("form").find(".fileupload-progress").hide();
|
||||
data.formData = $("#dir-upload-form").serializeArray();
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
$("#dir-fileupload").closest("form").find(".fileupload-progress").hide();
|
||||
var r = data.result;
|
||||
if (typeof r === "string") { try { r = JSON.parse(r); } catch (err) {} }
|
||||
if (r && r.code > 0) {
|
||||
dr_tips(r.code, r.msg);
|
||||
setTimeout(function() { window.location.reload(true); }, 800);
|
||||
} else if (r) {
|
||||
dr_tips(r.code, r.msg, -1);
|
||||
} else {
|
||||
dr_tips(0, '{$dir_js.upload_fail}', -1);
|
||||
}
|
||||
},
|
||||
fail: function (e, data) {
|
||||
$("#dir-fileupload").closest("form").find(".fileupload-progress").hide();
|
||||
dr_tips(0, data.errorThrown || '{$dir_js.upload_fail}', -1);
|
||||
}
|
||||
});
|
||||
$(".dir-replace-wrap").each(function() {
|
||||
var $w = $(this);
|
||||
$w.fileupload({
|
||||
url: "{$dir_replace_url}",
|
||||
dataType: "json",
|
||||
autoUpload: true,
|
||||
maxFileSize: "{$upload.param.size}",
|
||||
maxChunkSize: 2000000000,
|
||||
add: function (e, data) {
|
||||
var fd = $("#dir-replace-csrf").serializeArray();
|
||||
fd.push({name: "replace", value: $w.attr("data-replace-path")});
|
||||
data.formData = fd;
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
var r = data.result;
|
||||
if (typeof r === "string") { try { r = JSON.parse(r); } catch (err2) {} }
|
||||
if (r && r.code > 0) {
|
||||
dr_tips(r.code, r.msg);
|
||||
setTimeout(function() { window.location.reload(true); }, 600);
|
||||
} else if (r) {
|
||||
dr_tips(r.code, r.msg, -1);
|
||||
} else {
|
||||
dr_tips(0, '{$dir_js.upload_fail}', -1);
|
||||
}
|
||||
},
|
||||
fail: function (e, data) {
|
||||
dr_tips(0, data.errorThrown || '{$dir_js.upload_fail}', -1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect" width="50">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="55%">{dr_lang('名称')}</th>
|
||||
<th width="12%">{dr_lang('类型')}</th>
|
||||
<th width="13%">{dr_lang('大小')}</th>
|
||||
<th width="20%">{dr_lang('修改时间')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $rel}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="4">
|
||||
<a href="{dr_url($uriprefix.'/index', ['path' => $parent_rel])}"><i class="fa fa-level-up"></i> ..</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{loop $dirs $t}
|
||||
<tr>
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="paths[]" value="{$t.path}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td><i class="fa fa-folder text-warning"></i>
|
||||
<a href="{dr_url($uriprefix.'/index', ['path' => $t.path])}">{$t.name}</a>
|
||||
</td>
|
||||
<td>{dr_lang('文件夹')}</td>
|
||||
<td class="dir-folder-size text-muted" data-path="{$t.path_esc}" title="{dr_lang('含子目录的全部文件大小')}" data-loading="0" style="cursor:pointer;">{dr_lang('点击计算')}</td>
|
||||
<td>{dr_date($t.mtime, null, 'red')}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{loop $files $t}
|
||||
<tr>
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="paths[]" value="{$t.path}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{if $t.is_image}
|
||||
<img src="{$t.url}" style="max-width:28px;max-height:28px;vertical-align:middle;margin-right:6px;" />
|
||||
<a href="javascript:dr_preview_image('{$t.url}');">{$t.name}</a>
|
||||
{elseif $t.is_mp4}
|
||||
<i class="fa fa-file-o text-muted"></i>
|
||||
<a href="javascript:dr_preview_video('{$t.url}');">{$t.name}</a>
|
||||
{else}
|
||||
<i class="fa fa-file-o text-muted"></i>
|
||||
<a href="javascript:dr_preview_url('{$t.url}');">{$t.name}</a>
|
||||
{/if}
|
||||
<a class="btn btn-xs default" style="margin-left:6px;vertical-align:middle;" href="{$t.url}" target="_blank" rel="noopener noreferrer" title="{dr_lang('新窗口打开')}"><i class="fa fa-external-link"></i></a>
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<span class="fileinput-button btn btn-xs green dir-replace-wrap" style="margin-left:6px;position:relative;vertical-align:middle;" data-replace-path="{$t.path_esc}">
|
||||
<i class="fa fa-refresh"></i> {dr_lang('重传')}<input type="file" name="file_data">
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $t.ext}{$t.ext}{else}{dr_lang('文件')}{/if}</td>
|
||||
<td>{dr_format_file_size($t.size)}</td>
|
||||
<td>{dr_date($t.mtime, null, 'red')}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{if !$dirs && !$files && !$rel}
|
||||
<tr><td colspan="5" class="text-center text-muted">{dr_lang('暂无文件')}</td></tr>
|
||||
{elseif !$dirs && !$files}
|
||||
<tr><td colspan="5" class="text-center text-muted">{dr_lang('当前文件夹为空')}</td></tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form id="dir-mkdir-data" style="display:none;">
|
||||
{dr_form_hidden(['path' => $rel])}
|
||||
<input type="hidden" name="name" id="dr_mkdir_name" value="" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function dr_attachment_dir_mkdir() {
|
||||
layer.prompt({
|
||||
title: '{$dir_js.mkdir_title}',
|
||||
formType: 0,
|
||||
maxlength: 80
|
||||
}, function (name, index) {
|
||||
layer.close(index);
|
||||
name = $.trim(name);
|
||||
if (!name) {
|
||||
dr_tips(0, '{$dir_js.name_empty}', -1);
|
||||
return;
|
||||
}
|
||||
$('#dr_mkdir_name').val(name);
|
||||
var loading = layer.load(2, {shade: [0.3,'#fff'], time: 100000000});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
url: '{$dir_mkdir_url}',
|
||||
data: $('#dir-mkdir-data').serialize(),
|
||||
success: function (json) {
|
||||
layer.close(loading);
|
||||
if (json.token) {
|
||||
$("#myform input[name='"+json.token.name+"']").val(json.token.value);
|
||||
}
|
||||
dr_cmf_tips(json.code, json.msg, json.data ? json.data.time : 0);
|
||||
if (json.code) {
|
||||
setTimeout(function () { window.location.reload(true); }, 600);
|
||||
}
|
||||
},
|
||||
error: function (HttpRequest, ajaxOptions, thrownError) {
|
||||
layer.close(loading);
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{if $dirs}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.dir-folder-size').on('click', function() {
|
||||
var $td = $(this);
|
||||
if ($td.attr('data-loaded') == '1' || $td.attr('data-loading') == '1') {
|
||||
return;
|
||||
}
|
||||
var path = $td.data('path');
|
||||
if (path === undefined || path === null) {
|
||||
$td.removeClass('text-muted').html('—');
|
||||
return;
|
||||
}
|
||||
$td.attr('data-loading', '1').html('<i class="fa fa-spinner fa-spin"></i> {dr_lang("计算中")}');
|
||||
$.ajax({
|
||||
url: '{$dir_folder_size_url}',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
data: { path: path },
|
||||
success: function(json) {
|
||||
if (json.code > 0 && json.data && json.data.size_text !== undefined) {
|
||||
$td.removeClass('text-muted').attr('data-loaded', '1').attr('data-loading', '0').css('cursor', 'default').html(json.data.size_text);
|
||||
} else {
|
||||
$td.attr('data-loading', '0').html('<span class="text-muted">—</span>');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
$td.attr('data-loading', '0').html('<span class="text-muted">—</span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,20 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<input type="text" placeholder="{dr_lang('附件名称')}" type="text" name="name" value="{$name}" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<style>
|
||||
body {
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,264 @@
|
||||
{template "header.html"}
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/cropper/css/cropper.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/cropper/css/main.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="{THEME_PATH}assets/global/plugins/cropper/js/cropper.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/cropper/js/main.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function (){
|
||||
var img = $('#image');
|
||||
var realWidth;//真实的宽度
|
||||
var realHeight;//真实的高度
|
||||
$("<img/>").attr("src", $(img).attr("src")).on('load', function() {
|
||||
$('#image_cc').html(this.width+'X'+this.height);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<form class="form-horizontal" method="post" style="margin-top: -20px;" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center margin-bottom-20">
|
||||
<a href="{$data.url}" target="_blank">{$data.url}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<!-- <h3>Demo:</h3> -->
|
||||
<div class="img-container">
|
||||
<img id="image" src="{$data.url}?{SYS_TIME}" alt="Picture">
|
||||
<canvas id="brushCanvas" style="position: absolute;left: 0;top: 0;z-index: 20;display: none;"></canvas>
|
||||
</div>
|
||||
<div class="margin-top-10 margin-bottom-10 text-center" style="clear: both">
|
||||
{dr_lang('图片实际尺寸:')}<span id="image_cc"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- <h3>Preview:</h3> -->
|
||||
<div class="docs-preview clearfix">
|
||||
<div class="img-preview preview-lg"></div>
|
||||
</div>
|
||||
|
||||
<!-- <h3>Data:</h3> -->
|
||||
<div class="docs-data">
|
||||
<div class="input-group input-group-sm">
|
||||
<label class="input-group-addon" for="dataX">X</label>
|
||||
<input type="text" class="form-control" readonly name="data[x]" id="dataX" placeholder="x">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
<div class="input-group input-group-sm">
|
||||
<label class="input-group-addon" for="dataY">Y</label>
|
||||
<input type="text" class="form-control" readonly name="data[y]" id="dataY" placeholder="y">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
<div class="input-group input-group-sm">
|
||||
<label class="input-group-addon" for="dataWidth">Width</label>
|
||||
<input type="text" class="form-control" readonly name="data[w]" id="dataWidth" placeholder="width">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
<div class="input-group input-group-sm">
|
||||
<label class="input-group-addon" for="dataHeight">Height</label>
|
||||
<input type="text" class="form-control" readonly name="data[h]" id="dataHeight" placeholder="height">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm hide">
|
||||
<label class="input-group-addon" for="dataRotate">Rotate</label>
|
||||
<input type="text" class="form-control" name="data[r]" id="dataRotate" placeholder="rotate">
|
||||
<span class="input-group-addon">deg</span>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm hide">
|
||||
<label class="input-group-addon" for="dataScaleX">ScaleX</label>
|
||||
<input type="text" class="form-control" name="data[sx]" id="dataScaleX" placeholder="scaleX">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm hide">
|
||||
<label class="input-group-addon" for="dataScaleY">ScaleY</label>
|
||||
<input type="text" class="form-control" name="data[sy]" id="dataScaleY" placeholder="scaleY">
|
||||
<span class="input-group-addon">px</span>
|
||||
</div>
|
||||
<input type="hidden" name="data[brush]" id="dataBrush" value="">
|
||||
<input type="hidden" name="data[brush_points]" id="dataBrushPoints" value="">
|
||||
<input type="hidden" name="data[brush_color]" id="dataBrushColor" value="#ff0000">
|
||||
<input type="hidden" name="data[brush_size]" id="dataBrushSize" value="24">
|
||||
<div class="margin-top-10">
|
||||
<button type="button" class="btn btn-xs btn-warning" id="toggleBrush">{dr_lang('开启画笔')}</button>
|
||||
<button type="button" class="btn btn-xs btn-default" id="clearBrush">{dr_lang('清空笔迹')}</button>
|
||||
</div>
|
||||
<div class="input-group input-group-sm margin-top-10">
|
||||
<label class="input-group-addon" for="brushSize">{dr_lang('笔刷大小')}</label>
|
||||
<input type="range" class="form-control" id="brushSize" min="8" max="80" value="24">
|
||||
<span class="input-group-addon"><span id="brushSizeText">24</span>px</span>
|
||||
</div>
|
||||
<div class="input-group input-group-sm margin-top-10">
|
||||
<label class="input-group-addon" for="brushColor">{dr_lang('画笔颜色')}</label>
|
||||
<input type="color" class="form-control" id="brushColor" value="#ff0000">
|
||||
</div>
|
||||
<div class="margin-top-10 text-muted margin-bottom-20">
|
||||
<span id="brushStatus">{dr_lang('未开启画笔')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="docs-buttons">
|
||||
<!-- <h3>Toolbar:</h3> -->
|
||||
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-method="zoom" data-option="0.1" title="Zoom In">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("zoom", 0.1)">
|
||||
<span class="fa fa-search-plus"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="zoom" data-option="-0.1" title="Zoom Out">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("zoom", -0.1)">
|
||||
<span class="fa fa-search-minus"></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-method="move" data-option="-10" data-second-option="0" title="Move Left">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("move", -10, 0)">
|
||||
<span class="fa fa-arrow-left"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="move" data-option="10" data-second-option="0" title="Move Right">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("move", 10, 0)">
|
||||
<span class="fa fa-arrow-right"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="move" data-option="0" data-second-option="-10" title="Move Up">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("move", 0, -10)">
|
||||
<span class="fa fa-arrow-up"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="move" data-option="0" data-second-option="10" title="Move Down">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("move", 0, 10)">
|
||||
<span class="fa fa-arrow-down"></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-method="rotate" data-option="-45" title="Rotate Left">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("rotate", -45)">
|
||||
<span class="fa fa-rotate-left"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="rotate" data-option="45" title="Rotate Right">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("rotate", 45)">
|
||||
<span class="fa fa-rotate-right"></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-method="scaleX" data-option="-1" title="Flip Horizontal">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("scaleX", -1)">
|
||||
<span class="fa fa-arrows-h"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="scaleY" data-option="-1" title="Flip Vertical">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("scaleY", -1)">
|
||||
<span class="fa fa-arrows-v"></span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" data-method="crop" title="Crop">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("crop")">
|
||||
<span class="fa fa-check"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-method="clear" title="Clear">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("clear")">
|
||||
<span class="fa fa-remove"></span>
|
||||
</span>
|
||||
|
||||
<button type="button" class="btn btn-primary" data-method="reset" title="Reset">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="$().cropper("reset")">
|
||||
<span class="fa fa-refresh"></span>
|
||||
</span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- /.docs-buttons -->
|
||||
|
||||
<div class="docs-toggles">
|
||||
<!-- <h3>Toggles:</h3> -->
|
||||
<div class="btn-group btn-group-justified" data-toggle="buttons">
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="aspectRatio0" name="aspectRatio" value="1.7777777777777777">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="aspectRatio: 16 / 9">
|
||||
16:9
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="aspectRatio1" name="aspectRatio" value="1.3333333333333333">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="aspectRatio: 4 / 3">
|
||||
4:3
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="aspectRatio2" name="aspectRatio" value="1">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="aspectRatio: 1 / 1">
|
||||
1:1
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="aspectRatio3" name="aspectRatio" value="0.6666666666666666">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="aspectRatio: 2 / 3">
|
||||
2:3
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary active">
|
||||
<input type="radio" class="sr-only" id="aspectRatio4" name="aspectRatio" value="NaN" checked>
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="aspectRatio: NaN">
|
||||
Free
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-group btn-group-justified" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="radio" class="sr-only" id="viewMode0" name="viewMode" value="0" checked>
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="View Mode 0">
|
||||
VM0
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="viewMode1" name="viewMode" value="1">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="View Mode 1">
|
||||
VM1
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="viewMode2" name="viewMode" value="2">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="View Mode 2">
|
||||
VM2
|
||||
</span>
|
||||
</label>
|
||||
<label class="btn btn-primary">
|
||||
<input type="radio" class="sr-only" id="viewMode3" name="viewMode" value="3">
|
||||
<span class="docs-tooltip" data-toggle="tooltip" title="View Mode 3">
|
||||
VM3
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- /.docs-toggles -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,687 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="myfbody">
|
||||
<div class="portlet bordered light ">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<ul class="nav nav-tabs" style="float:left;">
|
||||
<li class="{if $page==0}active{/if}">
|
||||
<a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('附件设置')} </a>
|
||||
</li>
|
||||
<li class="{if $page==3}active{/if}">
|
||||
<a href="#tab_3" data-toggle="tab" onclick="$('#dr_page').val('3')"> <i class="fa fa-download"></i> {dr_lang('下载设置')} </a>
|
||||
</li>
|
||||
<li class="{if $page==2}active{/if}">
|
||||
<a href="#tab_2" data-toggle="tab" onclick="$('#dr_page').val('2')"> <i class="fa fa-user"></i> {dr_lang('头像存储')} </a>
|
||||
</li>
|
||||
<li class="{if $page==1}active{/if}">
|
||||
<a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1')"> <i class="fa fa-photo"></i> {if IS_SITES}{dr_lang('【%s】缩略图', SITE_NAME)}{else}{dr_lang('缩略图')}{/if} </a>
|
||||
</li>
|
||||
<li class="{if $page==5}active{/if}">
|
||||
<a href="#tab_5" data-toggle="tab" onclick="$('#dr_page').val('5')"> <i class="fa fa-file-photo-o"></i> {if IS_SITES}{dr_lang('【%s】水印', SITE_NAME)}{else}{dr_lang('水印设置')}{/if} </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane {if $page==3}active{/if}" id="tab_3">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件下载重命名')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-small">
|
||||
<input class="form-control " type="text" name="data[SYS_ATTACHMENT_DOWN_SIZE]" value="{php echo $data['SYS_ATTACHMENT_DOWN_SIZE']?$data['SYS_ATTACHMENT_DOWN_SIZE']:50;}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_domain_dir('dr_attachment_dir')" type="button">MB</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('控制附件重命名条件,在多少MB以内才支持附件下载重命名,超出就按储存名显示,设置的参数越大可能会下载失败')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('远程附件下载命名')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_DOWN_REMOTE]" value="0" {if empty($data['SYS_ATTACHMENT_DOWN_REMOTE'])}checked{/if} /> {dr_lang('储存名')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_DOWN_REMOTE]" value="1" {if $data['SYS_ATTACHMENT_DOWN_REMOTE']}checked{/if} /> {dr_lang('文件名')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('下载附件时对远程储存的附件进行重命名,按储存名下载效率更高')}</span>
|
||||
<span class="help-block">{dr_lang('储存名指随机字符名字,文件名指后台可修改的名字')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {if $page==0}active{/if}" id="tab_0">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件归档')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_DB]" value="1" {if $data['SYS_ATTACHMENT_DB']}checked{/if} /> {dr_lang('开启')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_DB]" value="0" {if empty($data['SYS_ATTACHMENT_DB'])}checked{/if} /> {dr_lang('关闭')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('附件将分为已使用的附件和未使用的附件,归档存储')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !IS_USE_MEMBER}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('游客上传')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_GUEST]" value="1" {if $data['SYS_ATTACHMENT_GUEST']}checked{/if} /> {dr_lang('开启')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_GUEST]" value="0" {if empty($data['SYS_ATTACHMENT_GUEST'])}checked{/if} /> {dr_lang('关闭')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('开启游客上传附件的权限')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('防止重复上传')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_CF]" value="1" {if $data['SYS_ATTACHMENT_CF']}checked{/if} /> {dr_lang('开启')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_CF]" value="0" {if empty($data['SYS_ATTACHMENT_CF'])}checked{/if} /> {dr_lang('关闭')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('当存在重复上传同一文件时,只存储一个文件')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('浏览附件分页')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input class="form-control" type="text" name="data[SYS_ATTACHMENT_PAGESIZE]" value="{php echo $data['SYS_ATTACHMENT_PAGESIZE']?$data['SYS_ATTACHMENT_PAGESIZE']:36;}" ></label>
|
||||
<span class="help-block">{dr_lang('在浏览附件界面中每页显示的数量控制')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('上传安全策略')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_SAFE]" value="0" {if empty($data['SYS_ATTACHMENT_SAFE'])}checked{/if} /> {dr_lang('严格模式')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_SAFE]" value="1" {if $data['SYS_ATTACHMENT_SAFE']}checked{/if} /> {dr_lang('宽松模式')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('严格模式将对文件进行全面检测是否存在非法特征')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('全局存储策略')}</label>
|
||||
<div class="col-md-9">
|
||||
<label>
|
||||
<select name="data[SYS_ATTACHMENT_SAVE_ID]" class="form-control">
|
||||
<option value="0"> {dr_lang('按字段分别设置')} </option>
|
||||
{loop $remote $t}
|
||||
<option value="{$t.id}" {if $data['SYS_ATTACHMENT_SAVE_ID'] == $t.id} selected{/if}> {dr_lang($t.name)} </option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<span class="help-block">{dr_lang('设置全局存储时,全站附件上传都会存储到此存储策略中')}</span>
|
||||
<span class="help-block">{dr_lang('按字段设置时,需要手动为每个字段设置不同的存储策略')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('存储目录方式')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" onclick="$('.dr_attachment_type').hide()" name="data[SYS_ATTACHMENT_SAVE_TYPE]" value="0" {if empty($data['SYS_ATTACHMENT_SAVE_TYPE'])}checked{/if} /> {dr_lang('默认目录')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" onclick="$('.dr_attachment_type').show()" name="data[SYS_ATTACHMENT_SAVE_TYPE]" value="1" {if $data['SYS_ATTACHMENT_SAVE_TYPE']}checked{/if} /> {dr_lang('自定义目录')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('默认存储目录为:/年月/文件名')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div {if empty($data['SYS_ATTACHMENT_SAVE_TYPE'])}style="display: none"{/if} class="form-group dr_attachment_type">
|
||||
<label class="col-md-2 control-label">{dr_lang('存储目录格式')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input class="form-control input-xlarge" type="text" name="data[SYS_ATTACHMENT_SAVE_DIR]" value="{htmlspecialchars((string)$data['SYS_ATTACHMENT_SAVE_DIR'])}" ></label>
|
||||
<span class="help-block">{dr_lang('留空表示不要目录存储,可填参数格式:{y}表示年,{m}表示月,{d}表示日,/表示目录,不要填写其他特殊符号')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {if $data['SYS_ATTACHMENT_SAVE_ID']} hide{/if}">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件相对域名')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_REL]" value="0" {if empty($data['SYS_ATTACHMENT_REL'])}checked{/if} /> {dr_lang('主站域名')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[SYS_ATTACHMENT_REL]" value="1" {if $data['SYS_ATTACHMENT_REL']}checked{/if} /> {dr_lang('相对域名')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('相对模式表示各个终端调用附件显示当前的域名地址,不显示主域名,需要开启服务器的目录映射到主站目录')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {if $data['SYS_ATTACHMENT_SAVE_ID']} hide{/if}">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件上传目录')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" id="dr_attachment_dir" name="data[SYS_ATTACHMENT_PATH]" value="{htmlspecialchars((string)$data['SYS_ATTACHMENT_PATH'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_domain_dir('dr_attachment_dir')" type="button"><i class="fa fa-code"></i> {dr_lang('测试')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('此目录必须有读写权限,绝对路径请以“/”开头')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {if $data['SYS_ATTACHMENT_SAVE_ID']} hide{/if}">
|
||||
<label class="col-md-2 control-label">{dr_lang('附件URL地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" name="data[SYS_ATTACHMENT_URL]" value="{htmlspecialchars((string)$data['SYS_ATTACHMENT_URL'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_domain()" type="button"><i class="fa fa-wrench"></i> {dr_lang('检测')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('当设置了附件上传目录后,必须为该目录指定域名,用于分离附件,留空表示默认本项目地址(站外保存时必须指定域名)')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none" id="dr_test_domain">
|
||||
<label class="col-md-2 control-label">{dr_lang('目录检测结果')}</label>
|
||||
<div class="col-md-9" style="padding-top: 3px; line-height: 25px; color:green" id="dr_test_domain_result">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {if $page==1}active{/if}" id="tab_1">
|
||||
<div class="form-body">
|
||||
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
|
||||
<div class="form-group " >
|
||||
<label class="col-md-2 control-label">{dr_lang('缩略图格式')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="image[ext]" value="0" {if empty($image['ext'])}checked{/if} /> JPG <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="image[ext]" value="1" {if $image['ext']}checked{/if} /> WEBP <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('缩略图扩展名格式选择')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('无图显示图片')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" name="image[nopic]" value="{htmlspecialchars((string)$image['nopic'])}" >
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('无图时显示的图片地址,默认是/static/assets/images/nopic.gif')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('缩略图存储目录')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" id="dr_cache_dir" name="image[cache_path]" value="{htmlspecialchars((string)$image['cache_path'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_domain_dir('dr_cache_dir')" type="button"><i class="fa fa-code"></i> {dr_lang('测试')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('绝对路径请以“/”开头,默认uploadfile/thumb/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('缩略图访问URL地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " id="dr_cache_url" type="text" name="image[cache_url]" value="{htmlspecialchars((string)$image['cache_url'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_thumb_domain()" type="button"><i class="fa fa-wrench"></i> {dr_lang('检测')}</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="help-block">{dr_lang('缩略图文件访问地址,可单独指定域名,默认/uploadfile/thumb/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none" id="dr_test_thumb_domain">
|
||||
<label class="col-md-2 control-label">{dr_lang('目录检测结果')}</label>
|
||||
<div class="col-md-9" style="padding-top: 3px; line-height: 25px; color:green" id="dr_test_thumb_domain_result">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {if $page==5}active{/if}" id="tab_5">
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印位置')}</label>
|
||||
<div class="col-md-9">
|
||||
<label>
|
||||
<select class="form-control" name="watermark[locate]">
|
||||
{loop $locate $i $t}
|
||||
<option {if $i==$watermark['locate']} selected=""{/if} value="{$i}">{dr_lang($t)}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<span class="help-block">{dr_lang('选择水印在图片中的位置')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印类型')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" onclick="dr_type(0)" name="watermark[type]" value="0" {if empty($watermark['type'])}checked{/if} /> {dr_lang('图片')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" onclick="dr_type(1)" name="watermark[type]" value="1" {if $watermark['type']}checked{/if} /> {dr_lang('文字')} <span></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group dr_sy dr_sy_1">
|
||||
<label class="col-md-2 control-label">{dr_lang('文字字体')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><select class="form-control" name="watermark[wm_font_path]">
|
||||
{loop $waterfile $t}
|
||||
{if strpos($t, '.ttf') !== false}
|
||||
<option {if $t==$watermark['wm_font_path']} selected=""{/if} value="{$t}">{$t}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select></label>
|
||||
<label class="wm-fileupload-font"><div style="margin-bottom:5px;" class="btn green btn-sm fileinput-button"><i class="fa fa-plus"></i> <span>{dr_lang('上传')}</span> <input type="file" name="file_data"> </div> </label>
|
||||
<span class="help-block">{dr_lang('自定义水印字体文件cache/watermark/***.ttf')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_sy dr_sy_1">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印文字')}</label>
|
||||
<div class="col-md-5">
|
||||
<input name="watermark[wm_text]" value="{htmlspecialchars((string)$watermark['wm_text'])}" type="text" class="form-control">
|
||||
<span class="help-block">{dr_lang('如果为中文,先要水印目录中添加中文字体')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_sy dr_sy_1">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印文字大小')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input name="watermark[wm_font_size]" value="{intval($watermark['wm_font_size'])}" type="text" class="form-control"></label>
|
||||
<span class="help-block">{dr_lang('字体大小,单位px像素')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_sy dr_sy_1">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印文字颜色')}</label>
|
||||
<div class="col-md-9" style="padding-top: 2px;">
|
||||
<label><input type="hidden" id="hue-demo" data-control="hue" class="form-control demo" name="watermark[wm_font_color]" value="{htmlspecialchars((string)$watermark['wm_font_color'])}"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group dr_sy dr_sy_0">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印文件')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><select class="form-control" name="watermark[wm_overlay_path]">
|
||||
{loop $waterfile $t}
|
||||
{if strpos($t, '.jpg') !== false || strpos($t, '.jpeg') !== false || strpos($t, '.png') !== false}
|
||||
<option {if $t==$watermark['wm_overlay_path']} selected=""{/if} value="{$t}">{$t}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select></label>
|
||||
<label class="wm-fileupload-img"><div style="margin-bottom:5px;" class="btn green btn-sm fileinput-button"><i class="fa fa-plus"></i> <span>{dr_lang('上传')}</span> <input type="file" name="file_data"> </div> </label>
|
||||
|
||||
<span class="help-block">{dr_lang('自定义图片水印文件位于/cache/watermark/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group dr_sy dr_sy_0">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印图片透明度')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input name="watermark[wm_opacity]" value="{intval($watermark.wm_opacity)}" type="text" class="form-control" placeholder="{dr_lang('px')}"></label>
|
||||
<span class="help-block">{dr_lang('设置范围:1~100,表示水印图片的透明度数,可以预览看效果')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印图片内边距')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input name="watermark[wm_padding]" value="{intval($watermark.wm_padding)}" type="text" class="form-control" placeholder="{dr_lang('px')}"></label>
|
||||
<span class="help-block">{dr_lang('内边距,以像素为单位,是水印与图片边缘之间的距离')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('水印图片偏移量')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-inline input-small">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{dr_lang('水平')}</span>
|
||||
<input type="text" name="watermark[wm_hor_offset]" value="{intval($watermark.wm_hor_offset)}" class="form-control" placeholder="px">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-inline input-small">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{dr_lang('垂直')}</span>
|
||||
<input type="text" name="watermark[wm_vrt_offset]" value="{intval($watermark.wm_vrt_offset)}" class="form-control" placeholder="px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('图片大小限制')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-inline input-large">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{dr_lang('宽大于')}</span>
|
||||
<input type="text" name="watermark[width]" value="{intval($watermark.width)}" class="form-control" placeholder="px">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-inline input-large">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{dr_lang('高大于')}</span>
|
||||
<input type="text" name="watermark[height]" value="{intval($watermark.height)}" class="form-control" placeholder="px">
|
||||
</div>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('对超过设定值的图片附件加水印,例如小尺寸的图片不水印')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('编辑器水印')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="watermark[ueditor]" value="0" {if empty($watermark['ueditor'])}checked{/if} /> {dr_lang('按编辑器属性')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="watermark[ueditor]" value="1" {if $watermark['ueditor']}checked{/if} /> {dr_lang('全部水印')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('是否对编辑器上传的图片进行强制水印')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('缩略图水印')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="watermark[thumb]" value="0" {if empty($watermark['thumb'])}checked{/if} /> {dr_lang('按调用参数')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="watermark[thumb]" value="1" {if $watermark['thumb']}checked{/if} /> {dr_lang('全部水印')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('是否对缩略图函数dr_thumb的图片进行强制水印')}</span>
|
||||
<label><button type="button" onclick="dr_preview()" class="btn red"> <i class="fa fa-photo"></i> {dr_lang('预览水印')}</button></label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {if $page==2}active{/if}" id="tab_2">
|
||||
<div class="form-body">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('头像存储目录')}</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" id="dr_avatar_dir" name="image[avatar_path]" value="{htmlspecialchars((string)$image['avatar_path'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_domain_dir('dr_avatar_dir')" type="button"><i class="fa fa-code"></i> {dr_lang('测试')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('绝对路径请以“/”开头,默认uploadfile/member/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('头像访问URL地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group input-xlarge">
|
||||
<input class="form-control " type="text" id="dr_avatar_url" name="image[avatar_url]" value="{htmlspecialchars((string)$image['avatar_url'])}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_test_avatar_domain()" type="button"><i class="fa fa-wrench"></i> {dr_lang('检测')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('头像文件访问地址,可单独指定域名,默认/uploadfile/member/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none" id="dr_test_avatar_domain">
|
||||
<label class="col-md-2 control-label">{dr_lang('目录检测结果')}</label>
|
||||
<div class="col-md-9" style="padding-top: 3px; line-height: 25px; color:green" id="dr_test_avatar_domain_result">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<label><button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存')}</button></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function dr_test_domain() {
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 5000
|
||||
});
|
||||
$('#dr_test_domain').hide();
|
||||
$.ajax({type: "POST",dataType:"json", url: admin_file+"?c=api&m=test_attach_domain", data: $('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
$('#dr_test_domain').show();
|
||||
$('#dr_test_domain_result').html(json.msg);
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_test_thumb_domain() {
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 5000
|
||||
});
|
||||
$('#dr_test_domain').hide();
|
||||
$.ajax({type: "POST",dataType:"json", url: admin_file+"?c=api&m=test_thumb_domain", data: $('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
$('#dr_test_thumb_domain').show();
|
||||
$('#dr_test_thumb_domain_result').html(json.msg);
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_test_avatar_domain() {
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 5000
|
||||
});
|
||||
$('#dr_test_domain').hide();
|
||||
$.ajax({type: "POST",dataType:"json", url: admin_file+"?c=api&m=test_avatar_domain", data: $('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
$('#dr_test_avatar_domain').show();
|
||||
$('#dr_test_avatar_domain_result').html(json.msg);
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_test_domain_dir(id) {
|
||||
$.ajax({type: "GET",dataType:"json", url: admin_file+"?c=api&m=test_attach_dir&v="+encodeURIComponent($("#"+id).val()),
|
||||
success: function(json) {
|
||||
dr_tips(json.code, json.msg, -1);
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError)
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-colorpicker/css/colorpicker.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/jquery-minicolors/jquery.minicolors.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dr_type(v) {
|
||||
$('.dr_sy').hide();
|
||||
$('.dr_sy_'+v).show();
|
||||
}
|
||||
function dr_preview() {
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '{dr_lang('水印预览')}',
|
||||
fix:true,
|
||||
scrollbar: false,
|
||||
shadeClose: true,
|
||||
shade: 0,
|
||||
area: [{php echo \Phpcmf\Service::IS_PC_USER() ? '\'50%\', \'60%\'' : '"95%", "90%"'}],
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$(body).attr("style", "text-align:center");
|
||||
},
|
||||
content: '{dr_url("api/preview")}&'+$("#myform").serialize()+'&is_ajax=1'
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
// 初始化上传组件
|
||||
$('.wm-fileupload-font').fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: 2,
|
||||
url: '{dr_url("attachment/upload_index")}&at=font',
|
||||
dataType: 'json',
|
||||
formData : {
|
||||
'{csrf_token()}': '{csrf_hash()}',
|
||||
},
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
layer.msg(progress+'%');
|
||||
},
|
||||
add: function (e, data) {
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
//console.log($(this).html());
|
||||
dr_tips(data.result.code, data.result.msg);
|
||||
if (data.result.code) {
|
||||
setTimeout("window.location.reload(true)", 2000);
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
// 初始化上传组件
|
||||
$('.wm-fileupload-img').fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: 2,
|
||||
url: '{dr_url("attachment/upload_index")}&at=img',
|
||||
dataType: 'json',
|
||||
formData : {
|
||||
'{csrf_token()}': '{csrf_hash()}',
|
||||
},
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
layer.msg(progress+'%');
|
||||
},
|
||||
add: function (e, data) {
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
//console.log($(this).html());
|
||||
dr_tips(data.result.code, data.result.msg);
|
||||
if (data.result.code) {
|
||||
setTimeout("window.location.reload(true)", 2000);
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
$("#hue-demo").minicolors({
|
||||
control: $(this).attr('data-control') || 'hue',
|
||||
defaultValue: $(this).attr('data-defaultValue') || '',
|
||||
inline: $(this).attr('data-inline') === 'true',
|
||||
letterCase: $(this).attr('data-letterCase') || 'lowercase',
|
||||
opacity: $(this).attr('data-opacity'),
|
||||
position: $(this).attr('data-position') || 'bottom left',
|
||||
change: function(hex, opacity) {
|
||||
if (!hex) return;
|
||||
if (opacity) hex += ', ' + opacity;
|
||||
if (typeof console === 'object') {
|
||||
console.log(hex);
|
||||
}
|
||||
},
|
||||
theme: 'bootstrap'
|
||||
});
|
||||
|
||||
|
||||
dr_type({intval($data['type'])});
|
||||
|
||||
});
|
||||
|
||||
function dr_test_thumb_domain() {
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 5000
|
||||
});
|
||||
$('#dr_test_domain').hide();
|
||||
$.ajax({type: "POST",dataType:"json", url: admin_file+"?c=api&m=test_thumb_domain", data: $('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
$('#dr_test_thumb_domain').show();
|
||||
$('#dr_test_thumb_domain_result').html(json.msg);
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_test_domain_dir(id) {
|
||||
$.ajax({type: "GET",dataType:"json", url: admin_file+"?c=api&m=test_attach_dir&v="+encodeURIComponent($("#"+id).val()),
|
||||
success: function(json) {
|
||||
dr_tips(json.code, json.msg, -1);
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_admin_alert_error(HttpRequest, ajaxOptions, thrownError)
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.btn-default.active, .btn-default:active, .btn-default:hover, .btn-default.active.focus {
|
||||
border-color: #e7ecf1;
|
||||
}
|
||||
.fc-3x3 .btn2 {
|
||||
border-bottom: 1px solid #e7ecf1;
|
||||
}
|
||||
</style>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,61 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<button type="button" onclick="dr_ajax_option('{dr_url('attachment/del')}', '{dr_lang('删除后,已关联的附件都会失效,确定要删除吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
{/if}
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th style="text-align:center" width="70" class="{dr_sorting('id')}" name="id">Id</th>
|
||||
<th style="text-align:center" class="{dr_sorting('type')}" name="type" width="100">{dr_lang('存储类型')}</th>
|
||||
<th class="{dr_sorting('name')}" name="name">{dr_lang('名称')}</th>
|
||||
<th>{dr_lang('操作')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center">{$t.id}</td>
|
||||
<td style="text-align:center"> <span class="badge badge-{$color[$t['type']]}"> {$ci->type[$t['type']]['name']} </span></td>
|
||||
<td>{$t.name}</td>
|
||||
<td>
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<label><a href="{dr_url('attachment/edit', ['id'=>$t.id])}" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')}</a></label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,51 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 control-label ">{dr_lang('原来的储存策略')}</label>
|
||||
<div class="col-xs-12">
|
||||
|
||||
|
||||
<label style="width: 200px">
|
||||
<div class="input-group">
|
||||
<input type="text" name="data[o]" id="dr_old" class="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li>
|
||||
<a href="javascript:$('#dr_old').val('0');"> {dr_lang('默认')} </a>
|
||||
</li>
|
||||
{loop $remote $t}
|
||||
<li>
|
||||
<a href="javascript:$('#dr_old').val('{$t.id}');"> {$t.name} </a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 control-label ">{dr_lang('变更后的储存策略')}</label>
|
||||
<div class="col-xs-12">
|
||||
<label>
|
||||
<select name="data[n]" class="form-control">
|
||||
<option value="0"> {dr_lang('默认')} </option>
|
||||
{loop $remote $t}
|
||||
<option value="{$t.id}" >{$t.name}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<p class="help-block">{dr_lang('需要手动将原来的储存附件复制到新的储存策略的目录中')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,60 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="myfbody text-center">
|
||||
<label class="wm-fileupload-img">
|
||||
<div class="btn green btn-sm fileinput-button"><i class="fa fa-plus"></i> <span>{dr_lang('上传')}</span> <input type="file" name="file_data"> </div>
|
||||
</label>
|
||||
|
||||
<span class="help-block">{$data.attachment}</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function(){
|
||||
|
||||
|
||||
// 初始化上传组件
|
||||
$('.wm-fileupload-img').fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: 2,
|
||||
url: '{dr_url("attachments/upload_edit")}&id={$data.id}',
|
||||
dataType: 'json',
|
||||
formData : {
|
||||
'{csrf_token()}': '{csrf_hash()}',
|
||||
},
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
layer.msg(progress+'%');
|
||||
},
|
||||
add: function (e, data) {
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
//console.log($(this).html());
|
||||
if (data.result.code) {
|
||||
//
|
||||
parent.layer.closeAll();
|
||||
}
|
||||
|
||||
top.dr_tips(data.result.code, data.result.msg);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,192 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="note note-danger">
|
||||
<p>{dr_lang('更改系统配置之后需要重新生成一次缓存文件')}</p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<div class="table-scrollable">
|
||||
|
||||
<table class="table table-fc-upload table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th width="55"> </th>
|
||||
<th width="500"> {dr_lang('执行项目')} </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $key=0;}
|
||||
{loop $list $id $t}
|
||||
{php $key=$key+1;}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge-success"> {$key} </span>
|
||||
</td>
|
||||
<td>
|
||||
{dr_lang($t[0])}
|
||||
</td>
|
||||
<td style="overflow:auto">
|
||||
<label>
|
||||
<a href="javascript:my_update_cache('{$id}', '{$t[1]}');" class="btn red btn-xs"><i class="fa fa-refresh"></i> {dr_lang('立即执行')} </a>
|
||||
</label>
|
||||
<label id="dr_{$id}_result" >
|
||||
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{php $key=$key+1;}
|
||||
{loop $sync $s}
|
||||
{load $s}
|
||||
{/loop}
|
||||
|
||||
{table table=linkage return=c}
|
||||
{/table}
|
||||
{if $return_c}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge-success">{$key++}</span>
|
||||
</td>
|
||||
<td>
|
||||
{dr_lang('变更联动菜单数据后,更新缓存数据')}
|
||||
</td>
|
||||
<td style="overflow:auto">
|
||||
{loop $return_c $c}
|
||||
<label>
|
||||
<a href="javascript:dr_iframe_show('{dr_lang($c.name)}', '{dr_url('linkage/cache_index')}&key={$c.id}', '500px', '300px');" class="btn blue btn-xs"> {dr_lang($c.name)} </a>
|
||||
</label>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge-success"> {$key++} </span>
|
||||
</td>
|
||||
<td style="color:blue">
|
||||
{dr_lang('在升级框架版本或插件版本后,需要更新本脚本')}
|
||||
</td>
|
||||
<td style="overflow:auto">
|
||||
<label>
|
||||
<a href="javascript:dr_iframe_show('{dr_lang('升级程序脚本')}', '{dr_url('cache/update_index')}', '500px', '300px');" class="btn red btn-xs"><i class="fa fa-refresh"></i> {dr_lang('立即执行')} </a>
|
||||
</label>
|
||||
{if $ci->_is_admin_auth('menu/init')}
|
||||
<label>
|
||||
<a href="javascript:dr_load_ajax('{dr_lang('确定初始化后台菜单吗?')}', '{dr_url('menu/init')}', 0);" class="btn blue btn-xs"><i class="fa fa-list"></i> {dr_lang('初始化后台菜单')} </a>
|
||||
</label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function my_update_cache(id, m) {
|
||||
var obj = $('#dr_'+id+'_result');
|
||||
obj.html("<img style='height:17px' src='{THEME_PATH}assets/images/loading-0.gif' />");
|
||||
|
||||
if (m == 'update_attachment') {
|
||||
my_update_attachment(id, 0);
|
||||
{if IS_SITES}
|
||||
} else if (m == 'update_cache') {
|
||||
my_update_site_cache(id, 0);
|
||||
{/if}
|
||||
} else if (m == 'update_site_config') {
|
||||
my_update_site_config(id, 0);
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{SELF}?c=api&m=cache&id="+m,
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
obj.html('<font color="red">'+json.msg+'</font>');
|
||||
} else {
|
||||
obj.html('<font color="green">'+json.msg+'</font>');
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajax, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
||||
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function my_update_attachment(id, page) {
|
||||
var obj = $('#dr_'+id+'_result');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{SELF}?c=api&m=cache&id=update_attachment&page="+page,
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
obj.html('<font color="red">'+json.msg+'</font>');
|
||||
|
||||
} else {
|
||||
if (json.data == 0) {
|
||||
obj.html('<font color="green">'+json.msg+'</font>');
|
||||
} else {
|
||||
my_update_attachment(id, json.data);
|
||||
obj.html('<font color="blue">'+json.msg+'</font>');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajax, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
||||
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
||||
}
|
||||
});
|
||||
}
|
||||
function my_update_site_cache(id, page) {
|
||||
var obj = $('#dr_'+id+'_result');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{SELF}?c=api&m=cache&id=update_site_cache&page="+page,
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
obj.html('<font color="red">'+json.msg+'</font>');
|
||||
} else {
|
||||
if (json.data == 0) {
|
||||
obj.html('<font color="green">'+json.msg+'</font>');
|
||||
} else {
|
||||
my_update_site_cache(id, json.data);
|
||||
obj.html('<font color="blue">'+json.msg+'</font>');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajax, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
||||
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
||||
}
|
||||
});
|
||||
}
|
||||
function my_update_site_config(id, page) {
|
||||
var obj = $('#dr_'+id+'_result');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{SELF}?c=api&m=cache&id=update_site_config&page="+page,
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
obj.html('<font color="red">'+json.msg+'</font>');
|
||||
} else {
|
||||
if (json.data == 0) {
|
||||
obj.html('<font color="green">'+json.msg+'</font>');
|
||||
} else {
|
||||
my_update_site_config(id, json.data);
|
||||
obj.html('<font color="blue">'+json.msg+'</font>');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajax, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
||||
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,56 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
<div class="table-scrollable">
|
||||
|
||||
<table class="table table-fc-upload table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th width="55"> </th>
|
||||
<th width="300"> {dr_lang('检查项目')} </th>
|
||||
<th> {dr_lang('检查结果')} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $key=1;}
|
||||
{loop $list $id $t}
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge badge-success"> {$key} </span>
|
||||
{php $key++;}
|
||||
</td>
|
||||
<td>{dr_lang($t)}</td>
|
||||
<td id="dr_{$id}_result">
|
||||
<img style='height:17px' src='{THEME_PATH}assets/images/loading-0.gif'>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
$(function () {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('check/do_index')}&id={$id}",
|
||||
success: function (json) {
|
||||
$('#dr_{$id}_result').html(json.msg);
|
||||
if (json.code == 0) {
|
||||
$('#dr_{$id}_result').attr('style', 'color:red');
|
||||
} else {
|
||||
$('#dr_{$id}_result').attr('style', 'color:green');
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
$('#dr_{$id}_result').attr('style', 'color:red');
|
||||
$('#dr_{$id}_result').html(HttpRequest.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,107 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box" style="position: inherit;">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th width="60" style="text-align:center"> </th>
|
||||
<th width="330"> {dr_lang('名称')} / {dr_lang('目录')}</th>
|
||||
{if !$is_oem}
|
||||
<th width="150"> {dr_lang('开发者')} </th>
|
||||
{/if}
|
||||
<th width="80"> {dr_lang('版本')} </th>
|
||||
<th> {dr_lang('操作')} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $i=1;}
|
||||
{loop $list $dir $t}
|
||||
<tr class="odd gradeX">
|
||||
<td style="text-align:center">
|
||||
<span class="badge badge-success"> {$i} </span>
|
||||
</td>
|
||||
<td><i class="{$t.icon}"></i> {$t.name} / {$dir}
|
||||
{if !$is_oem && $t.vip}
|
||||
<span class="label label-danger"> {$t.vip} </span>
|
||||
{/if}
|
||||
</td>
|
||||
{if !$is_oem}
|
||||
<td>{if $t.store}<a href="{$t.store}" target="_blank">{$t.author}</a>{else}{$t.author}{/if}</td>
|
||||
{/if}
|
||||
<td> {if $is_oem}
|
||||
{$t.version}
|
||||
{else}
|
||||
<a href="javascript:dr_show_log('app-{$t.id}', '{$t.version}');">{$t.version}</a>
|
||||
{/if}</td>
|
||||
<td style="overflow: auto">
|
||||
{if $t.install}
|
||||
{if $t.menu}
|
||||
{if count($t.menu) > 1}
|
||||
<label class="dropdown-toggle">
|
||||
<a class="btn green btn-xs dropdown-toggle dr_show_menu" data-dir="{$dir}" data-toggle="dropdown"> <i class="fa fa-cog"></i> {dr_lang('进入')}</a>
|
||||
<ul class="dropdown-menu" role="dropdown" id="dr_menu_{$dir}">
|
||||
{loop $t.menu $b}
|
||||
<li>
|
||||
<a href="{$b.url}"> {dr_lang($b.name)} </a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</label>
|
||||
{else}
|
||||
<label>
|
||||
<a class="btn green btn-xs" href="{$t['menu'][0]['url']}"> <i class="fa fa-cog"></i> {dr_lang('进入')}</a>
|
||||
</label>
|
||||
{/if}
|
||||
{/if}
|
||||
<label><a href="javascript:dr_load_ajax('{dr_lang($dir == 'module' ? '卸载建站系统会清空所有栏目及其内容,确定要卸载吗?' : '确定卸载此程序吗?')}', '{dr_url('cloud/uninstall', ['dir'=>$dir])}', 1);" class="btn btn-xs red"> <i class="fa fa-trash"></i> {dr_lang('卸载')} </a></label>
|
||||
{else}
|
||||
<label><a href="javascript:{if !$t.mtype && $t.ftype=='module'}dr_install_module_select('{dr_url('cloud/install', ['dir'=>$dir])}'){else}dr_install_app('{dr_url('cloud/install', ['dir'=>$dir])}'){/if};" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('安装')} </a></label>
|
||||
<label><a href="javascript:dr_iframe('{dr_lang('删除提示')}', '{dr_url('cloud/app_delete', ['dir'=>$dir])}', '600px', '320px');" class="btn btn-xs red"> <i class="fa fa-close"></i> {dr_lang('删除')} </a></label>
|
||||
{/if}
|
||||
<label>
|
||||
<a class="btn blue btn-xs" href="javascript:dr_iframe_show('{dr_lang('文件浏览')}', '{dr_url('cloud/app_file', ['dir'=>$dir])}', '600px', '320px');"> <i class="fa fa-file-o"></i> {dr_lang('文件')}</a>
|
||||
</label>
|
||||
{if IS_DEV && $t.id && !$is_oem}
|
||||
<label>
|
||||
<a href="{$dev_down_url}&id={$t.id}" class="btn red btn-xs"> <i class="fa fa-cloud"></i> {dr_lang('应用市场')}</a>
|
||||
</label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{php $i++;}
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function (){
|
||||
$('.dr_show_menu').click(function (){
|
||||
var dir = $(this).data('dir');
|
||||
var top = $(this).offset().top+20;
|
||||
var left = $(this).offset().left;
|
||||
$("#dr_menu_"+dir).attr('style', 'top:'+top+'px;left:'+left+'px');
|
||||
});
|
||||
});
|
||||
function dr_show_log(id, v) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '版本日志',
|
||||
scrollbar: false,
|
||||
resize: true,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
shade: 0,
|
||||
area: ['80%', '80%'],
|
||||
content: '{dr_url("cloud/log_show")}&id='+id+'&version='+v,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,16 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform" style="margin-top: -20px">
|
||||
{dr_form_hidden()}
|
||||
<p>1、{dr_lang('本操作将删除目录(%s)中的文件', $path)}</p>
|
||||
<p>2、{dr_lang('如果该应用在其他目录中存在的文件,需要手动删除')}</p>
|
||||
{if $files}
|
||||
<div class="note note-danger">
|
||||
{loop $files $t}
|
||||
<p style=" word-wrap: break-word;">{$t}</p>
|
||||
{/loop}
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,10 @@
|
||||
{template "header.html"}
|
||||
|
||||
{if $files}
|
||||
<div class="note " style="margin-top: -40px">
|
||||
{loop $files $t}
|
||||
<p style=" word-wrap: break-word;">{$t}</p>
|
||||
{/loop}
|
||||
</div>
|
||||
{/if}
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,123 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
<p>本功能用于检测本地核心文件与服务器最新版文件的差异</p>
|
||||
<p>本次检测中的文件强烈建议开发者不要去修改,否则会引起系统不稳定或者系统崩溃</p>
|
||||
<p>如果二次开发中需要变更核心文件的逻辑,需要提前向官方说明,再为你单独开放钩子或继承类,可提交建议类工单或者邮件finecms@qq.com</p>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button type="button" id="dr_check_button" onclick="dr_checking();" class="btn blue"> <i class="fa fa-refresh"></i> 立即与服务器文件对比差异</button>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_result" class="margin-top-30" style="display: none">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dr_check_div" class="well margin-top-30" style="display: none">
|
||||
<div class="scroller" style="height:300px" data-rail-visible="1" id="dr_check_html">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_ing" style="display: none">
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light bordered" style="margin-top: 30px;">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<span class="caption-subject sbold ">对比结果</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div id="dr_check_bf">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input id="dr_check_status" type="hidden" value="0">
|
||||
|
||||
<script>
|
||||
function dr_checking() {
|
||||
$('#dr_check_button').attr('disabled', true);
|
||||
$('#dr_check_button').html('<i class="fa fa-refresh"></i> 准备中');
|
||||
$('#dr_check_bf').html("");
|
||||
$('#dr_check_html').html("正在准备中");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/bf_count')}",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
dr_tips(0, json.msg);
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_button').attr('disabled', false);
|
||||
$('#dr_check_button').html('<i class="fa fa-refresh"></i> 重新对比');
|
||||
$('#dr_check_html').append('<p style="color: red">'+json.msg+'</p>');
|
||||
} else {
|
||||
$('#dr_check_bf').html("");
|
||||
$('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_button').attr('disabled', true);
|
||||
$('#dr_check_bf').append('<p style="color: green">本程序下载时间:{$cms_version.downtime}</p>');
|
||||
$('#dr_check_bf').append('<p style="color: green">服务端最近更新时间:'+json.msg+'</p>');
|
||||
dr_ajax2ajax(1);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_ajax2ajax(page) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/bf_check')}&page="+page,
|
||||
success: function (json) {
|
||||
|
||||
$('#dr_check_html').append(json.msg);
|
||||
document.getElementById('dr_check_html').scrollTop = document.getElementById('dr_check_html').scrollHeight;
|
||||
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button').attr('disabled', false);
|
||||
$('#dr_check_button').html('<i class="fa fa-refresh"></i> 重新对比');
|
||||
dr_tips(0, '发现异常');
|
||||
} else {
|
||||
$('#dr_check_result .progress-bar-success').attr('style', 'width:'+json.code+'%');
|
||||
if (json.code == 100) {
|
||||
$('#dr_check_button').attr('disabled', false);
|
||||
$('#dr_check_button').html('<i class="fa fa-refresh"></i> 重新对比');
|
||||
// 对比结果
|
||||
var isxs = 0;
|
||||
$("#dr_check_html .rbf").each(function(){
|
||||
$('#dr_check_bf').append('<p>'+$(this).html()+'</p>');
|
||||
isxs = 1;
|
||||
});
|
||||
if (isxs == 1) {
|
||||
$('#dr_check_bf').append('<p style="text-align: center"><a class="btn green" href="http://www.xunruicms.com/member.html?app=vip&c=home&m=index" target="_blank">前往下载升级包,然后手动替换以上红色的文件</a></p>');
|
||||
}
|
||||
} else {
|
||||
$('#dr_check_button').html('<i class="fa fa-refresh"></i> 文件对比中 '+json.code+'%');
|
||||
dr_ajax2ajax(json.code);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,180 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="text-center" id="dr_check_button">
|
||||
<button type="button" id="dr_check_button_ing" disabled="disabled" class="btn blue"> <img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 准备中 </button>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_result" class="margin-top-30" style="display: none">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dr_check_div" class="well margin-top-30" style="display: none">
|
||||
<div class="scroller" style="height:250px" data-rail-visible="1" id="dr_check_html">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_ing" style="display: none">
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input id="dr_check_status" type="hidden" value="0">
|
||||
<script>
|
||||
{if IS_OEM_CMS}
|
||||
var is_oem_cms_down = 1;
|
||||
{/if}
|
||||
$(function () {
|
||||
dr_checking();
|
||||
});
|
||||
function dr_checking() {
|
||||
$('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_reing').remove();
|
||||
$('#dr_check_button_ing').addClass('blue');
|
||||
$('#dr_check_button_ing').removeClass('red');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 准备中');
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在验证服务端授权信息</label></p>');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file')}&id={$app_id}&ls={$ls}",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
} else {
|
||||
dr_do_cron();
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 执行下载
|
||||
function dr_do_cron() {
|
||||
// 开始下载他
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在开始下载文件</label></p>');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 下载中');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file_down')}&id={$app_id}&ls={$ls}",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
clearInterval(interval_id);
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
// 检测下载结果
|
||||
var is_ok_lock = 0;
|
||||
var is_jd = 0;
|
||||
var is_count = 0;
|
||||
var interval_id = window.setInterval(function() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file_check')}&id={$app_id}&is_count="+is_count+"&is_jd="+is_jd,
|
||||
success: function (json) {
|
||||
is_count++;
|
||||
document.getElementById('dr_check_html').scrollTop = document.getElementById('dr_check_html').scrollHeight;
|
||||
is_jd = json.code;
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').html('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
clearInterval(interval_id);
|
||||
} else {
|
||||
$('#dr_check_result .progress-bar-success').attr('style', 'width:'+json.code+'%');
|
||||
if (json.code >= 100) {
|
||||
// 下在完成
|
||||
clearInterval(interval_id);
|
||||
//dr_checking_install();
|
||||
if (is_ok_lock == 0) {
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">文件下载完成</label></p>');
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-check-circle"></i> 下载完成');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_install" onclick="dr_install()" class="btn blue"> <i class="fa fa-cog"></i> 导入程序 </button>');
|
||||
}
|
||||
is_ok_lock = 1;
|
||||
} else {
|
||||
$('#dr_check_html').append(json.msg);
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 下载进度 '+json.code+'%');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
function dr_install_cancel() {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 已取消覆盖');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_html').html('<p class="p_error" style="font-size:14px;">已取消覆盖操作。如需继续导入,请先备份本地插件文件夹或手动处理后再试。</p>');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_install" onclick="dr_install()" class="btn blue"> <i class="fa fa-cog"></i> 重新导入 </button>');
|
||||
}
|
||||
function dr_install(cf=0) {
|
||||
$('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_install').remove();
|
||||
$('#dr_check_button_ing').addClass('blue');
|
||||
$('#dr_check_button_ing').removeClass('red');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 文件复制中');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/install_app')}&id={$app_id}&cf="+cf,
|
||||
success: function (json) {
|
||||
if (json.code == 1) {
|
||||
if (json.data && json.data.confirm) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-exclamation-triangle"></i> 等待确认覆盖');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_html').html(json.msg);
|
||||
} else {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-check-circle"></i> 导入完成');
|
||||
$('#dr_check_button_ing').addClass('green');
|
||||
$('#dr_check_button_ing').removeClass('blue red');
|
||||
$('#dr_check_html').html(json.msg);
|
||||
}
|
||||
} else {
|
||||
$('#dr_check_html').html('<p class="p_error">'+json.msg+'</p>');
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 复制失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_install" onclick="dr_install()" class="btn blue"> <i class="fa fa-cog"></i> 导入程序 </button>');
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href="{THEME_PATH}assets/global/css/admin.min.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body style="text-align: center;padding: 160px 0px;background-color: #fff;">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,186 @@
|
||||
{template "header.html"}
|
||||
<form class="form-horizontal login-form" action="" onsubmit="return dr_submit()" method="post" style="padding:50px 0">
|
||||
{$form}
|
||||
<div class="row myfbody">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light bordered" style="margin-top: 40px">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<span class="caption-subject font-green"><b>{dr_lang('安全验证后台管理员账号')}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-body">
|
||||
<div class="form-group" id="dr_row_username">
|
||||
<label class="col-md-3 control-label ">{dr_lang('后台管理员账号')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" id="dr_username" class="form-control" name="data[username]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_password">
|
||||
<label class="col-md-3 control-label ">{dr_lang('后台管理员密码')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="password" id="dr_password" class="form-control" name="data[password]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_check " style="display: none">
|
||||
<label class="col-md-3 control-label "> </label>
|
||||
<div class="col-md-7 dr_check_phone">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_check" style="display: none">
|
||||
<input type="hidden" name="data[phone]" id="dr_check_phone">
|
||||
<input type="hidden" name="is_check" id="is_check">
|
||||
<label class="col-md-3 control-label "> </label>
|
||||
<div class="col-md-7">
|
||||
<div class="input-icon">
|
||||
<div class="input-inline " style="margin-right: 0px;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="data[sms]" placeholder="{dr_lang('手机验证码')}" id="dr_sms" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<a class="btn default" onclick="dr_send_sms()">获取验证码</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if SYS_ADMIN_CODE}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label ">{dr_lang('图片验证码')}</label>
|
||||
<div class="col-md-7">
|
||||
<div class="input-group login-code">
|
||||
<div class="input-icon">
|
||||
<input style="padding-left: 10px" class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code">
|
||||
</div>
|
||||
<div class="input-group-btn fc-code">
|
||||
{dr_code(120, 35)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label "></label>
|
||||
<div class="col-xs-7">
|
||||
<button type="button" onclick="dr_submit()" class="btn red " style="margin-right: 20px;"> {dr_lang('再次后台管理员账号')} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/crypto-js.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{else}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/jquery.md5.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var is_admin = 2;
|
||||
if (typeof parent.layer == 'function') {
|
||||
parent.layer.closeAll('loading');
|
||||
}
|
||||
|
||||
function dr_send_sms() {
|
||||
$.ajax({type: "POST",dataType:"json", url: '{$sms_url}', data: $(".login-form").serialize(),
|
||||
success: function(json) {
|
||||
// token 更新
|
||||
if (json.token) {
|
||||
var token = json.token;
|
||||
$(".login-form input[name='"+token.name+"']").val(token.value);
|
||||
}
|
||||
if (json.code == 1) {
|
||||
dr_tips(1, json.msg);
|
||||
} else {
|
||||
$('.fc-code img').click();
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
$('.fc-code img').click();
|
||||
var msg = HttpRequest.responseText;
|
||||
if (!msg) {
|
||||
dr_tips(0, "{dr_lang('系统错误')}");
|
||||
} else {
|
||||
dr_tips(0, msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_submit() {
|
||||
// 这里进行md5加密存储
|
||||
var pwd = $('#dr_password').val();
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
$('.login-form').append('<input type="hidden" name="is_aes" value="1">');
|
||||
var key = CryptoJS.enc.Utf8.parse('{$crypto_key}');
|
||||
var iv = CryptoJS.enc.Utf8.parse('{$crypto_iv}');
|
||||
var pw = pwd;
|
||||
pwd = CryptoJS.AES.encrypt(pwd, key, {
|
||||
mode: CryptoJS.mode.CBC,
|
||||
iv: iv,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
{if IS_DEV}
|
||||
pwd2 = CryptoJS.AES.decrypt(pwd, key, {
|
||||
mode: CryptoJS.mode.CBC,
|
||||
iv: iv,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
pwd2 = pwd2.toString(CryptoJS.enc.Utf8);
|
||||
if (pwd2 != pw) {
|
||||
alert("CryptoJS密码解析失败");
|
||||
return;
|
||||
}
|
||||
{/if}
|
||||
{else}
|
||||
pwd = $.md5(pwd); // 进行md5加密
|
||||
{/if}
|
||||
$('#dr_password').val(pwd);
|
||||
$.ajax({type: "POST",dataType:"json", url: '{$login_url}', data: $(".login-form").serialize(),
|
||||
success: function(json) {
|
||||
// token 更新
|
||||
if (json.token) {
|
||||
var token = json.token;
|
||||
$(".login-form input[name='"+token.name+"']").val(token.value);
|
||||
}
|
||||
if (json.code == 9) {
|
||||
// 二次验证
|
||||
$(".dr_row_username").hide();
|
||||
$(".dr_row_password").hide();
|
||||
$(".dr_check").show();
|
||||
$(".dr_check_phone").html(json.msg);
|
||||
$("#dr_check_phone").val(json.data);
|
||||
$("#is_check").val("yes");
|
||||
$('.fc-code img').click();
|
||||
} else if (json.code == 1) {
|
||||
window.location.href = json.data.url;
|
||||
} else {
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
$('#dr_password').val("");
|
||||
{/if}
|
||||
$('.fc-code img').click();
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
$('.fc-code img').click();
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
jQuery(document).ready(function() {
|
||||
$('.login-form input').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
dr_submit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,25 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group" id="dr_row_username">
|
||||
<label class="col-xs-3 control-label ajax_name">官方账号</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" id="dr_username" class="form-control" name="data[username]">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_password">
|
||||
<label class="col-xs-3 control-label ajax_name">登录密码</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="password" id="dr_password" class="form-control" name="data[password]">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,21 @@
|
||||
{if IS_DEV && IS_OEM_CMS}
|
||||
<html>
|
||||
<head>
|
||||
<link href="{THEME_PATH}assets/global/css/admin.min.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="page-content-white">
|
||||
<div style="{if \Phpcmf\Service::IS_MOBILE_USER()} padding:100px 10px 10px 10px; {else}padding:220px;{/if}text-align: center">
|
||||
<a href="{$url}" class="btn default btn-block">{dr_lang('单击下方链接进行访问该页面,关闭开发模式后将自动跳转')}</a>
|
||||
<p>{$url}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{else}
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;url={$url}">
|
||||
</head>
|
||||
<body style="background: url({THEME_PATH}assets/images/loading-0.gif);background-position: center;background-color: #fff;background-repeat: no-repeat;"> </body>
|
||||
</html>
|
||||
{/if}
|
||||
@@ -0,0 +1,209 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="text-center" id="dr_check_button">
|
||||
<button type="button" id="dr_check_button_ing" disabled="disabled" class="btn blue"> <img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 准备中 </button>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_result" class="margin-top-30" style="display: none">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dr_check_div" class="well margin-top-30" style="display: none">
|
||||
<div class="scroller" style="height:250px" data-rail-visible="1" id="dr_check_html">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dr_check_ing" style="display: none">
|
||||
<div class="progress progress-striped">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$(function () {
|
||||
dr_checking();
|
||||
});
|
||||
function dr_checking() {
|
||||
$('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_reing').remove();
|
||||
$('#dr_check_button_ing').addClass('blue');
|
||||
$('#dr_check_button_ing').removeClass('red');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 准备中');
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在备份本项目文件</label></p>');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_backup')}&id={$app_id}&dir={$dir}&is_bf={$is_bf}",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 备份失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_do_check()" class="btn green"> <i class="fa fa-refresh"></i> 忽略备份继续升级 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">建议手动备份本项目全部文件,然后再点击上方的【继续升级】按钮</label></p>');
|
||||
} else {
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">'+json.msg+'</label></p>');
|
||||
dr_do_check();
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 验证版本开始下载
|
||||
function dr_do_check() {
|
||||
// $('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_reing').remove();
|
||||
$('#dr_check_button_ing').addClass('blue');
|
||||
$('#dr_check_button_ing').removeClass('red');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 准备中');
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在验证版本信息</label></p>');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file')}&id={$app_id}&ls={$ls}&is_update=1",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
} else {
|
||||
dr_do_cron();
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 执行下载
|
||||
function dr_do_cron() {
|
||||
// 开始下载他
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在开始下载文件</label></p>');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 下载中');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file_down')}&id={$app_id}&ls={$ls}&is_update=1",
|
||||
success: function (json) {
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
clearInterval(interval_id);
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
// 检测下载结果
|
||||
var is_ok_lock = 0;
|
||||
var is_jd = 0;
|
||||
var is_count = 0;
|
||||
var interval_id = window.setInterval(function() {
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file_check')}&id={$app_id}&ls={$ls}&is_count="+is_count+"&is_jd="+is_jd,
|
||||
success: function (json) {
|
||||
is_count++;
|
||||
document.getElementById('dr_check_html').scrollTop = document.getElementById('dr_check_html').scrollHeight;
|
||||
is_jd = json.code;
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 下载失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').html('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新下载 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
clearInterval(interval_id);
|
||||
} else {
|
||||
$('#dr_check_result .progress-bar-success').attr('style', 'width:'+json.code+'%');
|
||||
if (json.code == 100) {
|
||||
// 下在完成
|
||||
clearInterval(interval_id);
|
||||
//dr_checking_install();
|
||||
if (is_ok_lock == 0) {
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">文件下载完成</label></p>');
|
||||
dr_checking_install();
|
||||
}
|
||||
is_ok_lock = 1;
|
||||
} else {
|
||||
$('#dr_check_html').append(json.msg);
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 下载进度 '+json.code+'%');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function dr_checking_install() {
|
||||
$('#dr_check_html').html("");
|
||||
$('#dr_check_result').html($('#dr_check_ing').html());
|
||||
$('#dr_check_div').show();
|
||||
$('#dr_check_result').show();
|
||||
$('#dr_check_reing').remove();
|
||||
$('#dr_check_button_ing').addClass('blue');
|
||||
$('#dr_check_button_ing').removeClass('red');
|
||||
$('#dr_check_button_ing').html('<img width="15" src="{THEME_PATH}assets/images/loading-2.gif"> 更新中');
|
||||
$('#dr_check_html').append('<p class=""><label class="rleft">正在更新本项目程序文件</label></p>');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/update_file_install')}&id={$app_id}&ls={$ls}",
|
||||
success: function (json) {
|
||||
|
||||
if (json.code == 1) {
|
||||
// 升级完成
|
||||
$('#dr_check_button').html('<button type="button" onclick="parent.location.reload()" class="btn green"> <i class="fa fa-refresh"></i> 刷新后台 </button>');
|
||||
$('#dr_check_html').html('<p>恭喜你,升级完成,请刷新后台之后再更新后台缓存</p>');
|
||||
// 避免多次请求赋值
|
||||
$('#dr_check_html').attr('id', "test");
|
||||
$('#dr_check_button').attr('id', "test2");
|
||||
} else {
|
||||
$('#dr_check_button_ing').html('<i class="fa fa-times-circle"></i> 升级失败');
|
||||
$('#dr_check_button_ing').addClass('red');
|
||||
$('#dr_check_button_ing').removeClass('blue');
|
||||
$('#dr_check_button').append('<button type="button" id="dr_check_reing" onclick="dr_checking()" class="btn green"> <i class="fa fa-refresh"></i> 重新升级 </button>');
|
||||
$('#dr_check_html').append('<p class="p_error"><label class="rleft">'+json.msg+'</label></p>');
|
||||
}
|
||||
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,347 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
{if $list['phpcmf']['backup_tpl']}
|
||||
<p style="color: green">模板备份目录:{$list['phpcmf']['backup_tpl']}</p>
|
||||
{else}
|
||||
<p>升级程序之前,请务必备份全站数据</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if !$is_oem}<th class="myselect"></th>{/if}
|
||||
<th width="80" style="text-align: center"> 类型</th>
|
||||
<th width="310"> 程序名称</th>
|
||||
<th width="170"> 更新时间 </th>
|
||||
<th width="80"> 版本 </th>
|
||||
<th width="110" style="text-align: center"> 备份 </th>
|
||||
<th><a onclick="dr_update_version_all()" class="badge badge-danger badge-roundless"> {dr_lang('检测全部')} </a> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $i=1;$dirs=[];}
|
||||
{loop $list $dir $t}
|
||||
<tr class="odd gradeX">
|
||||
{php $dirs[$t.id]=$dir;}
|
||||
{if !$is_oem}<td class="myselect">
|
||||
{if $t.type == 'app'}
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>{/if}
|
||||
</td>{/if}
|
||||
<td style="text-align: center">{$t.tname}</td>
|
||||
<td>{$t.name}{if $t.type == 'app'} / {$dir}{/if}
|
||||
{if !$is_oem && $t.vip}
|
||||
<span class="label label-danger"> {$t.vip} </span>
|
||||
{/if}
|
||||
</td>
|
||||
<td> {$t.updatetime} </td>
|
||||
<td>{if !$is_oem}
|
||||
<a href="javascript:dr_show_log('{$t.id}', '{$t.version}');">{$t.version}</a>
|
||||
{else}
|
||||
{$t.version}
|
||||
{/if}
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
{if $t.backup}
|
||||
<a href="javascript:dr_show_info('<p>文件备份时间:{$t.backup_time}</p><p>程序备份目录:{$t.backup}</p><p>模板备份目录:{if $t.backup_tpl}{$t.backup_tpl}{else}未备份{/if}</p>');" class="label label-success"> 已备份 </a>
|
||||
{else}
|
||||
<span class="label label-warning"> 未备份 </span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<label style="display: none" id="dr_update_{$dir}">
|
||||
<button type="button" onclick="dr_update_cms('{dr_url('cloud/todo_update', ['id'=>$t.id, 'dir'=>$dir])}', '{dr_lang('升级前请做好系统备份,你确定要升级吗?')}', 1)" class="btn red btn-xs"> <i class="fa fa-cloud-upload"></i> {dr_lang('在线升级')}</button>
|
||||
{if !$is_oem}
|
||||
{if $dir == 'phpcmf'}
|
||||
<a href="https://www.xunruicms.com/member.php?action=down&cid={$cmf_version.id}&is_update=v{$t.version}&vs={$vs}&php={PHP_VERSION}" target="_blank" class="btn green btn-xs"> <i class="fa fa-cloud-download"></i> {dr_lang('离线下载升级包')}</a>
|
||||
{else}
|
||||
<a href="javascript:dr_down_cms('{$t.id}');" class="btn green btn-xs"> <i class="fa fa-cloud-download"></i> {dr_lang('离线下载升级包')}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</label>
|
||||
<label style="display: none" id="dr_duibi_{$dir}">
|
||||
{if IS_DEV}
|
||||
<button type="button" onclick="dr_update_cms('{dr_url('cloud/todo_update', ['id'=>$t.id, 'dir'=>$dir])}', '{dr_lang('更新前请做好系统备份,你确定要更新吗?')}', 1)" class="btn red btn-xs"> <i class="fa fa-cloud-upload"></i> {dr_lang('在线升级')}</button>
|
||||
{/if}
|
||||
<a href="https://www.xunruicms.com/member.php?action=down&cid={$cmf_version.id}&is_update=v{$t.version}&vs={$vs}&php={PHP_VERSION}" target="_blank" class="btn green btn-xs"> <i class="fa fa-cloud-download"></i> {dr_lang('离线下载升级包')}</a>
|
||||
</label>
|
||||
<label class="dr_check_version" id="dr_row_{$dir}">
|
||||
<a onclick="dr_update_version('{$dir}', '{$t.id}', '{$t.version}')" class="badge badge-danger badge-roundless"> {dr_lang('检测版本')} </a>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{php $i++;}
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{if !$is_oem}
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
<div class="col-md-12 fc-list-select">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
<label style="margin-left: 15px;"><button type="button" onclick="dr_update_all()" class="btn blue btn-sm"> <i class="fa fa-cloud-download"></i> {dr_lang('批量在线升级')}</button></label>
|
||||
<label><button type="button" onclick="dr_down_all()" class="btn green btn-sm"> <i class="fa fa-cloud-download"></i> {dr_lang('批量离线下载')}</button></label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dr_down_cms(id) {
|
||||
var login_url = '{dr_url("cloud/login")}';
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '登录官方云账号',
|
||||
fix:true,
|
||||
scrollbar: false,
|
||||
shadeClose: true,
|
||||
shade: 0,
|
||||
area: ['500px', '260px'],
|
||||
btn: [lang['ok'], lang['esc']],
|
||||
yes: function(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$(body).find('.form-group').removeClass('has-error');
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
$.ajax({type: "POST",dataType:"json", url: login_url, data: $(body).find('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
if (json.code == 1) {
|
||||
layer.close(index);
|
||||
var yz_url = '{dr_url("cloud/down_app")}&id='+id+'&vs={$vs}&ls='+json.data;
|
||||
location.href= yz_url;
|
||||
} else {
|
||||
$(body).find('#dr_row_'+json.data.field).addClass('has-error');
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
content: login_url+'&is_iframe=1'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function dr_down_all() {
|
||||
var ids = new Array();
|
||||
var idss = '';
|
||||
var i = 0;
|
||||
$(".checkboxes:checked").each(function(){
|
||||
ids[i] = this.value;
|
||||
idss+= ','+this.value;
|
||||
i++;
|
||||
});
|
||||
if (ids.length < 1) {
|
||||
dr_tips(0, '你还没有选中需要下载的选项');
|
||||
return false;
|
||||
}
|
||||
dr_down_cms(idss);
|
||||
}
|
||||
|
||||
function dr_update_all() {
|
||||
var dirs_array = {json_encode($dirs)};
|
||||
var ids = new Array();
|
||||
var dirs = '';
|
||||
var idss = '';
|
||||
var i = 0;
|
||||
$(".checkboxes:checked").each(function(){
|
||||
ids[i] = this.value;
|
||||
idss+= ','+this.value;
|
||||
dirs+= ','+dirs_array[this.value];
|
||||
i++;
|
||||
});
|
||||
if (ids.length < 1) {
|
||||
dr_tips(0, '你还没有选中需要升级的选项');
|
||||
return false;
|
||||
}
|
||||
var url = "{dr_url('cloud/todo_update')}&id="+idss+"&vs={$vs}&dir="+dirs;
|
||||
layer.confirm(
|
||||
"升级前请做好系统备份,你确定要升级吗?",
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: ['直接升级','备份再升级', lang['esc']]
|
||||
}, function(index, layero){
|
||||
layer.close(index);
|
||||
dr_todo_cms(url+'&is_bf=1');
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
dr_todo_cms(url+'&is_bf=0');
|
||||
});
|
||||
}
|
||||
|
||||
function dr_update_cms(url, msg, remove) {
|
||||
layer.confirm(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: ['直接升级','备份再升级', lang['esc']]
|
||||
}, function(index, layero){
|
||||
layer.close(index);
|
||||
dr_todo_cms(url+'&is_bf=1');
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
dr_todo_cms(url+'&is_bf=0');
|
||||
});
|
||||
}
|
||||
|
||||
function dr_todo_cms(url) {
|
||||
var login_url = '{dr_url("cloud/login")}';
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '登录官方云账号',
|
||||
fix:true,
|
||||
scrollbar: false,
|
||||
shadeClose: true,
|
||||
shade: 0,
|
||||
area: ['500px', '260px'],
|
||||
btn: [lang['ok'], lang['esc']],
|
||||
yes: function(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$(body).find('.form-group').removeClass('has-error');
|
||||
// 延迟加载
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
$.ajax({type: "POST",dataType:"json", url: login_url, data: $(body).find('#myform').serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
if (json.code == 1) {
|
||||
layer.close(index);
|
||||
var yz_url = url+'&'+$('#myform').serialize()+'&ls='+json.data;
|
||||
// 验证成功
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '升级程序',
|
||||
scrollbar: false,
|
||||
resize: true,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
shade: 0,
|
||||
area: ['80%', '80%'],
|
||||
success: function(layero, index){
|
||||
// 主要用于后台权限验证
|
||||
dr_iframe_error(layero, index, 0);
|
||||
},
|
||||
content: yz_url
|
||||
});
|
||||
} else {
|
||||
$(body).find('#dr_row_'+json.data.field).addClass('has-error');
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
content: login_url+'&is_iframe=1'
|
||||
});
|
||||
}
|
||||
|
||||
function dr_beifen_cms(url, msg, remove) {
|
||||
layer.confirm(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '备份程序',
|
||||
scrollbar: false,
|
||||
resize: true,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
shade: 0,
|
||||
area: ['80%', '80%'],
|
||||
success: function(layero, index){
|
||||
// 主要用于后台权限验证
|
||||
dr_iframe_error(layero, index, 0);
|
||||
},
|
||||
content: url
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function dr_show_log(id, v) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '版本日志',
|
||||
scrollbar: false,
|
||||
resize: true,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
shade: 0,
|
||||
area: ['80%', '80%'],
|
||||
content: '{dr_url("cloud/log_show")}&id='+id+'&version='+v,
|
||||
//content: 'http://www.phpcmf.net/version.php?id='+id+'&version='+v,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function dr_update_version_all() {
|
||||
{loop $list $dir $t}
|
||||
{if $t.id}
|
||||
dr_update_version("{$dir}", "{$t.id}", "{$t.version}");
|
||||
{/if}
|
||||
{/loop}
|
||||
}
|
||||
|
||||
function dr_update_version(dir, id, version) {
|
||||
$("#dr_row_"+dir).html("<img style='height:17px' src='{THEME_PATH}assets/images/loading-0.gif'>");
|
||||
$("#dr_update_"+dir).hide();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: "{dr_url('cloud/check_version')}&id="+id+"&version="+version,
|
||||
success: function(json) {
|
||||
if (json.code == 1) {
|
||||
$("#dr_row_"+dir).html(json.msg);
|
||||
$("#dr_update_"+dir).show();
|
||||
} else if (json.code == 2) {
|
||||
$("#dr_row_"+dir).html(json.msg);
|
||||
$("#dr_duibi_"+dir).show();
|
||||
} else {
|
||||
$("#dr_row_"+dir).html("<a onclick=\"dr_update_version('"+dir+"', '"+id+"', '"+version+"')\" class=\"badge badge-danger badge-roundless\"> {dr_lang('检测版本')} </a>");
|
||||
$("#dr_row_"+dir).append(" <font color='red'>"+json.msg+"</font>");
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
$("#dr_row_"+dir).html("<a onclick=\"dr_update_version('"+dir+"', '"+id+"', '"+version+"')\" class=\"badge badge-danger badge-roundless\"> {dr_lang('检测版本')} </a>");
|
||||
$("#dr_row_"+dir).append(" <font color='red'>网络异常,请稍后再试</font>");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,52 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('自动任务权限')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(0)" type="radio" {if !$data['SYS_CRON_AUTH']}checked{/if} /> {dr_lang('任意服务器执行')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(1)" type="radio" {if $data['SYS_CRON_AUTH'] && $data['SYS_CRON_AUTH'] != 'cli'}checked{/if} /> {dr_lang('限本服务器IP')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(2)" type="radio" {if $data['SYS_CRON_AUTH'] == 'cli'}checked{/if} /> {dr_lang('CLI模式运行')} <span></span></label>
|
||||
</div>
|
||||
<input type="hidden" id="dr_cron_sync" value="{$data['SYS_CRON_AUTH']}" />
|
||||
<label id="dr_cron_row" {if $data['SYS_CRON_AUTH'] && $data['SYS_CRON_AUTH'] != 'cli'}{else}style="display:none"{/if}><input id="dr_cron" class="form-control input-large" type="text" name="data[SYS_CRON_AUTH]" value="{$data['SYS_CRON_AUTH']}" ></label>
|
||||
<span class="help-block">{dr_lang('填写本服务器的IP地址或者CLI模式运行,可以限制任务脚本的执行权限,防止被其他人恶意执行')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('URL方式的脚本地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{ROOT_URL}api/cron.php</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('CLI模式的脚本实际地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{WEBPATH}api/cron.php</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function dr_cron_value(id) {
|
||||
if (id == "1") {
|
||||
$("#dr_cron_row").show();
|
||||
$("#dr_cron").val($("#dr_cron_sync").val());
|
||||
} else if (id == "2") {
|
||||
$("#dr_cron_row").hide();
|
||||
$("#dr_cron_sync").val('cli');
|
||||
$("#dr_cron").val('cli');
|
||||
} else {
|
||||
$("#dr_cron_row").hide();
|
||||
$("#dr_cron_sync").val($("#dr_cron").val());
|
||||
$("#dr_cron").val('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,115 @@
|
||||
{template "header.html"}
|
||||
{template "api_list_date_search.html"}
|
||||
<div class="note note-danger">
|
||||
<p>
|
||||
{if $run_time}
|
||||
<font color="green">{dr_lang('最近自动执行时间为:%s', $run_time)}</font>
|
||||
{else}
|
||||
<font color="red">{dr_lang('当前服务器没有设置自动任务脚本')}</font>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
<div class="note note-danger" {if !isset($get.submit)}style="display: none"{/if} id="table-search-tool">
|
||||
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{dr_form_search_hidden(['field' => 'type'])}
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label><select name="keyword" class="form-control">
|
||||
<option value="">--</option>
|
||||
{loop $type $i $t}
|
||||
<option value="{$i}" {if $param.keyword == $i} selected{/if}>{$t}</option>
|
||||
{/loop}
|
||||
</select></label>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<div class="input-group input-medium date-picker input-daterange" data-date="" data-date-format="yyyy-mm-dd">
|
||||
<input type="text" class="form-control" value="{$param.date_form}" name="date_form">
|
||||
<span class="input-group-addon"> {dr_lang('到')} </span>
|
||||
<input type="text" class="form-control" value="{$param.date_to}" name="date_to">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label><button type="submit" class="btn blue btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-card-box">
|
||||
|
||||
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="bootstrap-table bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
</label>{/if}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url($uriprefix.'/post_add')}', '{dr_lang('你确定要批量执行它们吗?')}', 1)" class="btn blue btn-sm"> <i class="fa fa-refresh"></i> {dr_lang('批量执行')}</button>
|
||||
</label>
|
||||
</div>
|
||||
<label class="pull-right"> <button class="btn btn-default btn-sm" onclick="$('#table-search-tool').fadeToggle()" type="button" name="toggle"><i class="bi bi-search"></i> </button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable deltable-clearfix">
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="140" class="{dr_sorting('type')}" name="type">{dr_lang('类型')}</th>
|
||||
<th class="{dr_sorting('inputtime')}" name="inputtime" width="170">{dr_lang('录入时间')}</th>
|
||||
<th class="{dr_sorting('updatetime')}" name="updatetime" width="170">{dr_lang('执行时间')}</th>
|
||||
<th style="text-align:center" width="100" class="{dr_sorting('status')}" name="status">{dr_lang('状态')}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>{if isset($type[$t.type])}<span class="label label-sm label-info">{$type[$t.type]}</span>{else}<span class="label label-sm label-danger">{$t.type}</span>{/if}</td>
|
||||
<td>{dr_date($t.inputtime, null, 'red')}</td>
|
||||
<td>{dr_date($t.updatetime, null, 'red')}</td>
|
||||
<td style="text-align:center">
|
||||
<label>{if $t.status}<a href="javascript:;" onclick="dr_iframe_show('{dr_lang('执行情况')}', '{dr_url($uriprefix.'/show')}&id={$t.id}')" class="label label-sm label-danger">{dr_lang('查看错误')}</a>{else}<span class="label label-sm label-warning">{dr_lang('待执行')}</span>{/if}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label><a href="javascript:;" class="btn blue btn-xs" onclick="dr_ajax_option('{dr_url($uriprefix.'/do_add')}&id={$t.id}', '{dr_lang('你确定要立即执行它吗?')}', 1)"> <i class="fa fa-refresh"></i> {dr_lang('立即执行')}</a> </label>
|
||||
<label><a href="javascript:;" class="btn green btn-xs" onclick="dr_iframe_show('{dr_lang('执行情况')}', '{dr_url($uriprefix.'/show')}&id={$t.id}')">{dr_lang('查看参数')}</a></label>
|
||||
{if $t.error}
|
||||
<label><a href="javascript:;" class="btn red btn-xs" onclick="dr_iframe_show('{dr_lang('执行情况')}', '{dr_url($uriprefix.'/show')}&id={$t.id}')">{dr_lang('已经执行%s次', $t.status)}</a></label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
|
||||
|
||||
<div class="col-md-12 fc-list-page">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,6 @@
|
||||
{template "header.html"}
|
||||
<p>{dr_lang('错误信息')}:</p>
|
||||
<pre>{$show_error}</pre>
|
||||
<p>{dr_lang('执行参数')}:</p>
|
||||
<pre>{$show_value}</pre>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,86 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('模式')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input onclick="rr(this.value)" type="radio" name="type" value="0" {if $data.host != 'mail'}checked=""{/if}> SMTP <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input onclick="rr(this.value)" type="radio" name="type" value="1" {if $data.host == 'mail'}checked=""{/if}> Mail <span></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mail" style="display: none">
|
||||
<label class="col-xs-3 control-label ajax_name"></label>
|
||||
<div class="col-xs-8">
|
||||
<span class="help-block">{dr_lang('Mail模式表示由当前服务器发出邮件,需要服务器的支撑。')}</span>
|
||||
<span class="help-block">{dr_lang('由Mail模式发送的邮件,被拦截的几率比较大,请慎用。')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group smtp" id="dr_row_host">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('服务器')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_host" name="data[host]" value="{htmlspecialchars((string)$data.host)}">
|
||||
<span class="help-block">{dr_lang('由邮件运营商提供,若使用ssl协议请使用ssl://开头,例如:ssl://smtp.exmail.qq.com')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group smtp" id="dr_row_port">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('端口号')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_port" name="data[port]" value="{htmlspecialchars((string)$data.port)}">
|
||||
<span class="help-block">{dr_lang('普通协议一般是25,ssl协议一般是465')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_user">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('邮箱账号')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_user" name="data[user]" value="{htmlspecialchars((string)$data.user)}">
|
||||
<span class="help-block">{dr_lang('登录邮件系统的账号名称')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group smtp" id="dr_row_pass">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('邮箱密码')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_pass" name="data[pass]" value="{htmlspecialchars((string)$data.pass)}">
|
||||
<span class="help-block">{dr_lang('登录邮件系统的账号密码')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('排列顺序')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id="displayorder" class="form-control" name="data[displayorder]" value="{intval($data.displayorder)}">
|
||||
<span class="help-block"> {dr_lang('排序值由小到大排列,范围为0-255')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/fuelux/js/spinner.min.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#displayorder").TouchSpin({
|
||||
buttondown_class: "btn red",
|
||||
buttonup_class: "btn green",
|
||||
min: -255,
|
||||
max: 255
|
||||
});
|
||||
{if $data && $data.host == 'mail'}
|
||||
rr(1);
|
||||
{/if}
|
||||
});
|
||||
function rr(v) {
|
||||
if (v == 0) {
|
||||
$('.smtp').show();
|
||||
$('.mail').hide();
|
||||
} else {
|
||||
$('.smtp').hide();
|
||||
$('.mail').show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,79 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
|
||||
<button type="button" onclick="dr_ajax_option('{dr_url('email/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix hrb10"></div>
|
||||
{/if}
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="70" style="text-align:center"> {dr_lang('排序')} </th>
|
||||
<th width="270"> {dr_lang('服务器')} </th>
|
||||
<th width="270"> {dr_lang('邮箱账号')} </th>
|
||||
<th width="80" style="text-align: center"> {dr_lang('端口号')} </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center"> <input type="text" onblur="dr_ajax_save(this.value, '{dr_url('email/save_edit', ['id'=>$t.id])}', 'displayorder')" value="{$t.displayorder}" class="displayorder form-control input-sm input-inline input-mini"> </td>
|
||||
<td>{if $t.host == 'mail'}Mail{else}{$t.host}{/if}</td>
|
||||
<td>{$t.user}</td>
|
||||
<td style="text-align: center">{if $t.host == 'mail'}{dr_lang('系统')}{else}{$t.port}{/if}</td>
|
||||
<td>
|
||||
{if $ci->_is_admin_auth('edit')}<a href="javascript:dr_iframe('edit', '{dr_url('email/edit', ['id'=>$t.id])}', '600px');" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a>{/if}
|
||||
<a id="dr_sending_{$t.id}" href="javascript:;" onclick="test_email('{$t.id}')" class="btn btn-xs default"> <i class="fa fa-send"></i> {dr_lang('测试发送')} </a>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function test_email(id) {
|
||||
$("#dr_sending_"+id).html(" <i class='fa fa-send'></i> {dr_lang('发送中...')}");
|
||||
$.ajax({type: "GET",dataType:"json", url: "{dr_url('api/email_test')}&id="+id+"&"+Math.random(),
|
||||
success: function(json) {
|
||||
dr_tips(json.code, json.msg, -1);
|
||||
$("#dr_sending_"+id).html(" <i class='fa fa-send'></i> {dr_lang('发送测试')}");
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,38 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
<p>{dr_lang('邮件发送失败时返回的错误代码,格式为:时间 [邮件服务器 - 服务器账号 - 发送给的邮箱] 错误代码')}</p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('email_log/del')}', '{dr_lang('你确定要清空全部记录吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('清空全部')}</button></label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-hover table-checkable">
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX">
|
||||
<td style="text-align:left;padding: 10px;">
|
||||
{$t}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 text-right">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,52 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/codemirror/lib/codemirror.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/plugins/codemirror/theme/neat.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="{THEME_PATH}assets/global/plugins/codemirror/lib/codemirror.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/codemirror/mode/javascript/javascript.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
var myTextArea = document.getElementById('file_code');
|
||||
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
styleActiveLine: true,
|
||||
theme: "neat",
|
||||
mode: 'javascript'
|
||||
});
|
||||
});
|
||||
|
||||
var getWindowSize = function(){
|
||||
return ["Height","Width"].map(function(name){
|
||||
return window["inner"+name] ||
|
||||
document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
|
||||
});
|
||||
}
|
||||
|
||||
function wSize(){
|
||||
var str=getWindowSize();
|
||||
var strs= new Array(); //定义一数组
|
||||
strs=str.toString().split(","); //字符分割
|
||||
var heights = strs[0]-140,Body = $('body');
|
||||
$('#file_code').height(heights);
|
||||
$('.CodeMirror').height(heights);
|
||||
}
|
||||
|
||||
$(function(){
|
||||
wSize();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="note note-danger" style="margin-top: -20px;">
|
||||
<p>{dr_safe_replace_path($file)}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea id="file_code" name="code">{$code}</textarea>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,60 @@
|
||||
{template "header.html"}
|
||||
{template "api_list_date_search.html"}
|
||||
<div class="note note-danger">
|
||||
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{dr_form_search_hidden()}
|
||||
<div class="col-md-12" style="padding-right: 0">
|
||||
<label>
|
||||
<div class="input-group fc-input-time date date-picker" data-date-format="yyyy-mm-dd">
|
||||
<input type="text" class="form-control" name="time" value="{$time}">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<label><button type="submit" class="btn blue btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('error/del', ['time'=>$time])}', '{dr_lang('你确定要清空当天记录吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('清空')}</button></label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th width="170">{dr_lang('时间')}</th>
|
||||
<th width="80" style="text-align: center">{dr_lang('类型')}</th>
|
||||
<th>{dr_lang('日志')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $id $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$id}">
|
||||
<td>{$t.time}</td>
|
||||
<td style="text-align: center">{$t.type}</td>
|
||||
<td>
|
||||
<a onclick="dr_show_file_code('{dr_lang('查看文件')}', '{dr_url('error/log_show', ['time'=>$time])}')">{dr_strcut($t.message, 80)}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 text-right">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,421 @@
|
||||
{template "header.html"}
|
||||
|
||||
{php echo \Phpcmf\Service::L('Field')->get('select')->get_select_search_code();}
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="myfbody">
|
||||
<div class="portlet bordered light ">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<ul class="nav nav-tabs" style="float:left;">
|
||||
<li class="{if $page==0}active{/if}">
|
||||
<a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('基本设置')} </a>
|
||||
</li>
|
||||
<li class="{if $page==3}active{/if}">
|
||||
<a href="#tab_3" data-toggle="tab" onclick="$('#dr_page').val('3')"> <i class="fa fa-code"></i> {dr_lang('字段样式')} </a>
|
||||
</li>
|
||||
<li class="{if $page==1}active{/if}">
|
||||
<a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1')"> <i class="fa fa-crop"></i> {dr_lang('数据验证')} </a>
|
||||
</li>
|
||||
<li class="{if $page==2}active{/if}">
|
||||
<a href="#tab_2" data-toggle="tab" onclick="$('#dr_page').val('2')"> <i class="fa fa-user"></i> {dr_lang('字段权限')} </a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane {if $page==0}active{/if}" id="tab_0">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('显示名称')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input class="form-control" type="text" name="data[name]" value="{htmlspecialchars((string)$data.name)}" id="dr_name" onblur="d_topinyin('fieldname','name');" /></label>
|
||||
<span class="help-block" id="dr_name_tips">{dr_lang('为字段取个名字')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('字段名称')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input class="form-control" type="text" name="data[fieldname]" value="{htmlspecialchars((string)$data.fieldname)}" {if $data.id}disabled{/if} id="dr_fieldname" /></label>
|
||||
<span class="help-block" id="dr_fieldname_tips">{dr_lang('只能由小写字母、数字、下划线组成')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{if $ismain}
|
||||
<input name="data[ismain]" type="hidden" value="1" />
|
||||
{else}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('是否主表')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" id="iszb1" name="data[ismain]" value="0" {if $id} disabled{/if} {if !$data.ismain} checked{/if} /> {dr_lang('附表')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" id="iszb2" name="data[ismain]" value="1" {if $id} disabled{/if} {if $data.ismain} checked{/if} /> {dr_lang('主表')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('主表字段可用于列表循环或者搜索;附表只能用于内容页显示')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('字段类别')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><select class="form-control bs-select" data-live-search="true" data-actions-box="true" {if $id && !$is_edit} readonly="readonly"{/if} id="dr_fieldtype" name="data[fieldtype]" onChange="show_field_option(this.value)">
|
||||
<option value=""> -- </option>
|
||||
{loop $ftype $t}
|
||||
<option value="{$t.id}" {if $t.id==$data.fieldtype} selected="selected"{/if}> {$t.name}({$t.id}) </option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label id="dr_loading" style="display:none">
|
||||
|
||||
<img width="16" src="{THEME_PATH}assets/images/loading-2.gif">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-body" id="dr_option">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane {if $page==1}active{/if}" id="tab_1">
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('XSS过滤')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="checkbox" name="data[setting][validate][xss]" value="1" {if $data['setting']['validate']['xss']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-off-color="danger" data-on-color="success" class="make-switch" data-size="small">
|
||||
<span class="help-block">{dr_lang('非法字符会被安全替换掉')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('前端禁止修改')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="checkbox" name="data[setting][validate][isedit]" value="1" {if $data['setting']['validate']['isedit']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
|
||||
<span class="help-block">{dr_lang('前端用户提交之后将不能修改字段值,后台仍然可以修改值')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_is_validate">
|
||||
<label class="col-md-2 control-label">{dr_lang('内容验证必填')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[setting][validate][required]" value="0" {if $data['setting']['validate']['required']==0}checked{/if} onclick="set_required(0)" /> {dr_lang('不验证')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[setting][validate][required]" value="1" {if $data['setting']['validate']['required']==1}checked{/if} onclick="set_required(1)" /> {dr_lang('验证')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('对提交内容进行必填验证(超管不进行验证)')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="required" class="dr_is_validate" style="display:none">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('正则验证')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group ">
|
||||
<input class="form-control" type="text" name="data[setting][validate][pattern]" value="{$data['setting']['validate']['pattern']}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn blue" onclick="dr_iframe_show('{dr_lang('正则表达式')}', '{dr_url('api/test_pattern')}')" type="button">{dr_lang('测试')}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('例如数字正则表达式格式:/^[0-9]+$/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('验证提示')}</label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="data[setting][validate][errortips]" value="{htmlspecialchars((string)$data['setting']['validate']['errortips'])}" id="dr_errortips" />
|
||||
<span class="help-block">{dr_lang('当字段校验未通过时的提示信息,如“标题必须在80字以内”等等')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('校验函数/方法')}</label>
|
||||
<div class="col-md-9">
|
||||
<label><input class="form-control input-large"type="text" name="data[setting][validate][check]" value="{htmlspecialchars((string)$data['setting']['validate']['check'])}" id="dr_check"> </label>
|
||||
<label><a class="btn btn-sm blue" href="javascript:dr_test_call('dr_check');"> {dr_lang('检测')} </a></label>
|
||||
<span class="help-block"> <a href="javascript:dr_help('601');"> {dr_lang('此功能需要有PHP编程经验,了解函数的定义')}</a> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('过滤函数/方法')}</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<label><input class="form-control input-large"type="text" name="data[setting][validate][filter]" value="{htmlspecialchars((string)$data['setting']['validate']['filter'])}" id="dr_filter"> </label>
|
||||
<label><a class="btn btn-sm blue" href="javascript:dr_test_call('dr_filter');"> {dr_lang('检测')} </a></label>
|
||||
<span class="help-block"> <a href="javascript:dr_help('602');"> {dr_lang('此功能需要有PHP编程经验,了解函数的定义')}</a> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane {if $page==3}active{/if}" id="tab_3">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-body" id="dr_css">
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('字段提示信息')}</label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="data[setting][validate][tips]" value="{htmlspecialchars((string)$data['setting']['validate']['tips'])}" />
|
||||
<span class="help-block">{dr_lang('对字段简短的提示,来说明这个字段是用来干什么的')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('Css样式表')}</label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="data[setting][option][css]" value="{htmlspecialchars((string)$data['setting']['option']['css'])}" />
|
||||
<span class="help-block">{dr_lang('[不建议使用] Text类型字段可用,对字段进行样式控制,使用开发者自定义的css样式')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('表单附加属性')}</label>
|
||||
<div class="col-md-9">
|
||||
<textarea class="form-control" style="height:120px" name="data[setting][validate][formattr]">{$data['setting']['validate']['formattr']}</textarea>
|
||||
<span class="help-block">{dr_lang('[不建议使用] Text类型字段可用,可以通过此处加入js事件、ajax验证、css等')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane {if $page==2}active{/if}" id="tab_2">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('禁止使用')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="checkbox" name="data[disabled]" value="1" {if $data['disabled']}checked{/if} data-on-text="{dr_lang('已禁止')}" data-off-text="{dr_lang('已开放')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('显示位置')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[setting][is_right]" value="0" {if !$data['setting']['is_right']}checked{/if} /> {dr_lang('默认')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[setting][is_right]" value="1" {if 1==$data['setting']['is_right']}checked{/if} /> {dr_lang('右侧')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input type="radio" name="data[setting][is_right]" value="2" {if 2==$data['setting']['is_right']}checked{/if} /> {dr_lang('手动')} <span></span></label>
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('此功能仅支持模块内容字段使用,选择“右侧”时字段显示在右侧部分; 当选择"手动"时,需要开发者手动调用')}
|
||||
<?php echo '{';?>$diyfield}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('后台不显示该字段')}</label>
|
||||
<div class="col-md-9">
|
||||
<label style="min-width: 200px">
|
||||
<select class="form-control bs-select" name="data[setting][show_admin][]" multiple data-actions-box="true">
|
||||
{loop $role $t}
|
||||
{if $t.id>1}
|
||||
<option {if dr_in_array($t.id, (array)$data.setting.show_admin)} selected{/if} value="{$t.id}">{dr_lang($t.name)}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<span class="help-block">{dr_lang('后台发布内容时该角色将不会看到这个字段')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label class="col-md-2 control-label">{dr_lang('前端不显示该字段')}</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<label style="min-width: 200px">
|
||||
<select class="form-control bs-select" name="data[setting][show_member][]" multiple data-actions-box="true">
|
||||
<option {if dr_in_array(0, (array)$data.setting.show_member)} selected{/if} value="0">{dr_lang('游客')}</option>
|
||||
{list action=cache name=MEMBER.group}
|
||||
<option {if dr_in_array($t.id, (array)$data.setting.show_member)} selected{/if} value="{$t.id}">{dr_lang($t.name)}</option>
|
||||
{/list}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
|
||||
<span class="help-block">{dr_lang('前端发布内容时该会员组将不会看到这个字段,如果“前端显示”关闭了此功能就无效')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('前端显示')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="checkbox" name="data[ismember]" value="1" {if $data['ismember']}checked{/if} data-on-text="{dr_lang('已显示')}" data-off-text="{dr_lang('已隐藏')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
|
||||
<span class="help-block">{dr_lang('前端发布内容时,前端表单或者会员中心控制是否显示它')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{if $issearch}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{dr_lang('category_search_field标签')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="checkbox" name="data[issearch]" value="1" {if $data['issearch']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
|
||||
<span class="help-block">{dr_lang('只针对栏目模型字段搜索时,category_search_field标签使用,只支持Select、Radio、Checkbox')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<label><button type="button" onclick="dr_ajax_submit3('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000', '')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存')}</button></label>
|
||||
<label><button type="button" onclick="dr_ajax_submit3('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000', '{dr_url('field/index', ['rname' => $rname, 'rid' => $rid])}')" class="btn green"> <i class="fa fa-mail-reply-all"></i> {dr_lang('保存并返回')}</button></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
set_required({intval($data['setting']['validate']['required'])});
|
||||
$("#dr_loading").show();
|
||||
$.ajax({type: "GET",dataType:"json", url: '{dr_url('api/field')}&rand='+Math.random(),
|
||||
data: {type:'{$data['fieldtype']}', relatedid:'{$rid}', relatedname:'{$rname}', app:'{$namespace}', id:{intval($data.id)}},
|
||||
success: function(data) {
|
||||
$('#dr_css').html(data.style);
|
||||
$('#dr_option').html(data.option);
|
||||
$("#dr_loading").hide();
|
||||
App.init();
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
});
|
||||
function dr_ajax_submit3(url, form, time, go) {
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: url,
|
||||
data: $("#"+form).serialize(),
|
||||
success: function(json) {
|
||||
layer.close(loading);
|
||||
// token 更新
|
||||
if (json.token) {
|
||||
var token = json.token;
|
||||
$("#"+form+" input[name='"+token.name+"']").val(token.value);
|
||||
}
|
||||
if (json.code < 0) {
|
||||
layer.confirm(
|
||||
json.msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: ['{dr_lang("仍然创建")}', '{dr_lang("变更名字")}']
|
||||
}, function(index) {
|
||||
dr_ajax_submit3(url+"&is_op_add=1", form, time, go);
|
||||
});
|
||||
} else if (json.code > 0) {
|
||||
dr_cmf_tips(json.code, json.msg, json.data.time);
|
||||
if (time) {
|
||||
var gourl = url;
|
||||
if (go != '' && go != undefined && go != 'undefined') {
|
||||
gourl = go;
|
||||
} else if (json.data.url) {
|
||||
gourl = json.data.url;
|
||||
}
|
||||
setTimeout("window.location.href = '"+gourl+"'", time);
|
||||
}
|
||||
dr_sync_cache(0); // 自动更新缓存
|
||||
} else {
|
||||
dr_cmf_tips(0, json.msg, json.data.time);
|
||||
if (json.data.field) {
|
||||
$('#'+form+' #dr_row_'+json.data.field).addClass('has-error');
|
||||
$('#'+form+' #dr_'+json.data.field).focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
function show_field_option(type) {
|
||||
{if $id}
|
||||
var ftype = '{$data.fieldtype}';
|
||||
if (ftype != type) {
|
||||
$.ajax({type: "GET",dataType:"json", url: '{dr_url("field/type_edit")}&my='+ftype+'&to='+type,
|
||||
success: function(json) {
|
||||
if (json.code==1) {
|
||||
$("#dr_loading").show();
|
||||
$.ajax({type: "GET",dataType:"json", url: '{dr_url('api/field')}&rand='+Math.random(),
|
||||
data: {type:type, relatedid:'{$rid}', relatedname:'{$rname}', app:'{$namespace}', id:{intval($data.id)}},
|
||||
success: function(data) {
|
||||
$('#dr_css').html(data.style);
|
||||
$('#dr_option').html(data.option);
|
||||
$("#dr_loading").hide();
|
||||
App.init();
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.confirm(
|
||||
json.msg,
|
||||
{
|
||||
icon: 3,
|
||||
shade: 0,
|
||||
title: lang['ts'],
|
||||
btn: [lang['ok'], lang['esc']]
|
||||
}, function(index) {
|
||||
$("#dr_loading").show();
|
||||
$.ajax({type: "GET",dataType:"json", url: '{dr_url('api/field')}&rand='+Math.random(),
|
||||
data: {type:type, relatedid:'{$rid}', relatedname:'{$rname}', app:'{$namespace}', id:{intval($data.id)}},
|
||||
success: function(data) {
|
||||
$('#dr_css').html(data.style);
|
||||
$('#dr_option').html(data.option);
|
||||
$("#dr_loading").hide();
|
||||
App.init();
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
{else}
|
||||
$("#dr_loading").show();
|
||||
$.ajax({type: "GET",dataType:"json", url: '{dr_url('api/field')}&rand='+Math.random(),
|
||||
data: {type:type, relatedid:'{$rid}', relatedname:'{$rname}', app:'{$namespace}', id:{intval($data.id)}},
|
||||
success: function(data) {
|
||||
$('#dr_css').html(data.style);
|
||||
$('#dr_option').html(data.option);
|
||||
$("#dr_loading").hide();
|
||||
App.init();
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
{/if}
|
||||
}
|
||||
function set_required(id) {
|
||||
if (!id) {
|
||||
$('#required').hide();
|
||||
} else {
|
||||
$('#required').show();
|
||||
}
|
||||
}
|
||||
|
||||
function dr_test_call(value) {
|
||||
$.ajax({type: "GET",dataType:"json", url: "{dr_url('api/field_call')}&name="+$('#'+value).val(),
|
||||
success: function(json) {
|
||||
dr_tips(json.code, json.msg);
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,89 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="bootstrap-table bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('field/del', ['rname' => $rname, 'rid' => $rid])}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button></label>
|
||||
<label><button type="button" onclick="javascript:dr_dcall();" class="btn blue btn-sm"> <i class="fa fa-sign-out"></i> {dr_lang('导出')}</button></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable table-clearfixdel">
|
||||
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="65" style="text-align:center"> {dr_lang('排序')} </th>
|
||||
<th style="text-align: center;font-size: 15px;" width="65">Id</th>
|
||||
<th>{dr_lang('字段')}</th>
|
||||
<th width="120">{dr_lang('类别')}</th>
|
||||
<th width="70" style="text-align: center">{dr_lang('系统')}</th>
|
||||
<th width="70" style="text-align: center">{dr_lang('主表')}</th>
|
||||
<th width="80" style="text-align: center">{dr_lang('XSS过滤')}</th>
|
||||
<th width="70" style="text-align: center">{dr_lang('前端')}</th>
|
||||
<th width="70" style="text-align: center">{dr_lang('可用')}</th>
|
||||
<th width="150"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
{if $t.issystem}
|
||||
<input type="checkbox" class="" disabled name="" value="" />
|
||||
{else}
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
{/if}
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center"> {if $t.spacer}{else}<input type="text" onblur="dr_ajax_save(this.value, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'save', 'id'=>$t.id])}', 'displayorder')" value="{$t.displayorder}" class="displayorder form-control input-sm input-inline input-mini"> {/if}</td>
|
||||
<td style="text-align: center;font-size: 15px;">{$t.id}</td>
|
||||
<td> {$t.spacer} {dr_lang($t.name)} / {$t.fieldname}</td>
|
||||
<td>{$t.ftype}</td>
|
||||
<td style="text-align: center;font-size: 15px;">{if $t.issystem}<i class="fa fa-check-circle"></i>{else}-{/if}</td>
|
||||
<td style="text-align: center;font-size: 15px;">{if $t.ismain}<i class="fa fa-check-circle"></i>{else}<i class="fa fa-times-circle"></i>{/if}</td>
|
||||
<td style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'xss', 'id'=>$t.id])}', 0);" class="badge badge-{if $t['setting']['validate']['xss']}yes{else}no{/if}"><i class="fa fa-{if $t['setting']['validate']['xss']}check{else}times{/if}"></i></a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'member','id'=>$t.id])}', 0);" class="badge badge-{if !$t.ismember}no{else}yes{/if}"><i class="fa fa-{if !$t.ismember}times{else}check{/if}"></i></a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'disabled','id'=>$t.id])}', 1);" class="badge badge-{if $t.disabled}no{else}yes{/if}"><i class="fa fa-{if $t.disabled}times{else}check{/if}"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
<label><a href="{dr_url('field/edit', ['rname' => $rname, 'rid' => $rid, 'id'=>$t.id])}" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a></label>
|
||||
<label><a href="javascript:dr_iframe_show('{dr_lang('导出')}', '{dr_url('field/export', ['rname' => $rname, 'rid' => $rid, 'id'=>$t.id])}');" class="btn btn-xs red"> <i class="fa fa-sign-out"></i> {dr_lang('导出')} </a></label>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function dr_dcall() {
|
||||
dr_iframe_show('{dr_lang('导出')}', '{dr_url('field/export_all', ['rname' => $rname, 'rid' => $rid, 'id'=>$t.id])}&ids='+$('#myform').serialize());
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="scroll-to-top">
|
||||
<i class="bi bi-arrow-up-circle-fill"></i>
|
||||
</div>
|
||||
{if isset($_GET['show_field']) && $_GET['show_field']}
|
||||
<script>
|
||||
$(function (){
|
||||
$('#dr_row_{dr_safe_replace($_GET['show_field'])}').addClass('has-error');
|
||||
$('#dr_{dr_safe_replace($_GET['show_field'])}').focus();
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{if is_file(WRITEPATH.'update.lock')}
|
||||
<script>
|
||||
dr_iframe_show('{dr_lang('升级程序脚本')}', '{dr_url('cache/update_index')}');
|
||||
</script>
|
||||
{/if}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
{if $goto_url}
|
||||
<meta http-equiv="refresh" content="0; url={$goto_url}" />
|
||||
{else}
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
没有获取到转向字段值。
|
||||
{/if}
|
||||
@@ -0,0 +1,270 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<script src="{$THEME_PATH}assets/global/plugins/jquery.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<link href="{$THEME_PATH}assets/icon/css/icon.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
{if $admin.setting.font_size}
|
||||
<link href="{$THEME_PATH}assets/global/css/font-max.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
{/if}
|
||||
<link href="{php echo defined('MYCSS_FILE') ? MYCSS_FILE : $THEME_PATH.'assets/global/css/my.css';}?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var admin_file = '{SELF}';
|
||||
var is_cms_dev = '{php echo CI_DEBUG ? 1 : '';}';
|
||||
var is_min = '{$is_min}';
|
||||
var is_oemcms = '{IS_OEM_CMS}';
|
||||
var web_dir = '{WEB_DIR}';
|
||||
var is_mobile_cms = '{$is_mobile}';
|
||||
var is_admin = '{if dr_in_array(1, $admin.roleid)}1{else}2{/if}';
|
||||
</script>
|
||||
<script src="{$LANG_PATH}lang.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{$THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{$THEME_PATH}assets/global/scripts/app{if !IS_XRDEV}.min{/if}.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{$THEME_PATH}assets/js/cms.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{if $is_index}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/jquery.md5.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{else}
|
||||
<script src="{$THEME_PATH}assets/js/my.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
function dr_update_cache_all() {
|
||||
{if $is_min && $is_mobile}
|
||||
$('.page-header .responsive-toggler').click();
|
||||
$(".nav-item").removeClass("active open");
|
||||
{/if}
|
||||
var index = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 10000
|
||||
});
|
||||
$.ajax({type: "GET",dataType:"json", url: admin_file+"?c=api&m=cache_update",
|
||||
success: function(json) {
|
||||
layer.close(index);
|
||||
dr_tips(1, "{dr_lang('全站缓存更新完成')}");
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
layer.closeAll('loading');
|
||||
dr_tips(0, "{dr_lang('更新失败,请检查错误日志')}");
|
||||
}
|
||||
});
|
||||
}
|
||||
function dr_update_cache_data(all = 0) {
|
||||
{if $is_min && $is_mobile}
|
||||
$('.page-header .responsive-toggler').click();
|
||||
$(".nav-item").removeClass("active open");
|
||||
{/if}
|
||||
var index = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 10000
|
||||
});
|
||||
$.ajax({type: "GET",dataType:"json", url: admin_file+"?c=api&m=cache_clear&all="+all,
|
||||
success: function(json) {
|
||||
layer.close(index);
|
||||
dr_tips(1, "{dr_lang('前端数据缓存更新完成')}");
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
layer.closeAll('loading');
|
||||
dr_tips(0, "{dr_lang('更新失败,请检查错误日志')}");
|
||||
}
|
||||
});
|
||||
}
|
||||
function show_category_field(catid) {
|
||||
{if $category_field_url}
|
||||
window.location.href = '{$category_field_url}&catid='+catid;
|
||||
{/if}
|
||||
}
|
||||
{if $is_index}
|
||||
// 退出
|
||||
function dr_logout(url) {
|
||||
var r=confirm(lang['logout']);
|
||||
if (r==true) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
url: url,
|
||||
success: function(json) {
|
||||
if (json.code == 1) {
|
||||
setTimeout("window.location.href='{dr_url("login/index")}'", 1000);
|
||||
}
|
||||
dr_tips(json.code, json.msg);
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function dr_select_site(id) {
|
||||
var r=confirm('{dr_lang("你确定要切换到选中站点吗?")}')
|
||||
if (r==true) {
|
||||
window.location.href='{dr_url("sites/api/login_select")}&id='+id
|
||||
}
|
||||
}
|
||||
function dr_go_url(url, name, nocache, top, left, link) {
|
||||
{if $is_min && $is_mobile}
|
||||
if (name == 'null') {
|
||||
$('.page-header .responsive-toggler').click();
|
||||
$(".nav-item").removeClass("active open");
|
||||
name = '';
|
||||
}
|
||||
{/if}
|
||||
|
||||
if (!name || name == 'null' || name == 'undefined') {
|
||||
name = '{dr_lang('新页面')}';
|
||||
}
|
||||
var cmd = $.md5(url);
|
||||
$('#myiframe iframe').hide();
|
||||
$('#myiframe').attr("cid", 'right_page_'+cmd);
|
||||
name = name.replace(/<[^>]*>/g, '');
|
||||
$('#dr_go_url li').removeClass('active');
|
||||
if ($('#right_page_'+cmd).length > 0) {
|
||||
// 存在
|
||||
$('#right_page_'+cmd).show();
|
||||
var iurl = document.getElementById("right_page_"+cmd).contentWindow.location.href;
|
||||
if (iurl.indexOf(url) == -1 && nocache != 'true') {
|
||||
// 地址不符合,重置
|
||||
$('#right_page_'+cmd).attr('src', url);
|
||||
}
|
||||
$('#dr_go_url_'+cmd).remove();
|
||||
} else {
|
||||
var html = '<iframe class="myiframe" name="right" data-top="'+top+'" data-left="'+left+'" data-link="'+link+'" id="right_page_'+cmd+'" src="'+url+'" url="'+url+'" style="border:none; margin-bottom:0px;height:'+$('#right_page').height()+'px" width="100%" height="auto" allowtransparency="true"></iframe>';
|
||||
$("#myiframe").append(html);
|
||||
}
|
||||
$('#dr_tab_close').after('<li id="dr_go_url_'+cmd+'" class="active"><a href="javascript:dr_tab_open(\''+cmd+'\');">'+name+'</a><i onclick="dr_tab_close(\''+cmd+'\');" class="fa fa-times"></i></li>');
|
||||
}
|
||||
function dr_tab_open(cmd) {
|
||||
if ($('#right_page_'+cmd).length > 0) {
|
||||
$('#myiframe iframe').hide();
|
||||
$('#dr_go_url li').removeClass('active');
|
||||
$('#right_page_'+cmd).show();
|
||||
$('#dr_go_url_'+cmd).addClass('active');
|
||||
var tid = $('#right_page_'+cmd).data('top');
|
||||
var left = $('#right_page_'+cmd).data('left');
|
||||
var link = $('#right_page_'+cmd).data('link');
|
||||
if (tid == 'undefined' || left == 'undefined' || link == 'undefined') {
|
||||
return;
|
||||
}
|
||||
if (tid && left && link) {
|
||||
Mlink(tid, left, link, '');
|
||||
}
|
||||
} else {
|
||||
dr_tips(0, "{dr_lang('页面不存在')}");
|
||||
}
|
||||
}
|
||||
function dr_tab_close(cmd) {
|
||||
$('#right_page_'+cmd).remove();
|
||||
$('#dr_go_url_'+cmd).remove();
|
||||
var iframe = $('#myiframe iframe:visible');
|
||||
if (iframe.length == 0) {
|
||||
// 显示第一个 iframe
|
||||
$('#myiframe iframe:first').show();
|
||||
}
|
||||
}
|
||||
function dr_tab_update() {
|
||||
// 找到 myiframe 被显示的页面
|
||||
var iframe = $('#myiframe iframe:visible');
|
||||
if (iframe.length > 0) {
|
||||
iframe.attr('src', iframe.attr('src'));
|
||||
}
|
||||
}
|
||||
function Mlink(top, left, link, url) {
|
||||
|
||||
if (top == 'undefined' || left == 'undefined' || link == 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (top == '' || left == '' || link == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$('.tooltip').hide();
|
||||
{if $is_min}
|
||||
{if $is_mobile}$('.page-header .responsive-toggler').click();{/if}
|
||||
$(".nav-item").removeClass("active open");
|
||||
$(".fc-all-menu-top").removeClass("active open");
|
||||
{else}
|
||||
$('.dr_menu_item').hide();
|
||||
$('.dr_menu_'+top).show();
|
||||
$('.dr_menu_'+top+' .sub-menu').hide();
|
||||
$('#dr_m_top_'+top+' li').removeClass('active open');
|
||||
$('.dr_menu_'+top+' li').removeClass('active open');
|
||||
{/if}
|
||||
|
||||
$('#dr_menu_link_'+link).addClass('active open');
|
||||
$('#dr_menu_m_link_'+link).addClass('active open');
|
||||
|
||||
// 顶级菜单选择
|
||||
$('.top-menu .navbar-nav li').removeClass('open');
|
||||
$('.fc-all-menu-top li').removeClass('open');
|
||||
$('.dr_mini_menu_top').removeClass('open');
|
||||
$('#dr_menu_top_'+top).addClass('open');
|
||||
$('#dr_mini_menu_top_'+top).addClass('open');
|
||||
|
||||
// 移动端选择
|
||||
$('.fc-mb-sum-menu').hide();
|
||||
$('#dr_m_top_'+top).show();
|
||||
|
||||
// 分组菜单选择
|
||||
$('.dr_menu_'+top+'').removeClass('active open');
|
||||
$('.dr_menu_'+top+' .selected').hide();
|
||||
$('.dr_menu_'+top+' .arrow').removeClass('open');
|
||||
|
||||
$('#dr_menu_left_'+left).addClass('active open');
|
||||
$('#dr_menu_left_'+left+' .selected').show();
|
||||
$('#dr_menu_left_'+left+' .arrow').addClass('open');
|
||||
$('#dr_menu_left_'+left+' .sub-menu').show();
|
||||
|
||||
if (url) {
|
||||
dr_go_url(url, $('#dr_menu_link_'+link).find('a').html(), false, top, left, link);
|
||||
}
|
||||
}
|
||||
function wSize(){
|
||||
var str=getWindowSize();
|
||||
var strs= new Array(); //定义一数组
|
||||
strs=str.toString().split(","); //字符分割
|
||||
var heights = strs[0]-60,Body = $('body');
|
||||
$('#right_page').height(heights);
|
||||
$('#dr_go_url .dropdown-menu').attr('style', 'max-height:'+(heights-50)+'px;overflow-y: scroll;');
|
||||
}
|
||||
if(!Array.prototype.map)
|
||||
Array.prototype.map = function(fn,scope) {
|
||||
var result = [],ri = 0;
|
||||
for (var i = 0,n = this.length; i < n; i++){
|
||||
if(i in this){
|
||||
result[ri++] = fn.call(scope ,this[i],i,this);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
var getWindowSize = function(){
|
||||
return ["Height","Width"].map(function(name){
|
||||
return window["inner"+name] ||
|
||||
document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
{if $main_link} {$main_link} {/if}
|
||||
$('#dr_go_url').show();
|
||||
window.onresize=wSize;
|
||||
wSize();
|
||||
// 宽度小时
|
||||
if ($(document).width() < 900) {
|
||||
$('.page-sidebar .sidebar-toggler').click();
|
||||
}
|
||||
});
|
||||
|
||||
{/if}
|
||||
$(function(){
|
||||
//防止回车提交表单
|
||||
document.onkeydown = function(e){
|
||||
var ev = document.all ? window.event : e;
|
||||
if (ev.keyCode==13) {
|
||||
var div = ev.target.toString();
|
||||
if (div.indexOf('TextArea') == -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{SITE_LANGUAGE}" class="{if SYS_NOT_ADMIN_CACHE}page-index-old{else}page-index-new{/if}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{if $meta_title}{$meta_title}{else}{SITE_NAME} - {dr_lang('后台管理平台')}{/if}</title>
|
||||
<link href="{$THEME_PATH}assets/global/css/frame{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{$THEME_PATH}assets/global/css/form{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
{template "head.html"}
|
||||
</head>
|
||||
|
||||
<body class="page-content-white {if isset($_GET['is_iframe']) && $_GET['is_iframe'] && !isset($_GET['is_menu'])} main-content-iframe{/if}">
|
||||
|
||||
<div class="page-container">
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content page-content3 mybody-nheader main-content {if isset($_GET['is_iframe']) && $_GET['is_iframe'] && !isset($_GET['is_menu'])} main-content-iframe{/if}">
|
||||
{if (!isset($_GET['hide_menu']) || !$_GET['hide_menu']) || isset($_GET['is_menu'])}
|
||||
{if (isset($menu) && $menu && !$_GET['is_iframe']) || isset($_GET['is_menu'])}
|
||||
<div class="page-bar">
|
||||
<ul class="page-breadcrumb">
|
||||
{$menu}
|
||||
</ul>
|
||||
{if $menu_toolbar}
|
||||
<div class="page-toolbar">
|
||||
{$menu_toolbar}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="page-body" style="padding-top:25px;">
|
||||
{else}
|
||||
<div class="page-body">
|
||||
{/if}
|
||||
{else}
|
||||
<div class="page-body">
|
||||
{/if}
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
<div class="alert">
|
||||
{if $mark}
|
||||
<h5>{$msg}</h5>
|
||||
{else}
|
||||
<h5 style="color: red">{$msg}</h5>
|
||||
{/if}
|
||||
{if $url}
|
||||
<a href="{$url}">{dr_lang('如果您的浏览器没有自动跳转,请点击这里')}</a>
|
||||
<meta http-equiv="refresh" content="0; url={$url}">
|
||||
{/if}
|
||||
{if $note}<p>{$note}</p>{/if}
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
.alert {
|
||||
background: #ffffff!important;
|
||||
text-align: center;
|
||||
margin-top: 70px;
|
||||
}
|
||||
.alert h5 {
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.alert p {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: rgba(2, 1, 1, 0.41);
|
||||
}
|
||||
.alert a {
|
||||
text-shadow: none;
|
||||
color: #337ab7;
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
{template "header.html"}
|
||||
|
||||
<div class="module-content" style="margin-top:-20px">
|
||||
|
||||
<iframe class="myiframe" name="contentright" id="module-content-right" src="{$url}&cache={SYS_TIME}" url="{$url}&cache={SYS_TIME}" frameborder="false" scrolling="auto" style="border:none; margin-bottom:0px;" width="100%" height="auto" allowtransparency="true"></iframe>
|
||||
|
||||
</div>
|
||||
<style>
|
||||
.page-content-wrapper .page-content {
|
||||
padding: 25px 0px 10px 20px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function McLink(dir, url) {
|
||||
|
||||
// 延迟提示
|
||||
//var admin_loading = layer.load(2, { time: 10000 });
|
||||
$('.iframe_menu_a a').removeClass('on');
|
||||
$('#iframe_menu_a_'+dir+' a').addClass('on');
|
||||
|
||||
|
||||
//$('.my-left-content li span').removeClass('selected');
|
||||
//$('.my-left-content li').removeClass('active open');
|
||||
|
||||
/// $('.my-left-content2 li span').removeClass('selected');
|
||||
//$('.my-left-content2 li').removeClass('active open');
|
||||
|
||||
//$('.left-content-'+dir+' ').addClass('active open');
|
||||
// $('.left-content-'+dir+' span').addClass('selected');
|
||||
|
||||
|
||||
$("#module-content-right").attr('src', url);
|
||||
$("#module-content-right").attr("url", url);
|
||||
}
|
||||
|
||||
function wSize(){
|
||||
var str=getWindowSize();
|
||||
var strs= new Array(); //定义一数组
|
||||
strs=str.toString().split(","); //字符分割
|
||||
var heights = strs[0]-$('.page-bar').height(),Body = $('body');
|
||||
$('#module-content-right').height(heights);
|
||||
}
|
||||
|
||||
var getWindowSize = function(){
|
||||
return ["Height","Width"].map(function(name){
|
||||
return window["inner"+name] ||
|
||||
document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
|
||||
});
|
||||
}
|
||||
window.onload = function (){
|
||||
if(!+"\v1" && !document.querySelector) { // for IE6 IE7
|
||||
document.body.onresize = resize;
|
||||
} else {
|
||||
window.onresize = resize;
|
||||
}
|
||||
function resize() {
|
||||
wSize();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$(function(){
|
||||
wSize();
|
||||
document.documentElement.style.overflowY = 'hidden'
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,283 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{SITE_LANGUAGE}" class="{if SYS_NOT_ADMIN_CACHE}page-index-old{else}page-index-new{/if}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{if $meta_title}{$meta_title}{else}{SITE_NAME} - {dr_lang('后台管理平台')}{/if}</title>
|
||||
<link href="{$THEME_PATH}assets/global/css/all{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
{template "head.html"}
|
||||
</head>
|
||||
|
||||
|
||||
<?php
|
||||
foreach ($my_menu as $tid => $topm) {
|
||||
$_left = 0; // 是否第一个分组菜单,0表示第一个
|
||||
$_link = 0; // 是否第一个链接菜单,0表示第一个
|
||||
$left_string = '';
|
||||
$mleft_string = [];
|
||||
!$first && $first = $tid;
|
||||
foreach ($topm['left'] as $if => $left) {
|
||||
// 链接菜单开始
|
||||
$link_string = '';
|
||||
$mlink_string = '';
|
||||
foreach ($left['link'] as $i => $link) {
|
||||
$url = $link['url'];
|
||||
if (!$_link) {
|
||||
// 第一个链接菜单时 指定class
|
||||
$class = 'nav-item active open';
|
||||
$topm['url'] = $link['url'];
|
||||
$topm['link_id'] = $link['id'];
|
||||
$topm['left_id'] = $left['id'];
|
||||
} else {
|
||||
$class = 'nav-item';
|
||||
}
|
||||
$_link = 1; // 标识以后的菜单就不是第一个了
|
||||
$link_string.= '<li id="dr_menu_link_'.$link['id'].'" class="'.$class.'"><a href="javascript:Mlink('.$tid.', '.$left['id'].', '.$link['id'].', \''.$url.'\');" class="tooltips" data-container="body" data-placement="right" data-original-title="'.dr_lang($link['name']).'" title="'.dr_lang($link['name']).'"><i class="iconm '.$link['icon'].'"></i> <span class="title" title="'.dr_lang($topm['name']).' - '.dr_lang($left['name']).' - '.dr_lang($link['name']).'">'.dr_lang($link['name']).'</span></a></li>';
|
||||
$mlink_string.= '<li id="dr_menu_m_link_'.$link['id'].'" class="'.$class.'"><a href="javascript:Mlink('.$tid.', '.$left['id'].', '.$link['id'].', \''.$url.'\');"><i class="iconm '.$link['icon'].'"></i> <span class="title" title="'.dr_lang($topm['name']).' - '.dr_lang($left['name']).' - '.dr_lang($link['name']).'">'.dr_lang($link['name']).'</span></a></li>';
|
||||
}
|
||||
$left_string.= '
|
||||
<li id="dr_menu_left_'.$left['id'].'" class="dr_menu_'.$tid.' dr_menu_item nav-item '.($_left ? '' : 'active open').' " style="'.($first==$tid ? '' : 'display:none').'">
|
||||
<a href="javascript:;" class="nav-link nav-toggle tooltips" data-container="body" data-placement="right" data-original-title="'.dr_lang($left['name']).'">
|
||||
<i class="'.$left['icon'].'"></i>
|
||||
<span class="title">'.dr_strcut(dr_lang($left['name']), 5).'</span>
|
||||
<span class="selected" style="'.($_left ? 'display:none' : '').'"></span>
|
||||
<span class="arrow '.($_left ? '' : ' open').'"></span>
|
||||
</a>
|
||||
<ul class="sub-menu">'.$link_string.'</ul>
|
||||
</li>';
|
||||
$mleft_string[] = $mlink_string;
|
||||
$_left = 1; // 标识以后的菜单就不是第一个了
|
||||
}
|
||||
$string.= $left_string;
|
||||
$mstring.= '<li class="dropdown dropdown-extended dropdown-tasks fc-mb-sum-menu" id="dr_m_top_'.$tid.'" style=" '.($first == $tid ? '' : 'display:none').'">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
'.implode('<li class="divider"> </li>', $mleft_string).'
|
||||
</ul>
|
||||
</li>';
|
||||
$menu_top[$tid] = $topm;
|
||||
}
|
||||
// 自定义后台菜单显示
|
||||
if (function_exists('dr_my_admin_menu')) {
|
||||
list($string, $mstring, $menu_top, $first) = dr_my_admin_menu($my_menu, $string, $mstring, $menu_top, $first);
|
||||
}
|
||||
$top = $menu_top;
|
||||
?>
|
||||
<body scroll="no" style="overflow: hidden;" class="page-sidebar-closed-hide-logo page-admin-all page-content-white page-header-fixed page-sidebar-fixed ">
|
||||
|
||||
<div class="page-header navbar navbar-fixed-top">
|
||||
<div class="page-header-inner ">
|
||||
<div class="page-logo">
|
||||
<a href="{SITE_URL}" target="_blank"><img src="{THEME_PATH}assets/logo.png" alt="logo" class="logo-default" /> </a>
|
||||
</div>
|
||||
<a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span></span>
|
||||
</a>
|
||||
{if SYS_NOT_ADMIN_CACHE}
|
||||
<div class="top-menu my-top-left pull-left">
|
||||
<ul class="nav navbar-nav pull-left fc-all-menu-top ">
|
||||
{loop $top $t}
|
||||
<li id="dr_menu_top_{$t.id}" class="dropdown {if $t.id==$first}open{/if}">
|
||||
<a class="dropdown-toggle popovers" href="javascript:Mlink('{$t.id}', '{$t.left_id}', '{$t.link_id}', '{$t.url}');">
|
||||
<div class="menu-top-icon"><i class="{$t.icon}"></i></div>
|
||||
<div class="menu-top-name"><i class="top-txt-menu">{dr_lang($t.name)}</i></div>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
{else}
|
||||
<div class="top-menu my-top-left pull-left">
|
||||
{if !$is_mobile}
|
||||
<ul class="page-toolbar qs-top-menu pull-left" id="dr_go_url">
|
||||
<li class="qs-top-refresh" id="dr_tab_close"><a href="javascript:dr_tab_update();"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="top-menu my-top-right">
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
{if $is_mobile}
|
||||
<li class="dropdown fc-mini-menu-top">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-default fc_mini_menu_top">
|
||||
{loop $top $t}
|
||||
<li>
|
||||
<a id="dr_mini_menu_top_{$t.id}" class="dr_mini_menu_top {if $t.id==$first}open{/if}" href="javascript:Mlink('{$t.id}', '{$t.left_id}', '{$t.link_id}', '{$t.url}');">
|
||||
<i class="{$t.icon}"></i> {dr_lang($t.name)}
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
{$mstring}
|
||||
{/if}
|
||||
|
||||
{if dr_is_app('ai_helper')}
|
||||
<li class="dropdown dropdown-extended">
|
||||
<a href="javascript:;" onclick="dr_iframe_show('{dr_lang('AI助手')}', '{dr_url('ai_helper/api/index')}')"
|
||||
class="dropdown-toggle tooltips" data-container="body" data-placement="left" data-original-title="{dr_lang('AI助手')}">
|
||||
<div class="menu-top-icon"><i class="fa fa-adn"></i></div>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{if count($ci->site_info) > 1 && dr_is_app('sites')}
|
||||
<li class="dropdown dropdown-extended dropdown-tasks">
|
||||
<a href="javascript:;" class="dropdown-toggle " data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<div class="menu-top-icon"><i class="fa fa-share-alt"></i>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="dropdown-menu extended tasks">
|
||||
<li>
|
||||
<ul class="dropdown-menu-list scroller" style="height:400px;overflow: scroll;" data-handle-color="#637283">
|
||||
{loop $ci->site_info $i $t}
|
||||
{if \Phpcmf\Service::M('auth')->_check_site($i)}
|
||||
<li>
|
||||
<a href="javascript:;" onclick="dr_select_site('{$i}')" title="{$t.SITE_NAME}" {if SITE_ID == $i}style="color:red"{/if}>
|
||||
<p style="margin: 0">{dr_strcut($t.SITE_NAME, 30)}</p>
|
||||
<p style="margin: 0;margin-top: -4px;">{trim(str_replace(['http://', 'https://'], '', $t.SITE_URL), '/')}</p>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/loop}
|
||||
{if $ci->_is_admin_auth('sites/home/index')}
|
||||
<li class="external text-center">
|
||||
<a href="javascript:dr_go_url('{dr_url('sites/home/index')}', '{dr_lang('站点管理')}');">{dr_lang('站点管理')}</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
<?php $notice = \Phpcmf\Service::M('auth')->admin_notice(10, true);?>
|
||||
{if $notice}
|
||||
<li class="dropdown dropdown-extended dropdown-notification">
|
||||
<a href="javascript:;" class="dropdown-toggle " data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<div class="menu-top-icon"><i class="fa fa-bell"></i>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="dropdown-menu extended tasks">
|
||||
<li>
|
||||
<ul class="dropdown-menu-list scroller" style="height:400px;overflow: scroll;" data-handle-color="#637283">
|
||||
{loop $notice $t}
|
||||
<li>
|
||||
<a onclick="dr_hide_left_tab()" href="javascript:dr_go_url('{dr_url('api/notice', array('id' => $t.id))}');">
|
||||
<span class="time">{dr_fdate($t.inputtime)}</span>
|
||||
<span class="details"> {$t.msg} </span>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
{if $ci->_is_admin_auth('notice/index')}
|
||||
<li class="external text-center">
|
||||
<a href="javascript:dr_go_url('{dr_url('notice/index')}', '{dr_lang('更多提醒')}');">{dr_lang('更多提醒')}</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{if $is_mobile}
|
||||
<li class="dropdown">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<div class="menu-top-icon"> <i class="fa fa-wrench"></i> </div>
|
||||
<div class="menu-top-icon"><i class="top-txt-menu">{dr_lang('账号')}</i></div>
|
||||
</a>
|
||||
{else}
|
||||
<li class="dropdown dropdown-user">
|
||||
<a style="margin-right: -10px;" href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<img alt="{$admin['username']}" class="img-circle" src="{dr_avatar($admin.uid)}" />
|
||||
</a>
|
||||
{/if}
|
||||
<ul class="dropdown-menu dropdown-menu-default">
|
||||
{if IS_USE_MEMBER}<li><a href="{dr_url('api/alogin', ['id'=>$admin.uid])}" target="_blank"><i class="fa fa-user"></i> {dr_lang('用户中心')} </a></li>{/if}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('api/my')}', '{dr_lang('修改资料')}');"><i class="fa fa-edit"></i> {dr_lang('修改资料')} </a></li>
|
||||
<li><a href="{dr_url('api/admin_min')}"><i class="fa fa-retweet"></i> {dr_lang('简化模式')}</a></li>
|
||||
<li><a href="javascript:;" onClick="dr_logout('{dr_url('login/out')}');"><i class="fa fa-user-times"></i> {dr_lang('退出系统')}</a></li>
|
||||
<li class="divider"> </li>
|
||||
{if $ci->_is_admin_auth('cache/index')}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('cache/index')}', '{dr_lang('系统更新')}');"><i class="fa fa-cogs"></i> {dr_lang('系统更新')}</a></li>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('check/index')}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('check/index')}', '{dr_lang('系统体检')}');"><i class="fa fa-wrench"></i> {dr_lang('系统体检')}</a></li>
|
||||
{/if}
|
||||
<li><a href="javascript:dr_update_cache_all();"><i class="fa fa-refresh"></i> {dr_lang('更新缓存')}</a></li>
|
||||
<li><a href="javascript:dr_update_cache_data(1);"><i class="fa fa-trash"></i> {dr_lang('更新数据')}</a></li>
|
||||
{if $admin.adminid==1}
|
||||
<li class="divider"> </li>
|
||||
<li><a href="javascript:dr_go_url('{dr_url('error/index')}', '{dr_lang('系统日志')}');"><i class="fa fa-shield"></i> {dr_lang('系统日志')}</a></li>
|
||||
{/if}
|
||||
{if $is_search_help}
|
||||
<li><a href="https://www.xunruicms.com/doc/" target="_blank"><i class="fa fa-book"></i> {dr_lang('帮助手册')}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"> </div>
|
||||
|
||||
<div class="page-container">
|
||||
<div class="page-sidebar-wrapper">
|
||||
|
||||
{if !SYS_NOT_ADMIN_CACHE}
|
||||
<div class="page-sidebar-one ">
|
||||
<ul class="fc-all-menu-top ">
|
||||
{loop $top $t}
|
||||
<li id="dr_menu_top_{$t.id}" class="dropdown {if $t.id==$first}open{/if}">
|
||||
<a class="dropdown-toggle popovers" href="javascript:Mlink('{$t.id}', '{$t.left_id}', '{$t.link_id}', '{$t.url}');">
|
||||
<div class="menu-top-icon"><i class="{$t.icon}"></i></div>
|
||||
<div class="menu-top-name"><i class="top-txt-menu">{dr_lang($t.name)}</i></div>
|
||||
<span class="selected"></span>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="page-sidebar navbar-collapse collapse">
|
||||
|
||||
<ul class="page-sidebar-menu page-header-fixed page-sidebar-menu-light" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
|
||||
|
||||
{$string}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content index-content">
|
||||
<div id="myiframe" cid="right_page">
|
||||
<iframe class="myiframe active" name="right" id="right_page" data-top="{$main_menu.tid}" data-left="{$main_menu.pid}" data-link="{$main_menu.id}" src="{$main_url}" url="{$main_url}" style="border:none; margin-bottom:0px;" width="100%" height="auto" allowtransparency="true"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
dr_go_url("{$main_url}", "{$main_name}", true, {$main_menu.tid}, {$main_menu.pid}, {$main_menu.id});
|
||||
});
|
||||
// 关闭栏
|
||||
function dr_hide_left_tab() {
|
||||
$(".page-quick-sidebar-toggler").click();
|
||||
}
|
||||
if (self != top) {
|
||||
top.location.href = admin_file;
|
||||
}
|
||||
var url = '{dr_url_prefix('/')}';
|
||||
var p = url.split('/');
|
||||
var ptl = document.location.protocol;
|
||||
if ((p[0] == 'http:' || p[0] == 'https:') && ptl != p[0]) {
|
||||
alert('当前访问是'+ptl.replace(':', '')+'模式,本项目设置的是'+p[0].replace(':', '')+'模式,请使用'+p[0].replace(':', '')+'模式访问,会导致部分功能无法正常使用');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<div class="mt-checkbox-inline">
|
||||
{loop $role $t}
|
||||
{if $t.id>1}
|
||||
<label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[]" value="{$t.id}" {if !$data || dr_in_array($t.id, $data)} checked{/if} /> {$t.name} <span></span></label>
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
<span class="help-block">{dr_lang('只有选中的角色组才能看到此面板')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,201 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="alert alert-danger">
|
||||
{dr_lang('自定义后台首页界面的显示内容')}
|
||||
</div>
|
||||
<h3 class="page-title"> {dr_lang('面板区')} <small>{dr_lang('系统可用的面板,单击即可加入到预设区')}</small>
|
||||
</h3>
|
||||
<div class="">
|
||||
{loop $tables $table $name}
|
||||
<label><a href="javascript:dr_add_main_table('{$table}');" class="btn btn-default">{$name}</a></label>
|
||||
{/loop}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function dr_add_main_table(name) {
|
||||
if ($("#table_"+name).length>0){
|
||||
dr_cmf_tips(0, '{dr_lang('此面板已经存在')}');
|
||||
return;
|
||||
}
|
||||
$.ajax({type: "GET",dataType:"json", url: admin_file+"?c=api&m=add_main_table&table="+name,
|
||||
success: function(json) {
|
||||
if (json.code) {
|
||||
$('#dr_init_add_table').html(json.msg);
|
||||
dr_cmf_tips(json.code, '{dr_lang('面板添加成功,请手动进行移动调整')}');
|
||||
} else {
|
||||
dr_cmf_tips(json.code, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
var PortletDraggable = function () {
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
|
||||
if (!jQuery().sortable) {
|
||||
return;
|
||||
}
|
||||
|
||||
$("#sortable_portlets").sortable({
|
||||
connectWith: ".portlet",
|
||||
items: ".portlet",
|
||||
opacity: 0.8,
|
||||
handle : '.portlet-title',
|
||||
coneHelperSize: true,
|
||||
placeholder: 'portlet-sortable-placeholder',
|
||||
tolerance: "pointer",
|
||||
forcePlaceholderSize: !0,
|
||||
helper: "clone",
|
||||
cancel: ".portlet-sortable-empty, .portlet-fullscreen", // cancel dragging if portlet is in fullscreen mode
|
||||
revert: 250, // animation in milliseconds
|
||||
update: function(b, c) {
|
||||
var value = c.item.parent().attr('id');
|
||||
if (!value) {
|
||||
dr_tips(0, '{dr_lang('数据添加异常')}');
|
||||
return;
|
||||
}
|
||||
var tid = c.item.attr('id');
|
||||
$('#dr_'+tid).val(value);
|
||||
dr_tips(1, '{dr_lang('操作成功')}');
|
||||
if (c.item.prev().hasClass("portlet-sortable-empty")) {
|
||||
c.item.prev().before(c.item);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
PortletDraggable.init();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="sortable_portlets" class="sortable_portlets3">
|
||||
<div class="myfbody">
|
||||
<h3 class="page-title"> {dr_lang('预设区')} <small>{dr_lang('可以将本区域的面板移动到正式区')}</small>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12 column sortable sortable2" id="dr_init_add_table">
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="page-title"> {dr_lang('正式区')} <small>{dr_lang('在后台首页界面显示的面板')}</small>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-3 column sortable" id="3-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-1'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
<div class="col-md-3 column sortable" id="3-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-2'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
<div class="col-md-3 column sortable" id="3-3">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-3'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
<div class="col-md-3 column sortable" id="3-4">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-4'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 column sortable" id="4-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-1'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 column sortable" id="4-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-2'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 column sortable" id="4-3">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-3'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 column sortable" id="6-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '6-1'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
<div class="col-md-6 column sortable" id="6-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '6-2'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 column sortable" id="12">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '12'}
|
||||
{php echo \Phpcmf\Service::M('auth')->edit_main_table($table, $tables[$table], $tid);}
|
||||
{/if}
|
||||
{/loop}
|
||||
<div class="portlet portlet-sortable-empty"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存页面布局')}</button>
|
||||
<button type="button" onclick="dr_ajax_confirm_url('{dr_url('home/init_edit')}', '{dr_lang("确定要恢复面板吗?")}', '{dr_url('home/main')}')" class="btn red"> <i class="fa fa-cog"></i> {dr_lang('恢复默认面板')}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function dr_qx(name) {
|
||||
dr_iframe('{dr_lang('面板权限')}', '{dr_url('home/auth_edit')}&name='+name, '50%', '50%', 'nogo');
|
||||
}
|
||||
</script>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,106 @@
|
||||
{template "header.html"}
|
||||
|
||||
{if $table_data}
|
||||
<div class="row mymain">
|
||||
<div class="col-md-3 column sortable-ui" id="3-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-1'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="col-md-3 column sortable-ui" id="3-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-2'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="col-md-3 column sortable-ui" id="3-3">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-3'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="col-md-3 column sortable-ui" id="3-4">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '3-4'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mymain">
|
||||
<div class="col-md-4 column sortable-ui" id="4-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-1'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 column sortable-ui" id="4-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-2'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 column sortable-ui" id="4-3">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '4-3'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row mymain">
|
||||
<div class="col-md-6 column sortable-ui" id="6-1">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '6-1'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="col-md-6 column sortable-ui" id="6-2">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '6-2'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mymain">
|
||||
<div class="col-md-12 column sortable-ui" id="12">
|
||||
{loop $table_data $table $tid}
|
||||
{if $tid == '12'}
|
||||
{php $file = \Phpcmf\Service::M('auth')->get_main_table($table);}
|
||||
{load "$file"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<script>
|
||||
$(function () {
|
||||
$('.sortable-ui').each(function () {
|
||||
var html = $(this).html();
|
||||
if (html.length < 20) {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{SITE_LANGUAGE}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{if $meta_title}{$meta_title}{else}{SITE_NAME} - {dr_lang('后台管理平台')}{/if}</title>
|
||||
<link href="{$THEME_PATH}assets/layui/css/layui.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{$THEME_PATH}assets/global/css/min{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
{template "head.html"}
|
||||
</head>
|
||||
|
||||
<?php
|
||||
$string = '';
|
||||
foreach ($my_menu as $tid => $left) {
|
||||
$_link = 0;
|
||||
$link_string = '';
|
||||
$is_first_group = ((string) $first === (string) $tid);
|
||||
foreach ($left['link'] as $i => $link) {
|
||||
$url = $link['url'];
|
||||
// 仅「首个分组的首个链接」高亮,避免每个分组第一项都带 active
|
||||
$class = (!$_link && $is_first_group) ? 'nav-item active' : 'nav-item';
|
||||
if (!$_link && $is_first_group) {
|
||||
$top['url'] = $url;
|
||||
$top['link_id'] = $link['id'];
|
||||
$top['left_id'] = $left['id'];
|
||||
}
|
||||
$_link = 1;
|
||||
$link['icon'] = $link['icon'] ? $link['icon'] : 'fa fa-th-large';
|
||||
$link_string .= '<li id="dr_menu_link_' . $link['id'] . '" class="' . $class . '"><a href="javascript:Mlink(' . $tid . ', ' . $left['id'] . ', ' . $link['id'] . ', \'' . $url . '\');"><i class="iconm ' . $link['icon'] . '"></i> <span class="title">' . dr_lang($link['name']) . '</span></a></li>';
|
||||
}
|
||||
$group_cls = $is_first_group ? 'active open' : '';
|
||||
$string .= '
|
||||
<li id="dr_menu_left_' . $left['id'] . '" class="dr_menu_' . $tid . ' dr_menu_item nav-item ' . $group_cls . '">
|
||||
<a href="javascript:;" class="nav-link nav-toggle">
|
||||
<i class="' . $left['icon'] . '"></i>
|
||||
<span class="title">' . dr_lang($left['name']) . '</span>
|
||||
<span class="arrow"></span>
|
||||
</a>
|
||||
<ul class="sub-menu">' . $link_string . '</ul>
|
||||
</li>';
|
||||
}
|
||||
if (function_exists('dr_my_admin_min_menu')) {
|
||||
$string = dr_my_admin_min_menu($my_menu, $string);
|
||||
}
|
||||
?>
|
||||
|
||||
<body scroll="no" style="overflow:hidden;" class="page-sidebar-closed-hide-logo page-admin-min page-header-fixed page-sidebar-fixed">
|
||||
<div class="page-header navbar navbar-fixed-top">
|
||||
<div class="page-header-inner">
|
||||
<div class="page-logo">
|
||||
<a href="{SITE_URL}" target="_blank">
|
||||
<img src="{THEME_PATH}assets/logo.png" class="logo-default" alt="logo" />
|
||||
</a>
|
||||
</div>
|
||||
<a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span></span>
|
||||
</a>
|
||||
<div class="page-top">
|
||||
{if !$is_mobile}
|
||||
<div class="top-menu my-top-left pull-left">
|
||||
<ul class="fc-all-menu-top fc-mb-left-menu" id="dr_go_url"></ul>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="top-menu">
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
{if count($ci->site_info) > 1}
|
||||
<li class="dropdown dropdown-extended dropdown-tasks">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<i class="fa fa-share-alt"></i>
|
||||
<span class="badge badge-default">{count($ci->site_info)}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu extended tasks">
|
||||
<li>
|
||||
<ul class="dropdown-menu-list">
|
||||
{loop $ci->site_info $i $t}
|
||||
{if \Phpcmf\Service::M('auth')->_check_site($i)}
|
||||
<li>
|
||||
<a href="javascript:;" onclick="dr_select_site('{$i}')" title="{$t.SITE_NAME}"{if SITE_ID == $i} class="active" style="color:#dc3545"{/if}>
|
||||
<span class="task"><span class="desc">{dr_strcut($t.SITE_NAME, 30)}</span></span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="dropdown dropdown-user">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
|
||||
<span class="username username-hide-on-mobile">{dr_strcut($admin['username'], 8)}</span>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-default">
|
||||
{if IS_USE_MEMBER}<li><a href="{dr_url('api/alogin', ['id'=>$admin.uid])}" target="_blank"><i class="fa fa-user"></i> {dr_lang('用户中心')}</a></li>{/if}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('api/my')}');"><i class="fa fa-edit"></i> {dr_lang('修改资料')}</a></li>
|
||||
{if !$is_mode}
|
||||
<li><a href="{dr_url('api/admin_all')}"><i class="fa fa-retweet"></i> {dr_lang('完整模式')}</a></li>
|
||||
{/if}
|
||||
<li><a href="javascript:;" onClick="dr_logout('{dr_url('login/out')}');"><i class="fa fa-user-times"></i> {dr_lang('退出系统')}</a></li>
|
||||
<li class="divider"></li>
|
||||
{if $ci->_is_admin_auth('cache/index')}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('cache/index')}');"><i class="fa fa-cogs"></i> {dr_lang('系统更新')}</a></li>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('check/index')}
|
||||
<li><a href="javascript:dr_go_url('{dr_url('check/index')}');"><i class="fa fa-wrench"></i> {dr_lang('系统体检')}</a></li>
|
||||
{/if}
|
||||
<li><a href="javascript:dr_update_cache_all();"><i class="fa fa-refresh"></i> {dr_lang('更新缓存')}</a></li>
|
||||
<li><a href="javascript:dr_update_cache_data();"><i class="fa fa-trash"></i> {dr_lang('更新数据')}</a></li>
|
||||
{if $admin.adminid==1}
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:dr_go_url('{dr_url('error/index')}');"><i class="fa fa-shield"></i> {dr_lang('系统日志')}</a></li>
|
||||
{/if}
|
||||
{if $is_search_help}
|
||||
<li><a href="http://help.xunruicms.com" target="_blank"><i class="fa fa-book"></i> {dr_lang('帮助手册')}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="sidebar-overlay" id="min_sidebar_overlay"></div>
|
||||
<div class="page-container">
|
||||
<div class="page-sidebar-wrapper">
|
||||
<div class="page-sidebar navbar-collapse collapse">
|
||||
<ul class="page-sidebar-menu page-header-fixed" data-slide-speed="200" data-auto-scroll="false" data-keep-expanded="false">
|
||||
{$string}
|
||||
{if $is_mobile}
|
||||
{if $ci->_is_admin_auth('cache/index')}
|
||||
<li class="nav-item nav-extra"><a href="javascript:dr_go_url('{dr_url('cache/index')}', 'null');"><i class="fa fa-cogs"></i> <span class="title">{dr_lang('系统更新')}</span></a></li>
|
||||
{/if}
|
||||
<li class="nav-item nav-extra"><a href="javascript:dr_update_cache_all();"><i class="fa fa-refresh"></i> <span class="title">{dr_lang('更新缓存')}</span></a></li>
|
||||
<li class="nav-item nav-extra"><a href="javascript:dr_update_cache_data();"><i class="fa fa-trash"></i> <span class="title">{dr_lang('更新数据')}</span></a></li>
|
||||
<li class="nav-item nav-extra"><a href="{dr_url('api/alogin', ['id'=>$admin.uid])}" target="_blank"><i class="fa fa-user"></i> <span class="title">{dr_lang('用户中心')}</span></a></li>
|
||||
{if !$is_mode}
|
||||
<li class="nav-item nav-extra"><a href="{dr_url('api/admin_all')}"><i class="fa fa-retweet"></i> <span class="title">{dr_lang('完整模式')}</span></a></li>
|
||||
{/if}
|
||||
<li class="nav-item nav-extra"><a href="javascript:;" onClick="dr_logout('{dr_url('login/out')}');"><i class="fa fa-user-times"></i> <span class="title">{dr_lang('退出系统')}</span></a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content page-content-min">
|
||||
<div id="myiframe">
|
||||
<iframe class="myiframe" name="right" id="right_page" src="{$main_url}" url="{$main_url}" width="100%" height="auto" allowtransparency="true"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{$THEME_PATH}assets/global/scripts/min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
{template "install/header.html"}
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-file-text-o font-green"></i>
|
||||
<span class="caption-subject font-green">软件使用协议</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="line-height: 24px;">
|
||||
|
||||
</div>
|
||||
<div class="portlet-title" style="min-height: 18px;">
|
||||
</div>
|
||||
<div class="portlet-body text-center">
|
||||
<a href="javascript:;" disabled="" id="ok" class="btn btn-success"> ... </a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var Seconds = 10;
|
||||
var setIntervalID;
|
||||
function ok() {
|
||||
var ok = $("#ok");
|
||||
if (Seconds <= 0) {
|
||||
ok.html("同意协议");
|
||||
ok.attr('href', '{$next_url}');
|
||||
ok.attr('disabled', false);
|
||||
clearInterval(setIntervalID);
|
||||
} else {
|
||||
ok.html("请仔细阅读协议还剩下(" + Seconds + ")秒");
|
||||
}
|
||||
Seconds--;
|
||||
}
|
||||
setIntervalID=setInterval("ok()", 1000);
|
||||
</script>
|
||||
{template "install/footer.html"}
|
||||
@@ -0,0 +1,204 @@
|
||||
{template "install/header.html"}
|
||||
|
||||
<style>
|
||||
.install-check-form .form-group {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.install-check-form .control-label {
|
||||
color: #334155;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.install-check-form .form-control-static {
|
||||
color: #4a5568;
|
||||
}
|
||||
|
||||
.install-check-box {
|
||||
margin-top: -1px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.install-check-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.install-check-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 0 0 10px;
|
||||
padding: 6px 14px;
|
||||
border: 1px solid #e7edf4;
|
||||
border-radius: 10px;
|
||||
background: #f8fbfd;
|
||||
color: #475569;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.install-check-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.install-check-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 50px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 999px;
|
||||
background: #eaf7ef;
|
||||
color: #1f8a4c;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.install-check-item.is-error {
|
||||
border-color: #f3d0d0;
|
||||
background: #fff6f6;
|
||||
color: #7f1d1d;
|
||||
}
|
||||
|
||||
.install-check-item.is-error .install-check-status {
|
||||
background: #fdeaea;
|
||||
color: #d83a3a;
|
||||
}
|
||||
|
||||
.install-check-help {
|
||||
margin-left: auto;
|
||||
color: #1a73b8;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.install-check-help:hover,
|
||||
.install-check-help:focus {
|
||||
color: #0f5f9b;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.install-action-disabled {
|
||||
min-width: 200px;
|
||||
border-radius: 22px;
|
||||
color: #7b8794;
|
||||
background: #eef2f6;
|
||||
border-color: #dde5ed;
|
||||
}
|
||||
|
||||
.install-action-disabled:hover,
|
||||
.install-action-disabled:focus,
|
||||
.install-action-disabled:active {
|
||||
color: #7b8794;
|
||||
background: #eef2f6;
|
||||
border-color: #dde5ed;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.install-check-item {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.install-check-help {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-refresh font-green"></i>
|
||||
<span class="caption-subject font-green">{dr_lang('环境监测')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<form action="#" class="form-horizontal form-bordered install-check-form">
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('目录读写权限')}</label>
|
||||
<div class="col-md-9 install-check-box">
|
||||
<div class="install-check-list">
|
||||
{loop $path $name $code}
|
||||
<p class="install-check-item {if !$code}is-error{/if}">
|
||||
<span class="install-check-status">{if !$code}{dr_lang('错误')}{else}{dr_lang('正确')}{/if}</span>
|
||||
<span>{$name}</span>
|
||||
</p>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('PHP版本')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static"> {PHP_VERSION} ({FRAME_PHP_VERSION}{dr_lang('及以上版本')})</p>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-3">{dr_lang('环境检测')}</label>
|
||||
<div class="col-md-9 install-check-box">
|
||||
<div class="install-check-list">
|
||||
{loop $php $t}
|
||||
{if !$t.code}
|
||||
<p class="install-check-item is-error">
|
||||
<?php $error = 1;?>
|
||||
<span class="install-check-status">{dr_lang('不支持')}</span>
|
||||
<span>{$t.name}</span>
|
||||
<a href="{$t.help}" target="_blank" class="install-check-help">{dr_lang('查看帮助')}</a>
|
||||
</p>
|
||||
{else}
|
||||
<p class="install-check-item">
|
||||
<span class="install-check-status">{dr_lang('支持')}</span>
|
||||
<span>{$t.name}</span>
|
||||
</p>
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库扩展')}</label>
|
||||
<div class="col-md-9 install-check-box">
|
||||
<div class="install-check-list">
|
||||
{loop $db_ext $t}
|
||||
<p class="install-check-item {if !$t.code}is-error{/if}">
|
||||
<span class="install-check-status">{if !$t.code}{dr_lang('不支持')}{else}{dr_lang('支持')}{/if}</span>
|
||||
<span>{$t.name}</span>
|
||||
{if !$t.code && $t.help}
|
||||
<a href="{$t.help}" target="_blank" class="install-check-help">{dr_lang('查看帮助')}</a>
|
||||
{/if}
|
||||
</p>
|
||||
{/loop}
|
||||
{if !$has_db_ext}
|
||||
<p class="install-check-item is-error">
|
||||
<span class="install-check-status">{dr_lang('错误')}</span>
|
||||
<span>{dr_lang('mysqli 与 sqlite3 至少需要启用一个')}</span>
|
||||
</p>
|
||||
{else}
|
||||
<p class="install-check-item">
|
||||
<span class="install-check-status">{dr_lang('正确')}</span>
|
||||
<span>{dr_lang('已满足:至少一种数据库扩展可用')}</span>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="portlet-title" style="min-height: 18px;">
|
||||
</div>
|
||||
<div class="portlet-body text-center">
|
||||
{if $error}
|
||||
<button type="button" class="btn default install-action-disabled"> {dr_lang('无法进行下一步安装')} </button>
|
||||
{else}
|
||||
<a href="{$next_url}" class="btn btn-success"> {dr_lang('下一步安装')} </a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{template "install/footer.html"}
|
||||
@@ -0,0 +1,361 @@
|
||||
{template "install/header.html"}
|
||||
|
||||
<style>
|
||||
.install-option-group {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
padding: 6px;
|
||||
border: 1px solid #e4ebf3;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
|
||||
}
|
||||
|
||||
/* 覆盖框架 .mt-radio 默认样式,避免圆点压住文字 */
|
||||
.install-option-group .install-option-card.mt-radio {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-width: 118px;
|
||||
margin: 0 0 0 0 !important;
|
||||
padding: 10px 18px 10px 40px !important;
|
||||
border: 1px solid #d7e3f0;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
color: #4a5568;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio:hover {
|
||||
border-color: #8db7e3;
|
||||
box-shadow: 0 6px 18px rgba(56, 110, 171, 0.10);
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio > input[type="radio"] {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
top: 50%;
|
||||
margin: -8px 0 0 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio > span {
|
||||
position: absolute !important;
|
||||
left: 14px !important;
|
||||
top: 50% !important;
|
||||
right: auto !important;
|
||||
bottom: auto !important;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
margin: -8px 0 0 0 !important;
|
||||
padding: 0 !important;
|
||||
border: 2px solid #b8c7d9 !important;
|
||||
border-radius: 50% !important;
|
||||
background: #fff !important;
|
||||
box-shadow: none;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio > span:after {
|
||||
content: "" !important;
|
||||
position: absolute !important;
|
||||
left: 50% !important;
|
||||
top: 50% !important;
|
||||
width: 6px !important;
|
||||
height: 6px !important;
|
||||
margin: -3px 0 0 -3px !important;
|
||||
border: 0 !important;
|
||||
border-radius: 50% !important;
|
||||
background: #26a65b !important;
|
||||
opacity: 0;
|
||||
transform: scale(0.6);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio > input[type="radio"]:checked + span {
|
||||
border-color: #26a65b !important;
|
||||
box-shadow: 0 0 0 4px rgba(38, 166, 91, 0.10);
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio > input[type="radio"]:checked + span:after {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio:has(input[type="radio"]:checked) {
|
||||
border-color: #26a65b;
|
||||
background: #f4fcf7;
|
||||
color: #1d7f45;
|
||||
box-shadow: 0 10px 22px rgba(38, 166, 91, 0.12);
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio.is-disabled,
|
||||
.install-option-group .install-option-card.mt-radio:has(input[type="radio"]:disabled) {
|
||||
opacity: .55;
|
||||
cursor: pointer;
|
||||
box-shadow: none;
|
||||
color: #8a96a6;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio.is-disabled:hover {
|
||||
border-color: #c5d0dc;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio.is-disabled > input[type="radio"] {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.install-option-help {
|
||||
margin: 12px 0 0;
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
background: #f8fbff;
|
||||
color: #6b7a8c;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.install-option-group {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.install-option-group .install-option-card.mt-radio {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-edit font-green"></i>
|
||||
<span class="caption-subject font-green">{dr_lang('项目信息')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<form action="#" id="myform" class="form-horizontal form-bordered ">
|
||||
{dr_form_hidden()}
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('项目地址')}</label>
|
||||
<div class="col-md-7">
|
||||
<p class="form-control-static" id="url"> {FC_NOW_HOST} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('项目名称')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[name]" value="{dr_lang('我的项目')}" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('创始人邮箱')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[email]" value="admin@admin.com" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('创始人账号')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[username]" value="admin" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('创始人密码')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[password]" value="admin" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库驱动')}</label>
|
||||
<div class="col-md-7">
|
||||
<div class="install-option-group mt-radio-inline">
|
||||
{loop $db_drivers $d}
|
||||
<label class="install-option-card mt-radio {if !$d.enabled}is-disabled js-db-driver-disabled{/if}"
|
||||
{if !$d.enabled}data-tip="{$d.tip}"{/if}>
|
||||
<input type="radio" name="data[db_driver]" value="{$d.name}" data-form="{$d.form}"
|
||||
{if $db_driver==$d.name && $d.enabled}checked{/if}
|
||||
{if !$d.enabled}disabled{/if}>
|
||||
<span></span>
|
||||
{$d.label}
|
||||
</label>
|
||||
{/loop}
|
||||
</div>
|
||||
{if $db_dir_missing || $force_mysqli}
|
||||
<p class="help-block install-option-help">
|
||||
{if $db_dir_missing}
|
||||
<span style="color:#d68910;">{dr_lang('未检测到 System/Database 目录,已默认使用 MySQLi(MySQL)模式')}</span>
|
||||
{elseif $force_mysqli}
|
||||
<span style="color:#d68910;">{dr_lang('检测到自定义 Install.sql,仅支持 MySQLi 安装')}</span>
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-server">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库地址')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_host]" value="{$db_host}" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-server">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库账号')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_user]" value="{$db_user}" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-server">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库密码')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_pass]" value="{$db_pass}" class="form-control js-db-pass" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-server">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库名称')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_name]" value="{$db_name}" class="form-control js-db-name-mysql" placeholder="">
|
||||
<p class="help-block"> {dr_lang('当提示Unknown database时,请先创建数据库后再进行下一步')} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-sqlite" style="display:none;">
|
||||
<label class="control-label col-md-3">{dr_lang('数据库文件')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_name_sqlite]" value="{$sqlite_name}" class="form-control js-db-name-sqlite" placeholder="database/SQLite3/" readonly>
|
||||
<p class="help-block"> {dr_lang('保存在 cache/database/SQLite3/ 下,文件名安装时随机生成,避免路径被猜测')} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group js-db-sqlite" style="display:none;">
|
||||
<label class="control-label col-md-3">{dr_lang('加密密码')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_pass_sqlite]" value="" class="form-control js-db-pass-sqlite" placeholder="{dr_lang('可选,一般留空')}">
|
||||
<p class="help-block"> {dr_lang('可选。若填写则作为 SQLite 加密口令(需 PHP 支持)')} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('数据表前缀')}</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" name="data[db_prefix]" value="{$db_prefix}" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
{if $is_demo}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">{dr_lang('安装测试数据')}</label>
|
||||
<div class="col-md-7">
|
||||
<div class="mt-radio-inline ">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="is_install_db" value="1" checked=""> {dr_lang('安装')}
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="is_install_db" value="0"> {dr_lang('不安装')}
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
<p class="help-block install-option-help"> {dr_lang('新手建议选择安装测试数据,方便快速入门')} </p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="portlet-title" style="min-height: 18px;"></div>
|
||||
<div class="portlet-body text-center">
|
||||
<a href="javascript:dr_next_install();" type='submit' class="btn btn-success"> {dr_lang('下一步安装')} </a>
|
||||
</div>
|
||||
<div class="portlet-body text-center" id="dr_loading" style="display: none; color:blue;">
|
||||
{dr_lang('正在安装中(这个过程一般不超过30秒)')}...
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#url').html(document.location.protocol+'//{DOMAIN_NAME}/');
|
||||
|
||||
function dr_toggle_db_driver() {
|
||||
var $checked = $('input[name="data[db_driver]"]:checked:not(:disabled)');
|
||||
if (!$checked.length) {
|
||||
$checked = $('input[name="data[db_driver]"]:not(:disabled)').first().prop('checked', true);
|
||||
}
|
||||
var formType = $checked.attr('data-form') || 'server';
|
||||
if (formType === 'sqlite') {
|
||||
$('.js-db-server').hide().find('input,select,textarea').prop('disabled', true);
|
||||
$('.js-db-sqlite').show().find('input,select,textarea').prop('disabled', false);
|
||||
$('.js-db-name-sqlite').attr('name', 'data[db_name]');
|
||||
$('.js-db-pass-sqlite').attr('name', 'data[db_pass]');
|
||||
} else {
|
||||
$('.js-db-sqlite').hide().find('input,select,textarea').prop('disabled', true);
|
||||
$('.js-db-server').show().find('input,select,textarea').prop('disabled', false);
|
||||
$('.js-db-name-sqlite').attr('name', 'data[db_name_sqlite]');
|
||||
$('.js-db-pass-sqlite').attr('name', 'data[db_pass_sqlite]');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// 若默认驱动不可用则自动切换
|
||||
var $checked = $('input[name="data[db_driver]"]:checked');
|
||||
if ($checked.length && $checked.prop('disabled')) {
|
||||
$('input[name="data[db_driver]"]:not(:disabled)').first().prop('checked', true);
|
||||
}
|
||||
dr_toggle_db_driver();
|
||||
$('input[name="data[db_driver]"]').on('change', dr_toggle_db_driver);
|
||||
|
||||
// 灰色不可用驱动:点击弹窗提示原因
|
||||
$(document).on('click', '.js-db-driver-disabled', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var tip = $(this).attr('data-tip') || '{dr_lang("该数据库驱动暂不可选")}';
|
||||
if (typeof layer !== 'undefined' && layer.alert) {
|
||||
layer.alert(tip);
|
||||
} else if (typeof dr_tips === 'function') {
|
||||
dr_tips(0, tip);
|
||||
} else {
|
||||
alert(tip);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function dr_next_install() {
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
$('#dr_loading').show();
|
||||
$.ajax({type: "POST",dataType:"json", url: '{$do_url}', data: $("#myform").serialize(),
|
||||
success: function(json) {
|
||||
if (json.code == 1) {
|
||||
window.location.href = json.msg;
|
||||
} else {
|
||||
layer.close(loading);
|
||||
layer.alert(json.msg);
|
||||
$('#dr_loading').hide();
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
layer.closeAll('loading');
|
||||
$('#dr_loading').hide();
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "{dr_lang('系统故障')}",
|
||||
fix:true,
|
||||
shadeClose: true,
|
||||
shade: 0,
|
||||
area: ['50%', '50%'],
|
||||
content: "<div style=\"padding:10px;\">"+HttpRequest.responseText+"</div>"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "install/footer.html"}
|
||||
@@ -0,0 +1,74 @@
|
||||
{template "install/header.html"}
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-laptop font-green"></i>
|
||||
<span class="caption-subject font-green">{dr_lang('正在安装数据结构')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="">
|
||||
|
||||
{if $error}
|
||||
<div class="scroller" style="height:300px;" data-rail-visible="1">
|
||||
{nl2br($error)}
|
||||
</div>
|
||||
{else}
|
||||
<div class="scroller" style="height:300px; font-size: 12px;" data-rail-visible="1" id="dr_check_html">
|
||||
<p>{dr_lang('正在执行安装程序')}</p>
|
||||
</div>
|
||||
<div id="dr_error_html" style="display: none">
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
dr_ajax2ajax(1);
|
||||
});
|
||||
function dr_ajax2ajax(page) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
timeout: 0,
|
||||
url: "{$do_url}&page="+page,
|
||||
success: function (json) {
|
||||
|
||||
$('#dr_check_html').append("<p>"+json.msg+"</p>");
|
||||
document.getElementById('dr_check_html').scrollTop = document.getElementById('dr_check_html').scrollHeight;
|
||||
|
||||
if (json.code == 0) {
|
||||
$('#dr_check_html').append("<p style='color:red'>出现故障:"+json.msg+"</p>");
|
||||
$('#dr_error_html').show();
|
||||
return;
|
||||
} else {
|
||||
if (json.data.page == 99 ) {
|
||||
// 完成
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
window.location.href = "{$next_url}&protocol="+document.location.protocol;
|
||||
} else {
|
||||
dr_ajax2ajax(json.data.page);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);;
|
||||
$('#dr_check_html').append("<p style='color:red'>出现故障:"+HttpRequest.responseText+"</p>");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="portlet-title" style="min-height: 18px;">
|
||||
</div>
|
||||
<div class="portlet-body text-center">
|
||||
{if $error}
|
||||
<a href="{$pre_url}" class="btn btn-success"> {dr_lang('返回上一步')} </a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{template "install/footer.html"}
|
||||
@@ -0,0 +1,109 @@
|
||||
{template "install/header.html"}
|
||||
|
||||
<style>
|
||||
.install-result-wrap {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.install-result-icon {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.install-result-icon i {
|
||||
display: inline-block;
|
||||
font-size: 88px;
|
||||
line-height: 1;
|
||||
color: #26a65b;
|
||||
text-shadow: 0 8px 24px rgba(38, 166, 91, 0.18);
|
||||
}
|
||||
|
||||
.install-result-main {
|
||||
color: #26a65b;
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.install-result-title {
|
||||
margin: 0 0 18px;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.install-result-item {
|
||||
margin: 0 0 10px;
|
||||
font-size: 16px;
|
||||
color: #3a4a5b;
|
||||
}
|
||||
|
||||
.install-result-item strong {
|
||||
display: inline-block;
|
||||
min-width: 68px;
|
||||
color: #26a65b;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.install-result-action {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.install-result-action .btn {
|
||||
min-width: 160px;
|
||||
height: 42px;
|
||||
padding-top:5px;
|
||||
color: #26a65b;
|
||||
line-height: 28px;
|
||||
border-radius: 21px;
|
||||
font-size: 15px;
|
||||
box-shadow: 0 10px 20px rgba(38, 166, 91, 0.18);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="portlet light">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-laptop font-green"></i>
|
||||
<span class="caption-subject font-green">{dr_lang('安装结果')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding:0 50px;">
|
||||
|
||||
|
||||
{if $error}
|
||||
<div class="scroller" style="height:300px" data-rail-visible="1">
|
||||
{nl2br($error)}
|
||||
</div>
|
||||
{else}
|
||||
<div class="row install-result-wrap">
|
||||
<div class="col-md-12 install-result-icon">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
</div>
|
||||
<div class="col-md-12 install-result-main">
|
||||
<p class="install-result-title">{dr_lang('安装完成')}</p>
|
||||
{if $data.username}<p class="install-result-item"><strong>{dr_lang('账号')}</strong>{$data.username}</p>{/if}
|
||||
{if $data.password}<p class="install-result-item"><strong>{dr_lang('密码')}</strong>{$data.password}</p>{/if}
|
||||
<p class="install-result-action"><a href="{$admin}.php?c=login" onclick="dr_next_install()" class="btn btn-success">{dr_lang('登录项目后台')}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function dr_next_install() {
|
||||
var loading = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 100000000
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="portlet-title" style="min-height: 18px;">
|
||||
</div>
|
||||
<div class="portlet-body text-center">
|
||||
{if $error}
|
||||
<a href="{$pre_url}" class="btn btn-success"> {dr_lang('返回上一步')} </a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{template "install/footer.html"}
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{dr_lang('安装程序')} - {DR_NAME}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<link href="{THEME_PATH}assets/icon/css/icon.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{THEME_PATH}assets/global/css/login.min.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">var admin_file = '{SELF}'; var assets_path = '{THEME_PATH}assets/';</script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/jquery.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/scripts/app.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{LANG_PATH}lang.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/js/cms.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<style>
|
||||
body.page-container-bg-solid.login {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background: linear-gradient(165deg, #e3f0ff 0%, #eef2f7 42%, #dfe8f3 100%) !important;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
.portlet-body.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.page-container-bg-solid.login .page-content {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .page-content-wrapper .page-content {
|
||||
margin-left: 0 !important;
|
||||
padding-top: 0;
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login > .logo {
|
||||
margin: 36px auto 28px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login > .logo img {
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login > .logo a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .page-content .container {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light {
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 32px rgba(15, 45, 90, 0.08), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light > .portlet-title {
|
||||
border-bottom: 1px solid #eef1f5;
|
||||
padding: 18px 24px 14px;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light > .portlet-body {
|
||||
padding: 20px 24px 8px;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center {
|
||||
padding: 16px 24px 28px;
|
||||
border-top: 1px solid #f4f6f9;
|
||||
background: #fafbfd;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center .btn,
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center .btn:hover,
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center .btn:focus,
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center .btn:active {
|
||||
color: #111 !important;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .portlet.light .portlet-body.text-center#dr_loading {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #1a6cb5 !important;
|
||||
background: linear-gradient(180deg, #f0f7ff 0%, #e8f2fc 100%);
|
||||
border-top: 1px dashed rgba(26, 108, 181, 0.25);
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .form-horizontal .form-group {
|
||||
border-color: #f0f2f5;
|
||||
}
|
||||
|
||||
.page-container-bg-solid.login .form-control-static {
|
||||
color: #4a5568;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="page-container-bg-solid login" style="background: #e3f0ff !important;">
|
||||
|
||||
<div class="logo">
|
||||
<a href="javascript:;"><img src="{THEME_PATH}assets/logo-web.png" alt=""></a>
|
||||
</div>
|
||||
|
||||
<div class="page-container">
|
||||
<div class="page-content-wrapper">
|
||||
<div class="page-content">
|
||||
<div class="container">
|
||||
<div class="page-content-inner">
|
||||
@@ -0,0 +1,38 @@
|
||||
{template "header.html"}
|
||||
<style> body{ overflow: hidden !important} </style>
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('名称')}</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" onblur="d_topinyin('code', 'name')" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
<span class="help-block"> {dr_lang('它的描述名称')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_code">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('别名')}</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" class="form-control" id="dr_code" name="data[code]" value="{htmlspecialchars((string)$data.code)}">
|
||||
<span class="help-block"> {dr_lang('别名只能由字母或者字母+数字组成')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {if !IS_SITES} hide {/if}">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('类型')}</label>
|
||||
<div class="col-xs-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="data[type]" value="0" {if !$data['type']} checked{/if}> {dr_lang('共享')}
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="data[type]" value="1" {if $data['type']} checked{/if}> {dr_lang('独立')}
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
<span class="help-block"> {dr_lang('独立是指各个项目的联动菜单数据分开录入')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,61 @@
|
||||
{template "header.html"}
|
||||
<style> body{ overflow: hidden !important} </style>
|
||||
<div style="text-align: center">
|
||||
|
||||
<link href="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/css/jquery.fileupload.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{ROOT_THEME_PATH}assets/global/plugins/jquery-fileupload/js/jquery.fileupload.js" type="text/javascript"></script>
|
||||
<div class="dev" id="fileupload">
|
||||
<a href="javaScript:;" class="fileinput-button btn read"> <i class="fa fa-upload"></i> {dr_lang('上传json文件')}<input type="file" name="file_data"> </a>
|
||||
<div class="col-lg-12 fileupload-progress fade" style="display:none">
|
||||
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar progress-bar-success" style="width:0%;"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#fileupload").fileupload({
|
||||
disableImageResize: false,
|
||||
autoUpload: true,
|
||||
maxFileSize: "10000000000",
|
||||
url: "{$upload_url}",
|
||||
dataType: "json",
|
||||
formData: { {csrf_token()}: "{csrf_hash()}" },
|
||||
acceptFileTypes: "*",
|
||||
maxChunkSize: 0,
|
||||
progressall: function (e, data) {
|
||||
// 上传进度条 all
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
$("#fileupload .fileupload-progress").show();
|
||||
$("#fileupload .fileupload-progress").removeClass("fade");
|
||||
$("#fileupload .progress-bar-success").attr("style", "width: "+progress+"%");
|
||||
},
|
||||
add: function (e, data) {
|
||||
$("#fileupload .fileupload-progress").hide();
|
||||
data.submit();
|
||||
},
|
||||
done: function (e, data) {
|
||||
|
||||
$("#fileupload .fileupload-progress").addClass("fade");
|
||||
$("#fileupload .fileupload-progress").hide();
|
||||
|
||||
if (data.result.code > 0) {
|
||||
dr_tips(1, '{dr_lang('上传成功,正在分析文件')}');
|
||||
window.location.href = '{$add_url}';
|
||||
} else {
|
||||
dr_tips(data.result.code, data.result.msg, -1);
|
||||
}
|
||||
},
|
||||
fail: function (e, data) {
|
||||
//console.log(data.errorThrown);
|
||||
dr_tips(0, "系统故障:"+data.errorThrown, -1);
|
||||
layer.closeAll('tips');
|
||||
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,88 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
<p>{dr_lang('联动菜单可以作为地区、行业、类型等,也可以按项目来设置联动菜单值')}</p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<button type="button" onclick="dr_ajax_option('{dr_url('linkage/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable">
|
||||
{else}
|
||||
<div class="table-scrollable">
|
||||
{/if}
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="150"> {dr_lang('名称')} </th>
|
||||
<th width="120"> {dr_lang('别名')} </th>
|
||||
<th width="120"> {dr_lang('表名')} </th>
|
||||
{if IS_SITES}
|
||||
<th width="120" style="text-align:center"> {dr_lang('类型')} </th>{/if}
|
||||
<th width="120" style="text-align:center"> {dr_lang('数据')} </th>
|
||||
<th> {dr_lang('操作')} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td>{$t.name}</td>
|
||||
<td>{$t.code}</td>
|
||||
<td>{php $tb='linkage_data_'.$t.id; echo $tb;}</td>
|
||||
{if IS_SITES}
|
||||
<td style="text-align:center">
|
||||
{if $t.type}
|
||||
<span class="label label-success"> {dr_lang('独立')} </span>
|
||||
{else}
|
||||
<span class="label label-danger"> {dr_lang('共享')} </span>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center">
|
||||
{count action=table table=$tb}
|
||||
</td>
|
||||
<td style="overflow:visible">
|
||||
{if $ci->_is_admin_auth('edit')}<label><a href="javascript:dr_iframe('edit', '{dr_url('linkage/edit', ['id'=>$t.id])}', '500px','410px');" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a></label>{/if}
|
||||
<label><a href="{dr_url('linkage/list_index', ['key'=>$t.id])}" class="btn btn-xs dark"> <i class="fa fa-table"></i> {dr_lang('数据管理')} </a></label>
|
||||
<label><a href="javascript:dr_iframe_show('{dr_lang('一键生成')}', '{dr_url('linkage/cache_index', ['key'=>$t.id])}', '500px', '300px');" class="btn btn-xs yellow"> <i class="fa fa-refresh"></i> {dr_lang('一键生成')}</a></label>
|
||||
{if $ci->_is_admin_auth()}
|
||||
<label><a href="javascript:top.dr_iframe_show('{dr_lang('自定义字段')}','{dr_url('field/index', ['rname'=>'linkage', 'rid'=>$t.id])}&is_menu=1', '80%', '90%');" class="btn btn-xs blue"> <i class="fa fa-code"></i> {dr_lang('自定义字段')} </a></label>
|
||||
<label><a href="javascript:dr_iframe_show('{dr_lang('导出')}', '{dr_url('linkage/export', ['key'=>$t.id])}', '500px','280px');" class="btn btn-xs red"> <i class="fa fa-sign-out"></i> {dr_lang('导出')} </a></label>
|
||||
<label><a href="javascript:dr_iframe_show('{dr_lang('导入')}', '{dr_url('linkage/import', ['key'=>$t.id])}', '500px','280px');" class="btn btn-xs green"> <i class="fa fa-sign-in"></i> {dr_lang('导入')} </a></label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,55 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
{if !$data.id}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('模式')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="_all" value="0" onclick="$('.dr_more').hide();$('.dr_one').show();" checked > {dr_lang('单个')}
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="_all" value="1" onclick="$('.dr_more').show();$('.dr_one').hide();"> {dr_lang('批量')}
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group" id="dr_row_pid">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('分类')}</label>
|
||||
<div class="col-xs-7">
|
||||
{$select}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_one" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('名称')}</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" onblur="d_topinyin('cname', 'name')" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
<span class="help-block"> {dr_lang('它的描述名称')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_one" id="dr_row_cname">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('别名')}</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" class="form-control" id="dr_cname" name="data[cname]" value="{htmlspecialchars((string)$data.cname)}">
|
||||
<span class="help-block"> {dr_lang('别名只能由字母或者字母+数字组成')} </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group dr_more" style="display:none">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('批量')}</label>
|
||||
<div class="col-xs-7">
|
||||
<textarea name="data[all]" class="form-control" style="height:220px" rows="3"></textarea>
|
||||
|
||||
<span class="help-block"> {dr_lang('换行分隔多条数据')} </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,57 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="myfbody">
|
||||
<div class="portlet bordered light ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<span class="caption-subject font-green-sharp">
|
||||
{dr_lang('内容')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn" href="{$reply_url}"> <i class="fa fa-mail-reply"></i> {dr_lang('返回')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group " id="dr_row_pid">
|
||||
<label class="col-md-2 control-label ">{dr_lang('分类')}</label>
|
||||
<div class="col-md-7">
|
||||
<label>{$select}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_one" id="dr_row_name">
|
||||
<label class="col-md-2 control-label ">{dr_lang('名称')}</label>
|
||||
<div class="col-md-7">
|
||||
<label><input type="text" onblur="d_topinyin('cname', 'name')" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}"></label>
|
||||
<span class="help-block"> {dr_lang('它的描述名称')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group " id="dr_row_cname">
|
||||
<label class="col-md-2 control-label ">{dr_lang('别名')}</label>
|
||||
<div class="col-md-7">
|
||||
<label><input type="text" class="form-control" id="dr_cname" name="data[cname]" value="{htmlspecialchars((string)$data.cname)}"></label>
|
||||
<span class="help-block"> {dr_lang('别名只能由字母或者字母+数字组成')} </span>
|
||||
</div>
|
||||
</div>
|
||||
{$myfield}
|
||||
{$diyfield}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<label><button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存内容')}</button></label>
|
||||
<label> <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{$reply_url}')" class="btn yellow"> <i class="fa fa-mail-reply-all"></i> {dr_lang('保存并返回')}</button></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,80 @@
|
||||
{template "header.html"}
|
||||
<div class="note note-danger">
|
||||
<p><a href="javascript:dr_iframe_show('{dr_lang('一键生成')}', '{dr_url('linkage/cache_index', ['key'=>$key])}', '500px', '300px');">{dr_lang('一键生成联动菜单数据')}</a></p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="bootstrap-table2 bootstrap-table">
|
||||
<div id="toolbar" class="toolbar">
|
||||
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('linkage/list_del', ['key'=>$key])}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button></label>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('edit')}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('linkage/open_edit', ['key'=>$key])}', '{dr_lang('你确定要启用它们吗?')}', 1)" class="btn blue btn-sm"> <i class="fa fa fa-check-circle"></i> {dr_lang('启用')}</button></label>
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('linkage/close_edit', ['key'=>$key])}', '{dr_lang('你确定要禁用它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa fa-times-circle"></i> {dr_lang('禁用')}</button></label>
|
||||
|
||||
<label style="margin-right: 3px;"><button type="button" onclick="dr_ajax_option('{dr_url('linkage/pid_edit', ['key'=>$key])}', '{dr_lang('你确定要批量移动它们吗?')}', 1)" class="btn green btn-sm"> <i class="fa fa-edit"></i> {dr_lang('变更分类')}</button></label>
|
||||
<label style="margin-top:5px;">{$select}</label>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="70" style="text-align:center"> {dr_lang('排序')} </th>
|
||||
<th width="60" style="text-align:center"> {dr_lang('状态')} </th>
|
||||
<th width="70"> Id </th>
|
||||
<th> {dr_lang('名称 / 别名')} </th>
|
||||
<th>
|
||||
{if $ci->_is_admin_auth('add')}<a href="javascript:dr_iframe('add', '{dr_url('linkage/listk_add', ['key'=>$key,'pid'=>$pid])}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('快速添加')} </a>{/if}
|
||||
<a href="{dr_url('linkage/list_index', ['key'=>$key,'pid'=>0])}" class="btn btn-xs dark"> <i class="fa fa-reply"></i> {dr_lang('全部数据')} </a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center"> <input type="text" onblur="dr_ajax_save(this.value, '{dr_url('linkage/displayorder_edit', ['key'=>$key,'id'=>$t.id])}')" value="{$t.displayorder}" class="displayorder form-control input-sm input-inline input-mini"> </td>
|
||||
<td style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('linkage/hidden_edit', ['key'=>$key,'id'=>$t.id])}', 1);" class="badge badge-{if $t.hidden}no{else}yes{/if}"><i class="fa fa-{if $t.hidden}times{else}check{/if}"></i></a>
|
||||
</td>
|
||||
<td>{$t.id}</td>
|
||||
<td>{dr_strcut($t.name, 20)} / {dr_strcut($t.cname, 20)} </td>
|
||||
<td>
|
||||
{if $ci->_is_admin_auth('add')}<label><a href="javascript:dr_iframe('add', '{dr_url('linkage/listk_add', ['key'=>$key, 'pid'=>$t.id])}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('快速添加')} </a></label>{/if}
|
||||
{if $ci->_is_admin_auth('edit')}<label><a href="{dr_url('linkage/list_edit', ['key'=>$key, 'id'=>$t.id])}" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a></label>{/if}
|
||||
{if $t.child}<label><a href="{dr_url('linkage/list_index', ['key'=>$key, 'pid'=>$t.id])}" class="btn btn-xs dark"> <i class="fa fa-table"></i> {dr_lang('下级数据管理')} </a></label>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,234 @@
|
||||
<!--- BESCMS https://www.besyun.com -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{dr_lang('%s - 后台管理平台', SITE_NAME)}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
<link href="{$THEME_PATH}assets/icon/css/icon.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{$THEME_PATH}assets/global/css/login{if !IS_XRDEV}.min{/if}.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<link href="{php echo defined('MYCSS_FILE') ? MYCSS_FILE : $THEME_PATH.'assets/global/css/my.css';}?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<script src="{$THEME_PATH}assets/global/plugins/jquery.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/crypto-js.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{else}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/jquery.md5.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
{/if}
|
||||
<script src="{$LANG_PATH}lang.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{$THEME_PATH}assets/js/cms.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="login">
|
||||
<div class="content">
|
||||
<form class="login-form" action="" onsubmit="return dr_submit()" method="post">
|
||||
{$form}
|
||||
<div class="logo">
|
||||
<a href="{SITE_URL}"><img src="{$THEME_PATH}assets/logo-web.png" /> </a>
|
||||
</div>
|
||||
<div class="post-msg alert alert-danger display-hide">
|
||||
<span> </span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="dr_row_username">
|
||||
<label class="control-label visible-ie8 visible-ie9">{dr_lang('账号')}</label>
|
||||
<div class="input-icon">
|
||||
<input style="padding-left:15px;" class="form-control placeholder-no-fix" type="text" value="<?php echo defined('DEMO_ADMIN_USERNAME') ? DEMO_ADMIN_USERNAME : ''?>" autocomplete="off" placeholder="{dr_lang('账号')}" name="data[username]" /> </div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_password">
|
||||
<label class="control-label visible-ie8 visible-ie9">{dr_lang('密码')}</label>
|
||||
<div class="input-icon">
|
||||
<input style="padding-left:15px;" id="password" class="form-control placeholder-no-fix" type="password" value="<?php echo defined('DEMO_ADMIN_PASSWORD') ? DEMO_ADMIN_PASSWORD : ''?>" autocomplete="off" placeholder="{dr_lang('密码')}" name="data[password]" /> </div>
|
||||
</div>
|
||||
|
||||
{if SYS_ADMIN_CODE}
|
||||
{if $is_mobile}
|
||||
<div class="form-group" id="dr_row_code">
|
||||
<label class="control-label visible-ie8 visible-ie9">{dr_lang('验证码')}</label>
|
||||
<div class="input-icon">
|
||||
<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="{dr_lang('验证码')}" name="code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-center">
|
||||
{dr_code(120, 35)}
|
||||
</div>
|
||||
{else}
|
||||
<div class="form-group" id="dr_row_code">
|
||||
<label class="control-label visible-ie8 visible-ie9">{dr_lang('验证码')}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-icon">
|
||||
<input style="padding-left: 15px" type="text" class="form-control placeholder-no-fix" autocomplete="off" placeholder="{dr_lang('验证码')}" name="code">
|
||||
</div>
|
||||
<div class="input-group-btn fc-code" style="padding-left: 10px;">
|
||||
{dr_code(120, 35)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $mytpl}
|
||||
{load $mytpl}
|
||||
{else}
|
||||
<div class="form-actions">
|
||||
<button type="button" onclick="dr_submit()" class="btn blue btn-block"> {dr_lang('登录后台')} </button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if defined('IS_ADMIN_MIN') && IS_ADMIN_MIN}
|
||||
{else}
|
||||
{if !SYS_ADMIN_MODE}
|
||||
<div class="form-group text-center">
|
||||
<div class="input-icon">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="data[mode]" value="1" {if $mode == 1}checked=""{/if}> {dr_lang('完整模式')}
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" name="data[mode]" value="2" {if $mode == 2}checked=""{/if}> {dr_lang('简化模式')}
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if SYS_ADMIN_OAUTH && $oauth}
|
||||
<link href="{$THEME_PATH}assets/icon/css/icon.css?v={CMF_UPDATE_TIME}" rel="stylesheet" type="text/css" />
|
||||
<div class="login-oauth">
|
||||
{loop $oauth $t}
|
||||
<a href="{$t.url}" class="tooltips" data-container="body" data-placement="top" data-original-title="{$t.title}"><i class="fa fa-{$t.name}"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
</div>
|
||||
<script src="{$THEME_PATH}assets/global/plugins/bootstrap/js/bootstrap.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script src="{$THEME_PATH}assets/global/scripts/app.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var is_admin = 2;
|
||||
if (typeof parent.layer == 'function') {
|
||||
parent.layer.closeAll('loading');
|
||||
}
|
||||
function dr_password_md5() {
|
||||
var pwd = $('#password').val();
|
||||
if (pwd.length == 32) {
|
||||
// 已经加密过
|
||||
} else {
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
$('.login-form').append('<input type="hidden" name="is_aes" value="1">');
|
||||
var key = CryptoJS.enc.Utf8.parse('{$crypto_key}');
|
||||
var iv = CryptoJS.enc.Utf8.parse('{$crypto_iv}');
|
||||
var pw = pwd;
|
||||
pwd = CryptoJS.AES.encrypt(pwd, key, {
|
||||
mode: CryptoJS.mode.CBC,
|
||||
iv: iv,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
{if IS_DEV}
|
||||
pwd2 = CryptoJS.AES.decrypt(pwd, key, {
|
||||
mode: CryptoJS.mode.CBC,
|
||||
iv: iv,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
pwd2 = pwd2.toString(CryptoJS.enc.Utf8);
|
||||
if (pwd2 != pw) {
|
||||
alert("CryptoJS密码解析失败");
|
||||
return;
|
||||
}
|
||||
{/if}
|
||||
{else}
|
||||
pwd = $.md5(pwd); // 进行md5加密
|
||||
{/if}
|
||||
$('#password').val(pwd);
|
||||
}
|
||||
}
|
||||
function dr_submit() {
|
||||
$('.post-msg', $('.login-form')).hide();
|
||||
// 这里进行md5加密存储
|
||||
dr_password_md5();
|
||||
$.ajax({type: "POST",dataType:"json", url: '{$login_url}', data: $(".login-form").serialize(),
|
||||
success: function(json) {
|
||||
// token 更新
|
||||
if (json.token) {
|
||||
var token = json.token;
|
||||
$(".login-form input[name='"+token.name+"']").val(token.value);
|
||||
}
|
||||
if (json.code == 1) {
|
||||
window.location.href = json.data.url;
|
||||
} else {
|
||||
{if defined('SYS_ADMIN_LOGIN_AES') && SYS_ADMIN_LOGIN_AES}
|
||||
$('#password').val("");
|
||||
{/if}
|
||||
$('.fc-code img').click();
|
||||
dr_msg(0, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
$('.fc-code img').click();
|
||||
var msg = HttpRequest.responseText;
|
||||
if (!msg) {
|
||||
dr_msg(0, "{dr_lang('系统错误')}");
|
||||
} else {
|
||||
dr_msg(0, msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
jQuery(document).ready(function() {
|
||||
$('.login-form input').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
dr_submit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
top.$('#dr_go_url').hide();
|
||||
if ($('.login-oauth .tooltips').length && $.fn.tooltip) {
|
||||
$('.login-oauth .tooltips').tooltip('destroy').tooltip({
|
||||
container: 'body',
|
||||
placement: 'top'
|
||||
});
|
||||
}
|
||||
});
|
||||
function dr_msg(code, msg) {
|
||||
$('.post-msg span', $('.login-form')).html(msg);
|
||||
$('.post-msg', $('.login-form')).show();
|
||||
if (code) {
|
||||
$('.post-msg').removeClass("alert-danger");
|
||||
$('.post-msg').addClass("alert-info");
|
||||
} else {
|
||||
$('.post-msg').addClass("alert-danger");
|
||||
$('.post-msg').removeClass("alert-info");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{if IS_OEM_CMS}
|
||||
<script src="{$THEME_PATH}assets/global/plugins/backstretch/jquery.backstretch.min.js?v={CMF_UPDATE_TIME}" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
<?php $bg = array('"'.$THEME_PATH.'assets/global/login/1.jpg"',
|
||||
'"'.$THEME_PATH.'assets/global/login/2.jpg"',
|
||||
'"'.$THEME_PATH.'assets/global/login/3.jpg"',
|
||||
'"'.$THEME_PATH.'assets/global/login/4.jpg"');
|
||||
shuffle($bg);
|
||||
?>
|
||||
jQuery(document).ready(function() {
|
||||
$.backstretch([
|
||||
{implode(',', $bg)}
|
||||
], {
|
||||
fade: 1000,
|
||||
duration: 8000
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{if isset($_GET['isback']) && $_GET['isback']}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
dr_tips({intval($_GET['iscode'])}, "{dr_safe_replace($_GET['isback'])}")
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
{if IS_USE_MODULE}
|
||||
<div class="portlet portlet-sortable light bordered">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<div class="caption">
|
||||
<i class="fa fa-bar-chart"></i>
|
||||
<span class="caption-subject"> {dr_lang('数据统计')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<?php
|
||||
|
||||
|
||||
$mtotal = [];
|
||||
$module = $ci->get_cache('module-'.SITE_ID.'-content');
|
||||
if ($module) {
|
||||
foreach ($module as $dir => $t) {
|
||||
// 判断权限
|
||||
if (!$ci->_is_admin_auth($dir.'/home/index')) {
|
||||
continue;
|
||||
}
|
||||
$mtotal[$dir] = [
|
||||
'name' => dr_lang($t['name']),
|
||||
'today' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/index'),
|
||||
'all' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/index'),
|
||||
'verify' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/verify/index', $dir.'/verify/index'),
|
||||
'recycle' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/recycle/index'),
|
||||
'timing' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/time/index'),
|
||||
'post' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/add'),
|
||||
'list' => \Phpcmf\Service::M('auth')->_menu_link_url($dir.'/home/index', $dir.'/home/index'),
|
||||
];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="">
|
||||
<table class="table table-mtotal table-nomargin table-bordered2 table-striped table-bordered table-advance">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{dr_lang('模块')}</th>
|
||||
<th style="text-align: center">{dr_lang('总数据')}</th>
|
||||
<th style="text-align: center">{dr_lang('今日')}</th>
|
||||
{if IS_USE_MEMBER}<th style="text-align: center">{dr_lang('待审核')}</th>{/if}
|
||||
<th style="text-align: center">{dr_lang('待发布')}</th>
|
||||
<th style="text-align: center">{dr_lang('回收站')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $mtotal $dir $t}
|
||||
<tr>
|
||||
<td>{$t.name}</td>
|
||||
<td style="text-align: center"><a class="drlabel drlabel-success tooltips" data-container="body" data-placement="top" data-original-title="{dr_lang('数据量不一定是精确的,仅供参考')}" href="{$t.all}" id="{$dir}_all"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
|
||||
<td style="text-align: center"><a class="drlabel drlabel-success tooltips" data-container="body" data-placement="top" data-original-title="{dr_lang('数据量不一定是精确的,仅供参考')}" href="{$t.today}" id="{$dir}_today"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
|
||||
{if IS_USE_MEMBER}<td style="text-align: center"><a class="drlabel drlabel-important tooltips" data-container="body" data-placement="top" data-original-title="{dr_lang('数据量不一定是精确的,仅供参考')}" href="{$t.verify}" id="{$dir}_verify"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>{/if}
|
||||
<td style="text-align: center"><a class="drlabel drlabel-important tooltips" data-container="body" data-placement="top" data-original-title="{dr_lang('数据量不一定是精确的,仅供参考')}" href="{$t.timing}" id="{$dir}_timing"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
|
||||
<td style="text-align: center"><a class="drlabel drlabel-important tooltips" data-container="body" data-placement="top" data-original-title="{dr_lang('数据量不一定是精确的,仅供参考')}" href="{$t.recycle}" id="{$dir}_recycle"><img src="{THEME_PATH}assets/images/mloading.gif"></a></td>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$.getScript("{dr_url('module/api/mtotal')}&dir={$dir}");
|
||||
});
|
||||
</script>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
<div class="portlet portlet-sortable light bordered">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<div class="caption">
|
||||
<i class="fa fa-send"></i>
|
||||
<span class="caption-subject"> {dr_lang('快捷链接')} </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="admin-usermenu">
|
||||
{loop $admin.usermenu $t}
|
||||
<label><a class="btn {if $t.color && $t.color!='default'}{$t.color}{else}btn-default{/if}" {if $t.target} target="_blank" {/if} href="{$t.url}"> {$t.name} </a>
|
||||
</label>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,80 @@
|
||||
{if $ci->_is_admin_auth('notice/index')}
|
||||
<div class="portlet portlet-sortable light bordered">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<div class="caption">
|
||||
<i class="fa fa-bell"></i>
|
||||
<span class="caption-subject"> <a href="{dr_url('notice/my_index')}">{dr_lang('系统提醒')}</a> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="scroller" style="height: 300px;" data-always-visible="1" data-rail-visible="0">
|
||||
<?php $notice = \Phpcmf\Service::M('auth')->admin_notice();?>
|
||||
{if !$notice}
|
||||
<div style="padding-top: 30px;padding-bottom: 30px;text-align: center;color: #d7d8da;"> {dr_lang('无任何提醒')} </div>
|
||||
{else}
|
||||
<ul class="feeds" style="padding-bottom: 20px">
|
||||
{loop $notice $t}
|
||||
<li>
|
||||
<div class="col1" style="padding-top: 2px;padding-left: 3px;">
|
||||
<div class="cont">
|
||||
<div class="cont-col1 user-avatar">
|
||||
<a href="{dr_url('api/notice', array('id' => $t.id))}"><img style="height: 25px!important;" src="{dr_avatar($t.uid)}" /></a>
|
||||
</div>
|
||||
<div class="cont-col2">
|
||||
<div class="desc"><a href="{dr_url('api/notice', array('id' => $t.id))}">{$t.msg}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<div class="date"> {dr_fdate($t.inputtime)} </div>
|
||||
</div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<div class="portlet portlet-sortable light bordered">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<div class="caption">
|
||||
<i class="fa fa-bell"></i>
|
||||
<span class="caption-subject"> <a href="{dr_url('notice/my_index')}">{dr_lang('系统提醒')}</a> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="scroller" style="height: 300px;" data-always-visible="1" data-rail-visible="0">
|
||||
<?php $notice = \Phpcmf\Service::M('auth')->admin_notice();?>
|
||||
{if !$notice}
|
||||
<div style="padding-top: 30px;padding-bottom: 30px;text-align: center;color: #d7d8da;"> {dr_lang('无任何提醒')} </div>
|
||||
{else}
|
||||
<ul class="feeds" style="padding-bottom: 20px">
|
||||
{loop $notice $t}
|
||||
<li>
|
||||
<div class="col1" style="padding-top: 2px;padding-left: 3px;">
|
||||
<div class="cont">
|
||||
<div class="cont-col1 user-avatar">
|
||||
<a href="{dr_url('api/notice', array('id' => $t.id))}"><img style="height: 25px!important;" src="{dr_avatar($t.uid)}" /></a>
|
||||
</div>
|
||||
<div class="cont-col2">
|
||||
<div class="desc"><a href="{dr_url('api/notice', array('id' => $t.id))}">{$t.msg}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<div class="date"> {dr_fdate($t.inputtime)} </div>
|
||||
</div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,82 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单类型')}</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"> {if $type == 1} {dr_lang('顶级菜单')} {else if $type==2} {dr_lang('分组菜单')} {else} {dr_lang('链接菜单')} {/if}</p>
|
||||
</div>
|
||||
</div>
|
||||
{if $select}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('所属菜单')}</label>
|
||||
<div class="col-xs-8">
|
||||
<label>{$select}</label>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单名称')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_mark">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('标识字符')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_mark" name="data[mark]" value="{htmlspecialchars((string)$data.mark)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_icon">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单图标')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="dr_icon" type="text" name="data[icon]" value="{htmlspecialchars((string)$data.icon)}" />
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-success" href="{dr_url('api/icon')}" target="_blank"><i class="fa fa-arrow-right fa-fw" /></i> {dr_lang('查看')}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $type == 3}
|
||||
<div class="form-group" id="dr_row_uri">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('系统路径')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_uri" name="data[uri]" value="{htmlspecialchars((string)$data.uri)}">
|
||||
<span class="help-block">{dr_lang('格式为:模块目录名/控制器名/方法名;如果不填写将不会对权限就行验证')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_url">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('实际地址')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_url" name="data[url]" value="{htmlspecialchars((string)$data.url)}">
|
||||
<span class="help-block">{dr_lang('如果不填写此地址时,会根据系统路径来生成地址')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('排列顺序')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id="displayorder" class="form-control" name="data[displayorder]" value="{intval($data.displayorder)}">
|
||||
<span class="help-block"> {dr_lang('排序值由小到大排列,范围为0-255')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/fuelux/js/spinner.min.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#displayorder").TouchSpin({
|
||||
buttondown_class: "btn red",
|
||||
buttonup_class: "btn green",
|
||||
min: -255,
|
||||
max: 255
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,209 @@
|
||||
{template "header.html"}
|
||||
|
||||
{php echo \Phpcmf\Service::L('Field')->get('select')->get_select_search_code();}
|
||||
<div class="right-card-box">
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('menu/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
</label>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('edit') && dr_count($ci->site_info) > 1}
|
||||
<label style="margin-left: 20px; margin-right: 5px;"><button type="button" onclick="dr_ajax_option('{dr_url('menu/site_add')}', '{dr_lang('你确定要这样操作吗?')}', 1)" class="btn blue btn-sm"> <i class="fa fa-edit"></i> {dr_lang('批量划分项目权限')}</button></label>
|
||||
<label style="min-width: 200px;">
|
||||
<select name="siteid[]" class="bs-select form-control" multiple="multiple" data-actions-box="true">
|
||||
{loop $ci->site_info $sid $t}
|
||||
{if $sid > 1}
|
||||
<option value="{$t.SITE_ID}">{$t.SITE_NAME}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable deltable-clearfix">
|
||||
<table class="table table-striped table-bordered table-bordered table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th class="hidden-mobile" width="70" style="text-align:center"> {dr_lang('排序')} </th>
|
||||
<th class="hidden-mobile" width="60" style="text-align:center"> {dr_lang('可用')} </th>
|
||||
<th> {dr_lang('名称')} </th>
|
||||
{if dr_count($ci->site_info) > 1}
|
||||
<th width="100">
|
||||
{if $ci->_is_admin_auth('add')}<a href="javascript:dr_iframe('add', '{dr_url('menu/add', ['pid'=>0])}', '600px', '500px');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('添加')} </a>{/if}
|
||||
</th>
|
||||
<th> {dr_lang('项目权限')} </th>
|
||||
{else}
|
||||
<th>
|
||||
{if $ci->_is_admin_auth('add')}<a href="javascript:dr_iframe('add', '{dr_url('menu/add', ['pid'=>0])}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('添加')} </a>{/if}
|
||||
</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $top=[]; $l2_has_child=[];}
|
||||
{loop $data $t}
|
||||
{php $t.pid == 0 && $top[] = $t.id;}
|
||||
{php !dr_in_array($t.pid, (array)$top) && $t.pid && $l2_has_child[$t.pid]=1;}
|
||||
{/loop}
|
||||
{loop $data $t}
|
||||
{php $t.site = dr_string2array($t.site);}
|
||||
{php $menu_level = $t.pid == 0 ? 1 : (dr_in_array($t.pid, (array)$top) ? 2 : 3);}
|
||||
{php $menu_top_id = $menu_level == 1 ? $t.id : ($menu_level == 2 ? $t.pid : $t.tid);}
|
||||
{php $has_l3_child = $menu_level == 2 && !empty($l2_has_child[$t.id]);}
|
||||
<tr class="odd gradeX {if $menu_level==1}menu-row-top menu-row-l1{elseif $menu_level==2}menu-row-child menu-row-l2 menu-row-top-{$menu_top_id}{else}menu-row-child menu-row-l3 menu-row-top-{$menu_top_id} menu-row-parent-{$t.pid}{/if}" id="dr_row_{$t.id}" data-top-id="{$menu_top_id}" data-level="{$menu_level}" data-pid="{$t.pid}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes checkboxes{$t.tid} checkboxes{$t.pid} group-checkable" data-set=".checkboxes{$t.id}" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="hidden-mobile" style="text-align:center"> <input type="text" onblur="dr_ajax_save(this.value, '{dr_url('menu/save_edit', ['id'=>$t.id])}', 'displayorder')" value="{$t.displayorder}" class="displayorder form-control input-sm input-inline input-mini"> </td>
|
||||
<td class="hidden-mobile" style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('menu/use_edit', ['id'=>$t.id])}', 1);" class="badge badge-{if $t.hidden}no{else}yes{/if}"><i class="fa fa-{if $t.hidden}times{else}check{/if}"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
{if $menu_level==1}
|
||||
<a href="javascript:;" class="menu-tree-toggle menu-tree-toggle-l1" data-top-id="{$t.id}"><i class="fa fa-caret-right"></i></a>
|
||||
{elseif $has_l3_child}
|
||||
<a href="javascript:;" class="menu-tree-toggle menu-tree-toggle-l2" data-parent-id="{$t.id}"><i class="fa fa-caret-right"></i></a>
|
||||
{/if}
|
||||
{$t.spacer} <a href="javascript:dr_iframe('edit', '{dr_url('menu/edit', ['id'=>$t.id])}', '600px');"><i class="{$t.icon}"></i> {dr_lang($t.name)} {if $t.uri} - {$t.uri}{/if}</a>
|
||||
</td>
|
||||
<td>
|
||||
{if $ci->_is_admin_auth('add') && ($t.pid == 0 || dr_in_array($t.pid, (array)$top))}<a href="javascript:dr_iframe('add', '{dr_url('menu/add', ['pid'=>$t.id])}', '600px', '{if !in_array($t.pid, $top)}500px{/if}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('添加')} </a>{/if}
|
||||
</td>
|
||||
{if dr_count($ci->site_info) > 1}
|
||||
<td>
|
||||
<label><a title="{$ci->site_info[1]['SITE_NAME']}" class="btn btn-xs dark" style="background-color:#3fa9e4;border-color:#3fa9e4"> {dr_lang('主站')} </a></label>
|
||||
{loop $t.site $b $sid}
|
||||
{if $sid > 1}
|
||||
<label id="dr_site_{$t.id}_{$sid}"><a href="javascript:dr_site_delete('{$t.id}', '{$sid}');" title="{$ci->site_info[$sid]['SITE_NAME']}" class="btn btn-xs {if $color[$b]}{$color[$b]}{else}default{/if}">{dr_strcut($ci->site_info[$sid]['SITE_NAME'], 4)} <i class="fa fa-times"></i> </a></label>
|
||||
{/if}
|
||||
{/loop}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<style>
|
||||
.menu-tree-toggle { display: inline-block; width: 14px; margin-right: 2px; color: #666; text-decoration: none; text-align: center; }
|
||||
.menu-tree-toggle:hover { color: #333; }
|
||||
.menu-row-l2 td { background-color: #fafbfc; }
|
||||
.menu-row-l3 td { background-color: #f5f7fa; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function dr_menu_tree_icon($toggle, open) {
|
||||
var $icon = $toggle.find('i');
|
||||
if (open) {
|
||||
$icon.removeClass('fa-caret-right').addClass('fa-caret-down');
|
||||
} else {
|
||||
$icon.removeClass('fa-caret-down').addClass('fa-caret-right');
|
||||
}
|
||||
}
|
||||
|
||||
function dr_menu_tree_init() {
|
||||
$('.menu-row-l2, .menu-row-l3').hide();
|
||||
$('.menu-row-top').each(function () {
|
||||
var topId = $(this).find('.menu-tree-toggle-l1').data('top-id');
|
||||
if (!$('.menu-row-l2.menu-row-top-' + topId).length) {
|
||||
$(this).find('.menu-tree-toggle-l1').hide();
|
||||
}
|
||||
});
|
||||
$('.menu-row-l2').each(function () {
|
||||
var parentId = $(this).attr('id').replace('dr_row_', '');
|
||||
if (!$('.menu-row-l3.menu-row-parent-' + parentId).length) {
|
||||
$(this).find('.menu-tree-toggle-l2').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
dr_menu_tree_init();
|
||||
|
||||
$(document).on('click', '.menu-tree-toggle-l1', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var topId = $(this).data('top-id');
|
||||
var $icon = $(this).find('i');
|
||||
var $l2 = $('.menu-row-l2.menu-row-top-' + topId);
|
||||
var $l3 = $('.menu-row-l3.menu-row-top-' + topId);
|
||||
if ($icon.hasClass('fa-caret-down')) {
|
||||
dr_menu_tree_icon($(this), 0);
|
||||
$l2.hide();
|
||||
$l3.hide();
|
||||
$l2.find('.menu-tree-toggle-l2 i').removeClass('fa-caret-down').addClass('fa-caret-right');
|
||||
} else {
|
||||
dr_menu_tree_icon($(this), 1);
|
||||
$l2.show();
|
||||
$l3.hide();
|
||||
$l2.find('.menu-tree-toggle-l2 i').removeClass('fa-caret-down').addClass('fa-caret-right');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.menu-tree-toggle-l2', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var parentId = $(this).data('parent-id');
|
||||
var $icon = $(this).find('i');
|
||||
var $l3 = $('.menu-row-l3.menu-row-parent-' + parentId);
|
||||
if ($icon.hasClass('fa-caret-down')) {
|
||||
dr_menu_tree_icon($(this), 0);
|
||||
$l3.hide();
|
||||
} else {
|
||||
dr_menu_tree_icon($(this), 1);
|
||||
$l3.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function dr_site_delete(id, sid) {
|
||||
{if !$ci->_is_admin_auth('del')}
|
||||
dr_tips(0, '{dr_lang('无权限删除')}');
|
||||
return;
|
||||
{/if}
|
||||
var index = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 10000
|
||||
});
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
cache: false,
|
||||
url: '{dr_url('menu/site_del')}&id='+id+'&sid='+sid,
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
layer.close(index);
|
||||
if (json.code == 1) {
|
||||
$('#dr_site_'+id+'_'+sid).hide();
|
||||
dr_tips(1, json.msg);
|
||||
} else {
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,75 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
{if $type}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('所属菜单')}</label>
|
||||
<div class="col-xs-8">
|
||||
<label>
|
||||
<input type="hidden" class="form-control" name="data[pid]" value="{$type}">
|
||||
<p class="form-control-static"> {$top[$type]['name']}</p>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('选择菜单')}</label>
|
||||
<div class="col-xs-8">
|
||||
<label>
|
||||
{$select}
|
||||
</label>
|
||||
<span class="help-block"> {dr_lang('添加菜单只能选择完整菜单中的菜单')} </span>
|
||||
<span class="help-block"> {dr_lang('权限设置继承于完整菜单的权限设置')} </span>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单名称')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_mark">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('标识字符')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_mark" name="data[mark]" value="{htmlspecialchars((string)$data.mark)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_icon">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单图标')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="dr_icon" type="text" name="data[icon]" value="{htmlspecialchars((string)$data.icon)}" />
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-success" href="{dr_url('api/icon')}" target="_blank"><i class="fa fa-arrow-right fa-fw" /></i> {dr_lang('查看')}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('排列顺序')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id="displayorder" class="form-control" name="data[displayorder]" value="{intval($data.displayorder)}">
|
||||
<span class="help-block"> {dr_lang('排序值由小到大排列,范围为0-255')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/fuelux/js/spinner.min.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#displayorder").TouchSpin({
|
||||
buttondown_class: "btn red",
|
||||
buttonup_class: "btn green",
|
||||
min: -255,
|
||||
max: 255
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,76 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('所属菜单')}</label>
|
||||
<div class="col-xs-8">
|
||||
<label>
|
||||
{$select}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单名称')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_mark" {if $type} style="display: none"{/if}>
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('标识字符')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_mark" name="data[mark]" value="{htmlspecialchars((string)$data.mark)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_icon">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('菜单图标')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="dr_icon" type="text" name="data[icon]" value="{htmlspecialchars((string)$data.icon)}" />
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-success" href="{dr_url('api/icon')}" target="_blank"><i class="fa fa-arrow-right fa-fw" /></i> {dr_lang('查看')}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $type}
|
||||
<div class="form-group" id="dr_row_uri">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('系统路径')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_uri" name="data[uri]" value="{htmlspecialchars((string)$data.uri)}">
|
||||
<span class="help-block">{dr_lang('格式为:模块目录名/控制器名/方法名,(不支持其他参数);如果不填写将不会对权限就行验证')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="dr_row_url">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('实际地址')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="dr_url" name="data[url]" value="{htmlspecialchars((string)$data.url)}">
|
||||
<span class="help-block">{dr_lang('如果不填写此地址时,会根据系统路径来生成地址')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('排列顺序')}</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id="displayorder" class="form-control" name="data[displayorder]" value="{intval($data.displayorder)}">
|
||||
<span class="help-block"> {dr_lang('排序值由小到大排列,范围为0-255')} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.css" rel="stylesheet" type="text/css" />
|
||||
<script src="{THEME_PATH}assets/global/plugins/fuelux/js/spinner.min.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#displayorder").TouchSpin({
|
||||
buttondown_class: "btn red",
|
||||
buttonup_class: "btn green",
|
||||
min: -255,
|
||||
max: 255
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,134 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('min_menu/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button></label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable table-clearfixdel">
|
||||
{else}
|
||||
<div class="table-scrollable">
|
||||
{/if} <table class="table table-striped table-bordered table-hover table-checkable dataTable">
|
||||
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th class="hidden-mobile" width="70" style="text-align:center"> {dr_lang('排序')} </th>
|
||||
<th class="hidden-mobile" width="60" style="text-align:center"> {dr_lang('可用')} </th>
|
||||
<th width="350"> {dr_lang('名称')} </th>
|
||||
<th>
|
||||
{if $ci->_is_admin_auth('add')}<a href="javascript:dr_iframe('add', '{dr_url('min_menu/add', ['pid'=>0])}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('添加')} </a>{/if}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $top=array();}
|
||||
{loop $data $t}
|
||||
{php $t.pid == 0 && $top[] = $t.id; $t.group = dr_string2array($t.group);$t.site = dr_string2array($t.site);}
|
||||
{php $menu_level = $t['pid'] == 0 ? 1 : (dr_in_array($t['pid'], (array)$top) ? 2 : 3); }
|
||||
{php $menu_top_id = $t['pid'] == 0 ? $t['id'] : (dr_in_array($t['pid'], (array)$top) ? $t['pid'] : $t['tid']); }
|
||||
<tr class="odd gradeX {if $menu_level==1}menu-row-top{else}menu-row-child menu-row-top-{$menu_top_id}{/if}" id="dr_row_{$t.id}" data-top-id="{$menu_top_id}" data-level="{$menu_level}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes checkboxes{$t.tid} checkboxes{$t.pid} group-checkable" data-set=".checkboxes{$t.id}" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="hidden-mobile" style="text-align:center"> <input type="text" onblur="dr_ajax_save(this.value, '{dr_url('min_menu/save_edit', ['id'=>$t.id])}', 'displayorder')" value="{$t.displayorder}" class="displayorder form-control input-sm input-inline input-mini"> </td>
|
||||
<td class="hidden-mobile" style="text-align:center">
|
||||
<a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('min_menu/use_edit', ['id'=>$t.id])}', 1);" class="badge badge-{if $t.hidden}no{else}yes{/if}"><i class="fa fa-{if $t.hidden}times{else}check{/if}"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
{if $menu_level==1}<a href="javascript:;" class="menu-tree-toggle" data-top-id="{$t.id}"><i class="fa fa-caret-right"></i></a>{/if}
|
||||
{$t.spacer} <a href="javascript:dr_iframe('edit', '{dr_url('min_menu/edit', ['id'=>$t.id])}', '600px');"><i class="{$t.icon}"></i> {dr_lang($t.name)}</a>
|
||||
</td>
|
||||
<td>
|
||||
{if $ci->_is_admin_auth('add') && $t.pid == 0}<a href="javascript:dr_iframe('add', '{dr_url('min_menu/add', ['pid'=>$t.id])}', '600px', '{if @in_array($t.pid, $top)}500px{/if}');" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('添加')} </a>{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<style>
|
||||
.menu-tree-toggle { display: inline-block; width: 14px; margin-right: 2px; color: #666; text-decoration: none; }
|
||||
.menu-tree-toggle:hover { color: #333; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.menu-row-top').each(function () {
|
||||
var topId = $(this).find('.menu-tree-toggle').data('top-id');
|
||||
var $rows = $('.menu-row-top-' + topId);
|
||||
if (!$rows.length) {
|
||||
$(this).find('.menu-tree-toggle').hide();
|
||||
} else {
|
||||
$rows.hide();
|
||||
}
|
||||
});
|
||||
$(document).on('click', '.menu-tree-toggle', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var topId = $(this).data('top-id');
|
||||
var $icon = $(this).find('i');
|
||||
var $rows = $('.menu-row-top-' + topId);
|
||||
if ($icon.hasClass('fa-caret-down')) {
|
||||
$icon.removeClass('fa-caret-down').addClass('fa-caret-right');
|
||||
$rows.hide();
|
||||
} else {
|
||||
$icon.removeClass('fa-caret-right').addClass('fa-caret-down');
|
||||
$rows.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function dr_delete(id, gid) {
|
||||
{if !$ci->_is_admin_auth('del')}
|
||||
dr_tips(0, '{dr_lang('无权限删除')}');
|
||||
return;
|
||||
{/if}
|
||||
var index = layer.load(2, {
|
||||
shade: [0.3,'#fff'], //0.1透明度的白色背景
|
||||
time: 10000
|
||||
});
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
cache: false,
|
||||
url: '{dr_url('min_menu/group_del')}&id='+id+'&gid='+gid,
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
layer.close(index);
|
||||
if (json.code == 1) {
|
||||
$('#dr_row_'+id+'_'+gid).hide();
|
||||
dr_tips(1, json.msg);
|
||||
} else {
|
||||
dr_tips(0, json.msg);
|
||||
}
|
||||
},
|
||||
error: function(HttpRequest, ajaxOptions, thrownError) {
|
||||
dr_ajax_alert_error(HttpRequest, this, thrownError);;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,38 @@
|
||||
{template "header.html"}
|
||||
<body>
|
||||
<div class="page-404-full-page">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 page-404">
|
||||
{if $mark==1}
|
||||
<div class="admin_msg number font-green-turquoise"> <i class="fa fa-check-circle-o"></i> </div>
|
||||
{else if $mark==2}
|
||||
<div class="admin_msg number font-blue" > <i class="fa fa-info-circle"></i> </div>
|
||||
{else}
|
||||
<div class="admin_msg number font-red"> <i class="fa fa-times-circle-o"></i> </div>
|
||||
{/if}
|
||||
<div class="details">
|
||||
<h4>{$msg}</h4>
|
||||
<p class="alert_btnleft">
|
||||
{if $url}
|
||||
<a href="{$url}" class="btn blue btn-outline">{dr_lang('即将跳转')}</a>
|
||||
<meta http-equiv="refresh" content="{$time}; url={$url}">
|
||||
{else}
|
||||
<a href="{$backurl}" class="btn {if $mark}blue{else}red{/if} btn-outline">{dr_lang('点击返回上一页')}</a>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('.page-bar').hide();
|
||||
//parent.$('.page-bar').hide();
|
||||
parent.$('.module-content-left').hide();
|
||||
parent.$('.module-content-right').addClass('page-content4');
|
||||
parent.$('.module-content-right').removeClass('page-content2');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,166 @@
|
||||
|
||||
<form class="form-horizontal " role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<table id="mytable" data-show-export="true"></table>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var table_name = '{$mytable_name}';
|
||||
{if defined("SYS_TABLE_ISFOOTER") && SYS_TABLE_ISFOOTER}
|
||||
// 批量按钮设置为下面
|
||||
var is_foot = true;
|
||||
$("#toolbar label").hide();
|
||||
$("#toolbar button").hide();
|
||||
{else}
|
||||
// 批量按钮设置为上面
|
||||
var is_foot = $('#toolbar label').hasClass('table_select_all') == true ? false : true;
|
||||
{/if}
|
||||
var table_ignoreColumn = {php echo dr_count($list_field)+1;};
|
||||
var page_id = {max(1,intval($_GET['page']))};
|
||||
var post_token = {{csrf_token()}: "{csrf_hash()}"};
|
||||
var mytable = {json_encode($mytable)};
|
||||
if (mytable.foot_tpl) {
|
||||
var field_columns = [{
|
||||
checkbox: true,
|
||||
footerFormatter: function stockNumFormatter(data) {
|
||||
return is_foot ? mytable.foot_tpl : '';
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
var field_columns = [];
|
||||
}
|
||||
|
||||
// 按自定义字段显示
|
||||
{loop $list_field $i $tt}
|
||||
field_columns.push({
|
||||
field: '{$i}',
|
||||
title: '{dr_lang($tt.name)}',
|
||||
align: '{if $tt.center}center{else}left{/if}',
|
||||
switchable: true,
|
||||
sortable: true,
|
||||
{if $tt.width}width: '{$tt.width}px',{/if}
|
||||
visible: true
|
||||
});
|
||||
{/list}
|
||||
// 记录右侧操作按钮
|
||||
if (mytable.link_tpl) {
|
||||
field_columns.push({
|
||||
field: 'link_tpl',
|
||||
title: '{dr_lang('操作')}',
|
||||
formatter: function formatter (value, row, index) {
|
||||
if (typeof row.link_tpl === "undefined") {
|
||||
var html = mytable.link_tpl;
|
||||
eval(mytable.link_var);
|
||||
return html;
|
||||
} else {
|
||||
return row.link_tpl;
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-table/bootstrap-table{if !IS_XRDEV}.min{/if}.js" type="text/javascript"></script>
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-table/tableExport{if !IS_XRDEV}.min{/if}.js" type="text/javascript"></script>
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" type="text/css" />
|
||||
{if is_file(ROOTPATH.'api/pdfmake/pdfmake.min.js')}
|
||||
<script type="text/javascript" src="{ROOT_URL}api/pdfmake/pdfmake.min.js"></script>
|
||||
<script type="text/javascript" src="{ROOT_URL}api/pdfmake/gbsn00lp_fonts.js"></script>
|
||||
<script type="text/javascript" src="{ROOT_URL}api/pdfmake/FileSaver.min.js"></script>
|
||||
{/if}
|
||||
{if $is_fixed_columns}
|
||||
<script src="{THEME_PATH}assets/global/plugins/bootstrap-table/bootstrap-table-fixed-columns.js" type="text/javascript"></script>
|
||||
<link href="{THEME_PATH}assets/global/plugins/bootstrap-table/bootstrap-table-fixed-columns.css" rel="stylesheet" type="text/css" />
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
$(function (){
|
||||
var $mytable = $('#mytable').bootstrapTable({
|
||||
url : "{dr_now_url()}&is_ajax=1",
|
||||
surl : "{dr_web_prefix(SELF)}?is_ajax=1",
|
||||
method: 'get',
|
||||
striped: true,
|
||||
toolbar:"#toolbar",
|
||||
totalField:"msg",
|
||||
dataField:"data",
|
||||
selectItemName:"ids[]",
|
||||
responsive: false,
|
||||
idField:"id",
|
||||
cache: false,
|
||||
fixedColumns: true, //固定列
|
||||
fixedRightNumber:1, //固定右侧列
|
||||
classes: "table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable ",
|
||||
queryParamsType: 'my',
|
||||
sidePagination: 'server',
|
||||
silent: true,
|
||||
showRefresh: {if $is_search && !$is_mobile}true{else}false{/if},
|
||||
showFullscreen: $('#table-search-tool-submit').hasClass('btn'),
|
||||
showToggle: true,
|
||||
showColumns: true,
|
||||
showExport: {if $is_show_export && $is_search && !$is_mobile}true{else}false{/if},
|
||||
uniqueid: "id",
|
||||
singleSelect: false,
|
||||
clickToSelect:false,
|
||||
sortName: "",
|
||||
sortOrder: "",
|
||||
pageSize: {$mytable_pagesize},
|
||||
pageNumber: page_id,
|
||||
pageList: "[{php echo $mytable_pagelist ? $mytable_pagelist : '10, 25, 50, 100, 200, 300'}]",
|
||||
{if !\Phpcmf\Service::IS_PC_USER()}
|
||||
paginationHAlign: 'center',
|
||||
paginationDetailHAlign: 'center',
|
||||
paginationSuccessivelySize: 0,
|
||||
paginationPagesBySide: 0,{/if}
|
||||
search: false,
|
||||
pagination: true,
|
||||
paginationShowPageGo: true,
|
||||
showFooter:is_foot ,
|
||||
exportTypes:['csv', 'txt', 'doc', 'excel'{if is_file(ROOTPATH.'api/pdfmake/pdfmake.min.js')}, 'pdf'{/if}],
|
||||
onPostBody:function () {
|
||||
//合并页脚
|
||||
if (is_foot && mytable.foot_tpl) {
|
||||
var footer_tbody = $('.fixed-table-body table tfoot');
|
||||
var footer_tr = footer_tbody.find('>tr');
|
||||
var footer_td = footer_tr.find('>th');
|
||||
var footer_td_1 = footer_td.eq(0);
|
||||
for(var i=1;i<footer_td.length;i++) {
|
||||
footer_td.eq(i).remove();
|
||||
}
|
||||
footer_td_1.attr('colspan', footer_td.length).show();
|
||||
} else {
|
||||
$('.fixed-table-body table tfoot').remove();
|
||||
}
|
||||
},
|
||||
onLoadSuccess: function onLoadSuccess(data) {
|
||||
$('[name="keyword"]').val(decodeURIComponent($('[name="keyword"]').val()));
|
||||
if (is_foot && mytable.foot_tpl) {
|
||||
var td_size = $('.fixed-table-body table tbody tr').length;
|
||||
var dp_size = $('.fixed-table-body table tfoot .dropdown-menu li').length;
|
||||
if (dp_size > td_size) {
|
||||
$('.fixed-table-body table tfoot .dropdown-menu').attr("style", "max-height: "+(40*td_size)+"px;overflow-y: scroll;");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
columns: field_columns,
|
||||
queryParams: function queryParams(params) {
|
||||
var temp = {
|
||||
page : params.pageNumber,
|
||||
pagesize : params.pageSize,
|
||||
order : params.sortName+' '+params.sortOrder,
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
});
|
||||
$("#table-search-tool-submit").click(function () {
|
||||
$('[name="keyword"]').val(encodeURIComponent($('[name="keyword"]').val()));
|
||||
$mytable.bootstrapTable('refresh');
|
||||
});
|
||||
$(".table-search-tool input").keydown(function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('[name="keyword"]').val(encodeURIComponent($('[name="keyword"]').val()));
|
||||
$mytable.bootstrapTable('refresh');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,136 @@
|
||||
{template "header.html"}
|
||||
|
||||
{template "api_list_date_search.html"}
|
||||
|
||||
<div class="note note-danger" id="table-search-tool">
|
||||
<div class="row table-search-tool">
|
||||
<form action="{SELF}" method="get">
|
||||
{dr_form_search_hidden()}
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<select name="field" class="form-control">
|
||||
{loop $field $t}
|
||||
<option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</label>
|
||||
<label><i class="fa fa-caret-right"></i></label>
|
||||
<label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<label>
|
||||
<div class="input-group input-medium date-picker input-daterange" data-date="" data-date-format="yyyy-mm-dd">
|
||||
<input type="text" class="form-control" value="{$param.date_form}" name="date_form">
|
||||
<span class="input-group-addon"> {dr_lang('到')} </span>
|
||||
<input type="text" class="form-control" value="{$param.date_to}" name="date_to">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<button type="submit" class="btn blue btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('notice/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('删除')}</button>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix hrb10"></div>
|
||||
{/if}
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="70" style="text-align:center">{dr_lang('类型')}</th>
|
||||
<th width="80" style="text-align:center">{dr_lang('状态')}</th>
|
||||
<th width="160">{dr_lang('申请时间')}</th>
|
||||
<th width="150">{dr_lang('申请人')}</th>
|
||||
<th>{dr_lang('内容')}</th>
|
||||
<th>{dr_lang('处理情况')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td style="text-align:center">
|
||||
{if $t.type =='system'}
|
||||
<span class="label label-sm label-danger">{dr_lang('系统')}</span>
|
||||
{else if $t.type =='content'}
|
||||
<span class="label label-sm label-warning">{dr_lang('内容')}</span>
|
||||
{else if $t.type =='app'}
|
||||
<span class="label label-sm label-info">{dr_lang('应用')}</span>
|
||||
{else if $t.type =='member'}
|
||||
<span class="label label-sm label-success">{dr_lang('会员')}</span>
|
||||
{else if $t.type =='pay'}
|
||||
<span class="label label-sm label-success">{dr_lang('支付')}</span>
|
||||
{else}
|
||||
<span class="label label-sm label-success">{dr_lang('系统')}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td style="text-align:center" title="{$t.uri}">{if $t.status ==0}
|
||||
<span class="label label-sm label-danger">{dr_lang('未处理')}</span>
|
||||
{else if $t.status ==1}
|
||||
<span class="label label-sm label-warning">{dr_lang('已查看')}</span>
|
||||
{else if $t.status ==2}
|
||||
<span class="label label-sm label-info">{dr_lang('处理中')}</span>
|
||||
{else if $t.status ==3}
|
||||
<span class="label label-sm label-success">{dr_lang('已完成')}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{dr_date($t.inputtime, NULL, 'red')}</td>
|
||||
<td>
|
||||
{if $t.uid}
|
||||
<a href="javascript:;" class="fc_member_show" member="{$t.username}">{dr_strcut($t.username, 10)}</a>
|
||||
{else}
|
||||
{dr_lang('系统')}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{dr_url('api/notice', array('id' => $t.id))}">{$t.msg}</a>
|
||||
</td>
|
||||
<td>
|
||||
{if $t.op_uid}
|
||||
{dr_date($t.updatetime, 'Y-m-d H:i:s ')}
|
||||
<a href="javascript:;" class="label label-sm label-info" member="{$t.op_username}">{dr_strcut($t.op_username, 10)}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table></div>
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
|
||||
<div class="col-md-12 fc-list-page">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,62 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="note note-danger">
|
||||
<p>
|
||||
<label><button type="button" onclick="dr_ajax_option('{dr_url('password_log/del')}', '{dr_lang('你确定要清空全部吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('清空全部')}</button></label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="right-card-box">
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-striped table-bordered table-hover dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
<th width="170">{dr_lang('时间')}</th>
|
||||
<th width="170">{dr_lang('账号')}</th>
|
||||
<th>{dr_lang('IP地址')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $list $id $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$id}">
|
||||
<td>{dr_date($t['time'])}</td>
|
||||
<td>{$t['username']}</td>
|
||||
<td>{if $t.message}{$t.message}{else}<a href="https://www.baidu.com/s?wd={$t['ip']}&action=xunruicms" target="_blank">{Ip::address($t['ip'])}</a> {str_replace(') ', ') ', $t.ip)} {/if}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 text-right">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function my_show(id) {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '{dr_lang("查看")}',
|
||||
scrollbar: false,
|
||||
resize: true,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
shade: 0,
|
||||
area: ['80%', '80%'],
|
||||
content: $('#my_show_'+id)
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.myp p {
|
||||
WORD-BREAK: break-all; WORD-WRAP: break-word;
|
||||
white-space: initial !important;
|
||||
}
|
||||
</style>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,73 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group" id="dr_row_name">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('名称')}</label>
|
||||
<div class="col-xs-7">
|
||||
<input type="text" class="form-control" id="dr_name" name="data[name]" value="{htmlspecialchars((string)$data.name)}">
|
||||
</div>
|
||||
</div>
|
||||
{if $id > 1 && IS_USE_MODULE}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('身份')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline">
|
||||
<input onclick="$('.dr_tgz').hide()" type="radio" name="data[application][tid]" value="0" {if !$data['application']['tid']} checked{/if} > {dr_lang('管理者')}
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio mt-radio-outline">
|
||||
<input onclick="$('.dr_tgz').show()" type="radio" name="data[application][tid]" value="1" {if $data['application']['tid']} checked{/if}> {dr_lang('投稿者')}
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
<p class="help-block">{dr_lang('管理者:可管理全部用户的投稿内容')}</p>
|
||||
<p class="help-block">{dr_lang('投稿者:只能管理自己的投稿内容')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group dr_tgz" style="{if !$data['application']['tid']} display:none{/if}">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('审核')}</label>
|
||||
<div class="col-xs-8">
|
||||
<label>
|
||||
<select name="data[application][verify]" class="form-control">
|
||||
<option value="0">{dr_lang('不审核')}</option>
|
||||
{if IS_USE_MEMBER}
|
||||
{table table=admin_verify}
|
||||
<option {if $data['application']['verify'] == $t.id} selected{/if} value="{$t.id}">{dr_lang($t.name)}</option>
|
||||
{empty}
|
||||
<option {if $data['application']['verify'] == 1} selected{/if} value="1">{dr_lang('启用审核')}</option>
|
||||
{/empty}
|
||||
{/if}
|
||||
</select>
|
||||
</label>
|
||||
<p class="help-block">{dr_lang('发布或修改模块内容时需要通过管理员审核')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<input type="hidden" name="data[application][tid]" value="0" />
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label ajax_name">{dr_lang('模式')}</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline">
|
||||
<input type="radio" name="data[application][mode]" value="0" {if !$data['application']['mode']} checked{/if} > {dr_lang('允许使用简化模式')}
|
||||
<span></span>
|
||||
</label>
|
||||
{if $id != 1}
|
||||
<label class="mt-radio mt-radio-outline">
|
||||
<input type="radio" name="data[application][mode]" value="1" {if $data['application']['mode']} checked{/if}> {dr_lang('强制使用简化模式')}
|
||||
<span></span>
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
<p class="help-block">{dr_lang('简化模式只具备部分可操作的功能,适用于非专业人士使用')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,161 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
|
||||
{$form}
|
||||
<div class="portlet bordered light myfbody">
|
||||
<div class="portlet-title tabbable-line">
|
||||
<ul class="nav nav-tabs" style="float:left;">
|
||||
<li class="{if $page==0}active{/if}">
|
||||
<a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-list-alt"></i> {dr_lang('菜单权限')} </a>
|
||||
</li>
|
||||
{if $module_auth}
|
||||
<li class="{if $page==1}active{/if}">
|
||||
<a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1');"> <i class="fa fa-th-large"></i> {dr_lang('内容权限')} </a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane {if $page==0}active{/if}" id="tab_0">
|
||||
|
||||
<table class="table table-striped table-bordered table-checkable">
|
||||
<thead>
|
||||
<tr style="background-color: #fbfcfd;">
|
||||
<th width="50" style="text-align:center"> Id </th>
|
||||
<th> {dr_lang('菜单名称')} </th>
|
||||
<th class="myselect" style="text-align:center;max-width: 40px!important;width: 40px!important">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="40" style="text-align:center"> {dr_lang('增')} </th>
|
||||
<th width="40" style="text-align:center"> {dr_lang('改')} </th>
|
||||
<th width="40" style="text-align:center"> {dr_lang('删')} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php $uris=[];}
|
||||
{loop $menu_data $t}
|
||||
<tr class="{if $t.pid==0} my_pid_menu2{/if} odd gradeX" id="dr_row_{$t.id}">
|
||||
|
||||
<td style="text-align:center">
|
||||
{$t.id}
|
||||
</td>
|
||||
<td>
|
||||
{$t.spacer} <i class="{$t.icon}"></i> {$t.name} {if $t.uri} - {$t.uri}{/if}
|
||||
</td>
|
||||
<td class="myselect" style="text-align:center;max-width: 40px!important;width: 40px!important">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes group-checkable menu{$t.pid} menu{$t.tid}" data-set="{if $t.uri}.zsg{$t.id}{else}.menu{$t.id}{/if}" name="data[mark][]" {if $t.mark && dr_in_array($t.mark, (array)$data.system.mark)}checked{/if} value="{$t.mark}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td style="text-align:center" class="myselect">
|
||||
{if $t.uri}
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes zsg{$t.id} menu{$t.pid} menu{$t.tid}" {if dr_in_array('add', (array)$data['system']['auth'][$t.uri])}checked{/if} name="data[auth][{$t.uri}][]" value="add" />
|
||||
<span></span>
|
||||
</label>
|
||||
{php $uris[]=$t.uri;}
|
||||
{/if}
|
||||
</td>
|
||||
<td style="text-align:center" class="myselect">
|
||||
{if $t.uri}
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes zsg{$t.id} menu{$t.pid} menu{$t.tid}" {if dr_in_array('edit', (array)$data['system']['auth'][$t.uri])}checked{/if} name="data[auth][{$t.uri}][]" value="edit" />
|
||||
<span></span>
|
||||
</label>
|
||||
{/if}
|
||||
</td>
|
||||
<td style="text-align:center" class="myselect">
|
||||
{if $t.uri}
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes zsg{$t.id} menu{$t.pid} menu{$t.tid}" {if dr_in_array('del', (array)$data['system']['auth'][$t.uri])}checked{/if} name="data[auth][{$t.uri}][]" value="del" />
|
||||
<span></span>
|
||||
</label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane {if $page==1}active{/if}" id="tab_1">
|
||||
{php $ikey=0;}
|
||||
{loop $module_auth $dir $t}
|
||||
<table class="table table-striped table-bordered table-hover table-checkable">
|
||||
<thead>
|
||||
<tr style="background-color: #fbfcfd;">
|
||||
<th width="50" style="text-align:center"> Id </th>
|
||||
<th> {$t.name}</th>
|
||||
<th width="50" class="myselect" style="text-align:center;max-width: 40px!important;width: 40px!important">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".menu_module_{$dir}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
<th width="50" style="text-align:center" class="myselect"> {dr_lang('增')} </th>
|
||||
<th width="50" style="text-align:center" class="myselect"> {dr_lang('改')} </th>
|
||||
<th width="50" style="text-align:center" class="myselect"> {dr_lang('删')} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $t.auth $uri $name}
|
||||
{if !dr_in_array($uri.'index', $uris)}
|
||||
{php $ikey++;}
|
||||
<tr class="odd gradeX">
|
||||
<td>
|
||||
{$ikey}
|
||||
</td>
|
||||
<td>
|
||||
{$name} - {$uri}index
|
||||
</td>
|
||||
<td style="text-align:center;max-width: 40px!important;width: 40px!important" class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes menu{md5($uri)} menu_module_{$dir}" {if dr_in_array($uri.'add', (array)$data.module)}checked{/if} name="module[{$uri}add]" value="{$uri.'add'}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="myselect" style="text-align:center">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes group-checkable menu_module_{$dir} menu{md5($uri)}" data-set=".menu{md5($uri)}" name="module[{$uri}index]" {if dr_in_array($uri.'index', (array)$data.module)}checked{/if} value="{$uri.'index'}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td style="text-align:center" class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes menu{md5($uri)} menu_module_{$dir}" {if dr_in_array($uri.'edit', (array)$data.module)}checked{/if} name="module[{$uri}edit]" value="{$uri.'edit'}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
<td style="text-align:center" class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="checkboxes menu{md5($uri)} menu_module_{$dir}" {if dr_in_array($uri.'del', (array)$data.module)}checked{/if} name="module[{$uri}del]" value="{$uri.'del'}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form myfooter">
|
||||
<div class="form-actions text-center">
|
||||
<button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn blue"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,33 @@
|
||||
{template "header.html"}
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[option][]" value="1" checked /> {dr_lang('项目权限')} <span></span></label>
|
||||
<label class="mt-checkbox mt-checkbox-outline"><input type="checkbox" name="data[option][]" value="2" checked /> {dr_lang('操作权限')} <span></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<select class="form-control" style="height: 200px" name="data[ids][]" multiple>
|
||||
{loop $role $t}
|
||||
{if $t.id > 1 && $t.id != $id}
|
||||
<option value="{$t.id}">{dr_lang($t.name)}</option>
|
||||
{/if}
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
{dr_lang('可以将本组的权限规则复制到其他组中去')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,86 @@
|
||||
{template "header.html"}
|
||||
|
||||
|
||||
<div class="right-card-box">
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{dr_form_hidden()}
|
||||
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<div class="bootstrap-table2">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<button type="button" onclick="dr_ajax_option('{dr_url('role/del')}', '{dr_lang('你确定要删除它们吗?')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> 删除</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix hrb10"></div>
|
||||
<div class="table-scrollable table-clearfix33">
|
||||
{else}
|
||||
<div class="table-scrollable">
|
||||
{/if}
|
||||
<table class="table table-striped table-bordered table-bordered2 table-hover table-checkable dataTable">
|
||||
<thead>
|
||||
<tr class="heading">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<th class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" class="group-checkable" data-set=".checkboxes" />
|
||||
<span></span>
|
||||
</label>
|
||||
</th>
|
||||
{/if}
|
||||
<th width="300"> {dr_lang('角色组')} </th>
|
||||
<th width="100" style="text-align:center"> {dr_lang('身份')} </th>
|
||||
{if IS_SITES}<th width="100" style="text-align:center"> {dr_lang('项目数')} </th>{/if}
|
||||
<th>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $data $t}
|
||||
<tr class="odd gradeX" id="dr_row_{$t.id}">
|
||||
{if $ci->_is_admin_auth('del')}
|
||||
<td class="myselect">
|
||||
<label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
|
||||
<input type="checkbox" {if $t.id==1}disabled{/if} class="checkboxes" name="ids[]" value="{$t.id}" />
|
||||
<span></span>
|
||||
</label>
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
{dr_lang($t.name)}
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a {if $ci->_is_admin_auth('edit')}href="{if $t.id>1}javascript:dr_iframe('{dr_lang('修改')}', '{dr_url('role/edit', ['id'=>$t.id])}', '500px', '80%');{else}javascript:;{/if}"{/if} class="badge {if $t.application.tid}badge-danger{else}badge-success{/if}">{if $t.application.tid}{dr_lang('投稿者')}{else}{dr_lang('管理者')}{/if}</a>
|
||||
</td>
|
||||
{if IS_SITES}
|
||||
<td style="text-align:center">
|
||||
<a {if $ci->_is_admin_auth('edit')}href="{if $t.id>1}javascript:dr_iframe('{dr_lang('项目权限')}', '{dr_url('role/site_edit', ['id'=>$t.id])}', '500px', '50%');{else}javascript:;{/if}"{/if} class="badge badge-success">{if $t.id>1}{count($t.site)}{else}{dr_lang('全部')}{/if}</a>
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
{if $ci->_is_admin_auth() && $t.id>1}
|
||||
<a href="{dr_url('role/auth_edit', ['id'=>$t.id])}" class="btn btn-xs dark"> <i class="fa fa-user-md"></i> {dr_lang('操作权限')} </a>
|
||||
{if IS_SITES}<a href="javascript:dr_iframe('{dr_lang('项目权限')}', '{dr_url('role/site_edit', ['id'=>$t.id])}', '500px', '80%', 'nogo');" class="btn btn-xs blue"> <i class="fa fa-cog"></i> {dr_lang('项目权限')}</a>{/if}
|
||||
{if IS_USE_MEMBER && IS_USE_MODULE && !$t.application.tid}<a href="javascript:dr_iframe('{dr_lang('审核权限')}', '{dr_url('role/verify_edit', ['id'=>$t.id])}', '500px', '80%', 'nogo');" class="btn btn-xs yellow"> <i class="fa fa-user"></i> {dr_lang('审核权限')}</a>{/if}
|
||||
<a onclick="dr_iframe('{dr_lang('复制')}', '{dr_url('role/copy_edit', ['id'=>$t.id])}')" class="btn red btn-xs"> <i class="fa fa-copy"></i> {dr_lang('同步到其他角色')}</a>
|
||||
{/if}
|
||||
{if $ci->_is_admin_auth('edit')}<a href="javascript:dr_iframe('edit', '{dr_url('role/edit', ['id'=>$t.id])}', '500px', '60%');" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{if $mypages}
|
||||
<div class="row fc-list-footer table-checkable ">
|
||||
<div class="col-md-12 fc-list-page">
|
||||
{$mypages}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,19 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
<div class="form-group" style="padding:0 30px;">
|
||||
<div class="mt-checkbox-list">
|
||||
{loop $ci->site_info $i $t}
|
||||
<label class="mt-table mt-checkbox mt-checkbox-outline">
|
||||
<input type="checkbox" {if dr_in_array($i, (array)$data['site'])}checked{/if} class="checkboxes" name="data[]" value="{$i}" />
|
||||
{$t['SITE_NAME']}
|
||||
<span></span>
|
||||
</label>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
@@ -0,0 +1,25 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body" style="padding: 0 10px">
|
||||
|
||||
{loop $verify $v}
|
||||
<?php $rs=dr_string2array($v.verify);?>
|
||||
<div class="form-group">
|
||||
<label>{$v.name}</label>
|
||||
<div class="mt-checkbox-inline">
|
||||
{loop $rs.role $i $arr}
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" {if dr_in_array($rid, $arr)} checked{/if} name="data[{$v.id}][]" value="{$i}"> {dr_lang('第%s次审核', $i)}
|
||||
<span></span>
|
||||
</label>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{template "footer.html"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user