summaryrefslogtreecommitdiff
path: root/includes/banner.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/banner.inc')
-rw-r--r--includes/banner.inc43
1 files changed, 1 insertions, 42 deletions
diff --git a/includes/banner.inc b/includes/banner.inc
index 888cc95..4f40c08 100644
--- a/includes/banner.inc
+++ b/includes/banner.inc
@@ -17,42 +17,13 @@ function _header_getMember(string $id, $system) {
return $member;
}
-function _header_memberPartOfSubsystem(array $member) {
- global $subsystems;
- $is = false;
-
- foreach ($subsystems as $subsystem) {
- if (in_array($member["id"], $subsystem["members"])) {
- $is = true;
- }
- }
-
- return $is;
-}
-
-function _header_getSubsystemFromMember(array $member) {
- global $subsystems;
- $ss = false;
-
- foreach ($subsystems as $subsystem) {
- if (in_array($member["id"], $subsystem["members"])) {
- $ss = $subsystem;
- }
- }
-
- return $ss;
-}
-
function getMemberBannerData(string $id, string $system, bool $french = false) {
- global $subsystems;
global $travelling;
global $isLoggedIn;
global $lang;
$french = $lang["_french"];
- $subsystems = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/$system.json"), true) ?? [];
-
$member = getSystemMember($system, $id);
$metadata = file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$id.json") ? parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$id.json"), true)) : parseMetadata([
"bitset" => 4196352,
@@ -188,24 +159,13 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$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;
- if (_header_memberPartOfSubsystem($member) && _header_getSubsystemFromMember($member)["source_type"] !== "member") {
- $subsystem = _header_getSubsystemFromMember($member);
- $systemData['subsystem'] = [
- "page" => $systemData['page'] . "/-/subsystem/" . $subsystem["source"],
- "icon" => "ss-$subsystem[source].png",
- "name" => file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/$system-$subsystem[source].json") ? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/$system-$subsystem[source].json"), true)["name"] : $subsystem["source"]
- ];
- }
-
if ($travelling[$member['id']]["travelling"] && !$travelling[$member['id']]["equestria"]) {
$systemData['page'] = "/" . ($system === "gdapd" ? "cloudburst" : "raindrops");
- $systemData['icon'] = ($system === "gdapd" ? "cloudburst" : "raindrops") . ".png";
+ $systemData['icon'] = getAsset($system === "gdapd" ? "ynmuc" : "gdapd");
$systemData['name'] = $system === "gdapd" ? "Cloudburst" : "Raindrops";
$systemData['full_name'] = $system === "gdapd" ? "Cloudburst System" : "Raindrops System";
- $systemData['subsystem'] = null;
$systemData['temporary'] = true;
}
@@ -214,7 +174,6 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$systemData['icon'] = "../logo/equestria.png";
$systemData['name'] = "Equestria";
$systemData['full_name'] = "Equestria";
- $systemData['subsystem'] = null;
$systemData['temporary'] = true;
}