5 setlocale(LC_TIME, "de_DE");
10 $datedb = "Termine/dates-".date("Y").".txt";
18 $head = '<div class="news"><div class="datesbody"><h3 class="newstitle">%s</h3><div class="date">';
19 $head .= '<table class="font" cellpadding=2 cellspacing=0 width=100%%><tr class="head"><th>Wann</th><th>Was</th><th>Wo</th></tr>';
20 $foot = '</table></div></div></div>';
21 $row = '<tr class="%s"><td>%s</td><td>%s</td><td>%s</td></tr>';
22 $pivot = time() + 60*60*24*$max_days;
23 $now = mktime(0,0,0, date('m'), date('d'), date('Y'));
25 if (($dates = @fopen($datedb,'r')) !== false) {
27 while (!feof($dates)) {
28 $line = fgets($dates, 200);
30 if (!preg_match("/\|OL\|/", $line))
33 if (preg_match("/([0-9]{4})-([0-9]{2})-([0-9]{2})\|/", $line, $match)) {
34 $when = mktime(0,0,0, $match[2], $match[3], $match[1]);
35 if ($when > $pivot || $when < $now)
43 echo '<div style="padding-top: 10px"></div>'."\n";
44 printf($head."\n", "Kommende Termine in Oldenburg");
46 foreach ($lines as $line) {
47 if (preg_match("/([0-9]{4})-([0-9]{2})-([0-9]{2})\|([^\|]*)\|OL\|([^\|]*)\|([^\|]*)\|(.*)/", $line, $match)) {
48 $when = mktime(0,0,0, $match[2], $match[3], $match[1]);
51 $date = '<strong>heute, ' . $match[4].'</strong>';
54 $date = strftime("%e.%m.%y", $when) . ', ' . $match[4];
55 $class = ($class == 'row0'?'row1':'row0');
61 $what = '<a href="'.$match[7].'">'.$match[5].'</a>';
63 printf($row, $class, $date, $what, $match[6]);
70 function display_news($when, $file)
74 $head = '<div class="news"><div class="newsbody"><h3 class="newstitle">%s</h3><div class="newscontent">';
75 $foot = '</div></div></div>';
77 $date = strftime("%e. %B %Y", $when);
79 if (($news = @fopen($newsdir.'/'.$file,'r')) !== false) {
80 $needp = 0; // 0 = init, 1 = <p> need, 2 = no <p> needed
82 printf($head."\n", $date);
83 while (!feof($news)) {
84 $line = fgets($news, 200);
86 $line = str_replace ("\\\n", "", $line);
89 if (substr($_, 0, 3) == "<p>") {
111 setlocale(LC_TIME, "de_DE");
113 $pivot = time() - 60*60*24*$max_age;
115 if (is_dir($newsdir)) {
116 if ($dir = opendir($newsdir)) {
117 while (($file = readdir($dir)) !== false) {
118 if (!preg_match("/news-([0-9]{4})-([0-9]{2})-([0-9]{2})\.txt/", $file, $matches))
120 $when = mktime(0,0,0, $matches[2], $matches[3], $matches[1]);
123 $news[$when] = $file;
130 echo '<div style="padding-top: 10px"></div>'."\n";
135 foreach ($news as $time => $file) {
136 if ($cnt >= $max_news)
138 display_news($time, $file);
147 <p>Die <strong>Linux User Group Oldenburg</strong> (LUGO) ist eine
148 Interessengemeinschaft für GNU/Linux und Freie Software in und um <a
149 href="http://www.oldenburg.de/">Oldenburg</a> in Niedersachsen.
150 Wir <a href="Termine/">treffen</a> uns unregelmäßig auf dem
151 Stammtisch und der <a href="http://www.linux-werkstatt-oldenburg.de/">Linux-Werkstatt</a>,
152 reden über GNU/Linux und verbessern unsere Systeme. Daneben veranstalten wir in unregelmäßigen Abständen Vorträge,
153 Workshops, einen Brunch und eine öffentliche
154 Ausstellung mit Vorträgen. Aus der LUGO hervorgegangen
155 ist der gemeinnützige <a href="http://www.ffis.de/">Verein zur
156 Förderung Freier Informationen und Software e.V.</a>.</p>
160 <p>Wir pflegen bewußt kein Web-Forum für Diskussionen sondern laden
161 interessierte Anwender und Entwickler stattdessen ein, sich von
162 Angesicht zu Angesicht mit uns auf unseren <a
163 href="<root_prefix>Infos/stammtisch.html">Linux-Stammtischen</a> oder
164 in der <a href="http://www.linux-werkstatt-oldenburg.de/">Linux-Werkstatt</a>
165 zu unterhalten. Zwischen den Stammtischen und für hartnäckige Probleme
166 nutzen wir eine <a href="<root_prefix>Infos/liste.html">\
167 Mailing-Liste</a>.</p>