diff options
author | polo <ordipolo@gmx.fr> | 2025-06-21 01:44:16 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-06-21 01:44:16 +0200 |
commit | 8ee3440f204dfc6532a49a05719ba37a8c4df359 (patch) | |
tree | 03dec8764e55d1a4e1983fcceea8ccd99686989a /src/post-ajax.php | |
parent | f0e0b449f2bd6c4417e467b2903b29ad03a9626d (diff) | |
download | fullcalendar-8ee3440f204dfc6532a49a05719ba37a8c4df359.zip |
échanges client/serveur
Diffstat (limited to 'src/post-ajax.php')
-rw-r--r-- | src/post-ajax.php | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/post-ajax.php b/src/post-ajax.php deleted file mode 100644 index bedfed5..0000000 --- a/src/post-ajax.php +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | <?php | ||
2 | session_start(); | ||
3 | |||
4 | if(isset($_SESSION['admin']) && $_SESSION['admin'] === true && $_SERVER['REQUEST_METHOD'] === 'POST'){ // && $_SESSION['admin'] === true | ||
5 | if($_SERVER['CONTENT_TYPE'] === 'application/json'){ | ||
6 | $data = file_get_contents('php://input'); | ||
7 | $json = json_decode($data, true); | ||
8 | //var_dump($json); | ||
9 | |||
10 | $id = isset($json['id']) ? $json['id'] : 7; // = id_event en BDD si nouvel évènement | ||
11 | echo json_encode(['success' => true, 'id' => $id]); | ||
12 | die; | ||
13 | } | ||
14 | } \ No newline at end of file | ||