forked from extern/egroupware
iCalendar looks to be working. I think this is about 99% compliant. The one thing I know that is not working is the GEO type.
This commit is contained in:
parent
e045003bfe
commit
7768e27072
@ -37,104 +37,116 @@ echo "Start Time : ".$phpgw->common->show_date()."<br>\n";
|
||||
|
||||
$vcalendar = ExecMethod('calendar.vCalendar.read',$contents);
|
||||
|
||||
echo "Product ID = ".$vcalendar->prodid->value."<br>\n";
|
||||
echo "Method = ".$vcalendar->method->value."<br>\n";
|
||||
echo "Version = ".$vcalendar->version->value."<br>\n";
|
||||
echo "Product ID = ".$vcalendar['prodid']['value']."<br>\n";
|
||||
echo "Method = ".$vcalendar['method']['value']."<br>\n";
|
||||
echo "Version = ".$vcalendar['version']['value']."<br>\n";
|
||||
|
||||
for($i=0;$i<count($vcalendar->timezone);$i++)
|
||||
{
|
||||
echo "<br>\nTIMEZONE<br>\n";
|
||||
if($vcalendar->timezone[$i]->tzdata)
|
||||
{
|
||||
for($j=0;$j<count($vcalendar->timezone[$i]->tzdata);$j++)
|
||||
{
|
||||
echo "TZDATA #$j<br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for($i=0;$i<count($vcalendar->event);$i++)
|
||||
for($i=0;$i<count($vcalendar['event']);$i++)
|
||||
{
|
||||
echo "<br>\nEVENT<br>\n";
|
||||
if($vcalendar->event[$i]->calscale->value)
|
||||
if($vcalendar['event'][$i]['uid'])
|
||||
{
|
||||
echo "Calscale = ".$vcalendar->event[$i]->calscale->value."<br>\n";
|
||||
echo 'UID = '.$vcalendar['event'][$i]['uid']['value']."<br>\n";
|
||||
}
|
||||
if($vcalendar->event[$i]->description->value)
|
||||
if($vcalendar['event'][$i]['calscale'])
|
||||
{
|
||||
echo "Description (Value) = ".$vcalendar->event[$i]->description->value."<br>\n";
|
||||
echo "Calscale = ".$vcalendar['event'][$i]['calscale']."<br>\n";
|
||||
}
|
||||
if($vcalendar->event[$i]->description->altrep)
|
||||
if($vcalendar['event'][$i]['description']['value'])
|
||||
{
|
||||
echo "Description (Alt Rep) = ".$vcalendar->event[$i]->description->altrep."<br>\n";
|
||||
echo "Description (Value) = ".$vcalendar['event'][$i]['description']['value']."<br>\n";
|
||||
}
|
||||
if($vcalendar->event[$i]->description->x_type)
|
||||
if($vcalendar['event'][$i]['description']['altrep'])
|
||||
{
|
||||
for($j=0;$j<count($vcalendar->event[$i]->description->x_type);$j++)
|
||||
echo "Description (Alt Rep) = ".$vcalendar['event'][$i]['description']['altrep']."<br>\n";
|
||||
}
|
||||
if($vcalendar['event'][$i]['description']['x_type'])
|
||||
{
|
||||
for($j=0;$j<count($vcalendar['event'][$i]['description']['x_type']);$j++)
|
||||
{
|
||||
echo "Description (X-".$vcalendar->event[$i]->description->x_type[$j]->name.") = ".$vcalendar->event[$i]->description->x_type[$j]->value."<br>\n";
|
||||
echo "Description (X-".$vcalendar['event'][$i]['description']['x_type'][$j]['name'].") = ".$vcalendar->event[$i]->description->x_type[$j]->value."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar->event[$i]->summary->value)
|
||||
if($vcalendar['event'][$i]['summary']['value'])
|
||||
{
|
||||
echo "Summary = ".$vcalendar->event[$i]->summary->value."<br>\n";
|
||||
echo "Summary = ".$vcalendar['event'][$i]['summary']['value']."<br>\n";
|
||||
}
|
||||
if(!empty($vcalendar->event[$i]->comment))
|
||||
if(!empty($vcalendar['event'][$i]['comment']))
|
||||
{
|
||||
for($j=0;$j<count($vcalendar->event[$i]->comment);$j++)
|
||||
for($j=0;$j<count($vcalendar['event'][$i]['comment']);$j++)
|
||||
{
|
||||
echo "Comment = ".$vcalendar->event[$i]->comment[$j]->value."<br>\n";
|
||||
echo "Comment = ".$vcalendar['event'][$i]['comment'][$j]['value']."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar->event[$i]->location->value)
|
||||
if($vcalendar['event'][$i]['location']['value'])
|
||||
{
|
||||
echo "Location = ".$vcalendar->event[$i]->location->value."<br>\n";
|
||||
echo "Location = ".$vcalendar['event'][$i]['location']['value']."<br>\n";
|
||||
}
|
||||
echo "Sequence = ".$vcalendar->event[$i]->sequence."<br>\n";
|
||||
echo "Date Start : ".$phpgw->common->show_date(mktime($vcalendar->event[$i]->dtstart->value->hour,$vcalendar->event[$i]->dtstart->value->min,$vcalendar->event[$i]->dtstart->value->sec,$vcalendar->event[$i]->dtstart->value->month,$vcalendar->event[$i]->dtstart->value->mday,$vcalendar->event[$i]->dtstart->value->year) - $phpgw->calendar->datatime->tz_offset)."<br>\n";
|
||||
if($vcalendar->event[$i]->dtstart->tzid)
|
||||
echo "Sequence = ".$vcalendar['event'][$i]['sequence']."<br>\n";
|
||||
// echo _debug_array($vcalendar['event'][$i]['dtstart'])."<br>\n";
|
||||
echo "Date Start : ".$phpgw->common->show_date(mktime($vcalendar['event'][$i]['dtstart']['hour'],$vcalendar['event'][$i]['dtstart']['min'],$vcalendar['event'][$i]['dtstart']['sec'],$vcalendar['event'][$i]['dtstart']['month'],$vcalendar['event'][$i]['dtstart']['mday'],$vcalendar['event'][$i]['dtstart']['year']) - $phpgw->calendar->datatime->tz_offset)."<br>\n";
|
||||
if($vcalendar['event'][$i]['dtstart']['tzid'])
|
||||
{
|
||||
echo "Date Start TZID : ".$vcalendar->event[$i]->dtstart->tzid."<br>\n";
|
||||
echo "Date Start TZID : ".$vcalendar['event'][$i]['dtstart']['tzid']."<br>\n";
|
||||
}
|
||||
if($vcalendar->event[$i]->rrule)
|
||||
if($vcalendar['event'][$i]['rrule'])
|
||||
{
|
||||
for($j=0;$j<count($vcalendar->event[$i]->rrule);$j++)
|
||||
for($j=0;$j<count($vcalendar['event'][$i]['rrule']);$j++)
|
||||
{
|
||||
echo "Recurrence : Frequency = ".$vcalendar->event[$i]->rrule[$j]->freq." Count = ".$vcalendar->event[$i]->rrule[$j]->count."<br>\n";
|
||||
}
|
||||
}
|
||||
echo "Class = ".$vcalendar->event[$i]->class->value."<br>\n";
|
||||
if($vcalendar->event[$i]->organizer)
|
||||
{
|
||||
echo "Organizer = ".$vcalendar->event[$i]->organizer->mailto->user.'@'.$vcalendar->event[$i]->organizer->mailto->host."<br>\n";
|
||||
if($vcalendar->event[$i]->organizer->dir)
|
||||
{
|
||||
echo "Organizer Dir = ".$vcalendar->event[$i]->organizer->dir."<br>\n";
|
||||
}
|
||||
}
|
||||
for($j=0;$j<count($vcalendar->event[$i]->attendee);$j++)
|
||||
{
|
||||
echo "<br>\nAttendee[$j] CN = ".$vcalendar->event[$i]->attendee[$j]->cn."<br>\n";
|
||||
if($vcalendar->event[$i]->attendee[$j]->dir)
|
||||
{
|
||||
echo "Attendee[$j] Dir = ".$vcalendar->event[$i]->attendee[$j]->dir."<br>\n";
|
||||
}
|
||||
echo "Attendee[$j] Address = ".$vcalendar->event[$i]->attendee[$j]->mailto->user.'@'.$vcalendar->event[$i]->attendee[$j]->mailto->host."<br>\n";
|
||||
echo "Attendee[$j] Role = ".$vcal->switch_role($vcalendar->event[$i]->attendee[$j]->role)."<br>\n";
|
||||
echo "Attendee[$j] RSVP = ".$vcal->switch_rsvp($vcalendar->event[$i]->attendee[$j]->rsvp)."<br>\n";
|
||||
// echo "Attendee[$j] RSVP = ".$vcalendar->event[$i]->attendee[$j]->rsvp."<br>\n";
|
||||
if($vcalendar->event[$i]->attendee[$j]->x_type)
|
||||
{
|
||||
for($k=0;$k<count($vcalendar->event[$i]->attendee[$j]->x_type);$k++)
|
||||
if($vcalendar['event'][$i]['rrule'][$j]['freq'])
|
||||
{
|
||||
echo "Attendee[$j] (X-".$vcalendar->event[$i]->attendee[$j]->x_type[$k]->name.") = ".$vcalendar->event[$i]->attendee[$j]->x_type[$k]->value."<br>\n";
|
||||
echo "Recurrence : Frequency = ".$vcalendar['event'][$i]['rrule'][$j]['freq']."<br>\n";
|
||||
}
|
||||
if($vcalendar['event'][$i]['rrule'][$j]['byday'])
|
||||
{
|
||||
echo "Recurrence : Byday = ".$vcalendar['event'][$i]['rrule'][$j]['byday']."<br>\n";
|
||||
}
|
||||
if($vcalendar['event'][$i]['rrule'][$j]['until'])
|
||||
{
|
||||
echo "Recurrence : Until = ".date('Ymd',mktime($vcalendar['event'][$i]['rrule'][$j]['until']['hour'],$vcalendar['event'][$i]['rrule'][$j]['until']['min'],$vcalendar['event'][$i]['rrule'][$j]['until']['sec'],$vcalendar['event'][$i]['rrule'][$j]['until']['month'],$vcalendar['event'][$i]['rrule'][$j]['until']['mday'],$vcalendar['event'][$i]['rrule'][$j]['until']['year']))."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar->event[$i]->attendee[$j]->delegated_from->user && $vcalendar->event[$i]->attendee[$j]->delegated_from->host)
|
||||
}
|
||||
echo "Class = ".$vCalendar->switch_class($vcalendar['event'][$i]['class'])."<br>\n";
|
||||
if($vcalendar['event'][$i]['organizer'])
|
||||
{
|
||||
echo "Organizer = ".$vcalendar['event'][$i]['organizer']['mailto']['user'].'@'.$vcalendar['event'][$i]['organizer']['mailto']['host']."<br>\n";
|
||||
if($vcalendar['event'][$i]['organizer']['dir'])
|
||||
{
|
||||
echo "Attendee[$j] DELEGATED_FROM = ".$vcalendar->event[$i]->attendee[$j]->delegated_from->user.'@'.$vcalendar->event[$i]->attendee[$j]->delegated_from->host."<br>\n";
|
||||
echo "Organizer Dir = ".$vcalendar['event'][$i]['organizer']['dir']."<br>\n";
|
||||
}
|
||||
}
|
||||
for($j=0;$j<count($vcalendar['event'][$i]['attendee']);$j++)
|
||||
{
|
||||
echo "<br>\nAttendee[$j] CN = ".$vcalendar['event'][$i]['attendee'][$j]['cn']."<br>\n";
|
||||
if($vcalendar['event'][$i]['attendee'][$j]['dir'])
|
||||
{
|
||||
echo "Attendee[$j] Dir = ".$vcalendar['event'][$i]['attendee'][$j]['dir']."<br>\n";
|
||||
}
|
||||
echo "Attendee[$j] Address = ".$vcalendar['event'][$i]['attendee'][$j]['mailto']['user'].'@'.$vcalendar['event'][$i]['attendee'][$j]['mailto']['host']."<br>\n";
|
||||
echo "Attendee[$j] Role = ".$vCalendar->switch_role($vcalendar['event'][$i]['attendee'][$j]['role'])."<br>\n";
|
||||
echo "Attendee[$j] RSVP = ".$vCalendar->switch_rsvp($vcalendar['event'][$i]['attendee'][$j]['rsvp'])."<br>\n";
|
||||
// echo "Attendee[$j] RSVP = ".$vcalendar['event'][$i]['attendee'][$j]['rsvp']."<br>\n";
|
||||
if($vcalendar['event'][$i]['attendee'][$j]['x_type'])
|
||||
{
|
||||
for($k=0;$k<count($vcalendar['event'][$i]['attendee'][$j]['x_type']);$k++)
|
||||
{
|
||||
echo "Attendee[$j] (X-".$vcalendar['event'][$i]['attendee'][$j]['x_type'][$k]['name'].") = ".$vcalendar['event'][$i]['attendee'][$j]['x_type'][$k]['value']."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar['event'][$i]['attendee'][$j]['delegated_from']['user'] && $vcalendar['event'][$i]['attendee'][$j]['delegated_from']['host'])
|
||||
{
|
||||
echo "Attendee[$j] DELEGATED_FROM = ".$vcalendar['event'][$i]['attendee'][$j]['delegated_from']['user'].'@'.$vcalendar['event'][$i]['attendee'][$j]['delegated_from']['host']."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar['event'][$i]['alarm'])
|
||||
{
|
||||
for($j=0;$j<count($vcalendar['event'][$i]['alarm']);$j++)
|
||||
{
|
||||
echo "Alarm #$j<br>\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -162,12 +174,12 @@ echo "Start Time : ".$phpgw->common->show_date()."<br>\n";
|
||||
echo "Class = ".$vcalendar->todo[$i]->class->value."<br>\n";
|
||||
}
|
||||
|
||||
*/
|
||||
include(PHPGW_APP_INC.'/../setup/setup.inc.php');
|
||||
|
||||
$vcal->set_var($vcalendar->prodid,'value','-//phpGroupWare//phpGroupWare '.$setup_info['calendar']['version'].' MIMEDIR//'.strtoupper($phpgw_info['user']['preferences']['common']['lang']));
|
||||
$vCalendar->set_var($vcalendar['prodid'],'value','-//phpGroupWare//phpGroupWare '.$setup_info['calendar']['version'].' MIMEDIR//'.strtoupper($phpgw_info['user']['preferences']['common']['lang']));
|
||||
echo "<br><br><br>\n";
|
||||
echo nl2br($vcal->build_vcal($vcalendar));
|
||||
*/
|
||||
echo nl2br(execmethod('calendar.vCalendar.build_vcal',$vcalendar));
|
||||
echo "End Time : ".$phpgw->common->show_date()."<br>\n";
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user