From bbfb384311283991b96313c0a862eb6c206dfeba Mon Sep 17 00:00:00 2001 From: icret Date: Sat, 2 Apr 2022 18:10:17 +0800 Subject: [PATCH] fix PHP8.0 --- README.md | 0 admin/admin.inc.php | 17 ++-- application/check_admin.inc.php | 4 +- application/function.php | 41 +++++--- application/list.php | 169 +++++++------------------------- config/api_key.php | 5 +- config/config.php | 0 i/.htaccess | 0 public/static/EasyImage.css | 92 +++++++++++++++++ 9 files changed, 168 insertions(+), 160 deletions(-) mode change 100755 => 100644 README.md mode change 100755 => 100644 config/config.php mode change 100755 => 100644 i/.htaccess create mode 100644 public/static/EasyImage.css diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/admin/admin.inc.php b/admin/admin.inc.php index badc443..f734e53 100644 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -67,7 +67,9 @@ if (isset($_GET['stop_token'])) { $stop_token = $_GET['stop_token']; $postArr = array( $stop_token => array( - 'id' => 0, 'expired' => time() + 'id' => 0, + 'expired' => time(), + 'add_time' => $tokenList[$stop_token]['add_time'] ) ); $new_config = array_replace($tokenList, $postArr); @@ -728,13 +730,14 @@ if (isset($_GET['recycle_reimg'])) { @@ -778,12 +781,12 @@ if (isset($_GET['recycle_reimg'])) { // 获取被隔离的文件 $cache_dir = APP_ROOT . $config['path'] . 'suspic/'; // cache目录 $cache_file = get_file_by_glob($cache_dir . '*.*'); // 获取所有文件 - @$cache_num = count($cache_file); // 统计目录文件个数 + $cache_num = count($cache_file); // 统计目录文件个数 for ($i = 0; $i < $cache_num and $i < 21; $i++) : // 循环输出文件 $file_cache_path = APP_ROOT . $config['path'] . 'suspic/' . $cache_file[$i]; // 图片绝对路径 $file_path = $config['path'] . 'suspic/' . $cache_file[$i]; // 图片相对路径 - @$file_size = getDistUsed(filesize($file_cache_path)); // 图片大小 - @$filen_name = $cache_file[$i]; // 图片名称 + $file_size = getDistUsed(filesize($file_cache_path)); // 图片大小 + $filen_name = $cache_file[$i]; // 图片名称 $url = $config['imgurl'] . $config['path'] . 'suspic/' . $cache_file[$i]; // 图片网络连接 $unlink_img = $config['domain'] . '/application/del.php?url=' . $url; // 图片删除连接 ?> diff --git a/application/check_admin.inc.php b/application/check_admin.inc.php index dcac8ad..6a0c48e 100644 --- a/application/check_admin.inc.php +++ b/application/check_admin.inc.php @@ -51,11 +51,11 @@ if (is_local($config['domain'])) { } // 检测监黄接口是否可以访问 -if ($configp['checkImg'] !== 0) { +if ($config['checkImg'] !== 0) { if ($config['checkImg'] == 1) { - if (!@IP_URL_Ping('api.moderatecontent.com', 80, 1)) { + if (!IP_URL_Ping('api.moderatecontent.com', 80, 1)) { echo ' diff --git a/config/api_key.php b/config/api_key.php index b6574a8..3d15dac 100644 --- a/config/api_key.php +++ b/config/api_key.php @@ -1,4 +1,4 @@ -Array @@ -16,6 +16,7 @@ $tokenList=Array '3e2246984b5047c25dcf08dc41c367b8'=>Array ( 'id'=>0, - 'expired'=>1645765606 + 'expired'=>1645765606, + 'add_time'=>1645722743 ) ); \ No newline at end of file diff --git a/config/config.php b/config/config.php old mode 100755 new mode 100644 diff --git a/i/.htaccess b/i/.htaccess old mode 100755 new mode 100644 diff --git a/public/static/EasyImage.css b/public/static/EasyImage.css new file mode 100644 index 0000000..300f1f1 --- /dev/null +++ b/public/static/EasyImage.css @@ -0,0 +1,92 @@ + /** 图片列表*/ + + @media screen and (min-width:960px) { + .listNum img { + width: 258px; + height: 258px; + } + } + + @media screen and (max-width:960px) { + .listNum img { + width: 358px; + height: 258px; + } + } + /** 返回顶部*/ + + * { + list-style: none; + border: 0; + } + + #rocket-to-top div { + left: 0; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + top: 0; + width: 110px; + } + + #rocket-to-top .level-2 { + background: url("../public/images/rocket_button_up.png") no-repeat scroll -149px 0 transparent; + display: none; + height: 250px; + opacity: 0; + z-index: 1; + } + + #rocket-to-top .level-3 { + background: none repeat scroll 0 0 transparent; + cursor: pointer; + display: block; + height: 150px; + z-index: 2; + } + + #rocket-to-top { + background: url("../public/images/rocket_button_up.png") no-repeat scroll 0 0 transparent; + cursor: default; + display: block; + height: 250px; + margin: -125px 0 0; + overflow: hidden; + padding: 0; + position: fixed; + right: 0; + top: 80%; + width: 110px; + z-index: 11; + } + + .cards { + padding-top: 0px; + padding-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + } + + .card { + box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px; + border-radius: 5px 5px 5px 5px; + } + + img { + cursor: pointer; + transition: all 0.8s; + } + + img:hover { + transform: scale(1.5); + position: relative; + z-index: 100; + } + + .bottom-bar { + width: 100%; + position: absolute; + bottom: -4px; + background-color: rgba(0, 0, 0, 0.2); + } \ No newline at end of file