summaryrefslogtreecommitdiff
path: root/pages/travelling.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/travelling.php')
-rw-r--r--pages/travelling.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/pages/travelling.php b/pages/travelling.php
index c40ebab..95c7851 100644
--- a/pages/travelling.php
+++ b/pages/travelling.php
@@ -1,7 +1,6 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.php"; global $title; global $isLoggedIn;
$travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling.json"), true);
$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
@@ -94,11 +93,11 @@ if (isset($_GET['toggleTravel'])) {
}
header("Location: /-/travelling");
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling.json", json_encode($travelling, JSON_PRETTY_PRINT));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling.json", utf8_encode(json_encode($travelling, JSON_PRETTY_PRINT)));
die();
}
-$title = "System travels manager"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
global $travelling;
?>
@@ -125,7 +124,7 @@ global $travelling;
<div class="relation-item" style="display:flex;align-items:center;margin-left:10px;padding:0 20px;">
<div>
- <b style="padding-right:5px;">Current System:</b><span class="list-separator-mobile"><br></span>
+ <b style="padding-right:5px;">Current system:</b><span class="list-separator-mobile"><br></span>
<?php $system = $member['_system'] === "gdapd" ? ($travelling[$member['id']]["travelling"] ? "ynmuc" : "gdapd") : ($travelling[$member['id']]["travelling"] ? "gdapd" : "ynmuc"); ?>
<a class="member-link" href="/<?= $system === "gdapd" ? "raindrops" : "cloudburst" ?>"><img style="width:24px;border-radius:5px;" src="/assets/uploads/<?= $system === "gdapd" ? "raindrops" : "cloudburst" ?>.png"> <?= $system === "gdapd" ? "Raindrops" : "Cloudburst" ?> System</a>
<?php if ($travelling[$member['id']]["travelling"]): ?>