forked from extern/egroupware
A more structured way of parsing. Will be adding conversion function to the array.
This commit is contained in:
parent
593a23dbcb
commit
60b1d31bcf
@ -25,14 +25,17 @@
|
||||
|
||||
$vcalendar = $vcal->read($contents);
|
||||
|
||||
echo "Product ID = ".$vcalendar->prodid."<br>\n";
|
||||
echo "Method = ".$vcalendar->method."<br>\n";
|
||||
echo "Version = ".$vcalendar->version."<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->event);$i++)
|
||||
{
|
||||
echo "<br>\nEVENT<br>\n";
|
||||
echo "Summary = ".$vcalendar->event[$i]->summary."<br>\n";
|
||||
if($vcalendar->event[$i]->calscale->value)
|
||||
{
|
||||
echo "Calscale = ".$vcalendar->event[$i]->calscale->value."<br>\n";
|
||||
}
|
||||
if($vcalendar->event[$i]->description->value)
|
||||
{
|
||||
echo "Description (Value) = ".$vcalendar->event[$i]->description->value."<br>\n";
|
||||
@ -41,10 +44,28 @@
|
||||
{
|
||||
echo "Description (Alt Rep) = ".$vcalendar->event[$i]->description->altrep."<br>\n";
|
||||
}
|
||||
echo "Location = ".$vcalendar->event[$i]->location."<br>\n";
|
||||
if($vcalendar->event[$i]->summary->value)
|
||||
{
|
||||
echo "Summary = ".$vcalendar->event[$i]->summary->value."<br>\n";
|
||||
}
|
||||
if(!empty($vcalendar->event[$i]->comment))
|
||||
{
|
||||
for($j=0;$j<count($vcalendar->event[$i]->comment);$j++)
|
||||
{
|
||||
echo "Comment = ".$vcalendar->event[$i]->comment[$j]->value."<br>\n";
|
||||
}
|
||||
}
|
||||
if($vcalendar->event[$i]->location->value)
|
||||
{
|
||||
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->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";
|
||||
echo "Class = ".$vcal->switch_class($vcalendar->event[$i]->class)."<br>\n";
|
||||
if($vcalendar->event[$i]->rrule)
|
||||
{
|
||||
echo "Recurrence : Frequency = ".$vcalendar->event[$i]->rrule->freq." Count = ".$vcalendar->event[$i]->rrule->count."<br>\n";
|
||||
}
|
||||
echo "Class = ".$vcalendar->event[$i]->class->value."<br>\n";
|
||||
echo "Organizer = ".$vcalendar->event[$i]->organizer->mailto->user.'@'.$vcalendar->event[$i]->organizer->mailto->host."<br>\n";
|
||||
if($vcalendar->event[$i]->organizer->dir)
|
||||
{
|
||||
@ -70,7 +91,10 @@
|
||||
for($i=0;$i<count($vcalendar->todo);$i++)
|
||||
{
|
||||
echo "<br>\nTODO<br>\n";
|
||||
echo "Summary = ".$vcalendar->todo[$i]->summary."<br>\n";
|
||||
if($vcalendar->todo[$i]->summary->value)
|
||||
{
|
||||
echo "Summary = ".$vcalendar->todo[$i]->summary->value."<br>\n";
|
||||
}
|
||||
if($vcalendar->todo[$i]->description->value)
|
||||
{
|
||||
echo "Description (Value) = ".$vcalendar->todo[$i]->description->value."<br>\n";
|
||||
@ -79,15 +103,18 @@
|
||||
{
|
||||
echo "Description (Alt Rep) = ".$vcalendar->todo[$i]->description->altrep."<br>\n";
|
||||
}
|
||||
echo "Location = ".$vcalendar->todo[$i]->location."<br>\n";
|
||||
if($vcalendar->event[$i]->location->value)
|
||||
{
|
||||
echo "Location = ".$vcalendar->todo[$i]->location->value."<br>\n";
|
||||
}
|
||||
echo "Sequence = ".$vcalendar->todo[$i]->sequence."<br>\n";
|
||||
echo "Date Start : ".$phpgw->common->show_date(mktime($vcalendar->todo[$i]->dtstart->hour,$vcalendar->todo[$i]->dtstart->min,$vcalendar->todo[$i]->dtstart->sec,$vcalendar->todo[$i]->dtstart->month,$vcalendar->todo[$i]->dtstart->mday,$vcalendar->todo[$i]->dtstart->year) - $phpgw->calendar->datatime->tz_offset)."<br>\n";
|
||||
echo "Class = ".$vcal->switch_class($vcalendar->todo[$i]->class)."<br>\n";
|
||||
echo "Class = ".$vcalendar->todo[$i]->class->value."<br>\n";
|
||||
}
|
||||
|
||||
include(PHPGW_APP_INC.'/../setup/setup.inc.php');
|
||||
|
||||
$vcal->set_var($vcalendar,'prodid','-//phpGroupWare//phpGroupWare '.$setup_info['calendar']['version'].' MIMEDIR//'.strtoupper($phpgw_info['user']['preferences']['common']['lang']));
|
||||
$vcal->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));
|
||||
$phpgw->common->phpgw_footer();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,8 +8,15 @@ ATTENDEE;CN="Jones Bill (IT)";ROLE=REQ-PARTICIPANT;RSVP=TRUE;DELEGATED-FROM="MAI
|
||||
ATTENDEE;CN="Smith Mary (PR)";ROLE=NON-PARTICIPANT;RSVP=FALSE:MAILTO:Mary.Smith@elsewhere.com
|
||||
ORGANIZER;DIR="ldap://host.com:6666/o=3DABC%20Industries,c=3DUS??(cn=3DJim%20Dolittle)":MAILTO:John.Doe@somewhere.com
|
||||
DTSTART:20010302T150000Z
|
||||
RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
|
||||
DTEND:20010302T153000Z
|
||||
LOCATION:Conference Room #2
|
||||
COMMENT:The meeting really needs to include both ourselves
|
||||
and the customer. We can't hold this meeting without them.
|
||||
As a matter of fact\, the venue for the meeting ought to be at
|
||||
their site. - - John
|
||||
COMMENT:I really don't think so.
|
||||
RESOURCES:EASEL,PROJECTOR,VCR
|
||||
TRANSP:OPAQUE
|
||||
SEQUENCE:0
|
||||
UID:023007208203E60074C5B7107A82E00803730C0D40A12C0042A2C001009384EA000F00B100
|
||||
@ -20,6 +27,7 @@ SUMMARY:Web Site Redesign
|
||||
PRIORITY:5
|
||||
ATTACH;FMTTYPE=image/basic;ENCODING=BASE64:VALUE:TEST
|
||||
CLASS:PUBLIC
|
||||
CATEGORIES:MEETING
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
ATTENDEE;CN="Doe2 John (Marketing)";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:John.Doe2@somewhere.com
|
||||
@ -36,6 +44,8 @@ UID:023007208203E60074C5B7107A82E00803730C0D40A12C0042A2C001009384EA000F00B100
|
||||
DTSTAMP:20010301T172412Z
|
||||
DESCRIPTION:\n
|
||||
SUMMARY:Web Site Redesign (2)
|
||||
CALSCALE:GREGORIAN
|
||||
GEO:37.386013;-122.082932
|
||||
PRIORITY:2
|
||||
CLASS:PRIVATE
|
||||
END:VEVENT
|
||||
@ -56,14 +66,15 @@ DESCRIPTION:P DPD OLSEN\, JOHN SSGT 19 - 23 Mar 01 2476 Mr Marr (GS-11) \nA
|
||||
SUMMARY:Alternate - Front Desk Duty
|
||||
PRIORITY:5
|
||||
CLASS:PUBLIC
|
||||
STATUS:CANCELLED
|
||||
END:VEVENT
|
||||
BEGIN:VTODO
|
||||
DTSTART:20010301T160000Z
|
||||
DTEND:20010301T163000Z
|
||||
LOCATION:My Desk\, or the conference room
|
||||
DTSTAMP:20010301T172312Z
|
||||
DESCRIPTION:\n
|
||||
SUMMARY:Prepare for tomrrow's meeting
|
||||
CLASS:PRIVATE
|
||||
PERCENT-COMPLETE:30
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
Loading…
Reference in New Issue
Block a user