diff options
Diffstat (limited to 'includes/components/planner.inc')
-rw-r--r-- | includes/components/planner.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/includes/components/planner.inc b/includes/components/planner.inc index bf3372a..f07bd47 100644 --- a/includes/components/planner.inc +++ b/includes/components/planner.inc @@ -13,7 +13,7 @@ global $_PROFILE; $cloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/ynmuc.json"), true); $raindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/gdapd.json"), true); -function pacifier($id) { +function fronterBadges($id) { global $isLowerLoggedIn; $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $id . ".json"), true)); @@ -22,6 +22,10 @@ function pacifier($id) { return "<img title='This pony likes to sleep with a pacifier.' data-bs-toggle='tooltip' src='/assets/logo/pacifier.png' style='margin-left:auto;float: right;opacity:.75;width:24px;height:24px;vertical-align: middle; filter: invert(1);'>"; } + if (isset($metadata["sleep_plush"]) && $metadata["sleep_plush"] && !$isLowerLoggedIn) { + return "<img title='This pony likes to sleep with a plush.' data-bs-toggle='tooltip' src='/assets/logo/plush.png' style='margin-left:auto;float: right;opacity:.75;width:24px;height:24px;vertical-align: middle; filter: invert(1);'>"; + } + return ""; } @@ -195,7 +199,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php elseif ($member["name"] === "unknown"): ?> <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a> <?php else: ?> - <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayCloudburst) - 1 ? pacifier($member["id"]) : "" ?></span></a> + <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayCloudburst) - 1 ? fronterBadges($member["id"]) : "" ?></span></a> <?php endif; ?> </td> <?php if (!isset($dayCloudburst[$index][1])): ?> @@ -212,7 +216,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php elseif ($member["name"] === "unknown"): ?> <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a> <?php else: ?> - <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayCloudburst) - 1 ? pacifier($member["id"]) : "" ?></span></a> + <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayCloudburst) - 1 ? fronterBadges($member["id"]) : "" ?></span></a> <?php endif; ?> </td> <?php endif; ?> @@ -239,7 +243,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php elseif ($member["name"] === "unknown"): ?> <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a> <?php else: ?> - <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayRaindrops) - 1 ? pacifier($member["id"]) : "" ?></span></a> + <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayRaindrops) - 1 ? fronterBadges($member["id"]) : "" ?></span></a> <?php endif; ?> </td> <?php if (!isset($dayRaindrops[$index][1])): ?> @@ -256,7 +260,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php elseif ($member["name"] === "unknown"): ?> <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a> <?php else: ?> - <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayRaindrops) - 1 ? pacifier($member["id"]) : "" ?></span></a> + <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span><?= $index === count($dayRaindrops) - 1 ? fronterBadges($member["id"]) : "" ?></span></a> <?php endif; ?> </td> <?php endif; ?> |