summaryrefslogtreecommitdiff
path: root/api/fronter.php
diff options
context:
space:
mode:
Diffstat (limited to 'api/fronter.php')
-rw-r--r--api/fronter.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/fronter.php b/api/fronter.php
index f962625..0dd6e99 100644
--- a/api/fronter.php
+++ b/api/fronter.php
@@ -1,6 +1,6 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn;
if (!$isLoggedIn) header("Location: /-/login") and die();
$system = $_GET['s'] ?? null;
@@ -18,7 +18,7 @@ if (!isset($type) || trim($type) === "")
if (!isset($date) || trim($date) === "" || strlen($date) !== 10 || !preg_match("/[\d-]/i", $date))
header("Location: /?error=Date not found") and die();
-$list = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-planner.json"), true);
+$list = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/$system.json"), true);
function moveElement(&$array, $a, $b) {
$out = array_splice($array, $a, 1);
@@ -105,6 +105,6 @@ switch ($type) {
break;
}
-file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-planner.json", json_encode($list));
+file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/$system.json", json_encode($list));
die(); \ No newline at end of file