diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /includes/functions.inc | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'includes/functions.inc')
-rw-r--r-- | includes/functions.inc | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/includes/functions.inc b/includes/functions.inc index d0f8568..5effe5b 100644 --- a/includes/functions.inc +++ b/includes/functions.inc @@ -3,6 +3,13 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/bitset.inc"; +if (!function_exists("peh_error")) { + function peh_error($message, $code = 500): void { + header("Location: /?em=" . urlencode(base64_encode($message)) . "&ec=" . $code); + die(); + } +} + if (!function_exists("getAsset")) { function getAsset($systemID, $memberID = null, $type = "avatars") { $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); @@ -268,24 +275,6 @@ if (!function_exists("showMembersFromList")) { } } -if (!function_exists("showSubsystem")) { - function showSubsystem(array $data, string $parentSystem) { - $subsystemData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/$parentSystem-$data[source].json"), true); - - echo('<!-- ' . $subsystemData["name"] . ' --> -<div id="hpd-cloudburst" style="background:rgba(255, 255, 255, .1);border-radius:10px;padding:10px;display:grid;grid-template-columns: 1fr;margin-bottom:10px;">'); - echo(' <div style="display:grid;grid-template-columns:repeat(6, 1fr);grid-gap:10px;">'); - - showMembersFromList(scoreOrder(array_map(function ($i) use ($parentSystem) { - return getSystemMember($parentSystem, $i); - }, $data["members"]), $parentSystem)); - - echo('</div> - -</div>'); - } -} - if (!function_exists("prettySize")) { function prettySize($bytes) { if ($bytes > 1024) { |