* * http://www.radix.net/~cknudsen * * Modified by Mark Peters * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ $phpgw_info['flags']['currentapp'] = 'calendar'; include('../header.inc.php'); $icsfile='/home/httpd/html/phpgroupware/calendar/inc/vcal1.ics'; $fp=fopen($icsfile,'r'); $contents = explode("\n",fread ($fp, filesize($icsfile))); fclose($fp); $vcal = CreateObject('calendar.vCalendar'); $vcalendar = $vcal->read($contents); echo "Product ID = ".$vcalendar->prodid."
\n"; echo "Method = ".$vcalendar->method."
\n"; echo "Version = ".$vcalendar->version."
\n"; echo "Summary = ".$vcalendar->event[0]->summary."
\n"; echo "Location = ".$vcalendar->event[0]->location."
\n"; echo "Sequence = ".$vcalendar->event[0]->sequence."
\n"; echo "Date Start : ".$phpgw->common->show_date(mktime($vcalendar->event[0]->dtstart->hour,$vcalendar->event[0]->dtstart->min,$vcalendar->event[0]->dtstart->sec,$vcalendar->event[0]->dtstart->month,$vcalendar->event[0]->dtstart->mday,$vcalendar->event[0]->dtstart->year))."
\n"; echo "Organizer = ".$vcalendar->event[0]->organizer->mailto->user.'@'.$vcalendar->event[0]->organizer->mailto->host."
\n"; for($i=0;$i<3;$i++) { echo "Attendee[$i] CN = ".$vcalendar->event[0]->attendee[$i]->cn."
\n"; echo "Attendee[$i] Address= ".$vcalendar->event[0]->attendee[$i]->mailto->user.'@'.$vcalendar->event[0]->attendee[$i]->mailto->host."
\n"; echo "Attendee[$i] Role = ".$vcal->switch_role($vcalendar->event[0]->attendee[$i]->role)."
\n"; // echo "Attendee[$i] RSVP = ".$vcal->switch_rsvp($vcalendar->event[0]->attendee[$i]->rsvp)."
\n"; echo "Attendee[$i] RSVP = ".$vcalendar->event[0]->attendee[$i]->rsvp."
\n"; } echo "Class = ".$vcalendar->event[0]->class."
\n"; $phpgw->common->phpgw_footer(); ?>