diff options
author | polo <ordipolo@gmx.fr> | 2025-06-19 03:00:57 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-06-19 03:00:57 +0200 |
commit | 2521ba44fed09eaf8ba8569e783e1c7468e3f31d (patch) | |
tree | 87fc8c03fd76d27d6cee70a129e40e35f5488d08 /src | |
parent | 04f4440a77be75f8d270fe1fed69e8e4b1a32483 (diff) | |
download | fullcalendar-2521ba44fed09eaf8ba8569e783e1c7468e3f31d.zip |
mode admin et non admin
Diffstat (limited to 'src')
-rw-r--r-- | src/post-ajax.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/post-ajax.php b/src/post-ajax.php index df5a01a..bedfed5 100644 --- a/src/post-ajax.php +++ b/src/post-ajax.php | |||
@@ -1,5 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | if($_SERVER['REQUEST_METHOD'] === 'POST'){ // && $_SESSION['admin'] === true | 2 | session_start(); |
3 | |||
4 | if(isset($_SESSION['admin']) && $_SESSION['admin'] === true && $_SERVER['REQUEST_METHOD'] === 'POST'){ // && $_SESSION['admin'] === true | ||
3 | if($_SERVER['CONTENT_TYPE'] === 'application/json'){ | 5 | if($_SERVER['CONTENT_TYPE'] === 'application/json'){ |
4 | $data = file_get_contents('php://input'); | 6 | $data = file_get_contents('php://input'); |
5 | $json = json_decode($data, true); | 7 | $json = json_decode($data, true); |