Skip to content

Commit

Permalink
fix racns#3
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenpoems committed Apr 17, 2022
1 parent a91e663 commit 3f024b0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 295 deletions.
24 changes: 8 additions & 16 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exit;
}
// 定义版本号
defined($Cver,'20201015');
define($Cver,'20201015');

// 插件设置模块
include 'inc/form.min.php';
Expand Down Expand Up @@ -167,7 +167,7 @@ public static function render(){
}

/**
* 为header添加css文件
*为header添加css文件
* @return void
*/
public static function header(){
Expand Down Expand Up @@ -195,7 +195,7 @@ public static function header(){
}

/**
* 为footer添加js文件
*为footer添加js文件
* @return void
*/
public static function footer(){
Expand Down Expand Up @@ -227,7 +227,7 @@ public static function footer(){
}

/**
* 为后台header添加css文件
*为后台header添加css文件
* @return void
*/
public static function A_Header(){
Expand All @@ -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();
}
}

}
12 changes: 8 additions & 4 deletions inc/api/img/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

// 从数组随机获取链接
Expand All @@ -64,11 +67,12 @@ function GetPageUrl(){

// JSON返回
case 'json':

header('Content-type:text/json');
die(json_encode(['pic'=>$pic]));

default:

die(header("Location: $pic"));
}
}
Expand Down
239 changes: 0 additions & 239 deletions inc/form.min.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ static function GetDBFlie(){
'b7.js' => '磁感线',
'b8.js' => '互动星空',
'b9.js' => '旋转星空',
'c1.js' => '灵魂拷问'
];

return $list;
Expand Down Expand Up @@ -309,243 +308,5 @@ static function RandomImg(){

return $result;
}

// // 服务器信息
// static function SERVER(){

// // 插件所在位置的路径信息
// $PluginPath = Helper::options()->pluginUrl.'/AliceStyle/';

// echo <<<HTML
// <script src="{$PluginPath}static/libs/vue.min.js" ></script>
// <script src="{$PluginPath}static/libs/axios.min.js"></script>

