*/ 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('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Methods: GET"); header("Access-Control-Allow-Headers: X-PINGOTHER, Content-Type, Accept-Encoding, cache-control"); header("Access-Control-Max-Age: 86400"); header('content-type: application/json'); echo json_encode($availableFields); return; } $toInject = ' '; echo printHTMLHead($toInject); echo '
" . $field['explica']; else $toolTipExplica = ""; $toolTip = generateHelpTooltip($fieldName, $field['name_human_readable'], "{$field['remark']}{$toolTipExplica}"); if ($hasTooltip) $tooltips[] = $toolTip[0]; echo "