summaryrefslogtreecommitdiff
path: root/includes/util/homepage.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/util/homepage.inc')
-rw-r--r--includes/util/homepage.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/util/homepage.inc b/includes/util/homepage.inc
index 497fe2e..a78c28d 100644
--- a/includes/util/homepage.inc
+++ b/includes/util/homepage.inc
@@ -20,12 +20,12 @@ function newHomepage($id, $page, $title) {
<div class="new-homepage-system-list" id="new-homepage-system-<?= $id ?>-list">
<?php $list = array_values(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $id . "/members.json"), true), $id), $id)); foreach ($list as $index => $member): ?>
<a href="/<?= $member["name"] ?>" class="new-homepage-link <?= $index === count($list) - 1 ? "new-homepage-link-last" : "" ?>" style="color: white; text-decoration: none !important; display: block; background-color: #<?= $member["color"] ?>22; padding: 5px 10px;">
- <img src="<?= getAsset(($travelling[$member["id"]]["travelling"] && !$travelling[$member["id"]]["equestria"]) ? ($id === "gdapd" ? "ynmuc" : "gdapd") : $id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
+ <img src="<?= getAsset(isset($travelling[$member["id"]]) && ($travelling[$member["id"]]["travelling"] && !$travelling[$member["id"]]["equestria"]) ? ($id === "gdapd" ? "ynmuc" : "gdapd") : $id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
<span style="width: calc(100% - 37px); vertical-align: middle; margin-left: 5px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"><?= $member["display_name"] ?? $member["name"] ?></span>
<span style="vertical-align: middle; float:right;">
- <?php if ($travelling[$member["id"]]["travelling"] && $travelling[$member["id"]]["equestria"]): ?>
+ <?php if (isset($travelling[$member["id"]]) && $travelling[$member["id"]]["travelling"] && $travelling[$member["id"]]["equestria"]): ?>
<img src="/assets/logo/<?= $member["_metadata"]["fictive"] ? "equestria" : ($member["_metadata"]["fictive2"] ? "celeste" : "") ?>.png" style="width: 24px; height: 24px; margin-top: 5px;">
- <?php elseif ($travelling[$member["id"]]["travelling"]): ?>
+ <?php elseif (isset($travelling[$member["id"]]) && $travelling[$member["id"]]["travelling"]): ?>
<img src="<?= getAsset($id === "gdapd" ? "ynmuc" : "gdapd") ?>" style="width: 24px; height: 24px; margin-top: 5px;">
<?php endif; ?>
</span>