aboutsummaryrefslogtreecommitdiffstats
path: root/functions/date_functions.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-05-28 04:19:25 +0000
committerChad Little <clittle@users.sourceforge.net>2003-05-28 04:19:25 +0000
commit015920d1d0228907f9815c02f388021fb3a5bfc5 (patch)
tree4558f14e170c51f706603dc63e9936bbdae77458 /functions/date_functions.php
parent9e07f4f2019973e0a42d6b1e21534572efee8013 (diff)
downloadphpicalendar-015920d1d0228907f9815c02f388021fb3a5bfc5.tar.gz
phpicalendar-015920d1d0228907f9815c02f388021fb3a5bfc5.tar.bz2
phpicalendar-015920d1d0228907f9815c02f388021fb3a5bfc5.zip
Started migration of javascript to function, added improved event.php for location, status, organizer, and attendees.
Updated english language include.
Diffstat (limited to 'functions/date_functions.php')
-rw-r--r--functions/date_functions.php43
1 files changed, 43 insertions, 0 deletions
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 <http> 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, '<b><i><u>');
+ }
+ 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 "<a class=\"psf\" href=\"";
+ if ((!(ereg("([[:alpha:]]+://[^<>[: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</a>";
+ }
+}
+
?> \ No newline at end of file

© 2014-2024 Faster IT GmbH | imprint | privacy policy