2 #include "stacheltermine.inc"
14 if (($db = fopen($datedb,'r')) !== false) {
17 $line = fgets($db, 200);
19 if (!preg_match("/^([0-9]{4})-([0-9]{2})-([0-9]{2})\|/", $line))
27 function display_dates()
31 $layout_head = '<div style="padding-top: 10px;"></div>'
32 .'<table class="dates" width="100%%" border="0" cellpadding="0" cellspacing="0">'
33 .'<tr bgcolor="#aeaeae"><th align="left" colspan="2"><strong> %s</strong></th>'
34 .'<td align="left">Ort</td>'
35 .'<td align="center">Zeit</td>'
37 $layout_row = '<tr bgcolor=#%s>'
38 .'<td align=left width=20%%> %d. (%s)</td>'
39 .'<td align=left width=60%%>%s</td>'
40 .'<td align=left width=15%%>%s</td>'
41 .'<td align=right width=5%%>%s </td>'
43 $layout_foot = '</table>';
45 $nowstring = date("Y-m-");
46 $today = mktime(0,0,0, date('m'), date('d'), date('Y'));
51 foreach ($dates as $line) {
52 if ($line < $nowstring)
55 if (preg_match("/([0-9]{4})-([0-9]{2})-([0-9]{2})\|([^\|]*)\|[^\|]*\|([^\|]*)\|([^\|]*)\|(.*)/", $line, $match)) {
57 $when = mktime(0,0,0, $match[2], $match[3], $match[1]);
59 if ($match[1] !== $thisyear || $match[2] !== $thismonth) {
62 $thisyear = $match[1];
63 $thismonth = $match[2];
64 printf($layout_head, strftime("%B %Y", $when));
69 printf($layout_row, $color, $match[3], strftime("%A", $when), $match[5], $match[6], $match[4]);
70 $color = $color == 'ffffff'?'d7d7d7':'ffffff';
77 setlocale(LC_TIME, "de_DE");
83 <h3>Veranstaltungen rund um GNU/Linux in der Region Weser-Ems</h3>
85 <p>Hier finden Sie Termine von Veranstaltungen, die sich mit Linux,
86 GNU/Linux und/oder Freier Software befassen und in der Region
87 Weser-Ems stattfinden. Wenn keine Stadt angegeben ist, findet die
88 Veranstaltung in Oldenburg statt.</p>
90 <p>Sollte eine Veranstaltung fehlen, kontaktieren Sie bitte joey@infodrom.org.</p>