fwtrash/inc/router.inc.php

19 lines
395 B
PHP
Raw Normal View History

2024-03-29 14:47:35 +00:00
<?php
2024-03-29 16:30:25 +00:00
declare(strict_types=1);
2024-03-29 14:47:35 +00:00
$_page = isset($_GET['p']) ? $_GET['p'] : '';
$routes = [
'doppelklinge' => 'doppelklinge',
'vermessung' => 'vermessung',
'knochen' => 'knochen',
'default' => 'default'
];
ob_start();
2024-03-29 16:30:25 +00:00
2024-03-29 14:47:35 +00:00
require_once __DIR__ . "/../pages/{$routes[array_key_exists($_page, $routes)?$_page:'default']}.php";
$_content = ob_get_contents();
ob_end_clean();