mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 03:24:41 +00:00
uwuzu v1.3.4 new_planet
This commit is contained in:
@@ -22,6 +22,11 @@ function createUniqId(){
|
||||
function random_code($length = 8){
|
||||
return substr(str_shuffle('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);
|
||||
}
|
||||
function mb_to_gb($megabyte){
|
||||
$n_mb = $megabyte / 1024;
|
||||
return round($n_mb, 1);
|
||||
}
|
||||
|
||||
|
||||
require('../db.php');
|
||||
|
||||
@@ -208,6 +213,30 @@ $count3 = $result3->num_rows;
|
||||
$result4 = $mysqli->query("SELECT userid FROM account WHERE sacinfo = 'bot'");
|
||||
$count4 = $result4->num_rows;
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$diskFree = (int) disk_free_space('C:') / 1024 / 1024;
|
||||
$diskTotal = (int) disk_total_space('C:') / 1024 / 1024;
|
||||
$diskUmari = $diskTotal - $diskFree;
|
||||
if ($diskFree / $diskTotal < 0.1) {
|
||||
$disk_over90p = true;
|
||||
}else{
|
||||
$disk_over90p = false;
|
||||
}
|
||||
|
||||
$loadAve = null;
|
||||
} else {
|
||||
$diskFree = (int) disk_free_space('/') / 1024 / 1024;
|
||||
$diskTotal = (int) disk_total_space('/') / 1024 / 1024;
|
||||
$diskUmari = $diskTotal - $diskFree;
|
||||
if ($diskFree / $diskTotal < 0.1) {
|
||||
$disk_over90p = true;
|
||||
}else{
|
||||
$disk_over90p = false;
|
||||
}
|
||||
|
||||
$loadAve = sys_getloadavg()[0];
|
||||
}
|
||||
|
||||
require('../logout/logout.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -215,13 +244,13 @@ require('../logout/logout.php');
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src="../js/jquery-min.js"></script>
|
||||
<script src="../js/unsupported.js"></script>
|
||||
<script src="../js/console_notice.js"></script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="apple-touch-icon" type="image/png" href="../favicon/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="../favicon/icon-192x192.png">
|
||||
<title>サーバー概要 - <?php echo htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
|
||||
<title>サーバー概要 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -245,32 +274,32 @@ require('../logout/logout.php');
|
||||
<!--(サーバーアイコン)-->
|
||||
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
|
||||
<div class="serverhead">
|
||||
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if( !empty($serversettings["serverinfo"]["server_icon"]) ){ ?>
|
||||
<div class="servericon">
|
||||
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
|
||||
<div class="up">
|
||||
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<img src="<?php echo htmlspecialchars($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<!--(サーバーアイコンここまで)-->
|
||||
<p>サーバー名</p>
|
||||
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<hr>
|
||||
<p>サーバー紹介メッセージ</p>
|
||||
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlspecialchars($info)); }?></p>
|
||||
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlentities($info)); }?></p>
|
||||
<hr>
|
||||
<p>サーバー管理者の名前</p>
|
||||
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<hr>
|
||||
<p>サーバーへのお問い合わせ用メールアドレス</p>
|
||||
<p><?php if( !empty(htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')) ){ echo htmlspecialchars($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8')) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8'); } ?></p>
|
||||
<hr>
|
||||
<p>統計情報</p>
|
||||
<div class="overview">
|
||||
@@ -293,6 +322,30 @@ require('../logout/logout.php');
|
||||
<p><?php echo htmlentities($count4);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<p>ディスク空き容量</p>
|
||||
<?php if($disk_over90p == true){?>
|
||||
<p class="errmsg">90%以上が使用済みです。<br>早急に容量拡張などの対応を考えてください!</p>
|
||||
<?php }else{?>
|
||||
<p>ディスク空き容量には余裕があります。</p>
|
||||
<?php };?>
|
||||
<div class="graph">
|
||||
<div class="per" style="width:calc(<?php echo round((int)mb_to_gb($diskUmari) / (int)mb_to_gb($diskTotal) * 100, 1);?>% - 8px);">
|
||||
</div>
|
||||
</div>
|
||||
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
|
||||
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
|
||||
<hr>
|
||||
<p>ロードアベレージ</p>
|
||||
<div class="p2">ロードアベレージはCPUのコア数と照らし合わせて活用してください。<br>
|
||||
"ロードアベレージ/CPUコア数"で計算をした時に1.0を超えると処理が重くなっています。<br>
|
||||
※Windows環境ではロードアベレージの取得はできません。</div>
|
||||
|
||||
<?php if(empty($loadAve)){?>
|
||||
<p>ロードアベレージの取得ができませんでした。</p>
|
||||
<?php }else{?>
|
||||
<p>過去1分間のロードアベレージ : <?php echo $loadAve?></p>
|
||||
<?php };?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -300,6 +353,7 @@ require('../logout/logout.php');
|
||||
|
||||
<?php require('../require/rightbox.php');?>
|
||||
<?php require('../require/botbox.php');?>
|
||||
<?php require('../require/noscript_modal.php');?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user