diff --git a/index.php b/index.php index f0372a1..1132e26 100644 --- a/index.php +++ b/index.php @@ -1,190 +1,97 @@ + */ +declare(strict_types = 1); error_reporting(E_ALL); -ini_set('display_errors', 1); -?> - - - -'; -echo ''; -echo '
'; -echo 'museum-digital CSV to XML converter'; -echo '
'; -echo '
'; -echo '
'; -echo '
'; -echo 'Please choose a csv-file to create xml-files: '; -echo ''; -echo '
'; -echo '
'; -echo '
'; -require 'values/all_fields.php'; -echo '

Currently approved tags (column names) for md:import:

'; -//echo ''; -//echo ''; -$categories = array('basic','other object title','detailed description','inscription','material_technique separate','separate dimensions','comparable objects','closer location','categorisation', 'object administration', 'object history', 'worth', 'state', 'location', 'rights (object)', 'remarks', 'links', 'literature', 'object_group', 'tags', 'events: related place', 'events: related actor', 'events: related time', 'images', 'resources', 'events: production', 'events: finding', 'events: publication', 'events: template creation', 'events: depiction_who', 'events: depiction_place', 'events: use', 'events: writing', 'events: colleting', 'events: painting', 'events: taking', 'events: receiving', 'events: printing plate production', 'events: sending', 'events: issuing', 'events: signing', 'events: type description', 'events:drawing', 'events: copying', 'events: has lived', 'events: commissioned', 'events: printed', 'events: spoken', 'events: sung', 'events: decor designed', 'events: form designed', 'events: modelled', 'events: signed', 'events: mentioning', 'events: burying', 'events: intellectual creation', 'events: painting on', 'events: illustrated' ); -$cat_counter = 0; -for ($i = 0; $i < count($allowed); $i++) -{ - //echo ''; - if ($i == 0) {echo '
' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 10) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 12) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 15) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 18) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 20) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 36) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 39) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 41) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 47) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 53) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 57) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 65) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 67) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 75) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 78) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 82) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 86) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 108) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 123) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 133) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 137) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 141) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 145) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 215) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 233) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 247) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 261) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 275) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 289) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 293) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } /**/ - if ($i == 297) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 311) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 325) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 339) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 353) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 367) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 381) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 395) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 409) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 423) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 437) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 451) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 465) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 479) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 489) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 503) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 517) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 531) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 545) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 559) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 573) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 587) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 601) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 615) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 629) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 643) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - if ($i == 657) {echo '

' . $categories[$cat_counter] . '
';$cat_counter++; - } - /* - */ - echo ''; - echo ''; - echo '

' . $allowed[$i][0] . '


'; - if (isset($allowed[$i][1])) echo '

Mandatory: ' . $allowed[$i][1] . "

"; - if (isset($allowed[$i][5])) echo '

' . $allowed[$i][5] . '

'; - if (isset($allowed[$i][2])) echo '

Format: ' . $allowed[$i][2] . "

"; - if (isset($allowed[$i][3])) echo '

Allowed values: ' . $allowed[$i][3] . "

"; - if (isset($allowed[$i][4])) echo '

Dependencies: ' . $allowed[$i][4] . "

"; - echo '
'; - echo '' . $allowed[$i][0] . ''; - echo '
'; - // echo ''; - // echo ''; - // echo ''; - // echo ''; - //echo ''; +ini_set('display_errors', "1"); + +require_once __DIR__ . "/functions/functions.php"; + +if (session_status() != PHP_SESSION_ACTIVE) { + session_start(); } -//echo '
NameMandatoryAllowedRemarksDependencies
'.$allowed[$i][1].''.$allowed[$i][2].''.$allowed[$i][3].''.$allowed[$i][4].'
'; -//print_r($allowed); -echo '
'; -echo '
'; + +// 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'] = lang_getfrombrowser($allowed_langs, 'en', "", false); +} +$lang = $_SESSION['lang']; + +require __DIR__ . "/translation-importer/$lang/csvxml-overview.php"; + +$toInject = ' + + +'; +echo printHTMLHead($toInject); + + +echo ' + +
+
+ + + +
+
+ +
+

' . $csvxml_overview['currently_approved_tags'] . '

+
+ ' . $csvxml_overview['download_csv_all'] . ' + +
+ ' . $csvxml_overview['select_required_fields'] . ' + ' . $csvxml_overview['select_all_fields'] . ' + +
+'; + +require __DIR__ . "/values/availableFields.php"; + +$tooltips = []; +foreach ($availableFields as $headline => $fields) { + + echo "

{$headline}

+ '; + +} + +echo ' +
+ +'; +echo implode($tooltips); + +echo ' + + + +'; diff --git a/new.php b/new.php deleted file mode 100644 index 1132e26..0000000 --- a/new.php +++ /dev/null @@ -1,97 +0,0 @@ - - */ -declare(strict_types = 1); -error_reporting(E_ALL); -ini_set('display_errors', "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'] = lang_getfrombrowser($allowed_langs, 'en', "", false); -} -$lang = $_SESSION['lang']; - -require __DIR__ . "/translation-importer/$lang/csvxml-overview.php"; - -$toInject = ' - - -'; -echo printHTMLHead($toInject); - - -echo ' - -
-
- - - -
-
- -
-

' . $csvxml_overview['currently_approved_tags'] . '

-
- ' . $csvxml_overview['download_csv_all'] . ' - -
- ' . $csvxml_overview['select_required_fields'] . ' - ' . $csvxml_overview['select_all_fields'] . ' - -
-'; - -require __DIR__ . "/values/availableFields.php"; - -$tooltips = []; -foreach ($availableFields as $headline => $fields) { - - echo "

{$headline}

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