aboutsummaryrefslogtreecommitdiffstats
path: root/functions
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
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')
-rw-r--r--functions/date_functions.php43
-rw-r--r--functions/ical_parser.php4
2 files changed, 45 insertions, 2 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
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 8b340a0..2c193b4 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -227,13 +227,13 @@ if ($parse_file) {
$end_time_tmp = '2400';
}
$nbrOfOverlaps = checkOverlap($start_date_tmp, $start_time_tmp, $end_time_tmp, $uid);
- $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true);
+ $master_array[$start_date_tmp][$time_tmp][$uid] = array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => true, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee) );
$start_tmp = strtotime('+1 day',$start_tmp);
}
if (!$write_processed) $master_array[$start_date][($hour.$minute)][$uid]['exception'] = true;
} else {
$nbrOfOverlaps = checkOverlap($start_date, $start_time, $end_time, $uid);
- $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false);
+ $master_array[($start_date)][($hour.$minute)][$uid] = array ('event_start' => $start_time, 'event_end' => $end_time, 'start_unixtime' => $start_unixtime, 'end_unixtime' => $end_unixtime, 'event_text' => $summary, 'event_length' => $length, 'event_overlap' => $nbrOfOverlaps, 'description' => $description, 'status' => $status, 'class' => $class, 'spans_day' => false, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee) );
if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true;
}
}

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