From 0713fd6c1cebe1b32f173af0ef447e7853cbaf70 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Mon, 21 Dec 2009 06:29:56 +0000 Subject: (OC) fixed some stuff with the calendar git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@388 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- admin/calendar/functions.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'admin/calendar/functions.php') diff --git a/admin/calendar/functions.php b/admin/calendar/functions.php index d0c13ec..8d1d6a1 100644 --- a/admin/calendar/functions.php +++ b/admin/calendar/functions.php @@ -83,7 +83,7 @@

Events for:

- Add New Event + Add New Event
-      +      Edit  |  @@ -140,6 +140,22 @@ echo $date_arr['year']; */ global $db; + + if(isset($_POST['processed'])){ + $title = addslashes($_POST['title']); + $text = addslashes($_POST['text']); + $year = addslashes($_POST['year']); + $month = addslashes($_POST['month']); + $day = addslashes($_POST['day']); + $time = addslashes($_POST['time']); + $color = addslashes($_POST['color']); + + $date = date("Y-m-d", mktime(0, 0, 0, $month, $day, $year)); + +$db->Query("UPDATE `bayonet_events` SET `title` = '$title', `text` = '$text', `color` = '$color', `date` = '$date', `time` = '$time' WHERE `event_id` ='$event_id' LIMIT 1"); + + } + $result = $db->Query("SELECT * FROM `bayonet_events` WHERE `event_id` = $event_id LIMIT 1"); while(($row = $db->Fetch($result))!=false) { @@ -152,6 +168,7 @@ Title Color Date + Time Text @@ -192,6 +209,7 @@ echo "New event, '$title', has been added.\n"; + PageRedirect(2,"?op=calendar"); //die, because we have completed what we wanted to do. return; } -- cgit