diff options
Diffstat (limited to 'admin/panes')
-rw-r--r-- | admin/panes/audit.php | 56 | ||||
-rw-r--r-- | admin/panes/denied.php | 62 | ||||
-rw-r--r-- | admin/panes/home.php | 36 | ||||
-rw-r--r-- | admin/panes/neutroning.php | 4 | ||||
-rw-r--r-- | admin/panes/quotas.php | 8 | ||||
-rw-r--r-- | admin/panes/telemetry.php | 26 | ||||
-rw-r--r-- | admin/panes/unchained.php | 16 | ||||
-rw-r--r-- | admin/panes/uptime.php | 21 | ||||
-rw-r--r-- | admin/panes/version.php | 26 |
9 files changed, 157 insertions, 98 deletions
diff --git a/admin/panes/audit.php b/admin/panes/audit.php index c2a8609..3292ec8 100644 --- a/admin/panes/audit.php +++ b/admin/panes/audit.php @@ -51,13 +51,13 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">Security Audit</h2>
+ <h2 style="text-align:center;"><?= l("Security Audit", "Audit de sécurité") ?></h2>
<table class="table table-hover">
<thead>
<tr>
- <th>IP address</th>
- <th>Connections</th>
- <th>Username(s)</th>
+ <th><?= l("IP address", "Adresse IP") ?></th>
+ <th><?= l("Connections", "Connexions") ?></th>
+ <th><?= l("Username(s)", "Nom(s) d'utilisateur") ?></th>
<th>Actions</th>
</tr>
</thead>
@@ -69,6 +69,16 @@ $dir = array_reverse($dir);
+ /** @var array $perms */
+ $viewFullIps = false;
+ foreach ($perms as $user => $uperms) {
+ if ($user === $_DATA['id']) {
+ if (in_array("addresses", $uperms)) {
+ $viewFullIps = true;
+ }
+ }
+ }
+
foreach ($dir as $file) {
if ($file !== "." && $file !== "..") {
if (substr($file, 0, 5) === "auth.") {
@@ -129,8 +139,24 @@ $index = 1;
foreach ($ips as $ip => $info) {
if ($ip !== "port") {
+ $pip = explode(".", $ip);
+
+ if ($viewFullIps) {
+ $rip = $ip;
+ } else {
+ if (strlen($pip[3]) === 3) $pip[3] = "xxx";
+ if (strlen($pip[3]) === 2) $pip[3] = "xx";
+ if (strlen($pip[3]) === 1) $pip[3] = "x";
+
+ if (strlen($pip[2]) === 3) $pip[2] = "xxx";
+ if (strlen($pip[2]) === 2) $pip[2] = "xx";
+ if (strlen($pip[2]) === 1) $pip[2] = "x";
+
+ $rip = implode(".", $pip);
+ }
+
echo("<tr>
- <td class='addr-location'><code>" . $ip . "</code><br><span id='iplocation-" . $ip . "'><span class='text-muted'>Please wait...</span></span>");?>
+ <td class='addr-location'><code>" . $rip . "</code><br><span id='iplocation-" . $ip . "'><span class='text-muted'>" . l("Please wait", "Patientez") . "...</span></span>");?>
<!--suppress JSUnresolvedVariable -->
<script>
@@ -145,7 +171,7 @@ </script>
<?php
if ($ip === $_SERVER['REMOTE_ADDR']) {
- echo(" <span class='badge text-primary border-primary' style='border:1px solid;vertical-align: middle;'>You</span>");
+ echo(" <span class='badge text-primary border-primary' style='border:1px solid;vertical-align: middle;'>" . l("You", "Vous") . "</span>");
}
echo("</td>
<td>");
@@ -166,27 +192,27 @@ }
}
if (count($info["connections"]) === 0) {
- echo("<span class='text-muted'>Never connected</span>");
+ echo("<span class='text-muted'>" . l("Never connected", "Jamais connecté") . "</span>");
} else {
- echo($success . " succeeded, " . $failed . " failed, " . $invalid . " invalid");
+ echo($success . " " . l("succeeded", "réussi") . ", " . $failed . " " . l("failed", "échoué") . ", " . $invalid . " " . l("invalid", "invalide"));
}
- echo("<br>Last: ");
+ echo("<br>" . l("Last", "Dernier ") . ": ");
if ($info["connections"][0]["status"] === "ok") {
- echo("<span class='badge text-success border-success' style='border:1px solid;vertical-align: middle;'>Succeeded</span>");
+ echo("<span class='badge text-success border-success' style='border:1px solid;vertical-align: middle;'>" . l("Succeeded", "Réussi") . "</span>");
}
if ($info["connections"][0]["status"] === "error") {
- echo("<span class='badge text-warning border-warning' style='border:1px solid;vertical-align: middle;'>Failed</span>");
+ echo("<span class='badge text-warning border-warning' style='border:1px solid;vertical-align: middle;'>" . l("Failed", "Échoué") . "</span>");
}
if ($info["connections"][0]["status"] === "invalid") {
- echo("<span class='badge text-danger border-danger' style='border:1px solid;vertical-align: middle;'>Invalid</span>");
+ echo("<span class='badge text-danger border-danger' style='border:1px solid;vertical-align: middle;'>" . l("Invalid", "Invalide") . "</span>");
}
echo("</td>
- <td class='users'><details><summary>Show full list</summary><ul class='list-group'>");
+ <td class='users'><details><summary>" . l("Show full list", "Afficher la liste") . "</summary><ul class='list-group'>");
$uniqueUsers = [];
$connectionsWithUsers = 0;
@@ -208,11 +234,11 @@ }
if (count($uniqueUsers) === 0) {
- echo("<li class='list-group-item text-muted'>Username was never sent to server</li>");
+ echo("<li class='list-group-item text-muted'>" . l("Username was never sent to server", "Le nom d'utilisateur n'a jamais été transmis au service") . "</li>");
}
echo("</ul></details></td></td>
- <td><a href='#'>Details</a> · <a href='https://cleantalk.org/blacklists/report-ip' target='_blank'>Report</a></td>
+ <td><a href='https://cleantalk.org/blacklists/report-ip' target='_blank'>" . l("Report as fraudulent", "Signaler comme fraude") . "</a></td>
</tr>");
$index++;
diff --git a/admin/panes/denied.php b/admin/panes/denied.php new file mode 100644 index 0000000..9a29fcb --- /dev/null +++ b/admin/panes/denied.php @@ -0,0 +1,62 @@ +<?php require $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php";/** @var array $_DATA */ ?>
+
+<style>
+ ::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ border-radius: 9999px;
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ background-color: rgba(136, 136, 136, 0.5);
+ transition: background 200ms;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(85, 85, 85, 0.75);
+ }
+
+ ::-webkit-scrollbar-thumb:active {
+ background-color: #222;
+ }
+
+ .list-group-item {
+ background: #34373c;
+ }
+
+ body {
+ background: #5f1b1b !important;
+ }
+</style>
+
+<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;display: flex;align-items:center;justify-content: center;height:100%;">
+ <div>
+ <p style="text-align: center;">
+ <!--suppress CheckImageSize -->
+ <img src="/static/admin/locked.svg" style="width:96px;filter:invert(1);">
+ </p>
+ <br>
+ <h2 style="text-align:center;"><?= l("Access is denied", "Accès refusé") ?></h2>
+
+ <h4 style="text-align:center;"><?= l("You don't have the", "Vous ne disposez pas de la permission") ?> <code>admin.<?= strip_tags($_GET['_'] ?? "*") ?></code><?= l(" permission, which is required to access this resource", ", qui est nécessaire pour accéder à ce contenu") ?>.</h4><br>
+
+ <div id="homebtn" style="text-align: center;width:max-content;margin-left:auto;margin-right:auto;">
+ <p class="btn-group">
+ <a onclick="window.parent.activity('activity-home', '/admin/panes/home.php', window.parent.document.getElementById('activity-home'));" class="btn btn-outline-light"><?= l("Home", "Accueil") ?></a>
+ </p>
+ </div>
+ <script>
+ if (window.parent === window) document.getElementById("homebtn").style.display = "none";
+ </script>
+
+ <small><p style="text-align: center;">
+ <?= l("If you believe this is an error", "Si vous pensez qu'il s'agit d'une erreur") ?>, <a href="/contact" target="_blank"><?= l("contact Minteck", "contactez Minteck") ?></a>
+ </p></small>
+ </div>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?>
\ No newline at end of file diff --git a/admin/panes/home.php b/admin/panes/home.php index fade996..3bc3429 100644 --- a/admin/panes/home.php +++ b/admin/panes/home.php @@ -30,28 +30,10 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">Welcome back <?= $_DATA["name"] ?>!</h2>
+ <h2 style="text-align:center;"><?= l("Welcome back", "Vous revoilà") ?> <?= $_DATA["name"] ?><?= l("", " ") ?>!</h2>
<ul class="list-group" style="margin-top:30px;">
<li class="list-group-item">
- <span id="temperature">Server running at <b><?php
-
- exec("sensors -j", $out);
- $outp = implode("\n", $out);
- $outd = json_decode($outp, true);
-
- echo(round($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"], 1));
-
- ?>°C</b>, <?php
-
- if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 90) {
- echo("completely overheating!");
- } else if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 60) {
- echo("starting to throttle!");
- } else {
- echo("under normal temperatures");
- }
-
- ?></span> <a href="#" onclick="window.parent.activity('activity-version', '/admin/panes/version.php', window.parent.document.getElementById('activity-version'));" style="float:right;">Manage...</a></li><li class="list-group-item"><b><?php
+ <span id="temperature"><?= l("Server running at", "Serveur fonctionnant à") ?> <b>--.-°C</b>, n/a</span> <a href="#" onclick="window.parent.activity('activity-version', '/admin/panes/version.php', window.parent.document.getElementById('activity-version'));" style="float:right;"><?= l("Manage", "Gérer") ?>...</a></li><li class="list-group-item"><b><?php
$uca = scandir("/mnt/blogchain/_posts");
$uct = [];
@@ -64,7 +46,7 @@ echo(count($uct));
- ?></b> UnchainedTech article·s, <?php
+ ?></b> <?= l("UnchainedTech article·s", "article·s sur UnchainedTech") ?>, <?php
$uca = scandir("/mnt/blogchain/_posts/_drafts");
$uct2 = [];
@@ -77,7 +59,7 @@ echo(count($uct2));
- ?> draft·s <a onclick="window.parent.activity('activity-unchained', '/admin/panes/unchained.php', window.parent.document.getElementById('activity-unchained'));" href="#" style="float:right;">Manage...</a></li>
+ ?> <?= l("draft·s", "brouillon·s") ?> <a onclick="window.parent.activity('activity-unchained', '/admin/panes/unchained.php', window.parent.document.getElementById('activity-unchained'));" href="#" style="float:right;"><?= l("Manage", "Gérer") ?>...</a></li>
<li class="list-group-item"><b><?php
$uca = scandir("/mnt/minteckrolt-cloud");
@@ -91,7 +73,7 @@ echo(count($uct3));
- ?></b> Neutron Cloud website·s <a onclick="window.parent.activity('activity-quotas', '/admin/panes/quotas.php', window.parent.document.getElementById('activity-quotas'));" href="#" style="float:right;">Manage...</a></li>
+ ?></b> <?= l("Neutron Cloud website·s", "site·s Neutron Cloud") ?> <a onclick="window.parent.activity('activity-quotas', '/admin/panes/quotas.php', window.parent.document.getElementById('activity-quotas'));" href="#" style="float:right;"><?= l("Manage", "Gérer") ?>...</a></li>
<li class="list-group-item"><b><?php
$uca = scandir("/mnt/kartik/online/private/stats");
@@ -105,18 +87,18 @@ echo(count($uct4));
- ?></b> Kartik Online player·s <a onclick="window.parent.activity('activity-kartik', '/admin/panes/kartik.php', window.parent.document.getElementById('activity-kartik'));" href="#" style="float:right;">Manage...</a></li>
- <li class="list-group-item">Using <b><?php
+ ?></b> <?= l("Kartik Online player·s", "joueurs·s Kartik Online") ?> <a onclick="window.parent.activity('activity-kartik', '/admin/panes/kartik.php', window.parent.document.getElementById('activity-kartik'));" href="#" style="float:right;"><?= l("Manage", "Gérer") ?>...</a></li>
+ <li class="list-group-item"><?= l("Using", "Utilisation de") ?> <b><?php
exec("df -h -x tmpfs -x squashfs -x devtmpfs --total -P", $outdisk);
$outn = explode(" ", preg_replace('/\s+/', ' ', $outdisk[count($outdisk) - 1]));
echo($outn[2] . "/" . $outn[1]);
- ?></b> on all disks, <b><?php
+ ?></b> <?= l("on all disks", "sur tous les disques") ?>, <b><?php
echo($outn[3]);
- ?></b> free <a onclick="window.parent.activity('activity-disk', '/admin/panes/disk.php', window.parent.document.getElementById('activity-disk'));" href="#" style="float:right;">Manage...</a></li>
+ ?></b> <?= l("free", "de libre") ?> <a onclick="window.parent.activity('activity-disk', '/admin/panes/disk.php', window.parent.document.getElementById('activity-disk'));" href="#" style="float:right;"><?= l("Manage", "Gérer") ?>...</a></li>
</ul>
<!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
<script>
diff --git a/admin/panes/neutroning.php b/admin/panes/neutroning.php index d8a73c5..07a64a6 100644 --- a/admin/panes/neutroning.php +++ b/admin/panes/neutroning.php @@ -30,9 +30,9 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">Neutron Cloud Map</h2>
+ <h2 style="text-align:center;"><?= l("Neutron Cloud Map", "Plan de Neutron Cloud") ?></h2>
- <h4 style="text-align:center;">Full map of all the websites that exists in Neutron Cloud</h4>
+ <h4 style="text-align:center;"><?= l("Full map of all the websites that exists in Neutron Cloud", "Plan complet de tous les sites Web qui existent dans Neutron Cloud") ?></h4>
<details open>
<summary>cloud.minteck.ro.lt</summary>
diff --git a/admin/panes/quotas.php b/admin/panes/quotas.php index 91b6899..8102a0d 100644 --- a/admin/panes/quotas.php +++ b/admin/panes/quotas.php @@ -30,13 +30,13 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">Neutron Cloud Quotas</h2>
+ <h2 style="text-align:center;"><?= l("Neutron Cloud Quotas", "Quotas de Neutron Cloud") ?></h2>
- <h4 style="text-align:center;">Websites that reached their limit can be locked down</h4>
+ <h4 style="text-align:center;"><?= l("Websites that reached their limit can be locked down", "Les sites Web qui ont atteint leur limite peuvent être bloqués") ?></h4>
<ul class="list-group" style="margin-top:20px;">
<?php $index=1;foreach (scandir("/mnt/minteckrolt-cloud") as $site): if (substr($site, 0, 1) === "~"): ?>
- <li class="list-group-item"><i><?= strip_tags(file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/data/webcontent/sitename")) ?></i> (<a href="https://cloud.minteck.ro.lt/<?= $site ?>" target="_blank"><code><?= $site ?></code></a>, X<?= file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/Tier") ?> Tier)<br><span class="text-muted" id="quota-<?= $index ?>">Calculating...</span><span style="float:right;"><a href="/admin/NeutronManage/?_=<?= $site ?>" target="_blank">Admin Panel</a></span><!--suppress JSUnresolvedVariable, JSUnresolvedFunction, JSUnfilteredForInLoop -->
+ <li class="list-group-item"><i><?= strip_tags(file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/data/webcontent/sitename")) ?></i> (<a href="https://cloud.minteck.ro.lt/<?= $site ?>" target="_blank"><code><?= $site ?></code></a>, <?= l("X", "Tier X") ?><?= trim(file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/Tier")) ?><?= l(" Tier", "") ?>)<br><span class="text-muted" id="quota-<?= $index ?>"><?= l("Calculating", "Calcul") ?>...</span><span style="float:right;"><a href="/admin/NeutronManage/?_=<?= $site ?>" target="_blank"><?= l("Admin Panel", "Espace d'administration") ?></a></span><!--suppress JSUnresolvedVariable, JSUnresolvedFunction, JSUnfilteredForInLoop -->
<script>
setTimeout(() => {
$.ajax("/admin/api/getQuota.php?_=<?= $site ?>", {
@@ -45,7 +45,7 @@ document.getElementById("quota-<?= $index ?>").innerHTML = data;
},
error: () => {
- document.getElementById("quota-<?= $index ?>").innerText = "Unable to calculate data usage";
+ document.getElementById("quota-<?= $index ?>").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
}
});
}, 1000 * <?= $index ?>)
diff --git a/admin/panes/telemetry.php b/admin/panes/telemetry.php index e87be24..3a589cc 100644 --- a/admin/panes/telemetry.php +++ b/admin/panes/telemetry.php @@ -50,12 +50,12 @@ function urlize($scheme) { </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">Telemetry Information</h2>
+ <h2 style="text-align:center;"><?= l("Telemetry Information", "Informations de télémétrie") ?></h2>
<?php $db = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/telemetry.json")); ?>
<ul class="list-group" style="margin-top:20px;">
- <li class="list-group-item">Lifetime Visitors <span style="float:right;"><?php
+ <li class="list-group-item"><?= l("Lifetime Visitors", "Visiteurs depuis toujours") ?> <span style="float:right;"><?php
$uniques = [];
@@ -76,7 +76,7 @@ function urlize($scheme) { echo (count($uniques));
?></span></li>
- <li class="list-group-item">Most Viewed Page <span style="float:right;"><?php
+ <li class="list-group-item"><?= l("Most Viewed Page", "Page la plus vue") ?> <span style="float:right;"><?php
$record = 0;
$recname = "-";
@@ -103,7 +103,7 @@ function urlize($scheme) { echo ($recname);
?></span></li>
- <li class="list-group-item">Least Viewed Page <span style="float:right;"><?php
+ <li class="list-group-item"><?= l("Least Viewed Page", "Page la moins vue") ?> <span style="float:right;"><?php
$record = 2;
$recname = "-";
@@ -133,7 +133,7 @@ function urlize($scheme) { </ul>
<ul class="list-group" style="margin-top:20px;">
- <li class="list-group-item text-muted">Tomorrow <span style="float:right;"><?php
+ <li class="list-group-item text-muted"><?= l("Tomorrow", "Demain") ?> <span style="float:right;"><?php
$uniques = [];
$totalDays = 0;
@@ -193,7 +193,7 @@ function urlize($scheme) { }
?></span></li>
- <li class="list-group-item">Today <span style="float:right;"><?php
+ <li class="list-group-item"><?= l("Today", "Aujourd'hui") ?> <span style="float:right;"><?php
$uniques = [];
@@ -253,7 +253,7 @@ function urlize($scheme) { }
?></span></li>
- <li class="list-group-item">Yesterday <span style="float:right;"><?php
+ <li class="list-group-item"><?= l("Yesterday", "Hier") ?> <span style="float:right;"><?php
$uniques = [];
@@ -873,19 +873,19 @@ function urlize($scheme) { <ul class="list-group">
<li class="list-group-item">
<details>
- <summary>Kartik downloads</summary>
+ <summary><?= l("Kartik downloads", "Téléchargements de Kartik") ?></summary>
<ul class="list-group">
- <li class="list-group-item"><b>All update channels <span style="float:right;"><?= (int)trim(file_get_contents("/mnt/kartik-cdn/stats/stable")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/eap")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/beta")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/nightly")) ?> downloads</span></b></li>
+ <li class="list-group-item"><b><?= l("All update channels", "Tous les canaux de mise à jour") ?> <span style="float:right;"><?= (int)trim(file_get_contents("/mnt/kartik-cdn/stats/stable")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/eap")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/beta")) + (int)trim(file_get_contents("/mnt/kartik-cdn/stats/nightly")) ?> downloads</span></b></li>
<li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo.png" width="24px"> Kartik Stable <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/stable")) ?> downloads</span></li>
- <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-eap.png" width="24px"> Kartik EAP <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/eap")) ?> downloads</span></li>
- <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-beta.png" width="24px"> Kartik Beta <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/beta")) ?> downloads</span></li>
- <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-nightly.png" width="24px"> Kartik Nightly <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/nightly")) ?> downloads</span></li>
+ <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-eap.png" width="24px"> Kartik EAP <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/eap")) ?> <?= l("downloads", "téléchargements") ?></span></li>
+ <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-beta.png" width="24px"> Kartik Beta <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/beta")) ?> <?= l("downloads", "téléchargements") ?></span></li>
+ <li class="list-group-item"><img alt="" src="https://github.com/Minteck-Projects/Kartik-Core/raw/trunk/logo/logo-nightly.png" width="24px"> Kartik Nightly <span style="float:right;"><?= trim(file_get_contents("/mnt/kartik-cdn/stats/nightly")) ?> <?= l("downloads", "téléchargements") ?></span></li>
</ul>
</details>
</li>
<li class="list-group-item">
<details>
- <summary>Page-specific statistics</summary>
+ <summary><?= l("Page-specific statistics", "Statistiques par page") ?></summary>
<p>
<?php
diff --git a/admin/panes/unchained.php b/admin/panes/unchained.php index 8f3133f..5f29406 100644 --- a/admin/panes/unchained.php +++ b/admin/panes/unchained.php @@ -36,19 +36,19 @@ <img src="/static/apps/unchainedtech.png" width="96px">
</p>
<br>
- <h2 style="text-align:center;">You already have access to UnchainedTech Admin</h2>
+ <h2 style="text-align:center;"><?= l("You already have access to UnchainedTech Admin", "Vous avez déjà accès à l'administration de UnchainedTech") ?></h2>
- <h4 style="text-align:center;">We automatically logged you into UnchainedTech Admin when you logged in to Minteck Admin</h4><br>
+ <h4 style="text-align:center;"><?= l("We automatically logged you into UnchainedTech Admin when you logged in to Minteck Cloud Admin Console", "Nous vous avons automatiquement connecté à l'administration d'UnchainedTech lorsque vous vous êtes connecté à Minteck Cloud Admin Console") ?></h4><br>
<div style="text-align: center;width:max-content;margin-left:auto;margin-right:auto;">
<p class="btn-group">
- <a href="https://unchainedtech.minteck.ro.lt/articles" target="_blank" class="btn btn-outline-light">All Articles</a>
- <a href="https://unchainedtech.minteck.ro.lt/admin" target="_blank" class="btn btn-outline-light">Admin Tasks</a>
+ <a href="https://unchainedtech.minteck.ro.lt/articles" target="_blank" class="btn btn-outline-light"><?= l("All Articles", "Tous les articles") ?></a>
+ <a href="https://unchainedtech.minteck.ro.lt/admin" target="_blank" class="btn btn-outline-light"><?= l("Admin Tasks", "Tâches d'administration") ?></a>
</p>
</div>
<small><p style="text-align: center;">
- v<?= trim(file_get_contents("/mnt/blogchain/version.txt")) ?> • <a href="#" onclick="document.getElementById('main').style.display='none';document.getElementById('secondary').style.display='';">Manage drafts</a>
+ v<?= trim(file_get_contents("/mnt/blogchain/version.txt")) ?> • <a href="#" onclick="document.getElementById('main').style.display='none';document.getElementById('secondary').style.display='';"><?= l("Manage drafts", "Gérer les brouillons") ?></a>
</p></small>
</div>
</div>
@@ -56,10 +56,10 @@ <div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;display:none;" id="secondary">
<div>
<h2 style="text-align:center;">UnchainedTech</h2>
- <h4 style="text-align:center;">Drafts List</h4>
+ <h4 style="text-align:center;"><?= l("Drafts List", "Liste des brouillons") ?></h4>
<small><p style="text-align: center;">
- v<?= trim(file_get_contents("/mnt/blogchain/version.txt")) ?> • <a href="#" onclick="document.getElementById('main').style.display='flex';document.getElementById('secondary').style.display='none';">Hide drafts list</a>
+ v<?= trim(file_get_contents("/mnt/blogchain/version.txt")) ?> • <a href="#" onclick="document.getElementById('main').style.display='flex';document.getElementById('secondary').style.display='none';"><?= l("Hide drafts list", "Masquer la liste des brouillons") ?></a>
</p></small>
<ul class="list-group">
@@ -69,7 +69,7 @@ foreach (scandir("/mnt/blogchain/_posts/_drafts") as $draft) {
if ($draft !== "." && $draft !== ".." && $draft !== ".gitkeep" && $draft !== "_template.md") {
$drafts = true;
- echo('<li class="list-group-item">' . substr($draft, 0, -3) . '<span style="float:right;"><a href="https://unchainedtech.minteck.ro.lt/admin/article/' . substr($draft, 0, -3) . '" target="_blank">Preview</a> · <a href="https://github.com/Minteck/UnchainedTech-Content/edit/production/_drafts/' . $draft . '" target="_blank">Edit</a> · <a href="https://github.com/Minteck/UnchainedTech-Content/delete/production/_drafts/' . $draft . '" target="_blank">Delete</a></span></li>');
+ echo('<li class="list-group-item">' . substr($draft, 0, -3) . '<span style="float:right;"><a href="https://unchainedtech.minteck.ro.lt/admin/article/' . substr($draft, 0, -3) . '" target="_blank">' . l("Preview", "Prévisualiser") . '</a> · <a href="https://github.com/Minteck/UnchainedTech-Content/edit/production/_drafts/' . $draft . '" target="_blank">' . l("Edit", "Modifier") . '</a> · <a href="https://github.com/Minteck/UnchainedTech-Content/delete/production/_drafts/' . $draft . '" target="_blank">' . l("Delete", "Supprimer") . '</a></span></li>');
}
}
diff --git a/admin/panes/uptime.php b/admin/panes/uptime.php index bc2a43e..f0d0e7c 100644 --- a/admin/panes/uptime.php +++ b/admin/panes/uptime.php @@ -30,20 +30,9 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">The server has been running for</h2>
+ <h2 style="text-align:center;"><?= l("The server has been running for", "Le serveur est en fonctionnement depuis") ?></h2>
- <h4 style="text-align:center;" id="uptime"><?php
-
- $str = @file_get_contents('/proc/uptime');
- $num = floatval($str);
- $secs = fmod($num, 60); $num = intdiv($num, 60);
- $mins = $num % 60; $num = intdiv($num, 60);
- $hours = $num % 24; $num = intdiv($num, 24);
- $days = $num;
-
- echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s")
-
- ?></h4>
+ <h4 style="text-align:center;" id="uptime">---</h4>
<!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
<script>
setInterval(() => {
@@ -65,10 +54,10 @@ $val = explode(" ", $data)[6];
echo($val);
- ?></b> of data has been collected to ensure easy system maintenance and audit
+ ?></b> <?= l("of data has been collected to ensure easy system maintenance and audit", "de données ont été recueillies pour faciliter la maintenance du système et les audits de sécurité") ?>
</li>
<li class="list-group-item" id="logsummary">
- Calculating...
+ Calcul en cours...
</li>
<!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
<script>
@@ -77,7 +66,7 @@ document.getElementById("logsummary").innerHTML = data;
},
error: () => {
- document.getElementById("logsummary").innerText = "An error occurred while loading this content";
+ document.getElementById("logsummary").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
}
});
</script>
diff --git a/admin/panes/version.php b/admin/panes/version.php index 10f1274..8642178 100644 --- a/admin/panes/version.php +++ b/admin/panes/version.php @@ -30,7 +30,7 @@ </style>
<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <h2 style="text-align:center;">This server is running <?= php_uname('s') ?> version</h2>
+ <h2 style="text-align:center;"><?= l("This server is running", "Ce serveur exécute") ?> <?= php_uname('s') ?> version</h2>
<h4 style="text-align:center;"><?= php_uname('r') . " " . php_uname('v') ?></h4>
@@ -38,7 +38,7 @@ <li class="list-group-item">PHP <?= PHP_VERSION ?></li>
<li class="list-group-item">Minteck's Space <?= trim(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/version.txt")) ?></li>
<li class="list-group-item">UnchainedTech <?= trim(file_get_contents("/mnt/blogchain/version.txt")) ?></li>
- <li class="list-group-item">Neutron Cloud <?= trim(file_get_contents("/mnt/minteckrolt-cloud/@BASE/source/api/version")) ?></li>
+ <li class="list-group-item">Neutron Cloud <?= trim(file_get_contents("/mnt/minteckrolt-cloud/@BASE/source/api/version")) ?> (<?= trim(file_get_contents("/mnt/minteckrolt-cloud/@BASE/source/api/codename")) ?>)</li>
<li class="list-group-item">Neutron Copper <?= trim(file_get_contents("/mnt/minteckrolt-cloud/@BASE/source/api/cyclic_version")) ?></li>
<li class="list-group-item">Neutron Titanium <?= trim(file_get_contents("/mnt/minteckrolt-cloud/@BASE/source/api/jaw_version")) ?></li>
<li class="list-group-item">
@@ -64,7 +64,7 @@ $soft = $_SERVER['SERVER_SOFTWARE'];
if (strpos(strtolower($soft), "apache") !== false) {
- echo("Apache HTTP Server");
+ echo(l("Apache HTTP Server", "Serveur HTTP Apache"));
} else {
echo("nginx");
}
@@ -83,13 +83,13 @@ </ul>
<ul class="list-group" style="margin-top:20px;">
- <li id="checking" class="list-group-item">Checking for updates...</li>
+ <li id="checking" class="list-group-item"><?= l("Checking for updates", "Recherche de mises à jour") ?>...</li>
<li id="checking2" class="list-group-item" style="display:none;"></li>
<li id="found" class="list-group-item" style="display:none;">
- <b id="updates-count">0</b> package·s have updates available
+ <b id="updates-count">0</b> <?= l("package·s have updates available", "paquet·s peuvent être mis à jour") ?>
<details>
- <summary>View details</summary>
+ <summary><?= l("View details", "Voir les détails") ?></summary>
<ul class="list-group" id="updates-list"></ul>
</details>
</li>
@@ -98,21 +98,21 @@ <script>
$.ajax("/admin/api/refreshUpdates.php", {
success: (data) => {
- document.getElementById("checking").innerText = "Checking for Ubuntu upgrades...";
+ document.getElementById("checking").innerText = "<?= l("Checking for Ubuntu upgrades", "Recherche de mises à niveau d'Ubuntu") ?>...";
$.ajax("/admin/api/getUbuntuUpgrades.php", {
success: (data) => {
document.getElementById("checking").innerHTML = data;
document.getElementById("checking2").style.display = "";
- document.getElementById("checking2").innerText = "Reading package lists...";
+ document.getElementById("checking2").innerText = "<?= l("Reading package lists", "Lecture des listes de paquets") ?>...";
$.ajax("/admin/api/getUpdates.php", {
success: (data) => {
- document.getElementById("checking2").innerText = "Please wait...";
+ document.getElementById("checking2").innerText = "<?= l("Please wait", "Patientez") ?>...";
document.getElementById("updates-count").innerText = data.count;
dom = "";
for (let index in data.packages) {
item = data.packages[index];
- dom += `<li class="list-group-item"><b>${item.name}</b> (<span style="color: orange;">${item.version.local}</span> → <span style="color: green;">${item.version.remote}</span>)<br>Provided by: <code>${item.repos}</code>, target architecture: <code>${item.architecture}</code></li>`
+ dom += `<li class="list-group-item"><b>${item.name}</b> (<span style="color: orange;">${item.version.local}</span> → <span style="color: green;">${item.version.remote}</span>)<br><?= l("Provided by", "Fourni par ") ?>: <code>${item.repos}</code>, <?= l("target architecture", "architecture cible ") ?>: <code>${item.architecture}</code></li>`
}
document.getElementById("updates-list").innerHTML = dom;
@@ -121,17 +121,17 @@ document.getElementById("found").style.display = "";
},
error: () => {
- document.getElementById("checking2").innerText = "An error occurred while loading this content";
+ document.getElementById("checking2").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
}
});
},
error: () => {
- document.getElementById("checking").innerText = "An error occurred while loading this content";
+ document.getElementById("checking").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
}
});
},
error: () => {
- document.getElementById("checking").innerText = "An error occurred while loading this content";
+ document.getElementById("checking").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
}
});
</script>
|