events as $e) { if($e->concert == "true" && $e->starttime + $e->duration > time()) $str .= $e->show_simple(); } if(!isset($GLOBALS['date'])) $date = time() - (date("N", time()) - 1) * 24 * 60 * 60; else $date = $GLOBALS['date'] - (date("N", $GLOBALS['date'])-1) * 24 * 60 * 60; if($GLOBALS['action'] =="addentry") { $title = stripslashes($GLOBALS['title']); $description = stripslashes($GLOBALS['description']); if($GLOBALS['concert'] == "on") $concert = "true"; else $concert = "false"; $time = strtotime($GLOBALS['txtdate'] . " " . $GLOBALS['txttimefrom'] . ":00"); if($time !== FALSE) { $duration = strtotime($GLOBALS['txtdate'] . " " . $GLOBALS['txttimeto'] . ":00") - $time; $eid = time(); $event = new Event($eid, $title, $concert, $time, $duration, $description, $current_user->uid); $events->add($event); $events->write(); if($ZEND_DIR != "") googleCalendarEvent($event); if($DOKUWIKI_CALENDAR != "") { $file = $DOKUWIKI_CALENDAR; $fp = fopen($file, "w"); fprintf($fp, "=====DIEs calendar=====\n"); fprintf($fp, "Do not edit this file - it is automatically generated " . "by the ExecutionRoom CMS.\n\n"); fprintf($fp, "====Events====\n"); foreach($events->events as $event) { fprintf($fp, " * %s - %s %s: %s\n", date("j.n.Y G:i", $event->starttime), date("j.n.Y G:i", $event->starttime + $event->duration), $event->title, $event->description); } fclose($fp); } notify("calendar", "New calendar entry:\n" . $GLOBALS['title'] . "\n" . date("r", $time) . "\n" . $GLOBALS['description'] . "\n" . $FORUM_URL . "/?mode=calendar&date=" . $time); $str .= " \n"; } else { $str .= "
\n";
$str .= "[<]\n";
$str .= " \n";
$str .= "[<<]\n";
$str .= " \n";
$str .= date("F Y", $date) . "\n";
$str .= " \n";
$str .= "[>>] \n";
$str .= " \n";
$str .= "[>]
\n";
$str .= "[Today]
\n";
$str .= "
\n"; $t = $date + $day * 24 * 60 * 60; $str .= " " . date("l j/n", $t) . "\n"; $str .= " | \n"; } $str .= "
4) $str .= " style=\"background: #311;\""; $str .= ">\n"; $str .= " Add\n"; $str .= $events->show($t, $t + 24 * 60 * 60); $str .= " | \n"; } $str .= "