From 96750c464fdb64071dc53f0845d68eb0bffe5a1c Mon Sep 17 00:00:00 2001 From: Faelayis <48393914+Faelayis@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:52:15 +0700 Subject: [PATCH] feat: change file structure --- COM-2305/Project/api/reservation/post.php | 4 +- COM-2305/Project/index.html | 264 +--------------------- COM-2305/Project/script/alerts.js | 62 +++++ COM-2305/Project/script/calendar.js | 25 ++ COM-2305/Project/script/events.js | 109 +++++++++ COM-2305/Project/script/fetch.js | 45 ++++ COM-2305/Project/script/utils.js | 61 +++++ 7 files changed, 308 insertions(+), 262 deletions(-) create mode 100644 COM-2305/Project/script/alerts.js create mode 100644 COM-2305/Project/script/calendar.js create mode 100644 COM-2305/Project/script/events.js create mode 100644 COM-2305/Project/script/fetch.js create mode 100644 COM-2305/Project/script/utils.js diff --git a/COM-2305/Project/api/reservation/post.php b/COM-2305/Project/api/reservation/post.php index 2e5056b..9dc82ef 100644 --- a/COM-2305/Project/api/reservation/post.php +++ b/COM-2305/Project/api/reservation/post.php @@ -2,6 +2,8 @@ header("Content-Type: application/json; charset=UTF-8"); header("Access-Control-Allow-Origin: *"); +include("../connected.php"); + $response = []; try { @@ -11,10 +13,8 @@ exit; } - include("../connected.php"); include("../../function/reservation/valid-reservation.php"); include("../../function/reservation/valid-student.php"); - include("../../function/page.php"); $reservation_date = $_POST['reservation_date']; $student_id = $_POST['student_id']; diff --git a/COM-2305/Project/index.html b/COM-2305/Project/index.html index a7b366d..a8e8f87 100644 --- a/COM-2305/Project/index.html +++ b/COM-2305/Project/index.html @@ -7,6 +7,9 @@ +