summaryrefslogtreecommitdiff
path: root/api/pleasure-real.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-09-21 22:42:33 +0200
committerMinteck <contact@minteck.org>2022-09-21 22:42:33 +0200
commite95b208af90cc386a7d8d1bcab426727cf4f0121 (patch)
treeb293e0c644513fbeb6e9ad29be97fa6347a55e9f /api/pleasure-real.php
parentb5f589c323f415bb42ea7069cb4d1a8a2233dd69 (diff)
downloadpluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.tar.gz
pluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.tar.bz2
pluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.zip
Update time
Diffstat (limited to 'api/pleasure-real.php')
-rw-r--r--api/pleasure-real.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/api/pleasure-real.php b/api/pleasure-real.php
index d62c8d4..fe8896d 100644
--- a/api/pleasure-real.php
+++ b/api/pleasure-real.php
@@ -4,7 +4,19 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLogg
if (!$isLoggedIn) header("Location: /-/login") and die();
global $_PROFILE;
-if ($_PROFILE['login'] === "raindrops") $pony = "Cloudy"; else $pony = "Lavender";
+$frontCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-fronters.json"), true)["members"];
+$frontRaindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-fronters.json"), true)["members"];
+
+if ($frontCloudburst[0]["id"] === "erknz" && $frontRaindrops[0]["id"] === "qbzxm") {
+ if ($_PROFILE['login'] === "raindrops") $pony = "Cloudy"; else $pony = "Lavender";
+} else if ($frontCloudburst[0]["id"] === "zzise" && $frontRaindrops[0]["id"] === "tfbob") {
+ if ($_PROFILE['login'] === "raindrops") $pony = "Violet"; else $pony = "Sky Dream";
+} else if ($frontCloudburst[0]["id"] === "vncoa" && $frontRaindrops[0]["id"] === "qraku") {
+ if ($_PROFILE['login'] === "raindrops") $pony = "Starry"; else $pony = "Minty";
+} else {
+ $pony = "somepony";
+}
+
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, stream_context_create([