From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- api/pleasure-real.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'api/pleasure-real.php') 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([ -- cgit