summaryrefslogtreecommitdiff
path: root/includes/member
diff options
context:
space:
mode:
Diffstat (limited to 'includes/member')
-rw-r--r--includes/member/hierarchy.inc179
-rw-r--r--includes/member/tree.inc8
2 files changed, 0 insertions, 187 deletions
diff --git a/includes/member/hierarchy.inc b/includes/member/hierarchy.inc
deleted file mode 100644
index acf954b..0000000
--- a/includes/member/hierarchy.inc
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php global $system;
-global $systemCommonName;
-global $systemID;
-global $member;
-global $memberData;
-global $memberCommonName;
-global $memberID;
-$title = "Member hierarchy · " . $memberCommonName . " · " . $systemCommonName;
-require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
-
-$travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true);
-
-$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true));
-
-$allMembers = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "/members.json"), true), $systemID);
-$allMembers2 = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), $systemID === "gdapd" ? "ynmuc" : "gdapd");
-
-$systemCommonData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "/general.json"), true);
-
-if ($travelling[$memberID]["travelling"]) {
- $allMembers = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), $systemID === "gdapd" ? "ynmuc" : "gdapd");
- $allMembers2 = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "/members.json"), true), $systemID);
-
- $systemCommonData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/general.json"), true);
-
- $system = $systemID === "gdapd" ? "cloudburst" : "raindrops";
- $systemCommonName = $systemID === "gdapd" ? "Cloudburst System" : "Raindrops System";
-}
-
-$memberData["system"] = $memberData["_system"] = $systemID;
-
-?>
-
- <br>
- <div class="container">
- <h2><?= getMiniName($memberCommonName) ?>'s hierarchy</h2>
- <br>
-
- <?php
-
- $takingCare = [
- ...array_filter($allMembers, function ($i) use ($systemID, $memberData) {
- return in_array($systemID . "/" . $memberData["id"], $i["_metadata"]["caretakers"]) && $i["id"] !== $memberData["id"];
- }),
- ...array_filter($allMembers2, function ($i) use ($systemID, $memberData) {
- return in_array($systemID . "/" . $memberData["id"], $i["_metadata"]["caretakers"]) && $i["id"] !== $memberData["id"];
- })
- ];
-
- $protected = array_filter($allMembers, function ($i) use ($memberData) {
- return $i["_metadata"]["protector"] && $i["id"] !== $memberData["id"];
- });
-
- $caretakers = array_map(function ($i) {
- return getSystemMember(explode("/", $i)[0], explode("/", $i)[1]);
- }, $metadata["caretakers"]);
-
- ?>
-
- <p class="text-muted" style="text-align: center;"><b>Part of:</b></p>
- <div class="row">
- <div class="cell" style="width:20%;display:inline-block;margin-left:auto;margin-right:auto;">
- <a href="/<?= $system ?>" style="text-decoration:none !important;filter:none !important;">
- <div class="hpd-item-card"
- style="background-color:rgba(255, 255, 255, .1);border:1px solid #<?= $systemCommonData["color"] ?? "ffffff" ?>55;outline-color:#<?= $systemCommonData["color"] ?? "ffffff" ?>55;border-radius:10px;text-align:center;display:flex;align-items:center;justify-content:center;padding:5px;">
- <div>
- <img alt=""
- src="/assets/uploads/<?= $system ?>.png"
- style="height:48px;display:block;margin-left:auto;margin-right:auto;">
- <div style="text-decoration:none;color:white;margin-top:5px;"><?= $systemCommonName ?></div>
- </div>
- </div>
- </a>
- </div>
- </div>
-
- <hr>
-
- <?php if (count($protected) > 0): ?>
- <p class="text-muted" style="text-align: center;"><b>Protected by:</b></p>
- <div class="row">
- <?php foreach ($protected as $selectedMember): ?>
- <div class="cell" style="width:20%;display:inline-block;margin-left:auto;margin-right:auto;">
- <?php showMembersFromList([$selectedMember]) ?>
- </div>
- <?php endforeach; ?>
- </div>
-
- <hr>
- <?php endif; ?>
-
- <?php if (count($caretakers) > 0): ?>
- <p class="text-muted" style="text-align: center;"><b>Taken care of by:</b></p>
- <div class="row">
- <?php foreach ($caretakers as $selectedMember): ?>
- <div class="cell" style="width:20%;display:inline-block;margin-left:auto;margin-right:auto;">
- <?php showMembersFromList([$selectedMember]) ?>
- </div>
- <?php endforeach; ?>
- </div>
-
- <hr>
- <?php endif; ?>
-
- <p class="text-muted" style="text-align: center;"><b>Member:</b></p>
- <div class="row">
- <div class="cell" style="width:20%;display:inline-block;margin-left:auto;margin-right:auto;">
- <?php showMembersFromList([$memberData]) ?>
- </div>
- </div>
-
- <?php if (count($takingCare) > 0): ?>
- <hr>
-
- <p class="text-muted" style="text-align: center;"><b>Taking care of:</b></p>
- <div class="row">
- <?php foreach ($takingCare as $selectedMember): ?>
- <div class="cell" style="width:20%;display:inline-block;margin-left:auto;margin-right:auto;">
- <?php showMembersFromList([$selectedMember]) ?>
- </div>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- </div>
-
- <style>
- .row {
- margin-bottom: 20px;
- }
-
- @media (max-width: 750px) {
- #hpd-cloudburst > div, #hpd-raindrops > div {
- grid-template-columns: repeat(1, 1fr) !important;
- }
-
- .hpd-item-card img {
- display: inline-block !important;
- margin-right: 5px !important;
- height: 32px !important;
- }
-
- #hpd-cloudburst > div, #hpd-raindrops > div {
- grid-gap: 5px !important;
- }
-
- .hpd-item-card div {
- display: inline-block !important;
- }
-
- .hpd-item-card div:nth-child(3)::before {
- content: "(";
- padding-left: 5px;
- color: white !important;
- }
-
- .hpd-item-card div:nth-child(3)::after {
- content: ")";
- color: white !important;
- }
-
- div.cell {
- grid-row-gap: 5px !important;
- width: 100% !important;
- margin-bottom: 5px;
- }
-
- div.cell:nth-last-child(1) {
- margin-bottom: 0 !important;
- }
- }
-
- @media (max-width: 997px) {
- .cell {
- width: 30% !important;
- }
- }
- </style>
-
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?> \ No newline at end of file
diff --git a/includes/member/tree.inc b/includes/member/tree.inc
deleted file mode 100644
index 2e94951..0000000
--- a/includes/member/tree.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-global $parts;
-$parts[3] = "hierarchy";
-array_shift($parts);
-
-header("Location: /" . implode("/", $parts));
-die(); \ No newline at end of file