96 lines
4.6 KiB
PHP
96 lines
4.6 KiB
PHP
<?php
|
|
|
|
/*
|
|
$contractArray = [
|
|
[ 'fieldId' => 'erstveroeffentlichung', 'fieldValue' => 'Erstveröffentlichung', 'fieldType' => 'input', 'inputType' => 'radio', 'isSelected' => 1],
|
|
[ 'fieldId' => 'openaccess', 'fieldValue' => 'OpenAccess CC BY-SA', 'fieldType' => 'input', 'inputType' => 'radio', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkboxbestaetigungccby', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkccbysa', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkboxberechtigung', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkboxbildrechte', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkboxhaftung', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'checkboxdatenschutz', 'fieldValue' => 'on', 'fieldType' => 'input', 'inputType' => 'checkbox', 'isSelected' => 1],
|
|
[ 'fieldId' => 'erstVeroeffentlichtInput', 'fieldValue' => 'Erstveröffenticht', 'fieldType' => 'textarea', 'inputType' => 'text', 'isSelected' => 1],
|
|
[ 'fieldId' => 'mitteilunginput', 'fieldValue' => 'Mitteilung', 'fieldType' => 'textarea', 'inputType' => 'text', 'isSelected' => 1]
|
|
];
|
|
*/
|
|
|
|
$labelArray = [
|
|
'erstveroeffentlichung' => 'Erstveröffentlichung',
|
|
'zweitveroeffentlichung'=> 'Zweitveröffentlichung',
|
|
'openaccessccbysa' => 'Veröffentlichung unter CC BY-SA',
|
|
'openaccess' => 'Open Access CC BY-SA',
|
|
'checkboxbestaetigungccbyv3' => 'Veröffentlichung gemäß CC BY-SA Lizenz',
|
|
'checkboxbestaetigungccby' => 'Veröffentlichung gemäß CC BY-SA Lizenz',
|
|
'checkccbysa' => 'Veröffentlichung mit CC-Lizenz zugestimmt',
|
|
'checkboxberechtigung' => 'Bestätigt, dass Sie zur Einreichung berechtigt sind',
|
|
'checkboxbildrechte' => 'Bestätigt, dass Sie die Bildrechte an allen Darstellung der Publikation haben',
|
|
'checkboxhaftung' => 'Bestätigt, dass Sie zur Publikation generell berechtig sind',
|
|
'checkboxdatenschutz' => 'Bestätigt, dass Sie den Datenschutzbestimmungen zugestimmt haben',
|
|
'mitteilungsinput' => 'Mitteilung',
|
|
'deutschesurheberrecht' => 'Deutsches Urheberrecht',
|
|
'einfachesnutzungsrecht'=> 'Bestätigt, dass Sie dem BIBB das einfache Nutzungsrecht einräumen',
|
|
'erstveröffentlichungsinput' => 'Erstveröffentlichungsort',
|
|
'veroeffentlichungsrechtvorhanden' => 'Bestätigt, dass Sie das ausschliesliche Nutzungsrecht haben',
|
|
'zweiveröffentlichungsrecht' => 'Bestätigt, dass Sie Recht zu Zweitveröffentlichung haben',
|
|
];
|
|
|
|
// print_r($labelArray); exit;
|
|
|
|
|
|
$contractDataHTML = '<div class="container mt-4">
|
|
<h4>Vertragssektion</h4>
|
|
<table class="table table-striped table-bordered" >
|
|
<thead style="background-color:#14416b;">
|
|
<tr>
|
|
<th style="width: 20%;"><h5>Feldbezeichnung</h5></th>
|
|
<th style="width: 80%;"><h5>Inhalt</h5></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
';
|
|
|
|
// im ersten Array steht die Auswahl
|
|
|
|
$resArray = [];
|
|
|
|
$resArray[] = ['label' => 'Veröffentlichungsart', 'content' => $contractArray[0]['fieldValue']];
|
|
$resArray[] = ['label' => 'Lizenzart', 'content' => $contractArray[1]['fieldValue']];
|
|
$resArray[] = ['label' => '', 'content' => ''];
|
|
$resArray[] = ['label' => 'Ausgewählte Checkboxen', 'content' => ''];
|
|
|
|
// Auswahl der Checkboxen
|
|
|
|
foreach($contractArray as $contractEntry) {
|
|
if ($contractEntry['inputType'] == 'checkbox') {
|
|
$resArray[] = [ 'label' => '', 'content' => $labelArray[$contractEntry['fieldId']]];
|
|
}
|
|
}
|
|
// Auswahl der Textfelder
|
|
foreach ($contractArray as $contractEntry) {
|
|
if ($contractEntry['fieldId'] == 'mitteilunginput') {
|
|
$resArray[] = [ 'label' => 'Mitteilung', 'content' => $contractEntry['fieldValue']];
|
|
}
|
|
if ($contractEntry['fieldId'] == 'erstveröffentlichungsinput') {
|
|
$resArray[] = [ 'label' => 'Erstveröffentlicht', 'content' => $contractEntry['fieldValue']];
|
|
}
|
|
}
|
|
|
|
|
|
// Ausgabe der gesammelten Daten
|
|
foreach($resArray as $entry) {
|
|
$contractDataHTML .= ' <tr>
|
|
<td>' .$entry['label'] .'</td>
|
|
<td>' .$entry['content'] .'</td>
|
|
</tr>';
|
|
}
|
|
|
|
|
|
$contractDataHTML .= ' </tbody>
|
|
</table>
|
|
</div>';
|
|
|
|
//echo $contractDataHTML;
|
|
|
|
?>
|