summaryrefslogtreecommitdiff
path: root/pages/api
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api')
-rw-r--r--pages/api/fronter.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/pages/api/fronter.php b/pages/api/fronter.php
index 9f70fdc..a908efa 100644
--- a/pages/api/fronter.php
+++ b/pages/api/fronter.php
@@ -1,5 +1,6 @@
<?php
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
if (!$isLoggedIn || $isLowerLoggedIn) {
header("Location: /-/login");
@@ -39,6 +40,8 @@ switch ($type) {
if (!isset($list[$date])) $list[$date] = [];
$list[$date][] = [$member, null];
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
case "cofront":
@@ -57,6 +60,8 @@ switch ($type) {
}
$list[$date][$index][1] = $member;
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
case "delete":
@@ -72,6 +77,8 @@ switch ($type) {
unset($day[$index]);
$list[$date] = array_values($day);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -87,6 +94,8 @@ switch ($type) {
}
$list[$date][$index][1] = null;
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -102,6 +111,8 @@ switch ($type) {
}
moveElement($list[$date], $index, $index + 1 < count($list[$date]) ? $index + 1 : $index);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -117,6 +128,8 @@ switch ($type) {
}
moveElement($list[$date], $index, count($list[$date]) - 1);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -132,6 +145,8 @@ switch ($type) {
}
moveElement($list[$date], $index, $index - 1 > -1 ? $index - 1 : $index);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -147,6 +162,8 @@ switch ($type) {
}
moveElement($list[$date], $index, 0);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;