summaryrefslogtreecommitdiff
path: root/pages/about.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pages/about.inc')
-rw-r--r--pages/about.inc80
1 files changed, 0 insertions, 80 deletions
diff --git a/pages/about.inc b/pages/about.inc
deleted file mode 100644
index 8a62d66..0000000
--- a/pages/about.inc
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages;
-require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
-$version = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/version.json"), true);
-
-$ignore = [
- $_SERVER['DOCUMENT_ROOT'] . "/Data",
- $_SERVER['DOCUMENT_ROOT'] . "/bits/Data",
- $_SERVER['DOCUMENT_ROOT'] . "/Private/Data",
- $_SERVER['DOCUMENT_ROOT'] . "/bits/Private/Data",
- $_SERVER['DOCUMENT_ROOT'] . "/includes/data",
- $_SERVER['DOCUMENT_ROOT'] . "/includes/tokens",
-];
-
-function rscandir($dir, $inverseIgnore = false) {
- global $ignore;
- $files = [];
-
- foreach (array_filter(scandir($dir), function ($i) {
- return !str_starts_with($i, ".");
- }) as $file) {
- if (!(($inverseIgnore && !in_array($dir . "/" . $file, $ignore)) || (!$inverseIgnore && in_array($dir . "/" . $file, $ignore)))) {
- if (is_dir($dir . "/" . $file)) {
- array_push($files, ...rscandir($dir . "/" . $file));
- } else {
- $files[] = $dir . "/" . $file;
- }
- }
- }
-
- return array_unique($files);
-}
-
-$sizeSystem = array_reduce(array_map(function ($i) {
- return filesize($i);
-}, rscandir($_SERVER['DOCUMENT_ROOT'])), function ($a, $b) {
- return $a + $b;
-});
-
-$sizeData = array_reduce(array_map(function ($i) {
- return filesize($i);
-}, rscandir($_SERVER['DOCUMENT_ROOT'], true)), function ($a, $b) {
- return $a + $b;
-});
-
-?>
-
-<br>
-<div class="container">
- <div id="page-content">
- <h2>About Cold Haze</h2>
- <p>
- <b>Cold Haze Engine version 2.<?= $version["build"] ?>.<?= $version["revision"] ?></b><br>
- Version date: <?= date('D j M Y, G:i:s T', $version["timestamp"]) ?><br>
- Version ID: <code style="color: white;"><?= $version["hash"] ?></code><br>
- Install path: <?= $_SERVER['DOCUMENT_ROOT'] ?><br>
- Server software: <?= $_SERVER['SERVER_SOFTWARE'] ?>, via <?= $_SERVER['GATEWAY_INTERFACE'] ?><br>
- Transport protocol: <?= $_SERVER['SERVER_PROTOCOL'] ?>
- </p>
-
- <p>
- <b>PHP <?= PHP_VERSION ?></b><br>
- Zend Engine: <?= zend_version() ?><br>
- Server API: <?= php_sapi_name() ?><br>
- Memory usage: <?= prettySize(memory_get_peak_usage()) ?><br>
- Server OS: <?= php_uname("s") ?> <?= php_uname("r") ?><br>
- Server domain name: <?= php_uname("n") ?><br>
- Server architecture: <?= php_uname("m") ?>
- </p>
-
- <p>
- <b>Disk space usage</b><br>
- Engine: <?= prettySize($sizeSystem) ?><br>
- Database: <?= prettySize($sizeData) ?>
- </p>
- </div>
-</div>
-
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>