From 1792aaee644e1e6cd99ffd4c6cb09fc0355e4388 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 23 Mar 2024 16:43:42 -0400 Subject: [PATCH] Feature added location to calendar events and created new tab called details in calendar events for description and location --- calendar_event_add_modal.php | 19 ++++++++++++++++++- calendar_event_edit_modal.php | 24 +++++++++++++++++------- calendar_events.php | 1 + client_events.php | 1 + post/event.php | 4 ++-- post/event_model.php | 1 + 6 files changed, 40 insertions(+), 10 deletions(-) diff --git a/calendar_event_add_modal.php b/calendar_event_add_modal.php index 6b14e997..f7dfdac1 100644 --- a/calendar_event_add_modal.php +++ b/calendar_event_add_modal.php @@ -14,6 +14,9 @@ + @@ -93,8 +96,22 @@ + + +
+
- + +
+
+ +
+ +
+
+ +
+
diff --git a/calendar_event_edit_modal.php b/calendar_event_edit_modal.php index 99eb0207..89769ad4 100644 --- a/calendar_event_edit_modal.php +++ b/calendar_event_edit_modal.php @@ -17,6 +17,9 @@ + @@ -60,7 +63,6 @@ -
@@ -94,17 +96,25 @@
+
+ + + +
+
+ +
+
+ +
+ +
- +
- -
- -
-
diff --git a/calendar_events.php b/calendar_events.php index 65856d1e..52a29a4b 100644 --- a/calendar_events.php +++ b/calendar_events.php @@ -32,6 +32,7 @@ while ($row = mysqli_fetch_array($sql)) { $event_id = intval($row['event_id']); $event_title = nullable_htmlentities($row['event_title']); $event_description = nullable_htmlentities($row['event_description']); + $event_location = nullable_htmlentities($row['event_location']); $event_start = nullable_htmlentities($row['event_start']); $event_end = nullable_htmlentities($row['event_end']); $event_repeat = nullable_htmlentities($row['event_repeat']); diff --git a/client_events.php b/client_events.php index 41ae75ff..fe18fb5c 100644 --- a/client_events.php +++ b/client_events.php @@ -34,6 +34,7 @@ while ($row = mysqli_fetch_array($sql)) { $event_id = intval($row['event_id']); $event_title = nullable_htmlentities($row['event_title']); $event_description = nullable_htmlentities($row['event_description']); + $event_location = nullable_htmlentities($row['event_location']); $event_start = nullable_htmlentities($row['event_start']); $event_end = nullable_htmlentities($row['event_end']); $event_repeat = nullable_htmlentities($row['event_repeat']); diff --git a/post/event.php b/post/event.php index aa729f8d..831a2839 100644 --- a/post/event.php +++ b/post/event.php @@ -27,7 +27,7 @@ if (isset($_POST['add_event'])) { require_once 'post/event_model.php'; - mysqli_query($mysqli,"INSERT INTO events SET event_title = '$title', event_description = '$description', event_start = '$start', event_end = '$end', event_repeat = '$repeat', event_calendar_id = $calendar_id, event_client_id = $client"); + mysqli_query($mysqli,"INSERT INTO events SET event_title = '$title', event_location = '$location', event_description = '$description', event_start = '$start', event_end = '$end', event_repeat = '$repeat', event_calendar_id = $calendar_id, event_client_id = $client"); $event_id = mysqli_insert_id($mysqli); @@ -103,7 +103,7 @@ if (isset($_POST['edit_event'])) { $event_id = intval($_POST['event_id']); - mysqli_query($mysqli,"UPDATE events SET event_title = '$title', event_description = '$description', event_start = '$start', event_end = '$end', event_repeat = '$repeat', event_calendar_id = $calendar_id, event_client_id = $client WHERE event_id = $event_id"); + mysqli_query($mysqli,"UPDATE events SET event_title = '$title', event_location = '$location', event_description = '$description', event_start = '$start', event_end = '$end', event_repeat = '$repeat', event_calendar_id = $calendar_id, event_client_id = $client WHERE event_id = $event_id"); //If email is checked if ($email_event == 1) { diff --git a/post/event_model.php b/post/event_model.php index a55272c5..d3f39b6d 100644 --- a/post/event_model.php +++ b/post/event_model.php @@ -1,6 +1,7 @@