summaryrefslogtreecommitdiff
path: root/includes/banner.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/banner.inc')
-rw-r--r--includes/banner.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/banner.inc b/includes/banner.inc
index c96bedd..888cc95 100644
--- a/includes/banner.inc
+++ b/includes/banner.inc
@@ -181,11 +181,13 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
];
}
+ $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
+
$systemData = [];
- $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : "cloudburst");
- $systemData['icon'] = ($system === "gdapd" ? "raindrops" : "cloudburst") . ".png";
- $systemData['name'] = $system === "gdapd" ? "Raindrops" : "Cloudburst";
- $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : "Cloudburst System";
+ $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : ($system === $app["other"]["id"] ? $app["other"]["slug"] : "cloudburst"));
+ $systemData['icon'] = getAsset($system);
+ $systemData['name'] = $system === "gdapd" ? "Raindrops" : ($system === $app["other"]["id"] ? $app["other"]["short"] : "Cloudburst");
+ $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : ($system === $app["other"]["id"] ? $app["other"]["name"] : "Cloudburst System");
$systemData['subsystem'] = null;
$systemData['temporary'] = false;
@@ -207,7 +209,6 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$systemData['temporary'] = true;
}
-
if ($travelling[$member['id']]["travelling"] && $travelling[$member['id']]["equestria"]) {
$systemData['page'] = null;
$systemData['icon'] = "../logo/equestria.png";