summaryrefslogtreecommitdiff
path: root/includes/subsysbanner.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
committerMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
commit108525534c28013cfe1897c30e4565f9893f3766 (patch)
treedd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /includes/subsysbanner.php
parent2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff)
downloadpluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip
Update
Diffstat (limited to 'includes/subsysbanner.php')
-rw-r--r--includes/subsysbanner.php69
1 files changed, 0 insertions, 69 deletions
diff --git a/includes/subsysbanner.php b/includes/subsysbanner.php
deleted file mode 100644
index 7788155..0000000
--- a/includes/subsysbanner.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-global $memberData;
-global $memberCommonName;
-global $memberID;
-global $systemCommonName;
-global $systemID;
-global $system;
-global $subsystemData;
-global $subsystemID;
-global $subsystem;
-
-$fronters = array_map(function ($item) {
- return $item["id"];
-}, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-fronters.json"), true)["members"]);
-
-?>
-
-<div id="system-info" style="background:rgba(255, 255, 255, .1);border-radius:10px;display:grid;grid-template-columns: 128px 1fr;">
- <img src="/assets/uploads/ss-<?= $subsystemID ?>.png" alt="" style="height:128px;border-top-left-radius:10px;border-bottom-left-radius:10px;">
- <div style="padding:10px 10px 10px 20px;text-align:center;">
- <div style="display: grid; grid-template-columns: 1fr;height:100%;grid-template-rows: max-content max-content 1fr;">
- <h3 style="height:max-content;"><?= $subsystemData["name"] ?></h3>
- <div style="height:max-content;display:grid;grid-template-columns: repeat(4, 1fr);" id="member-card">
- <span>
- <b>Fronter:</b>
- <?php if (in_array($fronters[0], $subsystem["members"])): $member = getMember($fronters[0]); ?>
- <a class="member-link" href="/<?= $member["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a>
- <?php else: ?>
- <span class="text-muted">N/A</span>
- <?php endif; ?>
- </span>
- <span>
- <?php
-
- $subsystem = getSubsystemByID($subsystemID);
- $arr = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-switches.json"), true), function ($i) use ($subsystem) {
- return isset($i["members"][0]) && in_array($i["members"][0], $subsystem["members"]);
- });
- sort($arr);
- $previousID = $arr[in_array($fronters[0], $subsystem["members"]) ? 1 : 0]["members"][0];
- $member = null;
-
- foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true) as $members) {
- if ($members["id"] === $previousID) {
- $member = $members;
- break;
- }
- }
-
- ?>
- <b>Last fronter: </b><a class="member-link" href="/<?= $member["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a>
- </span>
- <span>
- <b>Members:</b> <?= count($subsystem["members"]) ?>
- </span>
- <span>
- <b>Parent system:</b> <a class="member-link" href="/<?= $system ?>"><img style="width:24px;border-radius:5px;" src="/assets/uploads/<?= $system ?>.png"> <?= getMiniName($systemCommonName) ?></a>
- </span>
- </div>
- </div>
- </div>
-</div>
-
-<div id="system-actions" style="margin-top:10px;padding:5px 10px;background:rgba(255, 255, 255, .1);border-radius:10px;">
- <div style="padding: 5px 10px;text-align: center;">
- You are viewing the page of a subsystem of the <b><a style="color:white;text-decoration: none;" href="/<?= $system ?>"><?= $systemCommonName ?></a></b>.
- </div>
-</div> \ No newline at end of file