1 #include <infodrom.style>
4 <page func="Infodrom Oldenburg" title="Termine">
6 <style type="text/css">
10 table#calendar tr.row:hover {
13 table#calendar tr.newkw td {
14 border-top: 1px solid #999;
16 table#calendar tr.month {
19 table#calendar tr.current {
25 <table id="calendar" width="100%" class="smallfont border" cellspacing="0" summary="">
27 <th width="5%">KW</th>
28 <th width="20%">Datum</th>
29 <th width="55%">Beschreibung</th>
30 <th width="20%">Location</th>
34 setlocale('LC_TIME', 'de_DE');
35 $now = date('Y-m-d H:i:s');
36 $pivot = date('Y-m-d H:i:s', time()+(7*24*60*60));
38 $item = new Calendar();
41 if (empty($_GET['year'])) {
45 $from = mktime(0,0,0,1,1,intval($_GET['year']));
46 $to = mktime(0,0,0,1,1,intval($_GET['year'])+1) - 1;
49 foreach ($item->getItems($from, $to) as $row) {
50 $start = new DateTime($row->dtstart);
51 $newmonth = $start->format('F Y');
52 if ($month != $newmonth) {
54 printf('<tr class="month" month="%s"><td colspan="4">%s</td></tr>',
55 $start->format('Y-m'), $month);
60 if (strlen($row->description))
61 $tooltip = sprintf(' title="%s"', htmlspecialchars($row->description));
64 if ($row->dtstart >= $now && $row->dtstart < $pivot)
66 if (strlen($kw) && $kw != $row->kw)
69 printf('<tr id="%d" class="%s"><td>%s</td><td>%s</td><td%s>%s</td><td>%s</td></tr>',
72 $kw != $row->kw ? $row->kw : ' ',
73 Calendar::formatTimespan($row->dtstart, $row->dtend),
74 utf8_decode($tooltip),
75 utf8_decode($row->summary),
76 utf8_decode($row->location));