diff options
author | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-07-01 00:54:32 +0200 |
---|---|---|
committer | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-07-01 00:54:32 +0200 |
commit | 1d62401c897a5ba82d0def92d97d09195a6d676f (patch) | |
tree | d26f11765a4eee20ac4867d5b77794fcdcaac641 /_site/admin/status | |
parent | 1f23d65f32e37d0c6d703951d6735c9926f8521c (diff) | |
download | unchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.tar.gz unchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.tar.bz2 unchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.zip |
Fixed stuff + official logo
Diffstat (limited to '_site/admin/status')
-rw-r--r-- | _site/admin/status/index.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/_site/admin/status/index.php b/_site/admin/status/index.php new file mode 100644 index 0000000..6d46f34 --- /dev/null +++ b/_site/admin/status/index.php @@ -0,0 +1,40 @@ +<?php $__ADMIN = true; $_TITLE = "Data Sync Status - Blogchain Administration"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/header.php"; ?> + +<div class="container" style="margin-top:30px;text-align: center;"> + <h2>Data Sync Status</h2> + <p>Check if everything is good!</p> +</div> + +<div class="container"> + <ul> + <?php + + $commit = json_decode(gh_api("repos/Minteck/Blogchain-Content/commits"), true)[0]; + if (!isset($commit["commit"]["verification"]) || !isset($commit["commit"]["verification"]["verified"]) || !$commit["commit"]["verification"]["verified"]) { + echo("<li class='list-admin-warning'>This version is <b>not</b> digitally signed, its content may have been compromised.</li>"); + } + + ?> + <li><b>Upstream version:</b> <?php + + echo(substr($commit["sha"], 0, 7) . " « " . $commit["commit"]["message"] . " » · commited by " . $commit["commit"]["author"]["name"]); + + ?></li> + <li><b>Downstream version:</b> <?php + + echo(substr(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/../_posts/.git/refs/heads/master"), 0, 7)); + + ?></li> + <li><?php + + if (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/../_posts/.git/refs/heads/master")) === trim($commit["sha"])) { + echo("Downstream is up to date"); + } else { + echo("Downstream <b>rebase needed</b>"); + } + + ?></li> + </ul> +</div> + +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/footer.php"; ?>
\ No newline at end of file |