Filter out some items
[infodrom.org/infocon.infodrom.org] / class / teachings.class.php
index faa9372..9af9ce6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
 <?php
 
-define('TEACHINGS', '<root_prefix>/teachings.txt');
+define('TEACHINGS', $_SERVER['DOCUMENT_ROOT'] . '/teachings.txt');
 
 class Teachings {
   private static $instance = false;
 
 class Teachings {
   private static $instance = false;
@@ -43,7 +43,7 @@ class Teachings {
   {
     $html = '';
     foreach ($this->list as $row) {
   {
     $html = '';
     foreach ($this->list as $row) {
-      if ($row->location != 'Linuxhotel') continue;
+      if (strpos($row->location, 'Linuxhotel GmbH') === false) continue;
 
       $dstart = explode('-', $row->start);
       $dend = explode('-', $row->end);
 
       $dstart = explode('-', $row->start);
       $dend = explode('-', $row->end);
@@ -56,21 +56,25 @@ class Teachings {
       $link = strlen($row->url) ? sprintf('<a href="%s">Details / Buchen</a>', $row->url) : '';
       $html .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>',
                       $date,
       $link = strlen($row->url) ? sprintf('<a href="%s">Details / Buchen</a>', $row->url) : '';
       $html .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>',
                       $date,
-                      $row->title,
+                      str_replace('\\', '', $row->title),
                       $link);
     }
 
     if (strlen($html)) {
       $html = '<table class="teachings" width="100%">'
                       $link);
     }
 
     if (strlen($html)) {
       $html = '<table class="teachings" width="100%">'
+       . '<thead>'
        . '<tr>'
        . '<th width="20%">Datum</th>'
        . '<th width="60%" align="left">Beschreibung</th>'
        . '<th width="20%">Link</th>'
        . '</tr>'
        . '<tr>'
        . '<th width="20%">Datum</th>'
        . '<th width="60%" align="left">Beschreibung</th>'
        . '<th width="20%">Link</th>'
        . '</tr>'
-       . '<tr>'
+       . '</thead>'
+       . '<tbody>'
        . $html
        . $html
+       . '</tbody>'
        . '</table>';
     }
        . '</table>';
     }
+
     return $html;
   }
 }
     return $html;
   }
 }