aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/admin/about/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
commit529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch)
tree8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/cms-special/admin/about/index.php
parent15e4724761c50b30803df1811a525c85058f70bf (diff)
downloadelectrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin/about/index.php')
-rw-r--r--Neutron-trunk/cms-special/admin/about/index.php116
1 files changed, 116 insertions, 0 deletions
diff --git a/Neutron-trunk/cms-special/admin/about/index.php b/Neutron-trunk/cms-special/admin/about/index.php
new file mode 100644
index 0000000..1551ff0
--- /dev/null
+++ b/Neutron-trunk/cms-special/admin/about/index.php
@@ -0,0 +1,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"; ?>