diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
commit | 953ddd82e48dd206cef5ac94456549aed13b3ad5 (patch) | |
tree | 8f003106ee2e7f422e5a22d2ee04d0db302e66c0 /pages/edit.inc | |
parent | 62a9199846b0c07c03218703b33e8385764f42d9 (diff) | |
download | pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.gz pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.bz2 pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.zip |
Updated 30 files and deleted 2976 files (automated)
Diffstat (limited to 'pages/edit.inc')
-rw-r--r-- | pages/edit.inc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/pages/edit.inc b/pages/edit.inc deleted file mode 100644 index 28b8d88..0000000 --- a/pages/edit.inc +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $isLowerLoggedIn; global $title; global $isLoggedIn; global $lang; global $pages; global $app; - -if (!isset($_GET['_']) || trim($_GET['_']) === "") peh_error("Invalid request", 400); - -$parts = explode("/", $_GET['_']); -array_shift($parts); -array_shift($parts); -$system = $parts[0]; -$member = !isset($parts[1]) || $parts[1] === "" ? null : $parts[1]; - -if ($system !== "cloudburst" && $system !== "raindrops" && $system !== $app["other"]["slug"]) peh_error("Invalid system name: " . $system, 400); -$systemCommonName = $system === "cloudburst" ? "Cloudburst System" : ($system === "raindrops" ? "Raindrops System" : $app["other"]["name"]); -$systemID = $system === "cloudburst" ? "ynmuc" : ($system === "raindrops" ? "gdapd" : $app["other"]["id"]); - -if ($isLowerLoggedIn && $systemID !== $app["other"]["id"]) { - header("Location: /") and die(); -} - -if ($member === null) { - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/sysedit.inc'; -} else { - $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "/members.json"), true); - $memberData = null; - $memberCommonName = null; - $memberID = null; - - foreach ($members as $m) { - if ($m['name'] === $member) { - $memberData = $m; - $memberCommonName = $m['display_name'] ?? $m['name']; - $memberID = $m['id']; - } - } - - if ($memberData === null) { - peh_error("System member not found", 404); - } - - require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/fragments/edit.inc'; -} - -exit;
\ No newline at end of file |