* * 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 "Sequence = ".$vcalendar->event[0]->sequence."
\n"; $datet = CreateObject('phpgwapi.datetime'); $datetime = 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); echo "Date Start : ".$phpgw->common->show_date($datetime)."
\n"; echo "Organizer = ".$vcalendar->event[0]->organizer->mailto->user.'@'.$vcalendar->event[0]->organizer->mailto->host."
\n"; echo "Attendee[0] = ".$vcalendar->event[0]->attendee[0]->mailto->user.'@'.$vcalendar->event[0]->attendee[0]->mailto->host."
\n"; echo "Attendee[1] = ".$vcalendar->event[0]->attendee[1]->mailto->user.'@'.$vcalendar->event[0]->attendee[1]->mailto->host."
\n"; echo "Class = ".$vcalendar->event[0]->class."
\n"; $phpgw->common->phpgw_footer(); ?>