summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/api/emergency-real.php7
-rw-r--r--pages/api/emergency.php7
-rw-r--r--pages/api/pleasure-real.php7
-rw-r--r--pages/api/pleasure.php7
-rw-r--r--pages/api/wakeup-real.php7
-rw-r--r--pages/api/wakeup.php7
6 files changed, 36 insertions, 6 deletions
diff --git a/pages/api/emergency-real.php b/pages/api/emergency-real.php
index d788ca8..1e4c0e9 100644
--- a/pages/api/emergency-real.php
+++ b/pages/api/emergency-real.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
-if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn && !$isLowerLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
diff --git a/pages/api/emergency.php b/pages/api/emergency.php
index 9024197..5815148 100644
--- a/pages/api/emergency.php
+++ b/pages/api/emergency.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
-if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn && !$isLowerLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
diff --git a/pages/api/pleasure-real.php b/pages/api/pleasure-real.php
index 2d631ff..5ac0039 100644
--- a/pages/api/pleasure-real.php
+++ b/pages/api/pleasure-real.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
-if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn && !$isLowerLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
if ($_PROFILE["login"] === "cloudburst") return;
diff --git a/pages/api/pleasure.php b/pages/api/pleasure.php
index b300a70..705adfe 100644
--- a/pages/api/pleasure.php
+++ b/pages/api/pleasure.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
-if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn && !$isLowerLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
if ($_PROFILE["login"] === "cloudburst") return;
diff --git a/pages/api/wakeup-real.php b/pages/api/wakeup-real.php
index 0467f27..fd113ba 100644
--- a/pages/api/wakeup-real.php
+++ b/pages/api/wakeup-real.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
$frontCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true)["members"];
diff --git a/pages/api/wakeup.php b/pages/api/wakeup.php
index c338b9a..e4603ef 100644
--- a/pages/api/wakeup.php
+++ b/pages/api/wakeup.php
@@ -1,7 +1,12 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
+
+if (!$isLoggedIn) {
+ header("Location: /-/login");
+ die();
+}
+
global $_PROFILE;
$frontCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true)["members"];