*/ declare(strict_types = 1); require_once __DIR__ . "/../functions/functions.php"; if (session_status() != PHP_SESSION_ACTIVE) { session_start(); } // This array contains all available languages $allowed_langs = ['ar', 'de', 'en', 'hu', 'id', 'it', 'pl','pt']; // Some languages are in translation. They will only be available for logged in users. if (isset($_GET['navlang'])) { $_SESSION['lang'] = $_GET['navlang']; if (!in_array($_SESSION['lang'], $allowed_langs)) $_SESSION['lang'] = 'de'; } else if (!isset($_SESSION['lang'])) { $_SESSION['lang'] = MD_STD::lang_getfrombrowser($allowed_langs, 'en', "", false); } $lang = $_SESSION['lang']; $outFormat = MD_STD_IN::get_http_input_text("output", "html", ['html', 'json']); $tlLoader = new MDTlLoader("csxml_start", $lang); $fieldsGetter = new CsvxmlAvailableFields($lang); $availableFields = $fieldsGetter->getFields(); if ($outFormat === 'json') { header('content-type: application/json'); echo json_encode($availableFields); return; } $toInject = ' '; echo printHTMLHead($toInject); echo '

' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'currently_approved_tags') . '

' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'download_csv_all') . '
' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'select_required_fields') . ' ' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'select_all_fields') . '
'; $tooltips = []; foreach ($availableFields as $headline => $fields) { echo "

{$headline}

'; } echo '
'; echo implode($tooltips); echo ' ';