*/
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'];
$tlLoader = new MDTlLoader("csxml_start", $lang);
$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", 'download_csv_by_selection') . '
' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'select_required_fields') . '
' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'select_all_fields') . '
' . $tlLoader->tl("csvxml-overview", "csvxml_overview", 'unset_selection') . '
';
$fieldsGetter = new CsvxmlAvailableFields($lang);
$availableFields = $fieldsGetter->getFields();
$tooltips = [];
foreach ($availableFields as $headline => $fields) {
echo "
{$headline}
";
foreach($fields as $fieldName => $field) {
if (!empty($field['remark']) or !empty($field['explica'])) $hasTooltip = true;
else $hasTooltip = false;
echo "
- {$fieldName}";
if (!empty($field['explica'])) $toolTipExplica = "
General
" . $field['explica'];
else $toolTipExplica = "";
$toolTip = generateHelpTooltip($fieldName, $field['name_human_readable'], "{$field['remark']}{$toolTipExplica}");
if ($hasTooltip) $tooltips[] = $toolTip[0];
echo "
";
}
echo '
';
}
echo '
';
echo implode($tooltips);
echo '