1 #include <infodrom.style>
4 <page func="Infodrom Oldenburg" title="Termine">
6 <style type="text/css">
7 table#calendar tr.row:hover {
10 table#calendar tr.newkw td {
11 border-top: 1px solid #999;
13 table#calendar tr.month {
16 table#calendar tr.current {
21 <table id="calendar" width="100%" class="smallfont border" cellspacing="0" summary="">
23 <th width="5%">KW</th>
24 <th width="20%">Datum</th>
25 <th width="55%">Beschreibung</th>
26 <th width="20%">Location</th>
30 setlocale('LC_TIME', 'de_DE');
31 $now = date('Y-m-d H:i:s');
32 $pivot = date('Y-m-d H:i:s', time()+(7*24*60*60));
34 $item = new Calendar_Item();
37 if (empty($_GET['year'])) {
41 $from = mktime(0,0,0,1,1,intval($_GET['year']));
42 $to = mktime(0,0,0,1,1,intval($_GET['year'])+1) - 1;
45 foreach ($item->getItems($from, $to) as $row) {
46 $start = new DateTime($row->dtstart);
47 $newmonth = $start->format('F Y');
48 if ($month != $newmonth) {
50 printf('<tr class="month" month="%s"><td colspan="4">%s</td></tr>',
51 $start->format('Y-m'), $month);
56 if (strlen($row->description))
57 $tooltip = sprintf(' title="%s"', htmlspecialchars($row->description));
60 if ($row->dtstart >= $now && $row->dtstart < $pivot)
62 if (strlen($kw) && $kw != $row->kw)
65 printf('<tr id="%d" class="%s"><td>%s</td><td>%s</td><td%s>%s</td><td>%s</td></tr>',
68 $kw != $row->kw ? $row->kw : ' ',
69 Calendar_Item::formatTimespan($row->dtstart, $row->dtend),
70 utf8_decode($tooltip),
71 utf8_decode($row->summary),
72 utf8_decode($row->location));