From bf2558253637537c2d57765e557bdc0e164c58ee Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 22 Feb 2023 10:29:48 +0100 Subject: Updated 23 files, added assets/uploads/pt-princesscelestia.png and renamed assets/uploads/pt-luna.png (automated) --- pages/byfront.inc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'pages/byfront.inc') diff --git a/pages/byfront.inc b/pages/byfront.inc index 88da2f5..93fe3d5 100644 --- a/pages/byfront.inc +++ b/pages/byfront.inc @@ -90,12 +90,35 @@ $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()): ?> -
time() - (86400 * 21)): ?>rgba(255, 255, 255, .1) time() - (86400 * 37)): ?>rgba(255, 227, 0, 0.17)rgba(255,55,55,0.17); time() - (86400 * 21)): ?>rgba(255, 255, 255, .1) time() - (86400 * 30)): ?>rgba(255, 227, 0, 0.17)rgba(255,55,55,0.17);;margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;opacity: 0.75;"> + }); $members = array_reverse($members); foreach ($members as $member): if ($member["_lastFronted"] !== -1 && $member["_lastFronted"] !== time()): + + $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() - (86400 * 21)): ?>rgba(255, 255, 255, .1) time() - (86400 * 37)): ?>rgba(255, 227, 0, 0.17)rgba(128,54,54,0.17); time() - (86400 * 21)): ?>rgba(255, 255, 255, .1) time() - (86400 * 30)): ?>rgba(255, 227, 0, 0.17)rgba(255,55,55,0.17);;margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;opacity: 0.75;background-color:rgba(255, 255, 255, .1) !important;"> "> " style="width:24px;">  - + + No + + Less @@ -121,7 +144,7 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ
- +