// <ul class="nav navbar-nav hidden-sm">
// <li class="dropdown pos-stc">
// <a id="statistic_pane" data-status="false" href="#" data-toggle="dropdown" class="dropdown-toggle feathericons dropdown-toggle" aria-expanded="false">
// <svg t="1603788809476" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3943" width="18" height="18"><path d="M213.333333 85.333333h597.333334a85.333333 85.333333 0 0 1 85.333333 85.333334v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333333H213.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334z m256 85.333334a42.666667 42.666667 0 0 0 0 85.333333h213.333334a42.666667 42.666667 0 0 0 0-85.333333h-213.333334zM298.666667 256a42.666667 42.666667 0 1 0 0-85.333333 42.666667 42.666667 0 0 0 0 85.333333z" fill="#000000" opacity=".3" p-id="3944"></path><path d="M213.333333 384h597.333334a85.333333 85.333333 0 0 1 85.333333 85.333333v85.333334a85.333333 85.333333 0 0 1-85.333333 85.333333H213.333333a85.333333 85.333333 0 0 1-85.333333-85.333333v-85.333334a85.333333 85.333333 0 0 1 85.333333-85.333333z m256 85.333333a42.666667 42.666667 0 0 0 0 85.333334h213.333334a42.666667 42.666667 0 0 0 0-85.333334h-213.333334z m-170.666666 85.333334a42.666667 42.666667 0 1 0 0-85.333334 42.666667 42.666667 0 0 0 0 85.333334zM213.333333 682.666667h597.333334a85.333333 85.333333 0 0 1 85.333333 85.333333v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333334H213.333333a85.333333 85.333333 0 0 1-85.333333-85.333334v-85.333333a85.333333 85.333333 0 0 1 85.333333-85.333333z m256 85.333333a42.666667 42.666667 0 0 0 0 85.333333h213.333334a42.666667 42.666667 0 0 0 0-85.333333h-213.333334z m-170.666666 85.333333a42.666667 42.666667 0 1 0 0-85.333333 42.666667 42.666667 0 0 0 0 85.333333z" fill="#000000" p-id="3945"></path></svg>
// <span class="visible-xs-inline">服务器状态</span>
// <span class="caret"></span>
// </a>
// <div class="dropdown-menu wrapper w-full bg-white" id="AS-SERVER" v-if="UpdatePanel.data">
// <div class="row">
// <div class="col-sm-4">
// <div class="m-t-xs m-b-xs font-bold">运行状态</div>
// <div class>
// <span class="pull-right text-success" id="cpu">{{ SystemTotal.data.cpuRealUsed }}%</span>
// <span>CPU
// <span class="badge badge-sm bg-dark">{{ SystemTotal.data.cpuNum }}核处理器</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="cpu_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+SystemTotal.data.cpuRealUsed+'%'" data-original-title title></div>
// </div>
// <div class>
// <span class="pull-right text-success" id="memory">{{ ((SystemTotal.data.memRealUsed/SystemTotal.data.memTotal)*100).toFixed(2) }}%</span>
// <span>内存
// <span class="badge badge-sm bg-dark" id="memory_data">{{ SystemTotal.data.memRealUsed }}MB / {{ SystemTotal.data.memTotal }}MB</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="memory_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+ ((SystemTotal.data.memRealUsed/SystemTotal.data.memTotal)*100) +'%'" data-original-title title></div>
// </div>
// <div class>
// <span class="pull-right text-success" id="memCached">{{ ((SystemTotal.data.memCached/SystemTotal.data.memTotal)*100).toFixed(2) }}%</span>
// <span>缓存内存
// <span class="badge badge-sm bg-dark" id="memCached_data">{{ SystemTotal.data.memCached }}MB / {{ SystemTotal.data.memTotal }}MB</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="memCached_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+ ((SystemTotal.data.memCached/SystemTotal.data.memTotal)*100) +'%'" data-original-title title></div>
// </div>
// <div class>
// <span class="pull-right text-success" id="memBuffers">{{ ((SystemTotal.data.memBuffers/SystemTotal.data.memTotal)*100).toFixed(2) }}%</span>
// <span>缓冲内存
// <span class="badge badge-sm bg-dark" id="memBuffers_data">{{ SystemTotal.data.memBuffers }}MB / {{ SystemTotal.data.memTotal }}MB</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="memBuffers_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+ ((SystemTotal.data.memBuffers/SystemTotal.data.memTotal)*100) +'%'" data-original-title title></div>
// </div>
// <div class>
// <span class="pull-right text-success" id="disk">{{ DiskInfo.data[0].size[3] }}</span>
// <span>{{ DiskInfo.data[0].path }} 根磁盘
// <span class="badge badge-sm bg-dark" id="disk_data">{{ DiskInfo.data[0].size[2] }} / {{ DiskInfo.data[0].size[0] }}</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="disk_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+ (DiskInfo.data[0].size[3])" data-original-title title></div>
// </div>
// <div class>
// <span class="pull-right text-success" id="state_s">{{ NetWork.data.load.one }}%</span>
// <span>系统负载
// <span id="state">
// <span class="badge badge-sm bg-dark">{{ NetWork.data.load.one }}%</span>&nbsp;
// <span class="badge badge-sm bg-dark">{{ NetWork.data.load.five }}%</span>&nbsp;
// <span class="badge badge-sm bg-dark">{{ NetWork.data.load.fifteen }}%</span>&nbsp;</span></span>
// </div>
// <div class="progress progress-xs m-t-sm bg-default">
// <div id="state_css" class="progress-bar bg-success" data-toggle="tooltip" v-bind:style="'width:'+ NetWork.data.load.one +'%'" data-original-title title></div>
// </div>
// </div>
// <div class="col-sm-4 b-l b-light">
// <div class="m-t-xs m-b-xs font-bold">网络状态</div>
// <div class>
// <span class="pull-right text-default" id="io">
// <span class="badge badge-sm bg-dark">{{ NetWork.data.downPackets }}包/{{ NetWork.data.upPackets }}包</span>
// </span>
// <span>IO</span></div>
// <br>
// <div class>
// <span class="pull-right text-default" id="io1">
// <span class="badge badge-sm bg-dark">{{ NetWork.data.downTotal }}Bit/{{ NetWork.data.upTotal }}Bit</span>
// </span>
// <span>实时IO</span></div>
// <br>
// <div class>
// <span class="pull-right text-default" id="eth">
// <span class="badge badge-sm bg-dark">{{ NetWork.data.up }}K/S</span>
// </span>
// <span>上行流量</span></div>
// <br>
// <div class>
// <span class="pull-right text-default" id="eth1">
// <span class="badge badge-sm bg-dark">{{ NetWork.data.down }}K/S</span>
// </span>
// <span>下行流量</span>
// </div>
// <br>
// <div class>
// <span class="pull-right text-default" id="time">
// <span class="badge badge-sm bg-dark">{{ SystemTotal.data.system }}</span></span>
// <span>服务器系统</span></div>
// <br>
// <div class>
// <span class="pull-right text-default">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.soft_ware }}</span></span>
// <span>WEB服务器</span>
// </div><br>
// <div class>
// <span class="pull-right text-default">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.language }}</span></span>
// <span>服务语言</span>
// </div><br>
// <div class>
// <span class="pull-right text-default">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.php_ver }}</span></span>
// <span>PHP版本</span></div>
// <br></div>
// <div class="col-sm-4 b-l b-light">
// <div class="m-t-xs m-b-sm font-bold">访客信息</div>
// <div class>
// <span class="pull-right text-default" id="ip">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.user_ip }}</span></span>
// </span>
// <span>您的IP</span>
// </div><br>
// <div class>
// <span class="pull-right text-default" id="sys">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.user_system }}</span></span>
// </span>
// <span>您的设备</span>
// </div><br>
// <div class>
// <span class="pull-right text-default" id="b">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.user_browser }}</span></span>
// </span>
// <span>浏览器信息</span>
// </div><br>
// <div class>
// <span class="pull-right text-default" id="sys_times">
// <span class="badge badge-sm bg-dark">{{ getCurDateTime() }}</span></span>
// <span>您的设备时间</span>
// </div><br>
// <div class>
// <span class="pull-right text-default">
// <span class="badge badge-sm bg-dark">{{ SERVER.data.req_method }}</span></span>
// <span>请求方式</span>
// </div><br>
// <div class>
// <span class="pull-right text-default" id="u_time">
// <span class="badge badge-sm bg-dark">{{ SystemTotal.data.time }}</span></span>
// <span>持续运行</span>
// </div><br>
// <div class>
// <span class="pull-right text-default">
// <span class="badge badge-sm bg-dark">{{ SystemTotal.data.version }}</span></span>
// <span>面板版本</span>
// </div><br>
// <div class>
// <span class="pull-right text-default" id="address">
// <span class="badge badge-sm bg-dark">{{ (UpdatePanel.data.status == true) ? '有更新' : '无更新' }}</span></span>
// </span>
// <span>面板更新</span>
// </div>
// </div>
// </div>
// </div>
// </li>
// </ul>

