调整前端显示
parent
6021a30550
commit
e6cac01eda
|
@ -112,199 +112,200 @@ $allUploud = getFileNumber(APP_ROOT . $config['path'] . $allUploud);
|
|||
z-index: 11;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="col-md-12">
|
||||
<hr />
|
||||
<div class="col-md-8">
|
||||
<a href="list.php?<?php echo http_build_query($httpUrl); ?>"><span class="label label-info label-outline"> 当前<?php echo $allUploud; ?>张</span></a>
|
||||
<a href="list.php"><span class="label label-success label-outline">今日<?php echo read_total_json('todayUpload'); ?>张</span></a><a href="list.php?date=<?php echo date("Y/m/d/", strtotime("-1 day")) ?>"><span class="label label-danger label-outline">昨日<?php echo read_total_json('yestUpload'); ?>张</span></a>
|
||||
<?php for ($x = 2; $x <= 5; $x++) {
|
||||
/** 倒推日期显示上传图片 */ echo '<a href="list.php?date=' . date('Y/m/d/', strtotime("-{$x} day")) . '"> <span class="label label-danger label-outline"> ' . date('m月d日', strtotime("-{$x} day")) . '</span></a>';
|
||||
}
|
||||
if (is_online()) {
|
||||
echo '
|
||||
<div class="btn-group" style="padding:5px">
|
||||
<button class="btn btn-mini" type="button" onclick="opcheckboxed(\'checkbox\', \'checkall\')">全选</button>
|
||||
<button class="btn btn-mini" type="button" onclick="opcheckboxed(\'checkbox\', \'reversecheck\')">反选</button>
|
||||
<button class="btn btn-mini btn-primary" type="button" onclick="opcheckboxed(\'checkbox\', \'uncheckall\')">取消</button>
|
||||
<button class="btn btn-mini btn-danger" type="button" onclick="fun()">删除</button>
|
||||
<div class="btn-group">
|
||||
<a href="list.php?<?php echo http_build_query($httpUrl); ?>"><button class="btn btn-danger btn-mini">当前<?php echo $allUploud; ?>张</button></a>
|
||||
<a href="list.php"><button class="btn btn-primary btn-mini">今日<?php echo read_total_json('todayUpload'); ?>张</button></a>
|
||||
<a href="list.php?date=<?php echo date("Y/m/d/", strtotime("-1 day")) ?>"><button class="btn btn-mini">昨日<?php echo read_total_json('yestUpload'); ?>张</button></a>
|
||||
<?php
|
||||
for ($x = 2; $x <= 5; $x++) {
|
||||
// 倒推日期显示上传图片
|
||||
echo '<a href="list.php?date=' . date('Y/m/d/', strtotime("-{$x} day")) . '"> <button class="btn btn-mini">' . date('m月d日', strtotime("-{$x} day")) . '</button></a>';
|
||||
}
|
||||
echo '</div>';
|
||||
if (is_online()) {
|
||||
echo '
|
||||
<div class="btn-group" style="padding:5px">
|
||||
<button class="btn btn-mini" type="button" onclick="opcheckboxed(\'checkbox\', \'checkall\')">全选</button>
|
||||
<button class="btn btn-mini" type="button" onclick="opcheckboxed(\'checkbox\', \'reversecheck\')">反选</button>
|
||||
<button class="btn btn-mini btn-primary" type="button" onclick="opcheckboxed(\'checkbox\', \'uncheckall\')">取消</button>
|
||||
<button class="btn btn-mini btn-danger" type="button" onclick="fun()">删除</button>
|
||||
</div>';
|
||||
} ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form class="form-inline" action="list.php" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-date" value="<?php echo date('Y/m/d/'); ?>" name="date" readonly="readonly">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">按日期</button>
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form class="form-inline" action="list.php" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-date" value="<?php echo date('Y/m/d/'); ?>" name="date" readonly="readonly">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">按日期</button>
|
||||
</form>
|
||||
<!-- 返回顶部 -->
|
||||
<div style="display: none;" id="rocket-to-top">
|
||||
<div style="opacity:0;display: block;" class="level-2"></div>
|
||||
<div class="level-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 返回顶部 -->
|
||||
<div style="display: none;" id="rocket-to-top">
|
||||
<div style="opacity:0;display: block;" class="level-2"></div>
|
||||
<div class="level-3"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//viewjs
|
||||
var viewer = new Viewer(document.getElementById('dowebok'), {
|
||||
url: 'data-original',
|
||||
backdrop: true
|
||||
});
|
||||
<script>
|
||||
//viewjs
|
||||
var viewer = new Viewer(document.getElementById('dowebok'), {
|
||||
url: 'data-original',
|
||||
backdrop: true
|
||||
});
|
||||
|
||||
// 复制url
|
||||
var clipboard = new Clipboard('.copy');
|
||||
clipboard.on('success', function(e) {
|
||||
new $.zui.Messager("复制成功!", {
|
||||
type: "success" // 定义颜色主题
|
||||
}).show();
|
||||
// 复制url
|
||||
var clipboard = new Clipboard('.copy');
|
||||
clipboard.on('success', function(e) {
|
||||
new $.zui.Messager("复制成功!", {
|
||||
type: "success" // 定义颜色主题
|
||||
}).show();
|
||||
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
document.querySelector('.copy');
|
||||
new $.zui.Messager("复制失败!", {
|
||||
type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
});
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
document.querySelector('.copy');
|
||||
new $.zui.Messager("复制失败!", {
|
||||
type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
});
|
||||
|
||||
// 取消/全选文件
|
||||
function opcheckboxed(objName, type) {
|
||||
var objNameList = document.getElementsByName(objName);
|
||||
if (null != objNameList) {
|
||||
for (var i = 0; i < objNameList.length; i++) {
|
||||
if (objNameList[i].checked == true) {
|
||||
if (type != 'checkall') { // 非全选
|
||||
objNameList[i].checked = false;
|
||||
}
|
||||
} else {
|
||||
if (type != 'uncheckall') { // 非取消全选
|
||||
objNameList[i].checked = true;
|
||||
// 取消/全选文件
|
||||
function opcheckboxed(objName, type) {
|
||||
var objNameList = document.getElementsByName(objName);
|
||||
if (null != objNameList) {
|
||||
for (var i = 0; i < objNameList.length; i++) {
|
||||
if (objNameList[i].checked == true) {
|
||||
if (type != 'checkall') { // 非全选
|
||||
objNameList[i].checked = false;
|
||||
}
|
||||
} else {
|
||||
if (type != 'uncheckall') { // 非取消全选
|
||||
objNameList[i].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取所有的 checkbox 属性的 input标签
|
||||
function fun() {
|
||||
confirm('确认要删除?\n* 删除文件夹后将无法恢复!');
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'del_url_array': check_val
|
||||
},
|
||||
function(data) {
|
||||
if (data.search('success') > 0) {
|
||||
new $.zui.Messager("删除成功,请刷新浏览器;如果开启了CDN,请等待缓存失效!", {
|
||||
type: "success" // 定义颜色主题
|
||||
}).show();
|
||||
// 延时2秒刷新
|
||||
window.setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 1500)
|
||||
} else {
|
||||
new $.zui.Messager("文件不存在", {
|
||||
type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 返回顶部
|
||||
$(function() {
|
||||
var e = $("#rocket-to-top"),
|
||||
t = $(document).scrollTop(),
|
||||
n,
|
||||
r,
|
||||
i = !0;
|
||||
$(window).scroll(function() {
|
||||
var t = $(document).scrollTop();
|
||||
t == 0 ? e.css("background-position") == "0px 0px" ? e.fadeOut("slow") : i && (i = !1, $(".level-2").css("opacity", 1), e.delay(100).animate({
|
||||
marginTop: "-1000px"
|
||||
},
|
||||
"normal",
|
||||
function() {
|
||||
e.css({
|
||||
"margin-top": "-125px",
|
||||
display: "none"
|
||||
}),
|
||||
i = !0
|
||||
})) : e.fadeIn("slow")
|
||||
}),
|
||||
e.hover(function() {
|
||||
$(".level-2").stop(!0).animate({
|
||||
opacity: 1
|
||||
})
|
||||
//获取所有的 checkbox 属性的 input标签
|
||||
function fun() {
|
||||
confirm('确认要删除?\n* 删除文件夹后将无法恢复!');
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'del_url_array': check_val
|
||||
},
|
||||
function() {
|
||||
$(".level-2").stop(!0).animate({
|
||||
opacity: 0
|
||||
})
|
||||
}),
|
||||
$(".level-3").click(function() {
|
||||
function t() {
|
||||
var t = e.css("background-position");
|
||||
if (e.css("display") == "none" || i == 0) {
|
||||
clearInterval(n),
|
||||
e.css("background-position", "0px 0px");
|
||||
return
|
||||
function(data) {
|
||||
if (data.search('success') > 0) {
|
||||
new $.zui.Messager("删除成功,请刷新浏览器;如果开启了CDN,请等待缓存失效!", {
|
||||
type: "success" // 定义颜色主题
|
||||
}).show();
|
||||
// 延时2秒刷新
|
||||
window.setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 1500)
|
||||
} else {
|
||||
new $.zui.Messager("文件不存在", {
|
||||
type: "danger" // 定义颜色主题
|
||||
}).show();
|
||||
}
|
||||
switch (t) {
|
||||
case "0px 0px":
|
||||
e.css("background-position", "-298px 0px");
|
||||
break;
|
||||
case "-298px 0px":
|
||||
e.css("background-position", "-447px 0px");
|
||||
break;
|
||||
case "-447px 0px":
|
||||
e.css("background-position", "-596px 0px");
|
||||
break;
|
||||
case "-596px 0px":
|
||||
e.css("background-position", "-745px 0px");
|
||||
break;
|
||||
case "-745px 0px":
|
||||
e.css("background-position", "-298px 0px");
|
||||
}
|
||||
}
|
||||
if (!i) return;
|
||||
n = setInterval(t, 50),
|
||||
$("html,body").animate({
|
||||
scrollTop: 0
|
||||
},
|
||||
"slow");
|
||||
});
|
||||
});
|
||||
//懒加载
|
||||
var lazy = new Lazy({
|
||||
onload: function(elem) {
|
||||
console.log(elem)
|
||||
},
|
||||
delay: 300
|
||||
})
|
||||
|
||||
// 按日期浏览
|
||||
$(".form-date").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
todayHighlight: 1,
|
||||
startView: 2,
|
||||
minView: 2,
|
||||
forceParse: 0,
|
||||
format: "yyyy/mm/dd/"
|
||||
});
|
||||
// 更改网页标题
|
||||
document.title = "图床广场 今日上传<?php echo read_total_json('todayUpload'); ?>张 昨日<?php echo read_total_json('yestUpload'); ?>张 - <?php echo $config['title']; ?> "
|
||||
</script>
|
||||
<?php require_once APP_ROOT . '/application/footer.php';
|
||||
});
|
||||
}
|
||||
|
||||
// 返回顶部
|
||||
$(function() {
|
||||
var e = $("#rocket-to-top"),
|
||||
t = $(document).scrollTop(),
|
||||
n,
|
||||
r,
|
||||
i = !0;
|
||||
$(window).scroll(function() {
|
||||
var t = $(document).scrollTop();
|
||||
t == 0 ? e.css("background-position") == "0px 0px" ? e.fadeOut("slow") : i && (i = !1, $(".level-2").css("opacity", 1), e.delay(100).animate({
|
||||
marginTop: "-1000px"
|
||||
},
|
||||
"normal",
|
||||
function() {
|
||||
e.css({
|
||||
"margin-top": "-125px",
|
||||
display: "none"
|
||||
}),
|
||||
i = !0
|
||||
})) : e.fadeIn("slow")
|
||||
}),
|
||||
e.hover(function() {
|
||||
$(".level-2").stop(!0).animate({
|
||||
opacity: 1
|
||||
})
|
||||
},
|
||||
function() {
|
||||
$(".level-2").stop(!0).animate({
|
||||
opacity: 0
|
||||
})
|
||||
}),
|
||||
$(".level-3").click(function() {
|
||||
function t() {
|
||||
var t = e.css("background-position");
|
||||
if (e.css("display") == "none" || i == 0) {
|
||||
clearInterval(n),
|
||||
e.css("background-position", "0px 0px");
|
||||
return
|
||||
}
|
||||
switch (t) {
|
||||
case "0px 0px":
|
||||
e.css("background-position", "-298px 0px");
|
||||
break;
|
||||
case "-298px 0px":
|
||||
e.css("background-position", "-447px 0px");
|
||||
break;
|
||||
case "-447px 0px":
|
||||
e.css("background-position", "-596px 0px");
|
||||
break;
|
||||
case "-596px 0px":
|
||||
e.css("background-position", "-745px 0px");
|
||||
break;
|
||||
case "-745px 0px":
|
||||
e.css("background-position", "-298px 0px");
|
||||
}
|
||||
}
|
||||
if (!i) return;
|
||||
n = setInterval(t, 50),
|
||||
$("html,body").animate({
|
||||
scrollTop: 0
|
||||
},
|
||||
"slow");
|
||||
});
|
||||
});
|
||||
//懒加载
|
||||
var lazy = new Lazy({
|
||||
onload: function(elem) {
|
||||
console.log(elem)
|
||||
},
|
||||
delay: 300
|
||||
})
|
||||
|
||||
// 按日期浏览
|
||||
$(".form-date").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
autoclose: 1,
|
||||
todayHighlight: 1,
|
||||
startView: 2,
|
||||
minView: 2,
|
||||
forceParse: 0,
|
||||
format: "yyyy/mm/dd/"
|
||||
});
|
||||
// 更改网页标题
|
||||
document.title = "图床广场 今日上传<?php echo read_total_json('todayUpload'); ?>张 昨日<?php echo read_total_json('yestUpload'); ?>张 - <?php echo $config['title']; ?> "
|
||||
</script>
|
||||
<?php require_once APP_ROOT . '/application/footer.php';
|
||||
|
|
|
@ -67,12 +67,10 @@ $config=Array
|
|||
'checkImg_value'=>50,
|
||||
'upload_logs'=>1,
|
||||
'cache_freq'=>2,
|
||||
'version'=>'2.4.4',
|
||||
'version'=>'2.4.4 bate',
|
||||
'form'=>'',
|
||||
'TinyImag_key'=>'',
|
||||
'moderatecontent_key'=>'',
|
||||
'footer'=>'<a href="/admin/terms.php" target="_blank">请勿上传违反中国政策的图片</a>
|
||||
<i class="icon icon-smile"></i> <br/>',
|
||||
'imgRatio_save_headers'=>1,
|
||||
'imgRatio_value'=>10
|
||||
<i class="icon icon-smile"></i> <br/>'
|
||||
);
|
32
index.php
32
index.php
|
@ -45,29 +45,29 @@ mustLogin();
|
|||
<a href="#" data-target="#tab2Content5" data-toggle="tab">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" style="text-align:right">
|
||||
<div class="tab-content" style="text-align:right">
|
||||
<div class="tab-pane fade active in" id="tab2Content1">
|
||||
<textarea class="form-control" style="text-align: center;min-height: 100px;" id="links" readonly></textarea>
|
||||
<textarea class="form-control" rows="5" id="links" readonly></textarea>
|
||||
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-repeat"></i> 刷新</button>
|
||||
<button id="btnLinks" class="btn copyBtn1" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab2Content2">
|
||||
<textarea class="form-control" style="text-align: center;min-height: 100px;" id="bbscode" readonly></textarea>
|
||||
<textarea class="form-control" rows="5" id="bbscode" readonly></textarea>
|
||||
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-repeat"></i> 刷新</button>
|
||||
<button id="btnBbscode" class="btn copyBtn2" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab2Content3">
|
||||
<textarea class="form-control" style="text-align: center;min-height: 100px;" id="markdown" readonly></textarea>
|
||||
<textarea class="form-control" rows="5" id="markdown" readonly></textarea>
|
||||
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-repeat"></i> 刷新</button>
|
||||
<button id="btnMarkDown" class="btn copyBtn3" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab2Content4">
|
||||
<textarea class="form-control" style="text-align: center;min-height: 100px;" id="html" readonly></textarea>
|
||||
<textarea class="form-control" rows="5" id="html" readonly></textarea>
|
||||
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-repeat"></i> 刷新</button>
|
||||
<button id="btnHtml" class="btn copyBtn4" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab2Content5">
|
||||
<pre><textarea class="form-control" style="text-align: left;min-height: 100px;" id="del" readonly></textarea></pre>
|
||||
<pre><textarea class="form-control" rows="5" id="del" readonly></textarea></pre>
|
||||
<button class="btn" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-repeat"></i> 刷新</button>
|
||||
<button id="btndel" class="btn copyBtn5" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
||||
</div>
|
||||
|
@ -78,7 +78,7 @@ mustLogin();
|
|||
</div>
|
||||
</table>
|
||||
|
||||
<script src="<?php static_cdn();?>/public/static/EasyImage.js"></script>
|
||||
<script src="<?php static_cdn(); ?>/public/static/EasyImage.js"></script>
|
||||
<script src="<?php static_cdn(); ?>/public/static/zui/lib/uploader/zui.uploader.min.js?v1.9.2"></script>
|
||||
<script>
|
||||
$('#upShowID').uploader({
|
||||
|
@ -93,12 +93,20 @@ mustLogin();
|
|||
// 点击文件列表上传文件
|
||||
browseByClickList: true,
|
||||
// 预览图尺寸
|
||||
previewImageSize:{'width': 80, 'height': 80},
|
||||
previewImageSize: {
|
||||
'width': 80,
|
||||
'height': 80
|
||||
},
|
||||
// 上传格式过滤
|
||||
filters: { // 只允许上传图片或图标(.ico)
|
||||
mime_types: [
|
||||
{title: '图片',extensions:'<?php echo $config['extensions']; ?>'},
|
||||
{title: '图标',extensions: 'ico'}
|
||||
mime_types: [{
|
||||
title: '图片',
|
||||
extensions: '<?php echo $config['extensions']; ?>'
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
extensions: 'ico'
|
||||
}
|
||||
],
|
||||
prevent_duplicates: true
|
||||
},
|
||||
|
@ -107,7 +115,7 @@ mustLogin();
|
|||
// 自动上传失败的文件
|
||||
autoResetFails: true,
|
||||
<?php echo imgRatio(); ?>,
|
||||
responseHandler : function(responseObject, file) {
|
||||
responseHandler: function(responseObject, file) {
|
||||
|
||||
var obj = JSON.parse(responseObject.response); //由JSON字符串转换为JSON对象
|
||||
console.log(obj); // 输出log
|
||||
|
|
Loading…
Reference in New Issue