summaryrefslogtreecommitdiff
path: root/pages/relations.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/relations.php')
-rw-r--r--pages/relations.php87
1 files changed, 55 insertions, 32 deletions
diff --git a/pages/relations.php b/pages/relations.php
index d0f5583..aac2839 100644
--- a/pages/relations.php
+++ b/pages/relations.php
@@ -1,48 +1,71 @@
-<?php $title = "Relations"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; ?>
+<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.php"; global $title; global $isLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+
+?>
<br>
<div class="container">
<div id="page-content">
<h2>Relations</h2>
- <?php foreach (scoreOrderGlobal() as $member): if (count($member["_metadata"]["marefriends"]) > 0 || count($member["_metadata"]["sisters"]) > 0): ?>
+ <?php foreach (withCaretakersDown(scoreOrderGlobal()) as $member): if (count($member["_metadata"]["marefriends"]) > 0 || count($member["_metadata"]["sisters"]) > 0): ?>
<div class="relation" style="background-color:rgba(255, 255, 255, .1);margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1.5fr <?= $member["_metadata"]["little"] === 2 ? "2fr 2fr 2fr" : "3fr 3fr" ?>;">
<a 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;" 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>
- <div class="relation-item relation-item-marefriends" style="margin-left:10px;padding:0 20px;">
- <b style="padding-right:5px;">Marefriends:</b><span class="list-separator-mobile"><br></span>
- <?php if (count($member["_metadata"]["marefriends"]) === 0): ?>
- <span class="text-muted">None</span>
- <?php else: ?>
- <?php $index = 0; foreach ($member["_metadata"]["marefriends"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
- <a class="member-link" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?></a><?php if ($index + 2 <= count($member["_metadata"]["marefriends"])) echo('<span class="list-separator-desktop">, </span><span class="list-separator-mobile"><br></span>'); $index++; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
+ <table class="relation-item relation-item-marefriends" style="margin-left:10px;padding:0 20px;">
+ <tbody><tr>
+ <td style="width: 50%;text-align:right;">
+ <b style="padding-right:5px;">Marefriends:</b><span class="list-separator-mobile"><br></span>
+ </td>
+ <td style="width: 50%;text-align:left;">
+ <?php if (count($member["_metadata"]["marefriends"]) === 0): ?>
+ <span class="text-muted">None</span>
+ <?php else: ?>
+ <?php foreach ($member["_metadata"]["marefriends"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
+ <a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"></a>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </td>
+ </tr></tbody>
+ </table>
- <div class="relation-item relation-item-sisters" style="padding:0 20px;">
- <b style="padding-right:5px;">Sisters:</b><span class="list-separator-mobile"><br></span>
- <?php if (count($member["_metadata"]["sisters"]) === 0): ?>
- <span class="text-muted">None</span>
- <?php else: ?>
- <?php $index = 0; foreach ($member["_metadata"]["sisters"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
- <a class="member-link" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?></a><?php if ($index + 2 <= count($member["_metadata"]["sisters"])) echo('<span class="list-separator-desktop">, </span><span class="list-separator-mobile"><br></span>'); $index++; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
+ <table class="relation-item relation-item-sisters" style="padding:0 20px;">
+ <tbody><tr>
+ <td style="width: 50%;text-align:right;">
+ <b style="padding-right:5px;">Sisters:</b><span class="list-separator-mobile"><br></span>
+ </td>
+ <td style="width: 50%;text-align:left;">
+ <?php if (count($member["_metadata"]["sisters"]) === 0): ?>
+ <span class="text-muted">None</span>
+ <?php else: ?>
+ <?php foreach ($member["_metadata"]["sisters"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
+ <a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"></a>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </td>
+ </tr></tbody>
+ </table>
<?php if ($member["_metadata"]["little"] === 2): ?>
- <div class="relation-item relation-item-sisters" style="padding:0 20px;">
- <b style="padding-right:5px;">Caretakers:</b><span class="list-separator-mobile"><br></span>
- <?php if (count($member["_metadata"]["caretakers"]) === 0): ?>
- <span class="text-muted">None</span>
- <?php else: ?>
- <?php $index = 0; foreach ($member["_metadata"]["caretakers"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
- <a class="member-link" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"> <?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?></a><?php if ($index + 2 <= count($member["_metadata"]["sisters"])) echo('<span class="list-separator-desktop">, </span><span class="list-separator-mobile"><br></span>'); $index++; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
+ <table class="relation-item relation-item-sisters" style="padding:0 20px;">
+ <tbody><tr>
+ <td style="width: 50%;text-align:right;">
+ <b style="padding-right:5px;">Caretakers:</b><span class="list-separator-mobile"><br></span>
+ </td>
+ <td style="width: 50%;text-align:left;">
+ <?php if (count($member["_metadata"]["caretakers"]) === 0): ?>
+ <span class="text-muted">None</span>
+ <?php else: ?>
+ <?php foreach ($member["_metadata"]["caretakers"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
+ <a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $marefriend['name'] . ".png") ? "-" . $marefriend['name'] : "" ?>.png" style="width:24px;"></a>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </td>
+ </tr></tbody>
+ </table>
<?php endif; ?>
</div>
<?php endif; endforeach; ?>