diff options
author | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
commit | ef055e79855cf3be1ad5e1aa5f9ebad480062384 (patch) | |
tree | ff074b29a7a87c3ccfc3b10741bbe30cb28e103e /admin/panes/version.php | |
parent | e3a79df6428799024eac64e9cffbb062317aeb95 (diff) | |
download | main-trunk.tar.gz main-trunk.tar.bz2 main-trunk.zip |
Diffstat (limited to 'admin/panes/version.php')
-rw-r--r-- | admin/panes/version.php | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/admin/panes/version.php b/admin/panes/version.php deleted file mode 100644 index 8642178..0000000 --- a/admin/panes/version.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php require_once $_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;
- }
-</style>
-
-<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
- <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>
-
- <ul class="list-group" style="margin-top:20px;">
- <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")) ?> (<?= 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">
- <?php
-
- $osr = [];
- $lines = explode("\n", file_get_contents("/etc/os-release"));
-
- foreach ($lines as $line) {
- if (trim($line) !== "") {
- $parts = explode("=", $line);
- $osr[$parts[0]] = str_replace("\"", "", $parts[1]);
- }
- }
-
- echo($osr["NAME"] . " " . $osr["VERSION"]);
-
- ?>
- </li>
- <li class="list-group-item">Git <?php exec("git --version", $res);$p = explode(" ", $res[0]);array_shift($p);array_shift($p);echo(implode(" ", $p)) ?></li>
- <li class="list-group-item"><?php
-
- $soft = $_SERVER['SERVER_SOFTWARE'];
-
- if (strpos(strtolower($soft), "apache") !== false) {
- echo(l("Apache HTTP Server", "Serveur HTTP Apache"));
- } else {
- echo("nginx");
- }
-
- ?> <?php
-
- $soft = $_SERVER['SERVER_SOFTWARE'];
-
- if (strpos(strtolower($soft), "apache") !== false) {
- exec("apache2 -v", $res2);$p = explode(" ", $res2[0]);array_shift($p);array_shift($p);$p2 = explode("/", implode(" ", $p));array_shift($p2);echo(implode(" ", $p2));
- } else {
- exec("nginx -v", $res2);$p = explode(" ", $res2[0]);array_shift($p);array_shift($p);$p2 = explode("/", implode(" ", $p));array_shift($p2);echo(implode(" ", $p2));
- }
-
- ?></li>
- </ul>
-
- <ul class="list-group" style="margin-top:20px;">
- <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> <?= l("package·s have updates available", "paquet·s peuvent être mis à jour") ?>
-
- <details>
- <summary><?= l("View details", "Voir les détails") ?></summary>
- <ul class="list-group" id="updates-list"></ul>
- </details>
- </li>
- </ul>
- <!--suppress JSUnresolvedVariable, JSUnresolvedFunction, JSUnfilteredForInLoop -->
- <script>
- $.ajax("/admin/api/refreshUpdates.php", {
- success: (data) => {
- 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 = "<?= l("Reading package lists", "Lecture des listes de paquets") ?>...";
- $.ajax("/admin/api/getUpdates.php", {
- success: (data) => {
- 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><?= 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;
-
- document.getElementById("checking2").outerHTML = "";
- document.getElementById("found").style.display = "";
- },
- error: () => {
- 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 = "<?= 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 = "<?= 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>
-</div>
-
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?>
\ No newline at end of file |