blob: 215e1cf6b581f37ddf446c2b30c14b66e25249ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
global $_PROFILE;
header("Content-Type: application/json");
if ($_PROFILE['login'] === "raindrops") {
die('{"name": "Raindrops System", "id": "raindrops", "pluralkit": "gdapd"}');
} else if ($_PROFILE["login"] === "cloudburst") {
die('{"name": "Cloudburst System", "id": "cloudburst", "pluralkit": "ynmuc"}');
} else {
die(json_encode([
"name" => $app["other"]["name"],
"id" => $app["other"]["slug"],
"pluralkit" => $app["other"]["id"]
]));
}
|