From 6777850e41c22cfc59bfa1fb3c463ce6bfa206d0 Mon Sep 17 00:00:00 2001 From: icret Date: Tue, 31 Jan 2023 01:27:41 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E4=BF=AE=E5=A4=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- admin/admin.inc.php | 18 ++++++++++++------ admin/chart.php | 4 ++-- application/class.version.php | 26 +++++++++++++------------- application/function.php | 6 +++--- application/history.php | 9 +++------ 6 files changed, 34 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 183e326..b5b91f4 100755 --- a/README.md +++ b/README.md @@ -232,7 +232,6 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 * 2023-01-31 v2.7.0 dev - - 增加上传历史记录 - 增加粘贴上传状态 - 增加广场非图片图标 @@ -242,6 +241,7 @@ $HTTP["url"] =~ "^/(i|public)/" { - 修复图片详细信息中随机图片排版混乱 - 替换访问生成缩略图代码 - 更新一些组件 +- 调整前端显示 - 优化代码 * 2023-01-21 v2.6.9 Happy New Year diff --git a/admin/admin.inc.php b/admin/admin.inc.php index ab51774..9747f7f 100755 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -1210,12 +1210,12 @@ if (isset($_GET['recycle_reimg'])) { - - - - - - + + + + + + '; - // 延时1s刷新 - Header("refresh:1;url=chart.php"); + // 延时2s刷新 + Header("refresh:2;url=chart.php"); } // 统计图表 // array_reverse($arr,true) 倒叙数组并保持键值关系 diff --git a/application/class.version.php b/application/class.version.php index 38eb231..9e4d32b 100755 --- a/application/class.version.php +++ b/application/class.version.php @@ -6,7 +6,7 @@ * 简单图床 EasyImage2.0 2021-5-10 14:17:25 */ -class getVerson +class getVersion { private $url; public function __construct($url) @@ -16,11 +16,11 @@ class getVerson public function readJson($name = 'tag_name') { - if (file_exists(__DIR__ . '/../admin/logs/verson/verson.json')) { - $file = fopen(__DIR__ . '/../admin/logs/verson/verson.json', 'r'); - $test = fread($file, filesize(__DIR__ . '/../admin/logs/verson/verson.json')); - $verson = json_decode($test, true); - return $verson[$name]; + if (file_exists(__DIR__ . '/../admin/logs/version/version.json')) { + $file = fopen(__DIR__ . '/../admin/logs/version/version.json', 'r'); + $test = fread($file, filesize(__DIR__ . '/../admin/logs/version/version.json')); + $version = json_decode($test, true); + return $version[$name]; fclose($file); } else { $this->downJson(); @@ -30,14 +30,14 @@ class getVerson public function downJson() { - if (!is_dir(__DIR__ . '/../admin/logs/verson/')) { - mkdir(__DIR__ . '/../admin/logs/verson/', 0755, true); + if (!is_dir(__DIR__ . '/../admin/logs/version/')) { + mkdir(__DIR__ . '/../admin/logs/version/', 0755, true); } - $verson = $this->geturl($this->url); - $verson = json_decode($verson, true); - $file = fopen(__DIR__ . '/../admin/logs/verson/verson.json', 'w+'); - fwrite($file, $verson); + $version = $this->geturl($this->url); + $version = json_decode($version, true); + $file = fopen(__DIR__ . '/../admin/logs/version/version.json', 'w+'); + fwrite($file, $version); fclose($file); } @@ -61,6 +61,6 @@ class getVerson /////////// TEST ///////// /* $url = "https://api.github.com/repositories/188228357/releases/latest"; -$test = new getVerson($url); +$test = new getVersion($url); echo $test->readJson(); */ \ No newline at end of file diff --git a/application/function.php b/application/function.php index 7868823..851625a 100755 --- a/application/function.php +++ b/application/function.php @@ -855,7 +855,7 @@ function getVersion($name = 'tag_name') require_once APP_ROOT . '/application/class.version.php'; // 获取版本地址 $url = "https://api.github.com/repositories/188228357/releases/latest"; - $getVersion = new getVerson($url); + $getVersion = new getVersion($url); $now = date('dH'); // 当前日期时间 $get_ver_day = array('1006', '2501'); // 检测日期的时间 @@ -1512,6 +1512,6 @@ function get_current_version($file = '/admin/version.php') if (is_file($file)) { return file_get_contents($file); } - - return 'No Verson File'; + + return 'No Version File'; } diff --git a/application/history.php b/application/history.php index b374591..30a3c17 100644 --- a/application/history.php +++ b/application/history.php @@ -19,12 +19,10 @@ include_once __DIR__ . "/header.php";