ready v2.6.3

pull/141/head
icret 2022-05-23 00:05:09 +08:00
parent 5b1ff865b0
commit f95eb0dd87
11 changed files with 81 additions and 39 deletions

0
README.md Executable file → Normal file
View File

View File

@ -660,7 +660,6 @@ if (isset($_GET['recycle_reimg'])) {
</div>
</div>
</div>
<button type="button" class="btn btn-mini btn-primary" data-moveable="true" data-remote="/application/read_log.php?session=<?php echo md5($config['password'] . date('YMDH')); ?>" data-toggle="modal" data-scroll-inside="true" data-width="95%" data-height="768px" data-title="建议使用分辨率 ≥ 1366*768px" data-icon="info"><i class="icon icon-info" data-toggle="tooltip" title="最大读取壹佰万上传日志">当月日志</i></button>
<div class="form-group">
<input type="hidden" class="form-control" name="update" value="<?php echo date("Y-m-d H:i:s"); ?>" placeholder="隐藏的保存">
</div>
@ -1110,28 +1109,37 @@ if (isset($_GET['recycle_reimg'])) {
</form>
</div>
<div class="tab-pane fade" id="Content14">
<h5 class="header-dividing">文件管理 <small>Tinyfilemanager是由作者定制开发,非必要请勿替换</small></h5>
<a class="btn btn-mini btn-primary" href="/admin/manager.php?p=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
<h5 class="header-dividing">清理缓存 <small>已缓存: <?php echo getFileNumber(APP_ROOT . $config['path'] . 'thumbnails/') . '文件 | 占用' . getDistUsed(getDirectorySize(APP_ROOT . $config['path'] . 'thumbnails/')); ?></small></h5>
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<button type="submit" class="btn btn-mini btn-success" name="delDir" value="thumbnails/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
</form>
<h5 class="header-dividing">文件管理 <small>由作者定制,非必要请勿替换</small></h5>
<a class="btn btn-mini btn-primary" href="/admin/manager.php?p=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
<h5 class="header-dividing">上传日志 <small>需要在图床安全->开启上传日志</small></h5>
<form class="form-inline" action="../application/read_log.php" method="post" target="_blank">
<div class="form-group">
<label for="logDate" class="text-primary">选择月份: </label>
<input type="text" class="form-control logDate input-sm" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
<input type="hidden" class="form-control" name="pass" value="<?php echo md5($config['password'] . date('YMDH')); ?>" placeholder="隐藏的保存">
</div>
<button type="submit" class="btn btn-sm btn-primary">查看</button>
</form>
<h5 class="header-dividing">删除文件 <small>* 删除后不可恢复</small></h5>
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" target="_blank">
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" target="_blank" style="margin-bottom: 5px;">
<p id="delimgurl"></p>
<div class="form-group">
<label for="del" class="text-primary">删除单张图片文件: </label>
<label for="del" class="text-warning">删除单张图片文件: </label>
<input type="url" name="url_admin_inc" class="form-control input-sm" id="del" required="required" placeholder="请输入图片链接">
</div>
<button type="submit" class="btn btn-sm btn-primary" onClick="return confirm('确认要删除?\n* 删除文件后将无法恢复! ');">删除单文件</button>
<button type="submit" class="btn btn-sm btn-warning" onClick="return confirm('确认要删除?\n* 删除文件后将无法恢复! ');">删除</button>
</form>
<form class="form-inline" action="<?php $_SERVER['SCRIPT_NAME']; ?>" method="post">
<div class="form-group">
<label for="delDir" class="text-danger">删除指定日期文件: </label>
<input type="text" class="form-control form-date input-sm" name="delDir" value="<?php echo date('Y/m/d/'); ?>" readonly="">
<input type="text" class="form-control form-date input-sm" name="delDir" value="<?php echo date('Y/m/d/'); ?>" readonly>
</div>
<button type="submit" class="btn btn-sm btn-danger" onClick="return confirm('确认要删除?\n* 删除文件夹后将无法恢复! ');">删除文件夹</button>
<button type="submit" class="btn btn-sm btn-danger" onClick="return confirm('确认要删除?\n* 删除文件夹后将无法恢复! ');">删除</button>
</form>
</div>
</div>
@ -1204,6 +1212,7 @@ if (isset($_GET['recycle_reimg'])) {
//可以校验判断表单内容,true就是通过提交,false,阻止提交
return true;
}
// 动态显示要删除的图片
var oBtn = document.getElementById('del');
var oTi = document.getElementById('title');
@ -1230,6 +1239,21 @@ if (isset($_GET['recycle_reimg'])) {
endDate: new Date() // 只能选当前日期之前
});
// log日期选择
$(".logDate").datetimepicker({
format: 'yyyy-mm',
weekStart: 1,
autoclose: true,
startView: 3,
minView: 3,
forceParse: false,
language: 'zh-CN',
todayBtn: true,
todayHighlight: true,
endDate: new Date() // 只能选当前日期之前
});
// Token 数据表格
$('#myDataGrid').datagrid({
dataSource: {

View File

@ -12,20 +12,51 @@ if (!is_who_login('admin')) {
}
// 禁止直接访问
if (empty($_GET['session']) || $_GET['session'] !== md5($config['password'] . date('YMDH'))) exit;
if (empty($_POST['pass']) || $_POST['pass'] !== md5($config['password'] . date('YMDH'))) exit('No permission!');
require APP_ROOT . '/admin/logs/upload/' . date('Y-m') . '.php';
require_once APP_ROOT . '/application/header.php';
if (isset($_POST['logDate'])) {
$logFile = APP_ROOT . '/admin/logs/upload/' . $_POST['logDate'] . '.php';
} else {
$logFile = APP_ROOT . '/admin/logs/upload/' . date('Y-m') . '.php';
}
try {
if (is_file($logFile)) {
require_once $logFile;
} else {
throw new Exception('<div class="alert alert-info">日志文件不存在!<div>');
}
if (empty($logs)) {
throw new Exception('<div class="alert alert-info">没有上传日志!<div>');
}
} catch (Exception $e) {
echo $e->getMessage();
require_once APP_ROOT . '/application/footer.php';
exit;
}
?>
<div id="logs" class="datagrid table-bordered">
<div class="input-control search-box search-box-circle has-icon-left has-icon-right" id="searchboxExample2" style="margin-bottom: 10px;">
<input id="inputSearchExample2" type="search" class="form-control search-input input-sm" placeholder="日志搜索...">
<label for="inputSearchExample2" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
<a href="#" class="input-control-icon-right search-clear-btn"><i class="icon icon-remove"></i></a>
<div class="col-md-12" style="margin-bottom: 88px;">
<div id="logs" class="datagrid table-bordered">
<div class="input-control search-box search-box-circle has-icon-left has-icon-right" id="searchboxExample2" style="margin-bottom: 10px;">
<input id="inputSearchExample2" type="search" class="form-control search-input input-sm" placeholder="日志搜索...">
<label for="inputSearchExample2" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
<a href="#" class="input-control-icon-right search-clear-btn"><i class="icon icon-remove"></i></a>
</div>
<div class="datagrid-container"></div>
</div>
<div class="datagrid-container"></div>
<p class="text-muted" style="font-size:10px;"><i class="modal-icon icon-info"></i> 建议使用分辨率 1366*768px; 当前日志文件: <?php echo $logFile; ?></p>
</div>
<p class="text-muted" style="font-size:10px;">当前日志路径: /admin/logs/upload/<?php echo date('Y-m'); ?>.php</p>
<link href="<?php static_cdn(); ?>/public/static/zui/lib/datagrid/zui.datagrid.min.css" rel="stylesheet">
<script src="<?php static_cdn(); ?>/public/static/zui/lib/datagrid/zui.datagrid.min.js"></script>
<script>
// 更改页面布局
$(document).ready(function() {
$("body").removeClass("container").addClass("container-fixed-lg");
});
// logs 数据表格
$('#logs').datagrid({
dataSource: {
@ -107,7 +138,7 @@ require APP_ROOT . '/admin/logs/upload/' . date('Y-m') . '.php';
hoverCell: true,
showRowIndex: true,
responsive: true,
height: 640,
height: 666,
// ... 其他初始化选项
configs: {
R1: {
@ -122,10 +153,13 @@ require APP_ROOT . '/admin/logs/upload/' . date('Y-m') . '.php';
// 获取数据表格实例
var logMyDataGrid = $('#logs').data('zui.datagrid');
var myDate = new Date();
logMyDataGrid.showMessage(myDate.getFullYear() + '年' + (myDate.getMonth() + 1) + '月上传日志已加载...... ', 'primary', 2500);
// var myDate = new Date();
// logMyDataGrid.showMessage(myDate.getFullYear() + '年' + (myDate.getMonth() + 1) + '月上传日志已加载完毕...... ', 'primary', 2500);
logMyDataGrid.showMessage('上传日志已加载完毕...... ', 'primary', 2500);
// 按照 `name` 列降序排序
logMyDataGrid.sortBy('date', 'desc');
</script>
</script>
<?php
require_once APP_ROOT . '/application/footer.php';

View File

@ -1,16 +0,0 @@
<?php
/**
* 读取上传日志
*/
require_once __DIR__ . '/function.php';
// 非管理员不可访问!
if (!is_who_login('admin')) {
exit;
}
echo '<pre class="pre-scrollable bg-primary" style="font-size: 13px;">';
echo read_upload_logs();
echo '</pre>';

BIN
install/README/1305032567.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
install/README/2657944724.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 45 KiB

BIN
install/README/3053540273.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 170 KiB

BIN
install/README/674074848.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
install/README/chmod.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
install/README/info.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

0
install/README/log.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB