summaryrefslogtreecommitdiff
path: root/includes/system
diff options
context:
space:
mode:
Diffstat (limited to 'includes/system')
-rw-r--r--includes/system/compare.php54
-rw-r--r--includes/system/history.php40
-rw-r--r--includes/system/species.php18
-rw-r--r--includes/system/tree.php8
4 files changed, 65 insertions, 55 deletions
diff --git a/includes/system/compare.php b/includes/system/compare.php
index 6d69cd0..f597cf3 100644
--- a/includes/system/compare.php
+++ b/includes/system/compare.php
@@ -1,4 +1,4 @@
-<?php global $system; global $systemCommonName; global $systemID; $title = "Compare members · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+<?php global $system; global $systemCommonName; global $systemID; $title = "Compare members · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; global $travelling;
$members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true);
@@ -70,14 +70,6 @@ function getMember(string $id) {
<span class="comparison-header-l5">Ltl.</span>
</span>
<span class="comparison-header comparison-item">
- <span class="comparison-header-l0">Not talking</span>
- <span class="comparison-header-l1">No talk</span>
- <span class="comparison-header-l2">No talk</span>
- <span class="comparison-header-l3">NT.</span>
- <span class="comparison-header-l4">NT.</span>
- <span class="comparison-header-l5">NT.</span>
- </span>
- <span class="comparison-header comparison-item">
<span class="comparison-header-l0">Protector</span>
<span class="comparison-header-l1">Protector</span>
<span class="comparison-header-l2">Protect.</span>
@@ -97,41 +89,41 @@ function getMember(string $id) {
}
?>
- <a title="<?= $member["display_name"] ?? $member["name"] ?>" data-bs-toggle="tooltip" class="member-link comparison-item comparison-item-clickable" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <span style="vertical-align: middle;"><span class="comparison-name-full"><?= $member["display_name"] ?? $member["name"] ?></span><span class="comparison-name-small"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></span>
+ <a title="<?= $member["display_name"] ?? $member["name"] ?>" data-bs-toggle="tooltip" class="member-link comparison-item comparison-item-clickable" 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;"> <span style="vertical-align: middle;"><span class="comparison-name-full"><?= $member["display_name"] ?? $member["name"] ?></span><span class="comparison-name-small"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></span>
<span class="comparison-colors" style="background-color: #<?= $member["color"] ?? "ffffff" ?>; height: 16px; width: 16px;display: inline-block;vertical-align: middle;border-radius:2px;"></span>
</a>
<span class="comparison-item">
<?php foreach ($metadata["species"] ?? [] as $species): ?>
<img data-bs-toggle="tooltip" title="<?php switch ($species) {
case "earth":
- if ($metadata["robot"]) echo "Robot earth pony"; else echo "Earth pony";
+ if ($metadata["robot"]) echo "Robot earth pony"; else if ($metadata["plush"]) echo "Earth pony plush"; else echo "Earth pony";
break;
case "alicorn":
- if ($metadata["robot"]) echo "Robot alicorn"; else echo "Alicorn";
+ if ($metadata["robot"]) echo "Robot alicorn"; else if ($metadata["plush"]) echo "Alicorn plush"; else echo "Alicorn";
break;
case "crystal":
- if ($metadata["robot"]) echo "Robot crystal pony"; else echo "Crystal pony";
+ if ($metadata["robot"]) echo "Robot crystal pony"; else if ($metadata["plush"]) echo "Crystal pony plush"; else echo "Crystal pony";
break;
case "pegasus":
- if ($metadata["robot"]) echo "Robot pegasus"; else echo "Pegasus";
+ if ($metadata["robot"]) echo "Robot pegasus"; else if ($metadata["plush"]) echo "Pegasus plush"; else echo "Pegasus";
break;
case "batpony":
- if ($metadata["robot"]) echo "Robot bat pony"; else echo "Bat pony";
+ if ($metadata["robot"]) echo "Robot bat pony"; else if ($metadata["plush"]) echo "Bat pony plush"; else echo "Bat pony";
break;
case "unicorn":
- if ($metadata["robot"]) echo "Robot unicorn"; else echo "Unicorn";
+ if ($metadata["robot"]) echo "Robot unicorn"; else if ($metadata["plush"]) echo "Unicorn plush"; else echo "Unicorn";
break;
default:
echo $species . "_" . $metadata["robot"];
break;
- } ?>" style="width:24px;vertical-align: middle;position:relative;top:-5px;" src="/assets/species/<?= $species ?><?= $metadata["robot"] ? "-robot" : "" ?>.png" alt="<?= $species ?>">
+ } ?>" style="width:24px;vertical-align: middle;position:relative;top:-5px;" src="/assets/species/<?= $species ?><?= $metadata["robot"] ? "-robot" : ($metadata["plush"] ? "-plush" : "") ?>.png" alt="<?= $species ?>">
<?php endforeach; ?>
</span>
<span class="comparison-item">
@@ -143,15 +135,22 @@ function getMember(string $id) {
<?php $index = 0; foreach ($metadata["marefriends"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
global $mfMemberID;
return $item["id"] === $mfMemberID;
- }); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Marefriend" data-bs-toggle="tooltip" data-bs-html="true" class="member-link" href="/<?= $mfSystem === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?><?php $index = 0; foreach ($metadata["sisters"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
+ }); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Marefriend" data-bs-toggle="tooltip" data-bs-html="true" class="member-link tooltip-nohelp" href="/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?><?php $index = 0; foreach ($metadata["sisters"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
+ global $mfMemberID;
+ return $item["id"] === $mfMemberID;
+ }); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Sister" data-bs-toggle="tooltip" data-bs-html="true" class="member-link tooltip-nohelp" href="/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?><?php $index = 0; foreach ($metadata["caretakers"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
global $mfMemberID;
return $item["id"] === $mfMemberID;
- }); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Sister" data-bs-toggle="tooltip" data-bs-html="true" class="member-link" href="/<?= $mfSystem === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?>
+ }); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Caretaker" data-bs-toggle="tooltip" data-bs-html="true" class="member-link tooltip-nohelp" href="/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?>
</span>
</span>
<span class="comparison-item">
<?php if ($metadata["host"]): ?>
- <img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
+ <?php if ($travelling[$member["id"]]["travelling"]): ?>
+ <img data-bs-toggle="tooltip" title="Yes, but currently travelling" src="/assets/icons/partial.svg" alt="Yes, but currently travelling" style="width:24px;">
+ <?php else: ?>
+ <img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
+ <?php endif; ?>
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
@@ -173,15 +172,12 @@ function getMember(string $id) {
<?php endif; ?>
</span>
<span class="comparison-item">
- <?php if ($metadata["not_talking"]): ?>
- <img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
- <?php else: ?>
- <img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
- <?php endif; ?>
- </span>
- <span class="comparison-item">
<?php if ($metadata["protector"]): ?>
- <img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
+ <?php if ($travelling[$member["id"]]["travelling"]): ?>
+ <img data-bs-toggle="tooltip" title="Yes, but currently travelling" src="/assets/icons/partial.svg" alt="Yes, but currently travelling" style="width:24px;">
+ <?php else: ?>
+ <img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
+ <?php endif; ?>
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
diff --git a/includes/system/history.php b/includes/system/history.php
index 8483e3a..1f04bb7 100644
--- a/includes/system/history.php
+++ b/includes/system/history.php
@@ -119,8 +119,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 0) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -149,8 +149,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 1) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -179,8 +179,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 2) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -209,8 +209,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 3) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -239,8 +239,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 4) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -269,8 +269,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 5) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -299,8 +299,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 6) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -329,8 +329,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 7) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -359,8 +359,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 8) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
@@ -384,8 +384,8 @@ function getMember(string $id) {
<?= isNotToday($fronter["date"], 9) ? "00:00" : date('H:i', $fronter["date"]) ?>
</span>
<span class="fronter-profile" style="vertical-align: middle;">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
+ <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;"> <?= $member["display_name"] ?? $member["name"] ?>
</a>
</span>
</div>
diff --git a/includes/system/species.php b/includes/system/species.php
index 7747809..a35e811 100644
--- a/includes/system/species.php
+++ b/includes/system/species.php
@@ -1,9 +1,23 @@
-<?php global $system; global $systemCommonName; global $systemID; $title = "Members by species · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+<?php global $system; global $systemCommonName; global $systemID; $title = "Members by species · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; global $travelling;
$members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true);
$members = scoreOrder($members, $systemID);
function species(array $members, string $id, string $name) { global $systemID; ?>
+ <?php
+
+ $members = [
+ ...array_filter($members, function ($i) {
+ global $travelling;
+ return !$travelling[$i['id']]['travelling'];
+ }),
+ ...array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "-members.json"), true), function ($i) use ($id, $systemID) {
+ global $travelling;
+ return $travelling[$i['id']]['travelling'] && in_array($id, parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "-" . $i['id'] . "-metadata.json"), true))["species"]);
+ })
+ ];
+
+ ?>
<div class="relation" style="background-color:rgba(255, 255, 255, .1);margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 4fr;">
<div class="relation-intro" style="background-color:rgba(255, 255, 255, .05);border-right:1px solid rgba(255, 255, 255, .1);margin:-10px;padding:10px;border-top-left-radius:10px;border-bottom-left-radius:10px;color: white;text-decoration: none;">
<img src="/assets/species/<?= $id ?>.png" style="width:24px;"><span class="species-name"> <?= $name ?></span> (<?= count($members) ?>)
@@ -12,7 +26,7 @@ function species(array $members, string $id, string $name) { global $systemID; ?
<div class="relation-item" style="margin-left:10px;padding:0 20px;">
<?php if (count($members) > 0): ?>
<?php $index = 0; foreach ($members as $member): ?>
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?></a><?php if ($index + 2 <= count($members)) echo('<span class="list-separator-desktop">, &nbsp;</span><span class="list-separator-mobile"><br></span>'); $index++; endforeach; ?>
+ <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 if ($index + 2 <= count($members)) echo('<span class="list-separator-desktop">, &nbsp;</span><span class="list-separator-mobile"><br></span>'); $index++; endforeach; ?>
<?php else: ?>-<?php endif; ?>
</div>
</div>
diff --git a/includes/system/tree.php b/includes/system/tree.php
index 04cbf83..21d146b 100644
--- a/includes/system/tree.php
+++ b/includes/system/tree.php
@@ -78,7 +78,7 @@ function getMemberSubsystem(array $member) {
<div class="tree-l0-separator">&nbsp;</div>
<div class="tree-l1-separator<?= $ssfirst ? " tree-first-separator" : "" ?>">&nbsp;</div>
<div class="tree-inner">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $ssmember["name"] ?>">
+ <a class="member-link" href="/<?= $ssmember["name"] ?>">
<img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $ssmember['name'] . ".png") ? "-" . $ssmember['name'] : "" ?>.png" style="width:24px;"> <span style="vertical-align: middle;"><?= $ssmember["display_name"] ?? $ssmember["name"] ?></span>
</a>
</div>
@@ -90,8 +90,8 @@ function getMemberSubsystem(array $member) {
<div class="tree-l0">
<div class="tree-l0-separator<?= $first ? " tree-first-separator" : "" ?>">&nbsp;</div>
<div class="tree-inner">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
- <img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <span style="vertical-align: middle;"><?= $member["display_name"] ?? $member["name"] ?></span>
+ <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;"> <span style="vertical-align: middle;"><?= $member["display_name"] ?? $member["name"] ?></span>
</a>
</div>
<?php if (memberHasSubsystem($member)): ?>
@@ -100,7 +100,7 @@ function getMemberSubsystem(array $member) {
<div class="tree-l0-separator">&nbsp;</div>
<div class="tree-l1-separator<?= $ssfirst ? " tree-first-separator" : "" ?>">&nbsp;</div>
<div class="tree-inner">
- <a class="member-link" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $ssmember["name"] ?>">
+ <a class="member-link" href="/<?= $ssmember["name"] ?>">
<img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $ssmember['name'] . ".png") ? "-" . $ssmember['name'] : "" ?>.png" style="width:24px;"> <span style="vertical-align: middle;"><?= $ssmember["display_name"] ?? $ssmember["name"] ?></span>
</a>
</div>