summaryrefslogtreecommitdiff
path: root/pages/travelling.inc
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-22 10:29:48 +0100
committerMinteck <contact@minteck.org>2023-02-22 10:29:48 +0100
commitbf2558253637537c2d57765e557bdc0e164c58ee (patch)
tree9c50b253090001183ba574cc073d13f74e273758 /pages/travelling.inc
parent005bbb3c5b211dbb52cf8dcedac505f8a683cf42 (diff)
downloadpluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.tar.gz
pluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.tar.bz2
pluralconnect-bf2558253637537c2d57765e557bdc0e164c58ee.zip
Updated 23 files, added assets/uploads/pt-princesscelestia.png and renamed assets/uploads/pt-luna.png (automated)
Diffstat (limited to 'pages/travelling.inc')
-rw-r--r--pages/travelling.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/travelling.inc b/pages/travelling.inc
index 674d739..46b1a7f 100644
--- a/pages/travelling.inc
+++ b/pages/travelling.inc
@@ -1,12 +1,12 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages;
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages; global $isLowerLoggedIn;
$travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true);
$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
-if (isset($_GET['toggleTravel'])) {
+if (isset($_GET['toggleTravel']) && $isLoggedIn) {
if (isset($travelling[$_GET['member']])) {
$id = $_GET['member'];
$equestria = isset($_GET['equestria']);
@@ -152,7 +152,7 @@ global $travelling;
<div>
<?php if ($travelling[$member['id']]["travelling"]): ?>
<div class="dropdown">
- <button type="button" class="btn btn-outline-danger dropdown-toggle" data-bs-toggle="dropdown">
+ <button type="button" class="btn btn-outline-danger dropdown-toggle" data-bs-toggle="dropdown" <?= $isLowerLoggedIn ? "disabled" : "" ?>>
Stop travelling
</button>
<ul class="dropdown-menu">
@@ -161,7 +161,7 @@ global $travelling;
</div>
<?php else: ?>
<div class="dropdown">
- <button type="button" class="btn btn-outline-success dropdown-toggle" data-bs-toggle="dropdown">
+ <button type="button" class="btn btn-outline-success dropdown-toggle" data-bs-toggle="dropdown" <?= $isLowerLoggedIn ? "disabled" : "" ?>>
Start travelling
</button>
<ul class="dropdown-menu">