diff options
Diffstat (limited to 'pages/travelling.inc')
-rw-r--r-- | pages/travelling.inc | 8 |
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"> |