|
|
@ -5,19 +5,20 @@ |
|
|
# exit; |
|
|
# exit; |
|
|
# } |
|
|
# } |
|
|
header('Content-type: text/calendar; charset=utf-8'); |
|
|
header('Content-type: text/calendar; charset=utf-8'); |
|
|
header('Content-Disposition: inline; filename=calendar.ics'); |
|
|
|
|
|
|
|
|
header('Content-Disposition: inline; filename=kiwicalendar.ics'); |
|
|
include("./getEvents.php"); |
|
|
include("./getEvents.php"); |
|
|
|
|
|
|
|
|
$icalheader = "BEGIN:VCALENDAR |
|
|
$icalheader = "BEGIN:VCALENDAR |
|
|
VERSION:2.0 |
|
|
VERSION:2.0 |
|
|
PRODID:-//hacksw/handcal//NONSGML v1.0//EN" |
|
|
|
|
|
|
|
|
PRODID:KiWiCalendar v1.0//EN |
|
|
|
|
|
"; |
|
|
$icalfooter = "END:VCALENDAR"; |
|
|
$icalfooter = "END:VCALENDAR"; |
|
|
#"BEGIN:VEVENT |
|
|
#"BEGIN:VEVENT |
|
|
#UID:" . md5(uniqid(mt_rand(), true)) . "@yourhost.test |
|
|
#UID:" . md5(uniqid(mt_rand(), true)) . "@yourhost.test |
|
|
#DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z |
|
|
#DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z |
|
|
#DTSTART:19970714T170000Z |
|
|
#DTSTART:19970714T170000Z |
|
|
#DTEND:19970715T035959Z |
|
|
#DTEND:19970715T035959Z |
|
|
SUMMARY:Bastille Day Party" |
|
|
|
|
|
|
|
|
#SUMMARY:Bastille Day Party" |
|
|
|
|
|
|
|
|
$events = getEvents(); |
|
|
$events = getEvents(); |
|
|
|
|
|
|
|
|
@ -27,8 +28,12 @@ SUMMARY:Bastille Day Party" |
|
|
{ |
|
|
{ |
|
|
echo "BEGIN:VEVENT |
|
|
echo "BEGIN:VEVENT |
|
|
SUMMARY:".$event["titre"]." |
|
|
SUMMARY:".$event["titre"]." |
|
|
"."END:VEVENT"; |
|
|
|
|
|
|
|
|
DTSTART:".date("Ymd\THis",strtotime($event["dtstart"]))." |
|
|
|
|
|
DTEND:".date("Ymd\THis",strtotime($event["dtend"]))." |
|
|
|
|
|
LOCATION:".$event["localisation"]." |
|
|
|
|
|
CATEGORIES:"."<TODO : categorie>"." |
|
|
|
|
|
DESCRIPTION:".$event["description"]." |
|
|
|
|
|
END:VEVENT\n"; |
|
|
} |
|
|
} |
|
|
echo $icalfooter; |
|
|
echo $icalfooter; |
|
|
print_r($events); |
|
|
|
|
|
?> |
|
|
?> |