*/ declare(strict_types = 1); require __DIR__ . '/../provide_env.php'; if (is_numeric($_GET['lang'])) { header('Location: /en/' . $_GET['lang']); return; } error_reporting(E_ALL); ini_set("display_errors", "1"); if (!empty($_GET['lang']) and is_string($_GET['lang']) and is_dir(__DIR__ . "/../l10n/translation-musdb/{$_GET['lang']}")) { $lang = $_GET['lang']; } else $lang = "en"; $tlLoader = new MDTlLoader("ereignis_auswahl", $lang); $eventTypes = []; foreach (MDEventsSet::EVENT_IDS as $j) { $eventTypes[$j] = [ 'ereignistyp_id' => $j, 'ereignistyp_name' => $tlLoader->tl("eventtype_name", "eventname", $j), 'ereignistyp_explica' => $tlLoader->tl("eventtype_explica", "ereignistyp_explica", $j), ]; } $availableLangs = MD_STD::scandir(__DIR__ . "/../l10n/translation-musdb"); if (!empty($_GET['id']) and !($id = filter_var($_GET['id'], FILTER_VALIDATE_INT))) { echo "Error: IDs must be presented in a numeric format."; return; } echo ' '; foreach ($availableLangs as $tLang) { echo ' ' . $tLang . ' '; } echo '
'; if (!empty($id)) { echo '

' . $eventTypes[$id]['ereignistyp_name'] . '

ID
' . $id . '
-
' . $eventTypes[$id]['ereignistyp_explica'] . '

x '; return; } echo '

Event types

'; foreach ($eventTypes as $type) { echo '

' . $type['ereignistyp_id'] . ': ' . $type['ereignistyp_name'] . '

' . $type['ereignistyp_explica'] . '


'; }