mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-05 11:34:41 +00:00
uwuzu v1.3.6 new_planet
This commit is contained in:
@@ -213,28 +213,46 @@ $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;
|
||||
if(function_exists("disk_free_space")){
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$disk = true;
|
||||
$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 {
|
||||
$disk = true;
|
||||
$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;
|
||||
}
|
||||
if(function_exists("sys_getloadavg")){
|
||||
$loadAve = sys_getloadavg()[0];
|
||||
}else{
|
||||
$loadAve = null;
|
||||
}
|
||||
}
|
||||
|
||||
$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 = false;
|
||||
$diskFree = 5000;
|
||||
$diskUmari = 5000;
|
||||
$diskTotal = 10000;
|
||||
$disk_over90p = false;
|
||||
if(function_exists("sys_getloadavg")){
|
||||
$loadAve = sys_getloadavg()[0];
|
||||
}else{
|
||||
$disk_over90p = false;
|
||||
$loadAve = null;
|
||||
}
|
||||
|
||||
$loadAve = sys_getloadavg()[0];
|
||||
}
|
||||
|
||||
require('../logout/logout.php');
|
||||
@@ -250,7 +268,7 @@ require('../logout/logout.php');
|
||||
<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 htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8');?></title>
|
||||
<title>サーバー概要 - <?php echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false);?></title>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -274,32 +292,32 @@ require('../logout/logout.php');
|
||||
<!--(サーバーアイコン)-->
|
||||
<?php if( !empty($serversettings["serverinfo"]["server_head"]) ){ ?>
|
||||
<div class="serverhead">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_head"], ENT_QUOTES, 'UTF-8', false); ?>">
|
||||
</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 htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<img src="<?php echo htmlentities($serversettings["serverinfo"]["server_icon"], ENT_QUOTES, 'UTF-8', false); ?>">
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<!--(サーバーアイコンここまで)-->
|
||||
<p>サーバー名</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>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_name"], ENT_QUOTES, 'UTF-8', false); } ?></p>
|
||||
<hr>
|
||||
<p>サーバー紹介メッセージ</p>
|
||||
<p><?php $sinfo = explode("\n", $serverinfo); foreach ($sinfo as $info) { echo nl2br(htmlentities($info)); }?></p>
|
||||
<hr>
|
||||
<p>サーバー管理者の名前</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>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_admin"], ENT_QUOTES, 'UTF-8', false); } ?></p>
|
||||
<hr>
|
||||
<p>サーバーへのお問い合わせ用メールアドレス</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>
|
||||
<p><?php if( !empty(htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false)) ){ echo htmlentities($serversettings["serverinfo"]["server_admin_mailadds"], ENT_QUOTES, 'UTF-8', false); } ?></p>
|
||||
<hr>
|
||||
<p>統計情報</p>
|
||||
<div class="overview">
|
||||
@@ -324,17 +342,21 @@ require('../logout/logout.php');
|
||||
</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);">
|
||||
<?php if($disk == true){?>
|
||||
<?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>
|
||||
</div>
|
||||
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
|
||||
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
|
||||
<p>使用済み : <?php echo mb_to_gb($diskUmari)."GB/".mb_to_gb($diskTotal);?>GB<br>
|
||||
空き容量 : <?php echo mb_to_gb($diskFree);?>GB</p>
|
||||
<?php }else{?>
|
||||
<p>空き容量の取得ができませんでした。</p>
|
||||
<?php };?>
|
||||
<hr>
|
||||
<p>ロードアベレージ</p>
|
||||
<div class="p2">ロードアベレージはCPUのコア数と照らし合わせて活用してください。<br>
|
||||
|
||||
Reference in New Issue
Block a user