예제 #1
0
    die('User invalid');
}
header("Content-Type: text/calendar; charset=UTF-8");
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:-//FH TECHNIKUM WIEN//EN\n";
echo "METHOD:PUBLISH\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_coodle.php/', $uid, "\n";
echo "BEGIN:VFREEBUSY";
// Alle Umfragen holen an denen der User beteiligt ist
$umfragen = new coodle();
$umfragen->getCoodleFromUser($uid);
foreach ($umfragen->result as $umfrage) {
    if ($umfrage->coodle_status_kurzbz == 'laufend') {
        // Bei laufenden Umfragen werden alle angekreuzten Vorschlaege zur FreeBusy hinzugefuegt
        $ressource = new coodle();
        if ($ressource_id = $ressource->RessourceExists($umfrage->coodle_id, $uid)) {
            // Terminvorschlaege laden die angekreuzt wurden
            $termine = new coodle();
            $termine->getRessourceTermin($umfrage->coodle_id, $ressource_id);
            foreach ($termine->result as $termin) {
                //Start und Ende berechnen
                $date = new DateTime($termin->datum . ' ' . $termin->uhrzeit);
                $dtstart = $date->format('Ymd\\THis');
                $interval = new DateInterval('PT' . $umfrage->dauer . 'M');
                $date->add($interval);
                $uhrzeit_ende = $date->format('H:i:s');
예제 #2
0
    <h4>' . $p->t('coodle/laufendeUmfragen') . '</h4>
    <table id="myTableFiles" class="tablesorter">
    <thead>
        <tr>
            <th>' . $p->t('coodle/titel') . '</th>
            <th>' . $p->t('coodle/letzterStatus') . '</th>
            <th>' . $p->t('coodle/ersteller') . '</th>
            <th>' . $p->t('coodle/endedatum') . '</th>
            <th>' . $p->t('coodle/aktion') . '</th>
        </tr>
    </thead><tbody>';
$beendeteUmfragen = '';
$datum = new datum();
$coodle = new coodle();
$coodle->loadStatus();
$coodle->getCoodleFromUser($uid);
foreach ($coodle->result as $c) {
    $benutzer = new benutzer();
    $benutzer->load($c->ersteller_uid);
    $ersteller = $benutzer->nachname . ' ' . $benutzer->vorname;
    $row = '<tr>
            <td>' . $coodle->convert_html_chars($c->titel) . '</td>
            <td>' . $coodle->convert_html_chars($coodle->status_arr[$c->coodle_status_kurzbz]) . '</td>
            <td>' . $coodle->convert_html_chars($ersteller) . '</td>
            <td>' . $coodle->convert_html_chars($datum->formatDatum($c->endedatum, 'd.m.Y')) . '</td>
            <td nowrap>
            ';
    // Bearbeiten Button
    if ($c->coodle_status_kurzbz == 'neu' && $uid == $c->ersteller_uid) {
        $row .= '<a href="stammdaten.php?coodle_id=' . $c->coodle_id . '">
    				&nbsp;<img src="../../../skin/images/edit.png" title="' . $p->t('coodle/bearbeiten') . '">