1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
<?php $pageConfig = [ "domName" => "Mise à jour et sécurité", "headerName" => "Mise à jour et sécurité" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/precontent.php"; ?>
<?php
$currentVersionP = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version");
$currentVersion = $currentVersionP;
?>
<h3><?= $lang["admin-about"]["info"] ?></h3>
<ul><li>
<?php
echo("" . $lang['admin-about']['version']['prefix'] . " <b>" . $currentVersionP . "</b>");
echo("</li>");
$size = 0;
getData($_SERVER['DOCUMENT_ROOT']);
$sizestr = $size . " " . $lang["sizes"]["bytes"] . "";
if ($size > 1024) {
if ($size > 1048576) {
if ($size > 1073741824) {
$sizestr = round($size / 1073741824, 3) . " " . $lang["sizes"]["gibibytes"] . "";
} else {
$sizestr = round($size / 1048576, 3) . " " . $lang["sizes"]["mebibytes"] . "";
}
} else {
$sizestr = round($size / 1024, 3) . " " . $lang["sizes"]["kibibytes"] . "";
}
} else {
$sizestr = $size . " " . $lang["sizes"]["bytes"] . "";
}
echo("<li>" . $lang["admin-about"]["diskspace"][0] . " <b>" . $sizestr . "</b> " . $lang["admin-about"]["diskspace"][1] . "</li>");
?>
</ul>
<h3><?= $lang["admin-about"]["disk"] ?></h3>
<div id="storagebar" value="0" max="1"></div>
<span style="margin-left: 10px;"></span>
<?php
$globalSize = $size;
$size = 0;
getData($_SERVER['DOCUMENT_ROOT'] . "/api");
$mpcmsSize = $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/cms-special");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/widgets");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/css");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/fonts");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/image");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/js");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/lib");
$mpcmsSize = $mpcmsSize + $size;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/private");
$mpcmsSize = $mpcmsSize + $size;
$size = 0;
getData($_SERVER['DOCUMENT_ROOT'] . "/data");
$dataSize = $size;
$calSize = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json");
$confSize = filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widgets.json") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password") + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/footer");
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-notes-data")) {
$confSize = $confSize + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-notes-data");
}
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-contact-data")) {
$confSize = $confSize + filesize($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/widget-contact-data");
}
$size = 0;
getData($_SERVER['DOCUMENT_ROOT'] . "/resources/upload");
$resSize = $size;
$globalSize = $resSize + $mpcmsSize + $confSize + $dataSize + $calSize;
?>
<div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr;">
<span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#8bcf69;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['system'] ?> (<?= round(($mpcmsSize*100)/$globalSize, 2) ?>%)</span></span>
<span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#e6d450;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['config'] ?> (<?= round(($dataSize*100)/$globalSize, 2) ?>%)</span></span>
<span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:#cf82bf;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['resources'] ?> (<?= round(($resSize*100)/$globalSize, 2) ?>%)</span></span>
<span><span style="margin-right:5px;border-radius:999px;vertical-align:middle;background-color:gray;position:relative;width:15px;height:15px;display:inline-block;"></span><span style="margin-right:30px;"><?= $lang["admin-about"]["categories"]['misc'] ?></span></span>
</div>
<!-- <?= $globalSize - ($mpcmsSize + $dataSize + $resSize) ?>
<?= "<br>" ?>
<?= (($mpcmsSize + $dataSize + $resSize) * 100)/$globalSize ?> -->
<style>
#storagebar {
height: 12px;
width: calc(100% - 16px);
margin: 8px;
border-radius: 5px;
box-shadow: 0 5px 5px -5px #999 inset;
background-image: linear-gradient(
90deg,
#8bcf69 <?= round(($mpcmsSize*100)/$globalSize, 2) ?>%,
#e6d450 <?= round(($mpcmsSize*100)/$globalSize, 2) ?>%,
#e6d450 <?= round(($dataSize*100)/$globalSize, 2) ?>%,
#cf82bf <?= round(($dataSize*100)/$globalSize, 2) ?>%,
#cf82bf <?= round(($resSize*100)/$globalSize, 2) ?>%,
gray <?= round(($resSize*100)/$globalSize, 2) ?>%,
gray 100%
);
background-size: 100% 100%;
}
</style>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/postcontent.php"; ?>
|