get disk space size

pull/276/head
qkqpttgf 2021-03-14 16:58:30 +08:00 committed by GitHub
parent 2850db0699
commit 3118222734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 10 deletions

View File

@ -859,7 +859,7 @@ function size_format($byte)
while (abs($byte) >= 1024) {
$byte = $byte / 1024;
$i++;
if ($i == 3) break;
if ($i == 4) break;
}
$units = array('B', 'KB', 'MB', 'GB', 'TB');
$ret = round($byte, 2);
@ -1296,13 +1296,20 @@ function EnvOpt($needUpdate = 0)
<td>' . getConfig('Driver', $disktag);
if ($diskok) $frame .= ' <a href="?AddDisk=' . get_class($disk_tmp) . '&disktag=' . $disktag . '&SelectDrive">' . getconstStr('ChangeDrivetype') . '</a>';
$frame .= '</td>
</tr>
';
</tr>';
if ($diskok) {
$frame .= '
<tr>
<td>diskSpace</td><td>' . $disk_tmp->getDiskSpace() . '</td>
</tr>';
foreach (extendShow_diskenv($disk_tmp) as $ext_env) {
$frame .= '<tr><td>' . $ext_env . '</td><td>' . getConfig($ext_env, $disktag) . '</td></tr>
';
$frame .= '
<tr>
<td>' . $ext_env . '</td>
<td>' . getConfig($ext_env, $disktag) . '</td>
</tr>';
}
$frame .= '
<form name="' . $disktag . '" action="" method="post">
<input type="hidden" name="disk" value="' . $disktag . '">';
@ -1657,7 +1664,7 @@ function EnvOpt($needUpdate = 0)
}
$html .= '
<style type="text/css">
.tabs td { padding: 7px; }
.tabs td { padding: 5px; }
</style>
<table border=0>
<tr class="tabs">';