blob: b21137fcfc207a00d314627fafe91d65141d137f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php
error_reporting(0);
header("Content-Type: text/calendar");
header("Access-Control-Allow-Origin: *");
header("X-sijanec-gimsisextclient-webcal-version: 0.0.1");
require "main.php";
$g = new gimsisextClient();
$g->setusername($_REQUEST['u']);
$g->setpassword($_REQUEST['p']);
echo "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Anton Luka Šijanec//NONSGML gimsisextClient iCal fetchocenjevanja//SL\r\n";
foreach ($g->fetchocenjevanja() as $o) {
$d = explode(".", $o["datum"]);
echo "UID:" . $o["datum"] . $o["kratica"] . $o["predmet"] . "@ical.gimsisextclient.sijanec.eu\r\nDTSTAMP:" . $d[2] . $d[1] . $d[0] . "T080000Z\r\nORGANIZER;CN=" . $o["predmet"] . ":MAILTO:info+" . $o["kratica"] . "@gimb.org\r\nDTSTART:" . $d[2] . $d[1] . $d[0] . "T080000Z\r\nDTEND:" . $d[2] . $d[1] . $d[0] . "T140000Z\r\nSUMMARY:" . $o["kratica"] . ": " . $o["opis"] . "\r\nGEO:46.064167;14.511667\r\nEND:VEVENT\r\n";
}
echo "END:VCALENDAR\r\n";
?>
|