<?php
-define('TEACHINGS', '<root_prefix>/teachings.txt');
+define('TEACHINGS', $_SERVER['DOCUMENT_ROOT'] . '/teachings.txt');
class Teachings {
private static $instance = false;
{
$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);
$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%">'
+ . '<thead>'
. '<tr>'
. '<th width="20%">Datum</th>'
. '<th width="60%" align="left">Beschreibung</th>'
. '<th width="20%">Link</th>'
. '</tr>'
- . '<tr>'
+ . '</thead>'
+ . '<tbody>'
. $html
+ . '</tbody>'
. '</table>';
}
+
return $html;
}
}