From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 19:34:56 +0100 Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated) --- includes/functions.inc | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'includes/functions.inc') 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(' -
'); - echo('
'); - - showMembersFromList(scoreOrder(array_map(function ($i) use ($parentSystem) { - return getSystemMember($parentSystem, $i); - }, $data["members"]), $parentSystem)); - - echo('
- -
'); - } -} - if (!function_exists("prettySize")) { function prettySize($bytes) { if ($bytes > 1024) { -- cgit