summaryrefslogtreecommitdiff
path: root/pages/byfront.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pages/byfront.inc')
-rw-r--r--pages/byfront.inc62
1 files changed, 20 insertions, 42 deletions
diff --git a/pages/byfront.inc b/pages/byfront.inc
index a8ff483..d3b8bf0 100644
--- a/pages/byfront.inc
+++ b/pages/byfront.inc
@@ -90,50 +90,12 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ
})))
]; uasort($members, function ($a, $b) {
return $b["_lastFronted"] - $a["_lastFronted"];
- }); $members = array_reverse($members); foreach ($members as $member): if ($member["_lastFronted"] !== -1 && $member["_lastFronted"] !== time()):
+ }); $members = array_reverse($members); foreach ($members as $member): if ($member["_lastFronted"] <= time() - 86400 * 21):
- $metadata = $member["_metadata"];
-
- if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0) {
- if ($metadata["birth"]["age"] === -1) {
- $age = abs(log(0));
- } elseif ($metadata["birth"]["age"] <= 0) {
- $age = null;
- } else {
- $age = $metadata["birth"]["age"];
- }
- } else {
- if ($metadata["birth"]["year"] <= 1900) {
- $age = null;
- } else {
- $age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1);
- }
- }
-
- if ((isset($age) && $age > 0 && time() > 1677628800) || time() <= 1677628800): ?>
- <div class="relation" style="margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;<?php if ($travelling[$member['id']]["travelling"] || ($member["_metadata"]["punished"] ?? false)): ?>opacity: 0.75;<?php endif; ?>">
+ $metadata = $member["_metadata"];?>
+ <div class="relation" style="margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;">
<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;display:flex;align-items:center;text-decoration: none;" href="/<?= $member["name"] ?>">
<img src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px;">&nbsp;<?= $member["display_name"] ?? $member["name"] ?>
- <span style="display: inline-block;margin-left: auto;">
- <?php if ($member["_metadata"]["not_fronting"]): ?>
- <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-info text-black" ?> rounded-pill">Not fronting</span>
- <?php endif; ?>
- <?php if ($member["_metadata"]["less_frequent"] && !(isset($member["_metadata"]["not_fronting"]) && $member["_metadata"]["not_fronting"])): ?>
- <span class="badge bg-success rounded-pill">Less</span>
- <?php endif; ?>
- <?php if ($member["_metadata"]["persecutor"]): ?>
- <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-light text-black" ?> rounded-pill">Persecutor</span>
- <?php endif; ?>
- <?php if (isset($member["_metadata"]["punished"]) && $member["_metadata"]["punished"]): ?>
- <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-light text-black" ?> rounded-pill">Punished</span>
- <?php endif; ?>
- <?php if ($member["_metadata"]["shared_memory"] !== 2): ?>
- <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "text-black bg-warning" ?> rounded-pill">Memory</span>
- <?php endif; ?>
- <?php if ($travelling[$member['id']]["travelling"]): ?>
- <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "text-white bg-secondary" ?> rounded-pill">Travelling</span>
- <?php endif; ?>
- </span>
</a>
<div class="relation-item" style="display:flex;align-items:center;margin-left:10px;padding:0 20px;">
@@ -144,7 +106,23 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ
<?php endif; ?>
</div>
</div>
- <?php endif; endif; endforeach; ?>
+ <?php endif; endforeach; ?><hr><?php foreach ($members as $member): if ($member["_lastFronted"] > time() - 86400 * 21):
+
+ $metadata = $member["_metadata"];?>
+ <div class="relation" style="margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;">
+ <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;display:flex;align-items:center;text-decoration: none;" href="/<?= $member["name"] ?>">
+ <img src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px;">&nbsp;<?= $member["display_name"] ?? $member["name"] ?>
+ </a>
+
+ <div class="relation-item" style="display:flex;align-items:center;margin-left:10px;padding:0 20px;">
+ <?php if ($member["_lastFronted"] === -1): ?>
+ Never fronted
+ <?php else: ?>
+ Last fronted <?= timeAgo($member["_lastFronted"]) ?><?php if ($member["_lastFronted"] !== time()): ?> (<?= date('l j F Y', $member["_lastFronted"]) ?>)<?php endif; ?>
+ <?php endif; ?>
+ </div>
+ </div>
+ <?php endif; endforeach; ?>
<style>
@media (max-width: 991px) {