From 3f024b0cf17bca14330c4b2fc7f86f3ffe375c19 Mon Sep 17 00:00:00 2001 From: brokenpoems Date: Sun, 17 Apr 2022 13:40:04 +0800 Subject: [PATCH] fix #3 --- Plugin.php | 24 ++-- inc/api/img/api.php | 12 +- inc/form.min.php | 239 --------------------------------------- static/js/app/as-tool.js | 34 ------ static/js/bg/b7.js | 4 +- 5 files changed, 18 insertions(+), 295 deletions(-) diff --git a/Plugin.php b/Plugin.php index 9142187..9ecc036 100644 --- a/Plugin.php +++ b/Plugin.php @@ -3,7 +3,7 @@ exit; } // 定义版本号 -defined($Cver,'20201015'); +define($Cver,'20201015'); // 插件设置模块 include 'inc/form.min.php'; @@ -167,7 +167,7 @@ public static function render(){ } /** - * 为header添加css文件 + *为header添加css文件 * @return void */ public static function header(){ @@ -195,7 +195,7 @@ public static function header(){ } /** - * 为footer添加js文件 + *为footer添加js文件 * @return void */ public static function footer(){ @@ -227,7 +227,7 @@ public static function footer(){ } /** - * 为后台header添加css文件 + *为后台header添加css文件 * @return void */ public static function A_Header(){ @@ -243,21 +243,13 @@ public static function A_Header(){ } /** - * 为后台footer添加js文件 + *为后台footer添加js文件 * @return void */ - public static function A_Footer(){ + public static function A_Footer(){ // 后台美化 PluginsFooter::AliceStyleAdmin(); - } - - /** - * 服务器状态信息 - * - */ - public static function AS_SERVER(){ - - // PluginsForm::SERVER(); - } + } + } diff --git a/inc/api/img/api.php b/inc/api/img/api.php index a050099..5407da8 100644 --- a/inc/api/img/api.php +++ b/inc/api/img/api.php @@ -47,11 +47,14 @@ function GetPageUrl(){ $fs = fopen($file, "r"); - while (!feof($fs)) { - + while(!feof($fs)){ + $line=trim(fgets($fs)); - if ($line!='') array_push($pics, $line); + if($line!=''){ + + array_push($pics, $line); + } } // 从数组随机获取链接 @@ -64,11 +67,12 @@ function GetPageUrl(){ // JSON返回 case 'json': - + header('Content-type:text/json'); die(json_encode(['pic'=>$pic])); default: + die(header("Location: $pic")); } } diff --git a/inc/form.min.php b/inc/form.min.php index ba932dc..b5f8ec2 100644 --- a/inc/form.min.php +++ b/inc/form.min.php @@ -86,7 +86,6 @@ static function GetDBFlie(){ 'b7.js' => '磁感线', 'b8.js' => '互动星空', 'b9.js' => '旋转星空', - 'c1.js' => '灵魂拷问' ]; return $list; @@ -309,243 +308,5 @@ static function RandomImg(){ return $result; } - -// // 服务器信息 -// static function SERVER(){ - -// // 插件所在位置的路径信息 -// $PluginPath = Helper::options()->pluginUrl.'/AliceStyle/'; - -// echo << -// - -// - -// -// HTML; -// } - // END } \ No newline at end of file diff --git a/static/js/app/as-tool.js b/static/js/app/as-tool.js index 210241c..b3bff80 100644 --- a/static/js/app/as-tool.js +++ b/static/js/app/as-tool.js @@ -172,37 +172,3 @@ function ClearCookie() { } } } - -//"2019/09/24" -function getCurDate() { - return new Date().toJSON().substr(0,10).replace(/-/g, '/'); -} - -//"2019-09-24" -function getCurDate() { - return new Date().toJSON().substr(0,10); -} - -//"18:20:06" -function getCurTime() { - return new Date().toTimeString().substr(0,8); -} - -//"2019/09/24 18:21:48" -function getCurDateTime(){ - var d = new Date(); - return d.toJSON().substr(0,10).replace(/-/g, '/') + ' ' + d.toTimeString().substr(0,8); -} - -//"2019-09-24 18:23:11" -function getCurDateTime(){ - var d = new Date(); - return d.toJSON().substr(0,10) + ' ' + d.toTimeString().substr(0,8); -} - - - - - - - diff --git a/static/js/bg/b7.js b/static/js/bg/b7.js index 19faa79..114017b 100644 --- a/static/js/bg/b7.js +++ b/static/js/bg/b7.js @@ -6,13 +6,13 @@ function async_load() { i.border = "0"; - // i.setAttribute("frameborder", "0", 0); + i.setAttribute("frameborder", "0", 0); i.width = "100px"; i.height = "20px"; - // document.getElementById("hub_iframe").appendChild(i); + document.getElementById("hub_iframe").appendChild(i); }