// <script>

// let data = new Vue({

// el: '#AS-SERVER',

// data: {

// NetWork: [],
// SystemTotal: [],
// DiskInfo: [],
// SERVER: [],
// UpdatePanel: [],

// },

// mounted: function(){

// setInterval(()=>{

// axios.get('{$PluginPath}inc/bt/api.php?ask=GetNetWork').then((res) => {
// this.NetWork = res;
// }).catch(function(error){
// console.log(error);
// })

// axios.get('{$PluginPath}inc/bt/api.php?ask=GetSystemTotal').then((res) => {
// this.SystemTotal = res;
// }).catch(function(error){
// console.log(error);
// })

// axios.get('{$PluginPath}inc/bt/api.php?ask=GetDiskInfo').then((res) => {
// this.DiskInfo = res;
// }).catch(function(error){
// console.log(error);
// })

// axios.get('{$PluginPath}inc/bt/api.php?ask=UpdatePanel').then((res) => {
// this.UpdatePanel = res;
// }).catch(function(error){
// console.log(error);
// })

// axios.get('{$PluginPath}inc/bt/api.php?ask=SERVER').then((res) => {
// this.SERVER = res;
// }).catch(function(error){
// console.log(error);
// })

// },1000)

// },

// // END
// });

// function getCurDateTime(){
// var d = new Date();
// return d.toJSON().substr(0,10) + ' ' + d.toTimeString().substr(0,8);
// }
// </script>
// HTML;
// }

// END
}
34 changes: 0 additions & 34 deletions static/js/app/as-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}







Loading

0 comments on commit 3f024b0

Please sign in to comment.