diff options
author | Minteck <contact@minteck.org> | 2023-01-05 22:20:18 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-01-05 22:20:18 +0100 |
commit | 90b16702bb03c8d7115fa0cc6ea8d3aba5863f46 (patch) | |
tree | 6b4b28c24fc13d56184f262e61c1f1b4c51dcbf9 /pages/front.inc | |
parent | 721315d9569c6ca793e111a26349f5c2bc8972b3 (diff) | |
download | pluralconnect-90b16702bb03c8d7115fa0cc6ea8d3aba5863f46.tar.gz pluralconnect-90b16702bb03c8d7115fa0cc6ea8d3aba5863f46.tar.bz2 pluralconnect-90b16702bb03c8d7115fa0cc6ea8d3aba5863f46.zip |
Update - This is an automated commit
Diffstat (limited to 'pages/front.inc')
-rw-r--r-- | pages/front.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pages/front.inc b/pages/front.inc new file mode 100644 index 0000000..a60be1d --- /dev/null +++ b/pages/front.inc @@ -0,0 +1,30 @@ +<?php + +$parts = explode("/", $_GET["_"]); + +var_dump($parts); + +if (isset($parts[2])) { + if ($parts[2] === "cloudburst") { + $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true); + } elseif ($parts[2] === "raindrops") { + $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true); + } else { + header("Location: /"); + die(); + } + + if (count($fronters["members"]) > 0) { + header("Location: /" . $fronters["members"][0]["name"]); + die(); + } else { + if ($parts[2] === "cloudburst") { + header("Location: /cloudburst"); + } else { + header("Location: /raindrops"); + } + } +} else { + header("Location: /"); + die(); +}
\ No newline at end of file |