summaryrefslogtreecommitdiff
path: root/pages/dashboard.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/dashboard.php')
-rw-r--r--pages/dashboard.php66
1 files changed, 44 insertions, 22 deletions
diff --git a/pages/dashboard.php b/pages/dashboard.php
index 622cd20..a861636 100644
--- a/pages/dashboard.php
+++ b/pages/dashboard.php
@@ -1,9 +1,7 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
-
-$title = "Dashboard"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; global $_PROFILE;
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.php"; global $title; global $isLoggedIn; global $pages;
+require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; global $_PROFILE;
use om\IcalParser;
$poniesHavingSex = [];
@@ -32,7 +30,7 @@ foreach ($actions as $action) {
$fronter = array_map(function ($i) {
return $i["id"];
-}, ($_PROFILE["login"] === "raindrops" ? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-fronters.json"), true) : json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-fronters.json"), true))["members"])[0];
+}, ($_PROFILE["login"] === "raindrops" ? json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-fronters.json"), true) : json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-fronters.json"), true))["members"])[0] ?? null;
$viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']);
@@ -87,61 +85,77 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
setInterval(_Date);
</script>
- <div class="peh-row" style="<?php if (!$viewingPonyHasSex): ?>grid-template-columns: repeat(6, 1fr) !important;<?php endif; ?>">
+ <div class="peh-row" style="<?php if (!$viewingPonyHasSex): ?>grid-template-columns: repeat(8, 1fr) !important;<?php endif; ?>">
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["actions"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/actions" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/actions.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Actions</h6>
+ <h6 class="app-name"><?= $pages["actions"]["short"] ?></h6>
</a>
</div>
</div>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["rules"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/rules" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/rules.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Rules</h6>
+ <h6 class="app-name"><?= $pages["rules"]["short"] ?></h6>
</a>
</div>
</div>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["docs"]["name"] ?>" data-bs-toggle="tooltip">
+ <a href="/-/docs" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
+ <img src="/assets/icons/docs.svg" style="width:32px;height:32px;filter:invert(1);"><br>
+ <h6 class="app-name"><?= $pages["docs"]["short"] ?></h6>
+ </a>
+ </div>
+ </div>
+ <div class="column">
+ <div class="card" title="<?= $pages["nicknames"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/nicknames" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/nicknames.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Nicknames</h6>
+ <h6 class="app-name"><?= $pages["nicknames"]["short"] ?></h6>
</a>
</div>
</div>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["together"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/together" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/together.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Watch Together</h6>
+ <h6 class="app-name"><?= $pages["together"]["short"] ?></h6>
</a>
</div>
</div>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["splitting"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/splitting" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/form.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Splits</h6>
+ <h6 class="app-name"><?= $pages["splitting"]["short"] ?></h6>
</a>
</div>
</div>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["byfront"]["name"] ?>" data-bs-toggle="tooltip">
+ <a href="/-/byfront" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
+ <img src="/assets/icons/byfront.svg" style="width:32px;height:32px;filter:invert(1);"><br>
+ <h6 class="app-name"><?= $pages["byfront"]["short"] ?></h6>
+ </a>
+ </div>
+ </div>
+ <div class="column">
+ <div class="card" title="<?= $pages["bitset"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/bitset" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/bitset.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Bitset</h6>
+ <h6 class="app-name"><?= $pages["bitset"]["short"] ?></h6>
</a>
</div>
</div>
<?php if ($viewingPonyHasSex): ?>
<div class="column">
- <div class="card">
+ <div class="card" title="<?= $pages["toys"]["name"] ?>" data-bs-toggle="tooltip">
<a href="/-/toys" class="card-body" style="text-align:center;color: white !important; text-decoration: none !important;">
<img src="/assets/icons/toys.svg" style="width:32px;height:32px;filter:invert(1);"><br>
- <h6 class="app-name">Toys</h6>
+ <h6 class="app-name"><?= $pages["toys"]["short"] ?></h6>
</a>
</div>
</div>
@@ -167,9 +181,13 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
<h5>Fronters today</h5>
<ul>
- <?php foreach ($today1 as $index => $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id); ?>
+ <?php foreach ($today1 as $index => $id): $member = getMemberWithoutSystem($id); ?>
<li>
+ <?php if ($member["name"] === "fusion"): ?>
+ <img alt="" src="/assets/logo/logo.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span>
+ <?php else: ?>
<img alt="" src="/assets/uploads/pt-<?= $member["name"] ?>.png" style="width:24px; height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b>
+ <?php endif; ?>
<?php if (isset($today2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $today2[$index]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="/assets/uploads/pt-<?= $member2["name"] ?>.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></span><?php endif; ?>
</li>
<?php endforeach; ?>
@@ -179,7 +197,11 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
<ul>
<?php foreach ($tomorrow1 as $index => $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id); ?>
<li>
+ <?php if ($member["name"] === "fusion"): ?>
+ <img alt="" src="/assets/logo/logo.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span>
+ <?php else: ?>
<img alt="" src="/assets/uploads/pt-<?= $member["name"] ?>.png" style="width:24px; height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b>
+ <?php endif; ?>
<?php if (isset($tomorrow2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $tomorrow2[$index]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="/assets/uploads/pt-<?= $member2["name"] ?>.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></span><?php endif; ?>
</li>
<?php endforeach; ?>
@@ -252,7 +274,7 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys']
<style>
.peh-row {
display: grid;
- grid-template-columns: repeat(7, 1fr);
+ grid-template-columns: repeat(9, 1fr);
}
.column .card {