summaryrefslogtreecommitdiff
path: root/app.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
committerMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
commit108525534c28013cfe1897c30e4565f9893f3766 (patch)
treedd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /app.php
parent2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff)
downloadpluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip
Update
Diffstat (limited to 'app.php')
-rw-r--r--app.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/app.php b/app.php
index 8889a38..4df6b0b 100644
--- a/app.php
+++ b/app.php
@@ -16,20 +16,20 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) {
header("Location: /?error=File not found") and die();
}
} elseif ($toplevel === "") {
- require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/home.php";
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/home.inc";
} else {
if ($toplevel === "-") {
$pagename = substr($pagename, 2);
$toplevel = explode("/", $pagename)[0];
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".php")) {
- require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".php";
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) {
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc";
} else {
header("Location: /?error=Page not found: " . strip_tags($pagename)) and die();
}
} else if ($toplevel === "api") {
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".php")) {
- require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".php";
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) {
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc";
}
} else if ($toplevel === "cloudburst" || $toplevel === "raindrops") {
$parts = explode("/", $_GET['_']);
@@ -48,23 +48,23 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) {
die();
}
- require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.php";
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc";
} else {
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".php")) {
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) {
header("Location: /-/" . $toplevel);
} else {
$namesCloudburst = [...array_map(function ($i) {
return $i['name'];
- }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true)), "unknown-cb"];
+ }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true)), "unknown-cb"];
$namesRaindrops = [...array_map(function ($i) {
return $i['name'];
- }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true)), "unknown-rd"];
+ }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true)), "unknown-rd"];
if ((in_array($toplevel, $namesCloudburst) || in_array($toplevel, $namesRaindrops)) && $toplevel !== "unknown") {
- require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.php";
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc";
} else {
global $toplevel;
- require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/short.php";
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/short.inc";
}
}
}