'; } function generate_nav($active_page, $pages, $page_names) { $output = ''; return $output; } function html_link($href, $class, $innerHTML, $blank) { if($blank) return ''.$innerHTML.''; else return ''.$innerHTML.''; } function raumstatus() { $url = 'https://status.ctdo.de/api/simple/v2'; $data = json_decode(file_get_contents($url), true); return $data['state']; } function str_mass_replace($searchs, $replacers, $string) { foreach ($searchs as $key => $search) { $string = str_replace($search, $replacers[$key], $string); } return $string; } function scan_for_events() { $s = scandir('events/'); $output = array(); foreach ($s as $f) { if(count(str_split($f)) == 13) $output[] = $f; } return $output; } function generate_event_list() { $events = $this->scan_for_events(); $output = ""; foreach ($events as $event) { $date = str_replace('.md', '', $event); $lines = file(__DIR__ . '/../events/' . $event); $title = $lines[0]; $desc = $lines[1]; $output .= '
'.$desc.'