From 015920d1d0228907f9815c02f388021fb3a5bfc5 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 28 May 2003 04:19:25 +0000 Subject: Started migration of javascript to function, added improved event.php for location, status, organizer, and attendees. Updated english language include. --- functions/date_functions.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'functions/date_functions.php') diff --git a/functions/date_functions.php b/functions/date_functions.php index 9f6cb15..e8abe2c 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -160,5 +160,48 @@ function chooseOffset($time) { return $offset; } +function openevent($cal, $st, $end, $arr, $lines, $wrap, $clic, $fclic) { + $event_text = stripslashes(urldecode($arr["event_text"])); + # for iCal pseudo tag comptability + if (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$reg)) { + $ev = $reg[1] . $reg[2]; + $event_text = $reg[2]; + } else { + $ev = $arr["event_text"]; + $event_text = strip_tags($event_text, ''); + } + if ($arr["organizer"]) { + $organizer = urlencode(addslashes($arr["organizer"])); + } + if ($arr["attendee"]) { + $attendee = urlencode(addslashes($arr["attendee"])); + } + if ($arr["location"]) { + $organizer = $arr["location"]; + } + if ($arr["status"]) { + $organizer = $arr["status"]; + } + if ($event_text != "") { + if ($lines) $event_text = word_wrap($event_text, $wrap, $lines); + $dsc =urlencode(addslashes($arr["description"])); + echo "[:space:]]+)", $ev, $res))) || ($dsc)) { + echo "javascript:w=window.open('"; + echo "includes/event.php?event="; + echo urlencode(addslashes($ev)); + echo "&cal="; + echo urlencode(addslashes($cal)); + echo "&start=$st&end=$end&description=$dsc&status=$status&location=$location&organizer=$organizer&attendee=$attendee"; + echo "','Popup','"; + echo "scrollbars=yes,width=460,height=275"; + echo "');w.focus()"; + } else { + echo $res[1]; + } + echo "\">$clic$event_text"; + } +} + ?> \ No newline at end of file -- cgit v1.2.3