fix bug
parent
3f19610fe0
commit
a38fca1eb2
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
* API 页面管理
|
||||
* 快捷操作中心页面
|
||||
*/
|
||||
require_once '../application/header.php';
|
||||
require_once APP_ROOT . '/config/api_key.php';
|
||||
|
@ -45,22 +45,26 @@ if (isset($_GET['reimg'])) {
|
|||
}
|
||||
|
||||
// 统计图表
|
||||
// array_reverse($arr,true) 倒叙数组并保持键值关系
|
||||
$char_data = read_chart_total();
|
||||
|
||||
$chart_date = '';
|
||||
foreach ($char_data['date'] as $value) {
|
||||
if (is_array($char_data)) {
|
||||
$chart_date = '';
|
||||
foreach (array_reverse($char_data['date'], true) as $value) {
|
||||
$chart_date .= $value;
|
||||
}
|
||||
}
|
||||
$chart_date = str_replace(date('Y/'), '', $chart_date); // 删除年份
|
||||
|
||||
$chart_number = '';
|
||||
foreach ($char_data['number'] as $value) {
|
||||
$chart_number = '';
|
||||
foreach (array_reverse($char_data['number'], true) as $value) {
|
||||
$chart_number .= $value;
|
||||
}
|
||||
|
||||
$chart_disk = '';
|
||||
foreach (array_reverse($char_data['disk'], true) as $value) {
|
||||
$chart_disk .= $value;
|
||||
}
|
||||
}
|
||||
|
||||
$chart_disk = '';
|
||||
foreach ($char_data['disk'] as $value) {
|
||||
$chart_disk .= $value;
|
||||
}
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
|
@ -29,9 +29,9 @@ function getLatelyTime($type = '')
|
|||
return $result;
|
||||
}
|
||||
|
||||
$chart_total_fileName = 'total_chart_' . md5_file(APP_ROOT . '/config/config.php'); // 以config.php文件的md5命名
|
||||
$total_contents = APP_ROOT . $config['path']; // 获取用户自定义的上传目录
|
||||
$chart_total_file = $total_contents . 'cache/total_chart_' . $chart_total_fileName . '.php'; // 文件绝对目录
|
||||
$chart_total_fileName = 'total_chart_' . md5_file(APP_ROOT . '/config/config.php'); // 以config.php文件的md5命名
|
||||
$chart_total_file = $total_contents . 'cache/' . $chart_total_fileName . '.php'; // 文件绝对目录
|
||||
|
||||
function write_chart_total()
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ function read_chart_total()
|
|||
}
|
||||
}
|
||||
|
||||
return array('date' => $chart_data_date, 'number' => $chart_data_num, 'disk' => $chart_total_disk,'total_time'=>$chart_total_file['total_time']);
|
||||
return array('date' => $chart_data_date, 'number' => $chart_data_num, 'disk' => $chart_total_disk, 'total_time' => $chart_total_file['total_time']);
|
||||
}
|
||||
} else {
|
||||
write_chart_total();
|
||||
|
|
|
@ -25,10 +25,10 @@ if (!$config['showSwitch'] and !is_online()) {
|
|||
<div class="card">
|
||||
<img data-toggle="lightbox" data-image="' . back_cache_images($imgUrl) . '" src="../public/images/loading.svg" alt="简单图床-EasyImage">
|
||||
<div class="caption" style="color:#145ccd " >
|
||||
<label>选择<input type="checkbox" style="zoom:120%;" id="url" name="checkbox" value="' . $imgUrl . '"></label>
|
||||
<a href="' . $imgUrl . '" target="_blank"><i class="icon icon-picture" title="打开原图"></i></a>
|
||||
<a href="' . $config['domain'] . '/application/del.php?url=' . $imgUrl . '" target="_blank" title="删除文件"><i class="icon icon-trash"></i></a>
|
||||
<a data-clipboard-demo="" data-clipboard-action="copy" data-clipboard-text="' . $imgUrl . '" title="复制文件"><i class="icon icon-copy"></i></a>
|
||||
<a href="' . $imgUrl . '" target="_blank"><i class="icon icon-picture" title="打开原图"></i> </a>
|
||||
<a href="' . $config['domain'] . '/application/del.php?url=' . $imgUrl . '" target="_blank" title="删除文件"><i class="icon icon-trash"></i> </a>
|
||||
<a data-clipboard-demo="" data-clipboard-action="copy" data-clipboard-text="' . $imgUrl . '" title="复制文件"><i class="icon icon-copy"></i> </a>
|
||||
<label><input type="checkbox" style="zoom:120%;" id="url" name="checkbox" value="' . $imgUrl . '">选择</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue