|
From: <cl...@us...> - 2003-05-28 04:19:29
|
Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv16911/functions
Modified Files:
date_functions.php ical_parser.php
Log Message:
Started migration of javascript to function, added improved event.php for location, status, organizer, and attendees.
Updated english language include.
Index: date_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** date_functions.php 8 Dec 2002 09:45:58 -0000 1.12
--- date_functions.php 28 May 2003 04:19:25 -0000 1.13
***************
*** 161,164 ****
--- 161,207 ----
}
+ 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>";
+ }
+ }
+
?>
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** ical_parser.php 11 Mar 2003 23:02:15 -0000 1.87
--- ical_parser.php 28 May 2003 04:19:25 -0000 1.88
***************
*** 228,232 ****
}
$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);
$start_tmp = strtotime('+1 day',$start_tmp);
}
--- 228,232 ----
}
$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, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee) );
$start_tmp = strtotime('+1 day',$start_tmp);
}
***************
*** 234,238 ****
} 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);
if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true;
}
--- 234,238 ----
} 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, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee) );
if (!$write_processed) $master_array[($start_date)][($hour.$minute)][$uid]['exception'] = true;
}
|