header("Content-Type: text/calendar; charset=UTF-8");
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:-//FHCOMPLETE//EN\n";
echo "METHOD:PUBLISH\n";
echo "BEGIN:VFREEBUSY\n";
echo 'ORGANIZER;CN=', $bn->vorname, ' ', $bn->nachname, ':mailto:', $uid, '@', DOMAIN, "\n";
echo 'DTSTAMP;TZID=Europe/Vienna:', date('Ymd', mktime(date('H'), date('i'), date('s'), date('m'), date('d') - 5, date('Y'))), 'T', date('Hms'), "\n";
echo 'DTSTART;TZID=Europe/Vienna:', date('Ymd', mktime(0, 0, 0, date('m'), date('d') - 5, date('Y'))), "T000000\n";
echo 'DTEND;TZID=Europe/Vienna:', date('Ymd', mktime(0, 0, 0, date('m'), date('d') + 30, date('Y'))), "T000000\n";
echo 'URL:', APP_ROOT, 'cis/public/freebusy_lvplan.php/', $uid, "\n";
// Stundenplanobjekt erzeugen
$stdplan = new wochenplan($type);
$stdplan->crlf = "\n";
// Zusaetzliche Daten laden
if (!$stdplan->load_data($type, $uid)) {
    die($stdplan->errormsg);
}
$begin = mktime(0, 0, 0, date('m'), date('d') - 5, date('Y'));
$ende = mktime(0, 0, 0, date('m'), date('d') + 30, date('Y'));
$db_stpl_table = 'stundenplan';
$i = 0;
// Kalender erstellen
while ($begin < $ende) {
    $i++;
    if (!date("w", $begin)) {
        $begin = jump_day($begin, 1);
    }
    $stdplan->init_stdplan();
    $datum = $begin;
    $begin += 604800;
Esempio n. 2
0
                }
            }
        }
    }
}
// Stundenplan erstellen
$stdplan = new wochenplan($type);
if (!isset($datum)) {
    $datum = time();
}
// Benutzergruppe
$stdplan->user = $user;
// aktueller Benutzer
$stdplan->user_uid = $uid;
// Zusaetzliche Daten laden
if (!$stdplan->load_data($type, $pers_uid, $ort_kurzbz, $stg_kz, $sem, $ver, $grp, $gruppe_kurzbz, null, $lva)) {
    die($stdplan->errormsg);
}
//echo 'Datum:'.$datum.'<BR>';
// Stundenplan einer Woche laden
if (!$stdplan->load_week($datum)) {
    die($stdplan->errormsg);
}
// Kopfbereich drucken
if (!$stdplan->draw_header()) {
    die($stdplan->errormsg);
}
// Stundenplan der Woche drucken
if ($ort_kurzbz == 'all') {
    $stdplan->draw_week($raumres, $uid, false);
} else {
	},
	{
		"id":222,
		"title":"Event2",
		"start":"2012-10-20",
		"end":"2012-10-22",
		"url":"http:\/\/yahoo.com\/"
	}
]
*/
$events = array();
switch ($typ) {
    case 'Ort':
        // LVPlan/Reservierungen des Raumes holen
        $stdplan = new wochenplan('ort');
        $stdplan->load_data('ort', null, $id);
        while ($start < $end) {
            if (!date("w", $start)) {
                $start = jump_day($start, 1);
            }
            $stdplan->init_stdplan();
            $datum = $start;
            $start += 604800;
            // eine Woche
            // Stundenplan einer Woche laden
            if (!$stdplan->load_week($datum, 'stundenplan')) {
                die($stdplan->errormsg);
            }
            $result = $stdplan->draw_week_csv('return', LVPLAN_KATEGORIE);
            foreach ($result as $row) {
                $item['id'] = $id . $row['dtstart'] . $row['dtend'];