<td colspan="3" style="text-align: center;"> <?php if (isset($_POST['saved']) && $_POST['saved'] == 1) { $rasWrapper = new PhpRequestAndSessionWrapper($_POST, $_GET, $_SESSION); if (!$rasWrapper->getValue('post', 'barcode')) { echo "Fehler bei der Übergabe des Barcodes\n"; } else { ?> <!-- barcode o.k. --> <?php $barcode = $rasWrapper->getValue('post', 'barcode'); // eventuell noch vorhandene, nicht mehr gewünschte Werte aus der Session entfernen $unsetSessionValues = array('type', 'name', 'location', 'institution', 'material', 'technique', 'format', 'literature', 'commentary'); foreach ($unsetSessionValues as $valueKey) { $rasWrapper->unsetValue('session', $valueKey); // echo ("\$rasWrapper->unsetValue('session',$valueKey); aufgerufen\n<br>\n"); } ?> <!-- session bereinigt --> <?php // Datenbank-Objekt initialisieren $wrapper = new DilpsEntryWrapper($db, $db_prefix, $barcode); $storeDbValues = array('type', 'title', 'dating', 'material', 'technique', 'format', 'institution', 'literature', 'page', 'figure', 'tableno', 'name', 'location', 'commentary'); $sessionSavedValues = $rasWrapper->getValue('post', 'save_value'); foreach ($storeDbValues as $valueKey) { if ($rasWrapper->getValue('post', $valueKey)) { $funcName = 'set' . ucfirst($valueKey); if (method_exists($wrapper, $funcName)) { $wrapper->{$funcName}($rasWrapper->getValue('post', $valueKey)); // echo ("\$wrapper->{$funcName}(".$rasWrapper->getValue('post',$valueKey).") aufgerufen\n<br>\n");