<?php

namespace FOP;

class Import {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function mitglied_ImportUploadAction() { 
    
    
    // --- BLOCK: access ---
    if(!(((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())))) throw new \FOP\AccessDeniedException();
    // --- BLOCK: main ---
    
// letzte Uploads entfernen
\FOP\Database::query('DELETE FROM fop_import_tbl WHERE '.qi('date').' < '.time().' - 24*60*60');
// neue Datei einfügen
$fileid = \FOP\Files::uploadFromFile($_FILES['importfile']['tmp_name'], $_FILES['importfile']['name']);
\FOP\Database::query('INSERT INTO fop_import_tbl(file, import_id, '.qi('date').') VALUES (' . \FOP\Database::quote($fileid) . ', '. \FOP\Database::quote('mitglied-Import'). ', '. \FOP\Database::quote(time()) . ')');
$params = [];
header('Location: ' . \FOPRouter\Import::mitglied_ImportPrepareURL(\FOP\Database::getLastInsertId(), null, $params));

    
  }

  public static function mitglied_ImportAction() { 
    
    
    // --- BLOCK: 0_CSRFValidate ---
    
	if ($_SERVER['REQUEST_METHOD'] === 'POST') \FOP\Session::validateCSRFToken(); else \FOP\Session::getCSRFToken();

    // --- BLOCK: access ---
    if(!(((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())))) throw new \FOP\AccessDeniedException();
    // --- BLOCK: access+validators ---
    
	if ($_SERVER['REQUEST_METHOD'] === 'POST') {
		
		/* Validatoren */
		
		

		
		/* Sanitizer */

		

		
	}
	
    // --- BLOCK: main ---
     
	if (!isset($_POST['importid'])) {
		throw new AccessDeniedException('no_duplicate_import');
	}
	$file = \FOP\Database::query('SELECT fop_import_tbl.file AS file, fop_files.filename AS filename FROM fop_import_tbl LEFT JOIN fop_files ON fop_files.'.qi('ID').' = fop_import_tbl.file WHERE fop_import_tbl.'.qi('ID').' = ' . \FOP\Database::quote($_POST['importid']))->fetch(\PDO::FETCH_ASSOC);
	$spl = new \SplFileInfo(strtolower($file['filename']));
	$ext = ucfirst($spl->getExtension());
	$importFilePath = \FOP\Files::getTempFile($file['file'], $ext);
	$worksheetName = $_POST['wsheet'];
	$skip = intval($_POST['skip']);
	$flip = $_POST['flip'] == 'true';
	$default = []; // assoc Array tbl->col mit den Default-Werten

	/* Assignment-Liste aufbauen */
	$i = 0;
	
	if ((!\FOP\User::getIsGuest())) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::null_filter($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['tarif'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('tarif').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getSuperadmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['superadmin'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('superadmin').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canAdmin'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canAdmin').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canMitglied'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canMitglied').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canGruppe'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canGruppe').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canCampaign'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canCampaign').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canSammlung'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canSammlung').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canBuchhaltung'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canBuchhaltung').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canProtokoll'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canProtokoll').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getAdmin()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['canDokument'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('canDokument').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['reminderMitgliedMitglied-gebtagMails'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('reminderMitgliedMitglied-gebtagMails').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['reminderMitgliedForderungenMails'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('reminderMitgliedForderungenMails').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['reminderFop_fints_buchungForderungenMails'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('reminderFop_fints_buchungForderungenMails').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['reminderAufgabeAssignedMails'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('reminderAufgabeAssignedMails').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['reminderAufgabeNot_assignedMails'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('reminderAufgabeNot_assignedMails').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['name'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('name').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['vorname'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('vorname').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['mnr'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('mnr').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['geschlecht'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('geschlecht').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_date_to_unix_timestamp($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['geburtsdatum'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('geburtsdatum').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_date_to_unix_timestamp($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['verstorben'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('verstorben').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['land'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('land').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['plz'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('plz').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['ort'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('ort').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['strasse'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('strasse').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_text($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['email'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('email').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_text($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['email2'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('email2').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_phone($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['telefon'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('telefon').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_phone($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['mobil'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('mobil').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_date_to_unix_timestamp($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['eintritt'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('eintritt').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_date_to_unix_timestamp($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['austrittsdatum'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('austrittsdatum').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['austrittsgrund'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('austrittsgrund').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['notiz'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('notiz').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getBuchhaltung()))) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::iban_filter($_POST['default'][$i]);
		$_POST['default'][$i] = \FOP\Sanitizers::no_text($_POST['default'][$i]);
		$_POST['default'][$i] = mb_strtoupper($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['iban'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('iban').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getBuchhaltung()))) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = mb_strtoupper($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['bic'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('bic').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::password_filter($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['password'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('password').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['datenschutz'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('datenschutz').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getBuchhaltung()))) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['sepa'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('sepa').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (((\FOP\User::getBuchhaltung()))) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_date_to_unix_timestamp($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['sepaDate'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('sepaDate').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::convert_month_years_to_unixtime($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['main-mitglied']['dynamic:time'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('main-mitglied').', '.\FOP\Database::quote('dynamic:time').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['vorname'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('vorname').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['name'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('name').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['stellung'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('stellung').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_phone($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['tel'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('tel').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_phone($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['tel2'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('tel2').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		$_POST['default'][$i] = \FOP\Sanitizers::no_text($_POST['default'][$i]);
		// Default-Wert in Objekt speichern
		$default['sub-ansprechpartner']['email'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-ansprechpartner').', '.\FOP\Database::quote('email').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['sub-mitgliedPassnummer']['pnr'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-mitgliedPassnummer').', '.\FOP\Database::quote('pnr').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}
	if (true) {
		// Default-Wert sanitizen
		// Default-Wert in Objekt speichern
		$default['sub-mitgliedPassnummer']['verband'] = $_POST['default'][$i];
		// assign in DB stopfen, damit es mal wiedergefunden wird
		if ($_POST['assign'][$i]) {
			// Assign vormerken für den nächsten Import
			\FOP\Database::query('INSERT INTO fop_import_col(did, col, title, idx, filter, skip, flip) VALUES ('.\FOP\Database::quote('sub-mitgliedPassnummer').', '.\FOP\Database::quote('verband').', '.\FOP\Database::quote($_POST['assign'][$i]).', '.\FOP\Database::quote($_POST['assignIdx'][$i]).', '.\FOP\Database::quote($_POST['assignFilter'][$i]).', '.\FOP\Database::quote($skip).', '.\FOP\Database::quote($flip ? 1 : 0).')');	
		}
		$i++;
	}

    // --- BLOCK: main-auswertung ---
    ?><?php
			header('Content-Type: text/html; charset=UTF-8');
			header('X-XSS-Protection: 1; mode=block');
			header('Strict-Transport-Security: max-age=63072000');
			header('X-Content-Type-Options: nosniff');
			header("Content-Security-Policy: default-src *  data: blob: 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';");


		?><!DOCTYPE html><html><head><title><?php echo(_('Importieren')); ?></title><base href='<?php echo \FOP\Util::getCurrentBaseurl(); ?>'><meta name="google" content="notranslate"><meta http-equiv="Content-Language" content="<?php echo htmlentities(\FOP\I18n::getLocale()); ?>"><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="style_dependencies.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><link rel="stylesheet" type="text/css" href="style.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><script type="text/javascript" src="js/script_dependencies.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="mobile-web-app-capable" content="yes"><link rel="manifest" href="manifest.webmanifest"><script type="text/javascript">moment.locale('<?php echo(\FOP\I18n::getShortLocale()); ?>');</script><script type="text/javascript">window.globals = <?php
	echo json_encode(['user:superadmin' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSuperadmin(), 'user:mitglied' => /* TODO: resanitizer später mal */(integer) \FOP\User::getMitglied(), 'user:gruppe' => /* TODO: resanitizer später mal */(integer) \FOP\User::getGruppe(), 'user:campaign' => /* TODO: resanitizer später mal */(integer) \FOP\User::getCampaign(), 'user:sammlung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSammlung(), 'user:protokoll' => /* TODO: resanitizer später mal */(integer) \FOP\User::getProtokoll(), 'user:ID' => /* TODO: resanitizer später mal */(integer) \FOP\User::getID(), 'user:buchhaltung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getBuchhaltung()]);
?>;</script><script type="text/javascript" src="angular/<?php echo(\FOP\I18n::getShortLocale()); ?>/js/alltypes.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><script type="text/javascript" src="angular/angular-i18n/angular-locale_<?php echo \FOP\I18n::getAngularLocale(); ?>.js"></script><script type="text/javascript" src="js/date-filter.js"></script><script type="text/javascript" src="js/dropdown.js"></script><script type="text/javascript" src="js/numeric.js"></script><script type="text/javascript" src="js/getparam.js"></script><script type="text/javascript" src="js/tables.js"></script>
		<script type="text/javascript" src="js/parsehash.js"></script><script type="text/javascript">
		window.query = <?php echo json_encode($_GET, JSON_FORCE_OBJECT); ?>;
		window.baseurl = <?php echo json_encode(\FOP\Util::getCurrentBaseurl()); ?>;

		window.i18n_weiter = <?php echo json_encode(_('Weiter'));?>;
		//Filter I18n:
		window.i18n_quartal = <?php echo json_encode(_('Quarter'));?>;
		window.i18n_alle = <?php echo json_encode(_('All'));?>;
		window.i18n_leere = <?php echo json_encode(_('Empty'));?>;
		window.i18n_tag = <?php echo json_encode(_('Tag'));?>;
		window.i18n_woche = <?php echo json_encode(_('Woche'));?>;
		window.i18n_zeitraum = <?php echo json_encode(_('Period'));?>;
		window.i18n_monat = <?php echo json_encode(_('Monat'));?>;
		window.i18n_jahr = <?php echo json_encode(_('Jahr'));?>;
		window.i18n_von = <?php echo json_encode(_('filters_from'));?>;
		window.i18n_bis = <?php echo json_encode(_('filters_to'));?>;
		window.i18n_tabButton = <?php echo json_encode(_('open_in_new_tab'));?>;
		window.i18n_closeButton = <?php echo json_encode(_('close'));?>;
		</script></head><script type="text/javascript">const fopPushPublicKey = '<?php echo(addslashes(\FOP\Configuration::getFOPPushPublicKey())); ?>';
        const fopUserID = <?php echo(intval(\FOP\User::getID())); ?>;
        var fopPushDisabled = false;
    </script><script type="text/javascript" src="js/serviceworkersetup.js"></script><body ng-app='app'>
		<div class='mdl-js-snackbar mdl-snackbar' id='snackbar'>
			<div class='mdl-snackbar__text'></div>
			<button class='mdl-snackbar__action' type='button'></button>
		</div>
		<script>
			var snackbar = document.querySelector('#snackbar');
			componentHandler.upgradeElement(snackbar, 'MaterialSnackbar');
			$(function () {
				setTimeout(function () {
					$('.fop-layout').scrollTop(0);
				}, 0);
			});
		</script>

		<?php if (isset($_GET['popup'])) { ?>
		<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('Importieren')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      	</header>
			<style>
				.content {
					margin-top: 0px !important;
				}
			</style>
			<div id='content' class='popup' >
		<?php } else { ?>
			<div class="fop-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
			<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('Importieren')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      		</header>


				<?php  \EasyEditor\Navigation::render(); ?>
      
				<main class="mdl-layout__content" id="content">
					<div class="fop-content">
						<?php } ?>
						
							<div class="content" id="1">
	<h1><?php echo htmlentities($file['filename']); ?></h1>
	<?php
	$backurl = \FOPRouter\Import::mitglied_ImportPrepareURL($_POST['importid']);
	if ($_POST['dupl'] == 'show') {
		?>
			<a class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-button" href="<?php echo htmlentities($backurl); ?>">
				back to import
			</a>
		<?php
	}
	$summary_tmp = tempnam(sys_get_temp_dir(), 'asdf');
	$summary_f = fopen($summary_tmp, 'w');
	ob_start(function ($chunk) use ($summary_f) {
		// output to both: summary file and out
		fwrite($summary_f, $chunk);
		flush();
		return $chunk; // pass to next buffer
	}, 512);
	?>
	<table class='mdl-data-table'>
		<tr><th>#</th><?php
			if (!isset($_POST['ignore_main-mitglied'])) {
				?><th><?php echo(_('Mitglied')); ?></th><?php
			}
			if (!isset($_POST['ignore_sub-ansprechpartner'])) {
				?><th><?php echo(_('Kontaktperson')); ?></th><?php
			}
			if (!isset($_POST['ignore_sub-mitgliedPassnummer'])) {
				?><th><?php echo(_('Passnummer')); ?></th><?php
			} ?></tr>
	<?php
	$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($ext);
	if ($_POST['encoding'] && method_exists($reader, 'setInputEncoding')) $reader->setInputEncoding($_POST['encoding']);
	set_time_limit(300);
	if ($flip) {
		// quer: alles lesen
		$chunkSize = 65536;
	} else {
		$chunkSize = 1000;
		$chunkFilter = new ChunkReadFilter();
		$reader->setLoadSheetsOnly($worksheetName);
		$reader->setReadFilter($chunkFilter);
	}
	$checkDuplicates = [];
	
	$deletelist_main_mitglied = new \FOP\IDList();
	$idlist_main_mitglied = new \FOP\IDList();
	$deletelist_sub_ansprechpartner = new \FOP\IDList();
	$idlist_sub_ansprechpartner = new \FOP\IDList();
	$deletelist_sub_mitgliedPassnummer = new \FOP\IDList();
	$idlist_sub_mitgliedPassnummer = new \FOP\IDList();
	// chunks durchgehen
	for ($startRow = $skip + 1; $startRow <= 65536; $startRow += $chunkSize) {
		$chunkFilter->setRows($startRow, $chunkSize);
		$spreadsheet = $reader->load($importFilePath);
		$worksheet = $spreadsheet->getSheetByName($worksheetName);
		\FOP\Database::beginTransaction();

		if (!isset($assign)) {
			// $_POST enthält schon alle vorgenommenen Assigns. Nur die Struktur muss geändert werden.
			$assign = []; // assoc Array tbl->col mit einem Spalten/Zeilenindex
			$filter = [];
			for ($i = 0; $i < count($_POST['assignIdx']); $i++) if ($_POST['assignIdx'][$i] !== '' || $_POST['assign'][$i] !== '') {
				$idx = intval($_POST['assignIdx'][$i])+1;
				// Integritätstest:
				if (!$flip) {
					$column_title = $worksheet->getCellByColumnAndRow($idx, $skip + 1)->getValue();
				} else {
					$column_title = $worksheet->getCellByColumnAndRow($skip + 1, $idx)->getValue();
				}
				if ($idx == 0) { // index=-1 -> composed columns
					$cols = explode('¬', $_POST['assign'][$i]);
					foreach ($cols AS $j => $val) {
						if (preg_match('/^([0-9]+):.*$/', $val, $match)) {
							$cols[$j] = intval($match[1]);
						}
					}
					$assign[$_POST['did'][$i]][$_POST['col'][$i]] = $cols;
					$filter[$_POST['did'][$i]][$_POST['col'][$i]] = $_POST['assignFilter'][$i];
					if ($_POST['assignUnique'][$i] == 1) {
						$checkDuplicates[$_POST['did'][$i]][$_POST['col'][$i]] = true;
					}
				} else {
					if ($_POST['assign'][$i] != $column_title) {
						// col found: search
						$idx = 100;
						while ($idx > 0) {
							if (!$flip) {
								if ($_POST['assign'][$i] == $worksheet->getCellByColumnAndRow($idx, $skip + 1)->getValue()) break;
							} else {
								if ($_POST['assign'][$i] == $worksheet->getCellByColumnAndRow($skip + 1, $idx)->getValue()) break;
							}
							$idx--;
						}
					}
					if ($idx) {
						$assign[$_POST['did'][$i]][$_POST['col'][$i]] = $idx;
						$filter[$_POST['did'][$i]][$_POST['col'][$i]] = $_POST['assignFilter'][$i];
						if ($_POST['assignUnique'][$i] == 1) {
							$checkDuplicates[$_POST['did'][$i]][$_POST['col'][$i]] = true;
						}
					} else {
						echo 'WARN: '.$_POST['assign'][$i].' not found, ';
					}
				}
			}
		}

		// Datenzeilen durchgehen
		$line = $startRow;
		while ($line < min($flip ? $highestColumnIndex : $worksheet->getHighestRow(), $startRow + $chunkSize)) {
			echo '<tr><td class="mdl-data-table__cell--non-numeric">' . intval($line) . '</td>';
			$line++;
			
			$id_sub_mitgliedPassnummer = null;
			if (!isset($_POST['ignore_sub-mitgliedPassnummer'])) {
				/* !! Code Duplication zu Vorwärts-Durchlauf */
				$item = [];
				if (isset($assign['sub-mitgliedPassnummer'])) {
					$defaultvalues = \Tables\MitgliedPassnummer::getDefaults();
					\Tables\MitgliedPassnummer::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['sub-mitgliedPassnummer'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'mitglied') {
							
							$parsedvalue = \Types\Mitglied::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mitglied'];
							$value = $parsedvalue;
						}
						if ($col == 'pnr') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['pnr'];
							$value = $parsedvalue;
						}
						if ($col == 'verband') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['verband'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (!empty($item[$col])) {
							$leer = false;
						}
					}
				}
			}
			$id_sub_ansprechpartner = null;
			if (!isset($_POST['ignore_sub-ansprechpartner'])) {
				/* !! Code Duplication zu Vorwärts-Durchlauf */
				$item = [];
				if (isset($assign['sub-ansprechpartner'])) {
					$defaultvalues = \Tables\Ansprechpartner::getDefaults();
					\Tables\Ansprechpartner::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['sub-ansprechpartner'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'mitglied') {
							
							$parsedvalue = \Types\Mitglied::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mitglied'];
							$value = $parsedvalue;
						}
						if ($col == 'vorname') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['vorname'];
							$value = $parsedvalue;
						}
						if ($col == 'name') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['name'];
							$value = $parsedvalue;
						}
						if ($col == 'stellung') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['stellung'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (!empty($item[$col])) {
							$leer = false;
						}
					}
				}
			}
			$id_main_mitglied = null;
			if (!isset($_POST['ignore_main-mitglied'])) {
				/* !! Code Duplication zu Vorwärts-Durchlauf */
				$item = [];
				if (isset($assign['main-mitglied'])) {
					$defaultvalues = \Tables\Mitglied::getDefaults();
					\Tables\Mitglied::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['main-mitglied'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'name') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['name'];
							$value = $parsedvalue;
						}
						if ($col == 'vorname') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['vorname'];
							$value = $parsedvalue;
						}
						if ($col == 'geschlecht') {
							
							$parsedvalue = \Types\Geschlechtstyp::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['geschlecht'];
							$value = $parsedvalue;
						}
						if ($col == 'geburtsdatum') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['geburtsdatum'];
							$value = $parsedvalue;
						}
						if ($col == 'land') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['land'];
							$value = $parsedvalue;
						}
						if ($col == 'plz') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['plz'];
							$value = $parsedvalue;
						}
						if ($col == 'ort') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['ort'];
							$value = $parsedvalue;
						}
						if ($col == 'strasse') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['strasse'];
							$value = $parsedvalue;
						}
						if ($col == 'eintritt') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['eintritt'];
							$value = $parsedvalue;
						}
						if ($col == 'mnr') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mnr'];
							$value = $parsedvalue;
						}
						if ($col == 'austrittsdatum') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['austrittsdatum'];
							$value = $parsedvalue;
						}
						if ($col == 'austrittsgrund') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['austrittsgrund'];
							$value = $parsedvalue;
						}
						if ($col == 'verstorben') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['verstorben'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderMitgliedMitglied-gebtagMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderMitgliedMitglied-gebtagMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderMitgliedForderungenMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderMitgliedForderungenMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderFop_fints_buchungForderungenMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderFop_fints_buchungForderungenMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderAufgabeAssignedMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderAufgabeAssignedMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderAufgabeNot_assignedMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderAufgabeNot_assignedMails'];
							$value = $parsedvalue;
						}
						if ($col == 'sepaDate') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['sepaDate'];
							$value = $parsedvalue;
						}
						if ($col == 'tarif') {
							
							$parsedvalue = \Types\TarifNull::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['tarif'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (!empty($item[$col])) {
							$leer = false;
						}
					}
				}
				if (isset($item['mnr']) && ($tmp = \FOP\Database::query('SELECT '.qi('ID').' FROM '.qi('mitglied').' WHERE '.qi('mnr').' = ' . \FOP\Database::quote($item['mnr']))->fetchColumn())) $id_main_mitglied = $tmp;
				if (isset($item['email']) && ($tmp = \FOP\Database::query('SELECT '.qi('ID').' FROM '.qi('mitglied').' WHERE '.qi('email').' = ' . \FOP\Database::quote($item['email']))->fetchColumn())) $id_main_mitglied = $tmp;
				if ($id_sub_ansprechpartner) $id_main_mitglied = \FOP\Database::query('SELECT '.qi('mitglied').' FROM '.qi('ansprechpartner').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($id_sub_ansprechpartner))->fetchColumn();
				if ($id_sub_mitgliedPassnummer) $id_main_mitglied = \FOP\Database::query('SELECT '.qi('mitglied').' FROM '.qi('mitgliedPassnummer').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($id_sub_mitgliedPassnummer))->fetchColumn();
			}
			if (isset($_POST['ignore_main-mitglied'])) {
				$id_main_mitglied = null;
				// manually disabled: no display in table
			} else {
				// import will take place
				echo '<td class="mdl-data-table__cell--non-numeric">';
				$leer = !isset($_POST['force_main-mitglied']); // Anregung: Häkchen leere Datensätze trotzdem anlegen??
				/* array_merge überschreibt ggf. die Werte des Arrays links mit denen von rechts, bei + ist es andersrum! */
				$item = array_merge(\Tables\Mitglied::getDefaults(), $default['main-mitglied']);
				\Tables\Mitglied::sanitizeDefaults($item, false);
				/* !! Code Duplication zu Rückwärts-Durchlauf */
				if (isset($assign['main-mitglied'])) {
					$defaultvalues = \Tables\Mitglied::getDefaults();
					\Tables\Mitglied::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['main-mitglied'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['main-mitglied'][$col]) && $filter['main-mitglied'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'name') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['name'];
							$value = $parsedvalue;
						}
						if ($col == 'vorname') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['vorname'];
							$value = $parsedvalue;
						}
						if ($col == 'geschlecht') {
							
							$parsedvalue = \Types\Geschlechtstyp::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['geschlecht'];
							$value = $parsedvalue;
						}
						if ($col == 'geburtsdatum') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['geburtsdatum'];
							$value = $parsedvalue;
						}
						if ($col == 'land') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['land'];
							$value = $parsedvalue;
						}
						if ($col == 'plz') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['plz'];
							$value = $parsedvalue;
						}
						if ($col == 'ort') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['ort'];
							$value = $parsedvalue;
						}
						if ($col == 'strasse') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['strasse'];
							$value = $parsedvalue;
						}
						if ($col == 'eintritt') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['eintritt'];
							$value = $parsedvalue;
						}
						if ($col == 'mnr') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mnr'];
							$value = $parsedvalue;
						}
						if ($col == 'austrittsdatum') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['austrittsdatum'];
							$value = $parsedvalue;
						}
						if ($col == 'austrittsgrund') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['austrittsgrund'];
							$value = $parsedvalue;
						}
						if ($col == 'verstorben') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['verstorben'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderMitgliedMitglied-gebtagMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderMitgliedMitglied-gebtagMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderMitgliedForderungenMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderMitgliedForderungenMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderFop_fints_buchungForderungenMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderFop_fints_buchungForderungenMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderAufgabeAssignedMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderAufgabeAssignedMails'];
							$value = $parsedvalue;
						}
						if ($col == 'reminderAufgabeNot_assignedMails') {
							
							$parsedvalue = \Types\Fop_notification_frequency::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['reminderAufgabeNot_assignedMails'];
							$value = $parsedvalue;
						}
						if ($col == 'sepaDate') {
							
							$parsedvalue = \FOP\Sanitizers::parseDate($value);
							if ($parsedvalue === null) 
							$parsedvalue = \FOP\Sanitizers::parseDateExcel($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['sepaDate'];
							$value = $parsedvalue;
						}
						if ($col == 'tarif') {
							
							$parsedvalue = \Types\TarifNull::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['tarif'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (trim($item[$col])) {
							// value is not empty
							$leer = false;
						}
					}
				}
				if (/* show no duplicate */ $_POST['dupl'] == 'show' && !$id_main_mitglied) {
					echo '-';
				} else if (/* show no duplicate */ $_POST['dupl'] == 'show' && $id_main_mitglied) {
					echo '<a target="_blank" href="'.\TablesRouter\Mitglied::viewURL($id_main_mitglied).'">exists</a>';
					$idlist_main_mitglied->push($id_main_mitglied);
				}  else if (/* duplicated value / unique */ $id_main_mitglied) {
					// fill up empty columns
					echo '<a target="_blank" href="'.\TablesRouter\Mitglied::viewURL($id_main_mitglied).'">dupl</a>';
					if ($_POST['dupl'] == 'ignore') {
						echo ' ignore';
					} else {
						$dupl_data = \Tables\Mitglied::view($id_main_mitglied, false, true);
						$update_data = [];
						foreach ($item AS $key => $value) {
							if ((!$dupl_data[$key] || $_POST['dupl'] == 'overwrite') && array_key_exists($key, $assign['main-mitglied'])) {
								// dupl==fill: update column when value is empty, dupl==overwrite: always fill
								$update_data[$key] = $value;
								echo '<br>update ' . htmlentities($key);
							}
						}
						if (!empty($update_data)) {
							try {
								\Tables\Mitglied::edit($id_main_mitglied, $update_data, true);
							} catch (\FOP\AccessDeniedException $e) {
								// gefailte Edits mal ignorieren...
								echo ' update fail';
							}
							$idlist_main_mitglied->push($id_main_mitglied);
						}
					}
				} else if (!$leer) {
					$id_main_mitglied = \Tables\Mitglied::create($item, false, true);
					echo '<a target="_blank" href="'.\TablesRouter\Mitglied::viewURL($id_main_mitglied).'">create</a>';
					$deletelist_main_mitglied->push($id_main_mitglied);
					$idlist_main_mitglied->push($id_main_mitglied);
				} else {
					$id_main_mitglied = null;
					echo 'empty';
				}
				echo '</td>';
			}
			if (isset($_POST['ignore_sub-ansprechpartner'])) {
				$id_sub_ansprechpartner = null;
				// manually disabled: no display in table
			} else if (!$id_main_mitglied) {
				echo '<td class="mdl-data-table__cell--non-numeric">ref missing</td>';
			} else {
				// import will take place
				echo '<td class="mdl-data-table__cell--non-numeric">';
				$leer = !isset($_POST['force_sub-ansprechpartner']); // Anregung: Häkchen leere Datensätze trotzdem anlegen??
				/* array_merge überschreibt ggf. die Werte des Arrays links mit denen von rechts, bei + ist es andersrum! */
				$item = array_merge(\Tables\Ansprechpartner::getDefaults(), $default['sub-ansprechpartner']);
				\Tables\Ansprechpartner::sanitizeDefaults($item, false);
				$item['mitglied'] = $id_main_mitglied;
				/* !! Code Duplication zu Rückwärts-Durchlauf */
				if (isset($assign['sub-ansprechpartner'])) {
					$defaultvalues = \Tables\Ansprechpartner::getDefaults();
					\Tables\Ansprechpartner::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['sub-ansprechpartner'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['sub-ansprechpartner'][$col]) && $filter['sub-ansprechpartner'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'mitglied') {
							
							$parsedvalue = \Types\Mitglied::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mitglied'];
							$value = $parsedvalue;
						}
						if ($col == 'vorname') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['vorname'];
							$value = $parsedvalue;
						}
						if ($col == 'name') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['name'];
							$value = $parsedvalue;
						}
						if ($col == 'stellung') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['stellung'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (trim($item[$col])) {
							// value is not empty
							$leer = false;
						}
					}
				}
				if (/* show no duplicate */ $_POST['dupl'] == 'show' && !$id_sub_ansprechpartner) {
					echo '-';
				} else if (/* show no duplicate */ $_POST['dupl'] == 'show' && $id_sub_ansprechpartner) {
					echo '<a target="_blank" href="'.\TablesRouter\Ansprechpartner::viewURL($id_sub_ansprechpartner).'">exists</a>';
					$idlist_sub_ansprechpartner->push($id_sub_ansprechpartner);
				}  else if (/* duplicated value / unique */ $id_sub_ansprechpartner) {
					// fill up empty columns
					echo '<a target="_blank" href="'.\TablesRouter\Ansprechpartner::viewURL($id_sub_ansprechpartner).'">dupl</a>';
					if ($_POST['dupl'] == 'ignore') {
						echo ' ignore';
					} else {
						$dupl_data = \Tables\Ansprechpartner::view($id_sub_ansprechpartner, false, true);
						$update_data = [];
						foreach ($item AS $key => $value) {
							if ((!$dupl_data[$key] || $_POST['dupl'] == 'overwrite') && array_key_exists($key, $assign['sub-ansprechpartner'])) {
								// dupl==fill: update column when value is empty, dupl==overwrite: always fill
								$update_data[$key] = $value;
								echo '<br>update ' . htmlentities($key);
							}
						}
						if (!empty($update_data)) {
							try {
								\Tables\Ansprechpartner::edit($id_sub_ansprechpartner, $update_data, true);
							} catch (\FOP\AccessDeniedException $e) {
								// gefailte Edits mal ignorieren...
								echo ' update fail';
							}
							$idlist_sub_ansprechpartner->push($id_sub_ansprechpartner);
						}
					}
				} else if (!$leer) {
					$id_sub_ansprechpartner = \Tables\Ansprechpartner::create($item, false, true);
					echo '<a target="_blank" href="'.\TablesRouter\Ansprechpartner::viewURL($id_sub_ansprechpartner).'">create</a>';
					$deletelist_sub_ansprechpartner->push($id_sub_ansprechpartner);
					$idlist_sub_ansprechpartner->push($id_sub_ansprechpartner);
				} else {
					$id_sub_ansprechpartner = null;
					echo 'empty';
				}
				echo '</td>';
			}
			if (isset($_POST['ignore_sub-mitgliedPassnummer'])) {
				$id_sub_mitgliedPassnummer = null;
				// manually disabled: no display in table
			} else if (!$id_main_mitglied) {
				echo '<td class="mdl-data-table__cell--non-numeric">ref missing</td>';
			} else {
				// import will take place
				echo '<td class="mdl-data-table__cell--non-numeric">';
				$leer = !isset($_POST['force_sub-mitgliedPassnummer']); // Anregung: Häkchen leere Datensätze trotzdem anlegen??
				/* array_merge überschreibt ggf. die Werte des Arrays links mit denen von rechts, bei + ist es andersrum! */
				$item = array_merge(\Tables\MitgliedPassnummer::getDefaults(), $default['sub-mitgliedPassnummer']);
				\Tables\MitgliedPassnummer::sanitizeDefaults($item, false);
				$item['mitglied'] = $id_main_mitglied;
				/* !! Code Duplication zu Rückwärts-Durchlauf */
				if (isset($assign['sub-mitgliedPassnummer'])) {
					$defaultvalues = \Tables\MitgliedPassnummer::getDefaults();
					\Tables\MitgliedPassnummer::sanitizeDefaults($defaultvalues, false);
					foreach ($assign['sub-mitgliedPassnummer'] AS $col => $idx) {
						if (is_array($idx)) {
							// compose values
							$value = '';
							foreach ($idx AS $snippet) {
								if (is_int($snippet)) {
									if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $snippet + 1);}
									else {$cell = $worksheet->getCellByColumnAndRow($snippet + 1, $line);}
									$value .= $cell->getValue();
								} else {
									$value .= $snippet; // separator
								}
							}
						} else {
							// single value
							if ($flip) {$cell = $worksheet->getCellByColumnAndRow($line, $idx);}
							else {$cell = $worksheet->getCellByColumnAndRow($idx, $line);}
							$value = $cell->getValue();
						}
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number49') $value = \FOP\Sanitizers::canonicalize_number49($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number43') $value = \FOP\Sanitizers::canonicalize_number43($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'number41') $value = \FOP\Sanitizers::canonicalize_number41($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'vname') $value = \FOP\Sanitizers::canonicalize_vname($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'nname') $value = \FOP\Sanitizers::canonicalize_nname($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'plz') $value = \FOP\Sanitizers::canonicalize_plz($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'ort') $value = \FOP\Sanitizers::canonicalize_ort($value);
						if (isset($filter['sub-mitgliedPassnummer'][$col]) && $filter['sub-mitgliedPassnummer'][$col] == 'strasse') $value = \FOP\Sanitizers::canonicalize_strasse($value);
						if ($col == 'mitglied') {
							
							$parsedvalue = \Types\Mitglied::parse($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['mitglied'];
							$value = $parsedvalue;
						}
						if ($col == 'pnr') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['pnr'];
							$value = $parsedvalue;
						}
						if ($col == 'verband') {
							
							$parsedvalue = \FOP\Sanitizers::parseText($value);
							if ($parsedvalue === null) 
							// Wert nicht erfolgreich geparst => Default-Wert nehmen!
							$parsedvalue = $defaultvalues['verband'];
							$value = $parsedvalue;
						}
						$item[$col] = $value;
						if (trim($item[$col])) {
							// value is not empty
							$leer = false;
						}
					}
				}
				if (/* show no duplicate */ $_POST['dupl'] == 'show' && !$id_sub_mitgliedPassnummer) {
					echo '-';
				} else if (/* show no duplicate */ $_POST['dupl'] == 'show' && $id_sub_mitgliedPassnummer) {
					echo '<a target="_blank" href="'.\TablesRouter\MitgliedPassnummer::viewURL($id_sub_mitgliedPassnummer).'">exists</a>';
					$idlist_sub_mitgliedPassnummer->push($id_sub_mitgliedPassnummer);
				}  else if (/* duplicated value / unique */ $id_sub_mitgliedPassnummer) {
					// fill up empty columns
					echo '<a target="_blank" href="'.\TablesRouter\MitgliedPassnummer::viewURL($id_sub_mitgliedPassnummer).'">dupl</a>';
					if ($_POST['dupl'] == 'ignore') {
						echo ' ignore';
					} else {
						$dupl_data = \Tables\MitgliedPassnummer::view($id_sub_mitgliedPassnummer, false, true);
						$update_data = [];
						foreach ($item AS $key => $value) {
							if ((!$dupl_data[$key] || $_POST['dupl'] == 'overwrite') && array_key_exists($key, $assign['sub-mitgliedPassnummer'])) {
								// dupl==fill: update column when value is empty, dupl==overwrite: always fill
								$update_data[$key] = $value;
								echo '<br>update ' . htmlentities($key);
							}
						}
						if (!empty($update_data)) {
							try {
								\Tables\MitgliedPassnummer::edit($id_sub_mitgliedPassnummer, $update_data, true);
							} catch (\FOP\AccessDeniedException $e) {
								// gefailte Edits mal ignorieren...
								echo ' update fail';
							}
							$idlist_sub_mitgliedPassnummer->push($id_sub_mitgliedPassnummer);
						}
					}
				} else if (!$leer) {
					$id_sub_mitgliedPassnummer = \Tables\MitgliedPassnummer::create($item, false, true);
					echo '<a target="_blank" href="'.\TablesRouter\MitgliedPassnummer::viewURL($id_sub_mitgliedPassnummer).'">create</a>';
					$deletelist_sub_mitgliedPassnummer->push($id_sub_mitgliedPassnummer);
					$idlist_sub_mitgliedPassnummer->push($id_sub_mitgliedPassnummer);
				} else {
					$id_sub_mitgliedPassnummer = null;
					echo 'empty';
				}
				echo '</td>';
			}
			echo '</tr>';
			flush();
		}
		\FOP\Database::commitTransaction();
	}
	echo '</table>';
	// save summary file
	ob_end_flush();
	fclose($summary_f);
	$summary = \FOP\Files::uploadFromFile($summary_tmp, 'import-'.date(_('datetimeformat_php')).'.html');
	\FOP\Database::query('UPDATE fop_import_tbl SET summary = ' . intval($summary) . ' WHERE '.qi('ID').' = ' . \FOP\Database::quote($_POST['importid']));
	echo 'Do not reload this page!<br>';
	$backurl = \FOPRouter\Import::mitglied_ImportPrepareURL2(['id' => $_POST['importid'], 'encoding' => $_POST['encoding']]);
	
	if ($deletelist_main_mitglied->count()) {
		$backurl = \TablesRouter\Mitglied::deleteConfirmURL2(['id' => $deletelist_main_mitglied->toString(), 'from' => $backurl]);
	}
	if ($deletelist_sub_ansprechpartner->count()) {
		$backurl = \TablesRouter\Ansprechpartner::deleteConfirmURL2(['id' => $deletelist_sub_ansprechpartner->toString(), 'from' => $backurl]);
	}
	if ($deletelist_sub_mitgliedPassnummer->count()) {
		$backurl = \TablesRouter\MitgliedPassnummer::deleteConfirmURL2(['id' => $deletelist_sub_mitgliedPassnummer->toString(), 'from' => $backurl]);
	}
	echo '<a href="'.htmlentities($backurl).'" class="mdl-button mdl-js-button mdl-button--colored mdl-button--raised"><i class="material-icons">keyboard_arrow_left</i> '._('import_back').'</a>';
	echo '<a target="_blank" href="'.\FOPRouter\Files::downloadURL($summary).'" class="mdl-button mdl-js-button mdl-button--colored mdl-button--raised"><i class="material-icons">cloud_download</i> Download report</a><hr>';
	
	?><h2><?php echo(_('Mitglieder')); ?></h2>
		<a target="_blank" href="<?php echo \TablesRouter\Mitglied::indexURL2(['filter_mitglied_ID' => $idlist_main_mitglied->toString()]); ?>" class="mdl-js-button mdl-button--colored mdl-button--raised mdl-button">
			Liste öffnen
		</a>
	<?php
	$_GET['filter_mitglied_ID'] = $idlist_main_mitglied->toString();
	\DataView\Mitglied::renderScript();
	echo '<div id="mitglied-table">';
	\DataView\Mitglied::renderTabTableAction();
	echo '</div>';
	
	?><h2><?php echo(_('Kontaktpersonen')); ?></h2>
		<a target="_blank" href="<?php echo \TablesRouter\Ansprechpartner::indexURL2(['filter_ansprechpartner_ID' => $idlist_sub_ansprechpartner->toString()]); ?>" class="mdl-js-button mdl-button--colored mdl-button--raised mdl-button">
			Liste öffnen
		</a>
	<?php
	$_GET['filter_ansprechpartner_ID'] = $idlist_sub_ansprechpartner->toString();
	\DataView\Ansprechpartner::renderScript();
	echo '<div id="ansprechpartner-table">';
	\DataView\Ansprechpartner::renderTabTableAction();
	echo '</div>';
	
	?><h2><?php echo(_('Passnummern')); ?></h2>
		<a target="_blank" href="<?php echo \TablesRouter\MitgliedPassnummer::indexURL2(['filter_mitgliedPassnummer_ID' => $idlist_sub_mitgliedPassnummer->toString()]); ?>" class="mdl-js-button mdl-button--colored mdl-button--raised mdl-button">
			Liste öffnen
		</a>
	<?php
	$_GET['filter_mitgliedPassnummer_ID'] = $idlist_sub_mitgliedPassnummer->toString();
	\DataView\MitgliedPassnummer::renderScript();
	echo '<div id="mitgliedPassnummer-table">';
	\DataView\MitgliedPassnummer::renderTabTableAction();
	echo '</div>';
	 ?>
	<script type='text/javascript'>
		// neue GET params nachtragen
		window.query = <?php echo json_encode(array_diff_key($_GET, ['_q' => 'weg'])); ?>;
	</script>

							</div>
							<div class="content" id="focus-supersearch">
		<script type='text/javascript'>
			$(function () {
				var focusfield = $('#supersearch');
				
				if (focusfield.length) {
					focusfield[0].focus();
					focusfield[0].select();
				}
			});
		</script>
	
							</div>
						<?php if (!isset($_GET['popup'])) { ?>
					</div>
				</main>
				
			</div>
		<?php } else { ?></div><?php } ?>
<?php if (!isset($_GET['popup'])) { ?><div class='fop-seal'></div><?php } ?></body></html><?php
    
  }

  public static function mitglied_ImportPrepareAction($id, $encoding = null ) { 
    
    
    // --- BLOCK: access ---
    if(!(((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())) && ((\FOP\User::getGruppe())))) throw new \FOP\AccessDeniedException();
    // --- BLOCK: main ---
    
	$file = \FOP\Database::query('SELECT fop_import_tbl.file AS file, fop_files.filename AS filename FROM fop_import_tbl LEFT JOIN fop_files ON fop_files.'.qi('ID').' = fop_import_tbl.file WHERE fop_import_tbl.'.qi('ID').' =  '. \FOP\Database::quote($id))->fetch(\PDO::FETCH_ASSOC);

	$preassign = []; // assoc tbl->col mit {title, data}
	$previousUsedColumns = \FOP\Database::query('SELECT did, col, title, filter, MIN(flip) AS flip, MAX(skip) AS skip, MAX(idx) AS idx, COUNT(*) AS cnt FROM fop_import_col WHERE did IN (\'main-mitglied\', \'sub-ansprechpartner\', \'sub-mitgliedPassnummer\') GROUP BY did, col, title, filter')->fetchAll(\PDO::FETCH_ASSOC);
	// eine Default-Zuweisung vorschlagen
	
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'name',
		'title' => _('Name'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'name',
		'title' => 'name', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'vorname',
		'title' => _('Vorname'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'vorname',
		'title' => 'vorname', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'geschlecht',
		'title' => _('Geschlecht'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'geschlecht',
		'title' => 'geschlecht', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'datenschutz',
		'title' => _('Datenschutz akzeptiert'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'datenschutz',
		'title' => 'datenschutz', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'geburtsdatum',
		'title' => _('Geburtsdatum'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'geburtsdatum',
		'title' => 'geburtsdatum', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'land',
		'title' => _('Land'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'land',
		'title' => 'land', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'plz',
		'title' => _('Postleitzahl'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'plz',
		'title' => 'plz', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'ort',
		'title' => _('Ort'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'ort',
		'title' => 'ort', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'strasse',
		'title' => _('Straße und Hausnummer'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'strasse',
		'title' => 'strasse', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'eintritt',
		'title' => _('Eintrittsdatum'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'eintritt',
		'title' => 'eintritt', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'email',
		'title' => _('E-Mail'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'email',
		'title' => 'email', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'email2',
		'title' => _('E-Mail Alternative'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'email2',
		'title' => 'email2', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'telefon',
		'title' => _('Telefon'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'telefon',
		'title' => 'telefon', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'mobil',
		'title' => _('Mobil'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'mobil',
		'title' => 'mobil', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'mnr',
		'title' => _('Mitgliedsnummer'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'mnr',
		'title' => 'mnr', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'austrittsdatum',
		'title' => _('Austrittsdatum'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'austrittsdatum',
		'title' => 'austrittsdatum', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'austrittsgrund',
		'title' => _('Austritts-Grund'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'austrittsgrund',
		'title' => 'austrittsgrund', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'verstorben',
		'title' => _('Verstorben am'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'verstorben',
		'title' => 'verstorben', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'notiz',
		'title' => _('Notiz'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'notiz',
		'title' => 'notiz', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'password',
		'title' => _('Passwort'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'password',
		'title' => 'password', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'mitglied',
		'title' => _('von Mitglied'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'mitglied',
		'title' => 'mitglied', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'vorname',
		'title' => _('Vorname'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'vorname',
		'title' => 'vorname', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'name',
		'title' => _('Nachname'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'name',
		'title' => 'name', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'stellung',
		'title' => _('Beziehung zum Mitglied'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'stellung',
		'title' => 'stellung', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'tel',
		'title' => _('Telefon'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'tel',
		'title' => 'tel', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'tel2',
		'title' => _('Telefon 2'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'tel2',
		'title' => 'tel2', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-ansprechpartner',
		'col' => 'email',
		'title' => _('E-Mail'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-ansprechpartner',
		'col' => 'email',
		'title' => 'email', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'mitglied',
		'title' => _('Mitglied'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'mitglied',
		'title' => 'mitglied', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'pnr',
		'title' => _('Passnummer'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'pnr',
		'title' => 'pnr', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'verband',
		'title' => _('Sportverband'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'sub-mitgliedPassnummer',
		'col' => 'verband',
		'title' => 'verband', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'reminderMitgliedMitglied-gebtagMails',
		'title' => _('Geburtstage'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'reminderMitgliedMitglied-gebtagMails',
		'title' => 'reminderMitgliedMitglied-gebtagMails', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'reminderMitgliedForderungenMails',
		'title' => _('Offene Beiträge'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'reminderMitgliedForderungenMails',
		'title' => 'reminderMitgliedForderungenMails', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'reminderFop_fints_buchungForderungenMails',
		'title' => _('unbehandelte Zahlungseingänge'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'reminderFop_fints_buchungForderungenMails',
		'title' => 'reminderFop_fints_buchungForderungenMails', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'reminderAufgabeAssignedMails',
		'title' => _('Mir zugewiesen'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'reminderAufgabeAssignedMails',
		'title' => 'reminderAufgabeAssignedMails', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'reminderAufgabeNot_assignedMails',
		'title' => _('Nicht zugewiesen'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'reminderAufgabeNot_assignedMails',
		'title' => 'reminderAufgabeNot_assignedMails', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'sepa',
		'title' => _('SEPA-Lastschrift'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'sepa',
		'title' => 'sepa', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'sepaDate',
		'title' => _('Datum SEPA-Lastschrift'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'sepaDate',
		'title' => 'sepaDate', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'superadmin',
		'title' => _('Super-Admin'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'superadmin',
		'title' => 'superadmin', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'iban',
		'title' => _('IBAN'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'iban',
		'title' => 'iban', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'bic',
		'title' => _('BIC'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'bic',
		'title' => 'bic', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canAdmin',
		'title' => _('Admin'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canAdmin',
		'title' => 'canAdmin', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canMitglied',
		'title' => _('Mitgliederverwaltung'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canMitglied',
		'title' => 'canMitglied', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canGruppe',
		'title' => _('Verwaltung der eigenen Gruppe'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canGruppe',
		'title' => 'canGruppe', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canCampaign',
		'title' => _('Rundmails und Aktionen'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canCampaign',
		'title' => 'canCampaign', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canSammlung',
		'title' => _('Geldsammlungen'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canSammlung',
		'title' => 'canSammlung', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canBuchhaltung',
		'title' => _('Buchhaltung'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canBuchhaltung',
		'title' => 'canBuchhaltung', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canProtokoll',
		'title' => _('Protokoll'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canProtokoll',
		'title' => 'canProtokoll', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'canDokument',
		'title' => _('Dokumente'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'canDokument',
		'title' => 'canDokument', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'dynamic:time',
		'title' => _('validfrom'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'dynamic:time',
		'title' => 'dynamic:time', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);
	array_push($previousUsedColumns, [
		'did' => 'main-mitglied',
		'col' => 'tarif',
		'title' => _('Mitgliedsbeitrag'), // Beschriftung
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	], [
		'did' => 'main-mitglied',
		'col' => 'tarif',
		'title' => 'tarif', // technischer Name
		'filter' => null,
		'flip' => 0,
		'skip' => 0,
		'idx' => '',
		'cnt' => 1
	]);

	// Import-Datei einlesen
	$splInfo = new \SplFileInfo(strtolower($file['filename']));
	$ext = ucfirst($splInfo->getExtension());
	$importFilePath = \FOP\Files::getTempFile($file['file'], $ext);
	$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($ext);
	if ($encoding && method_exists($reader, 'setInputEncoding')) $reader->setInputEncoding($encoding);
	$chunkFilter = new ChunkReadFilter();
	$reader->setReadFilter($chunkFilter);
	$chunkFilter->setRows(1, 50);
	$spreadsheet = $reader->load($importFilePath);
	$worksheets = $spreadsheet->getSheetNames();
	$worksheets_out = array();
	foreach ($worksheets as $wsid => $worksheetName){
		$data = $spreadsheet->getSheetByName($worksheetName)->rangeToArray('A1:AZ50', null, false, true, false);
		$data2 = array_map(null, ...$data); // Spalte/Zeile umdrehen

		// preassign für das Sheet
		// geht Datensätze in fop_import_col durch (in $previousUsedColumns), sucht Titel in Import-Tabelle, setzt ggf. $preassign['did']['col']
		foreach ($previousUsedColumns AS $prev) {
			// Spaltennummern mit Titel $prev['title'] aus Import-Tabelle einlesen => $positions
			$positions = array_keys(($prev['flip'] == 0 ? $data : $data2)[$prev['skip']], $prev['title']);
			if (count($positions)) {
				// Spalte wird verwendet -> Zuweisung merken
				$pos = null;
				// exakten Match bevorzugen
				foreach ($positions AS $idx) {
					if ($idx == $prev['idx']) {
						// exact match Spalten-Index
						$pos = $idx;
					}
				}
				if (!$pos) $pos = $positions[0];
				// gehe bis zum letzten Datensatz mit diesem Titel, erst dann $preassign setzen
				if (!isset($preassign[$prev['did']][$prev['col']]) || $preassign[$prev['did']][$prev['col']]['cnt'] < $prev['cnt']) {
					$preassign[$prev['did']][$prev['col']] = [
						'title' => $prev['title'],
						'filter' => $prev['filter'],
						'idx' => $prev['idx'],
						'data' => array_slice(($prev['flip'] == 0 ? $data2 : $data)[$pos], $prev['skip'] + 1),
						'cnt' => $prev['cnt']
					];
				}
			}
		}

		array_push($worksheets_out, [
			'id' => $wsid,
			'name' => $worksheetName,
			'data' => $data, // normale Orientierung
			'data2' => $data2 // spaltenbasierte Datensätze
		]);
	}

	
	$default_main_mitglied = \Tables\Mitglied::getDefaults();
	\Tables\Mitglied::sanitizeDefaults($default_main_mitglied, true);
	$default_sub_ansprechpartner = \Tables\Ansprechpartner::getDefaults();
	\Tables\Ansprechpartner::sanitizeDefaults($default_sub_ansprechpartner, true);
	$default_sub_mitgliedPassnummer = \Tables\MitgliedPassnummer::getDefaults();
	\Tables\MitgliedPassnummer::sanitizeDefaults($default_sub_mitgliedPassnummer, true);
?><?php
			header('Content-Type: text/html; charset=UTF-8');
			header('X-XSS-Protection: 1; mode=block');
			header('Strict-Transport-Security: max-age=63072000');
			header('X-Content-Type-Options: nosniff');
			header("Content-Security-Policy: default-src *  data: blob: 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';");


		?><!DOCTYPE html><html><head><title><?php echo(_('Importieren')); ?></title><base href='<?php echo \FOP\Util::getCurrentBaseurl(); ?>'><meta name="google" content="notranslate"><meta http-equiv="Content-Language" content="<?php echo htmlentities(\FOP\I18n::getLocale()); ?>"><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="style_dependencies.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><link rel="stylesheet" type="text/css" href="style.css?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"><script type="text/javascript" src="js/script_dependencies.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="mobile-web-app-capable" content="yes"><link rel="manifest" href="manifest.webmanifest"><script type="text/javascript">moment.locale('<?php echo(\FOP\I18n::getShortLocale()); ?>');</script><script type="text/javascript">window.globals = <?php
	echo json_encode(['user:superadmin' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSuperadmin(), 'user:mitglied' => /* TODO: resanitizer später mal */(integer) \FOP\User::getMitglied(), 'user:gruppe' => /* TODO: resanitizer später mal */(integer) \FOP\User::getGruppe(), 'user:campaign' => /* TODO: resanitizer später mal */(integer) \FOP\User::getCampaign(), 'user:sammlung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getSammlung(), 'user:protokoll' => /* TODO: resanitizer später mal */(integer) \FOP\User::getProtokoll(), 'user:ID' => /* TODO: resanitizer später mal */(integer) \FOP\User::getID(), 'user:buchhaltung' => /* TODO: resanitizer später mal */(integer) \FOP\User::getBuchhaltung()]);
?>;</script><script type="text/javascript" src="angular/<?php echo(\FOP\I18n::getShortLocale()); ?>/js/alltypes.js?v=<?php echo(\FOP\Util::getVersionAppendix()); ?>"></script><script type="text/javascript" src="angular/angular-i18n/angular-locale_<?php echo \FOP\I18n::getAngularLocale(); ?>.js"></script><script type="text/javascript" src="js/date-filter.js"></script><script type="text/javascript" src="js/dropdown.js"></script><script type="text/javascript" src="js/numeric.js"></script><script type="text/javascript" src="js/getparam.js"></script><script type="text/javascript" src="js/tables.js"></script>
		<script type="text/javascript" src="js/parsehash.js"></script><script type="text/javascript">
		window.query = <?php echo json_encode($_GET, JSON_FORCE_OBJECT); ?>;
		window.baseurl = <?php echo json_encode(\FOP\Util::getCurrentBaseurl()); ?>;

		window.i18n_weiter = <?php echo json_encode(_('Weiter'));?>;
		//Filter I18n:
		window.i18n_quartal = <?php echo json_encode(_('Quarter'));?>;
		window.i18n_alle = <?php echo json_encode(_('All'));?>;
		window.i18n_leere = <?php echo json_encode(_('Empty'));?>;
		window.i18n_tag = <?php echo json_encode(_('Tag'));?>;
		window.i18n_woche = <?php echo json_encode(_('Woche'));?>;
		window.i18n_zeitraum = <?php echo json_encode(_('Period'));?>;
		window.i18n_monat = <?php echo json_encode(_('Monat'));?>;
		window.i18n_jahr = <?php echo json_encode(_('Jahr'));?>;
		window.i18n_von = <?php echo json_encode(_('filters_from'));?>;
		window.i18n_bis = <?php echo json_encode(_('filters_to'));?>;
		window.i18n_tabButton = <?php echo json_encode(_('open_in_new_tab'));?>;
		window.i18n_closeButton = <?php echo json_encode(_('close'));?>;
		</script></head><script type="text/javascript">const fopPushPublicKey = '<?php echo(addslashes(\FOP\Configuration::getFOPPushPublicKey())); ?>';
        const fopUserID = <?php echo(intval(\FOP\User::getID())); ?>;
        var fopPushDisabled = false;
    </script><script type="text/javascript" src="js/serviceworkersetup.js"></script><body ng-app='app'>
		<div class='mdl-js-snackbar mdl-snackbar' id='snackbar'>
			<div class='mdl-snackbar__text'></div>
			<button class='mdl-snackbar__action' type='button'></button>
		</div>
		<script>
			var snackbar = document.querySelector('#snackbar');
			componentHandler.upgradeElement(snackbar, 'MaterialSnackbar');
			$(function () {
				setTimeout(function () {
					$('.fop-layout').scrollTop(0);
				}, 0);
			});
		</script>

		<?php if (isset($_GET['popup'])) { ?>
		<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('Importieren')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      	</header>
			<style>
				.content {
					margin-top: 0px !important;
				}
			</style>
			<div id='content' class='popup' >
		<?php } else { ?>
			<div class="fop-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
			<header class="fop-header mdl-layout__header mdl-layout__header mdl-layout__header--scroll">
				<div class="mdl-layout__header-row">
					<span class="mdl-layout-title"><?php echo(_('Importieren')); ?></span><div class="mdl-layout-spacer"></div><span class="noprint mdl-layout-title mdl-layout--large-screen-only"><div class="mdl-textfield mdl-js-textfield"><input id="supersearch" accesskey="f" class="mdl-textfield__input" type="text" onkeydown="if (event.keyCode == 13 && this.value) window.location.href = 'FOP/Index/searchURL?q=' + encodeURIComponent(this.value) + '&from=<?php echo htmlentities(urlencode(\FOP\Util::getBackUrl())); ?>';" value="<?php echo htmlentities($_GET['q'] ?? ''); ?>" style="border-bottom: 1px solid white;"/><label class="mdl-textfield__label" style="color: inherit"><?php echo(_('search')); ?> - <?php
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
			// MAC: Control+ davor
			echo 'Control + ';
		}
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
			// Firefox
			if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) {
				// MAC: Control + Alt + key
				echo 'Alt + F';
			} else {
				echo 'Alt + Shift + F';
			}
		} else {
			// Internet Explorer, Chrome, Safari, Opera
			echo 'Alt + F';
		}
	?></label></div></span><i onclick='addFav(null)' class='material-icons fop-favorites' id='favorites_button'>star_border</i>
				</div>
      		</header>


				<?php  \EasyEditor\Navigation::render(); ?>
      
				<main class="mdl-layout__content" id="content">
					<div class="fop-content">
						<?php } ?>
						
							<div class="content" id="focus-supersearch">
		<script type='text/javascript'>
			$(function () {
				var focusfield = $('#supersearch');
				
				if (focusfield.length) {
					focusfield[0].focus();
					focusfield[0].select();
				}
			});
		</script>
	
							</div>
							<div class="content" id="form">
								

								<form
									
									action="<?php echo \FOPRouter\Import::mitglied_ImportURL2(['popup' => $_GET['popup'] ?? null]); ?>"
									method="post"
									enctype="multipart/form-data" ng-submit='submit($event)'
									onsubmit="
										if (window.running_uploads) {
											event.preventDefault();
											alert('<?php echo htmlentities(json_encode(_('fileUploadStillActive')));?>');
										}
									"
								 
								id="cardform-importDynamicmitglied_Import"
								style="width: 100%; height: 100%;"
								class='mdl-grid'
									ng-controller="FormImportDynamicmitglied_Import" ng-init="form = <?php echo htmlentities(json_encode([]));
									?>;"
								>
								<?php
								 echo '<input type="hidden" name="csrftoken" value="' . htmlentities(\FOP\Session::getCSRFToken()) . '">';
								 echo '<input type="hidden" name="importid" value="' . htmlentities($id) . '">';
								 ?>
								<div id='fop-upbar'></div>
								
<style type='text/css'>
	#importDynamicmitglied_Import_buttons {
		position: absolute;
		right: 50%;
		bottom: 10px;
		display: inline-block;
		width: auto;
	}
</style>
<div class="mdl-grid" style="position: absolute; top: 50px; bottom: 0px; left: 12px; right: 0px; flex-grow: unset!important;" ng-init="worksheets = <?php echo htmlentities(json_encode($worksheets_out)); ?>; options = <?php echo htmlentities(json_encode([
	'flip' => (boolean) \FOP\Database::query('SELECT flip FROM fop_import_col WHERE did IN (\'main-mitglied\', \'sub-ansprechpartner\', \'sub-mitgliedPassnummer\') GROUP BY flip ORDER BY COUNT(*) DESC')->fetchColumn(),
	'skip' => (int) \FOP\Database::query('SELECT skip FROM fop_import_col WHERE did IN (\'main-mitglied\', \'sub-ansprechpartner\', \'sub-mitgliedPassnummer\') GROUP BY skip ORDER BY COUNT(*) DESC')->fetchColumn(),
	'ws' => 0, /* worksheet-ID */
	'drag_ongoing' => false,
	'dupl' => 'ignore'])); ?>;">
	<div style="position: absolute; top: 0px; bottom: 0px; left: 0px; right: 50%; overflow: auto; flex-direction: column; align-items: start; display: flex;">
		<!-- Linke Seite: Spreadsheet -->
		<h4><?php echo htmlentities($file['filename']); ?> - Worksheets</h4>
		<?php if (method_exists($reader, 'setInputEncoding')) { ?>
		<a href="<?php
			$params = ['id' => $id, 'encoding' => 'UTF-8'];
			echo \FOPRouter\Import::mitglied_ImportPrepareURL2($params); ?>"  class="mdl-button mdl-js-button mdl-button--colored <?php if ($encoding <> 'UTF-8') { echo 'mdl-button--raised'; } ?>">UTF-8</a>
		<a href="<?php
			$params = ['id' => $id, 'encoding' => 'CP437'];
			echo \FOPRouter\Import::mitglied_ImportPrepareURL2($params); ?>"  class="mdl-button mdl-js-button mdl-button--colored <?php if ($encoding <> 'CP437') { echo 'mdl-button--raised'; } ?>">CP437 (MS-DOS)</a>
		<a href="<?php
			$params = ['id' => $id, 'encoding' => 'CP1252'];
			echo \FOPRouter\Import::mitglied_ImportPrepareURL2($params); ?>"  class="mdl-button mdl-js-button mdl-button--colored <?php if ($encoding <> 'CP1252') { echo 'mdl-button--raised'; } ?>">CP1252 (Windows)</a>
		<a href="<?php
			$params = ['id' => $id, 'encoding' => 'UTF16LE'];
			echo \FOPRouter\Import::mitglied_ImportPrepareURL2($params); ?>"  class="mdl-button mdl-js-button mdl-button--colored <?php if ($encoding <> 'UTF16LE') { echo 'mdl-button--raised'; } ?>">UTF16-LE (Windows Wide)</a>
		<br><?php } ?>
		<input type='hidden' name='encoding' value="<?php echo htmlentities($encoding); ?>">
		<input type='hidden' name='skip' value='{{options.skip}}'>
		<input type='hidden' name='flip' value='{{options.flip ? true : false}}'>
		<input type='hidden' name='wsheet' value='{{worksheets[options.ws].name}}'>
		<input type='hidden' name='dupl' value='{{options.dupl}}'>

		<div>
			<button class="mdl-button mdl-button--raised mdl-js-button" ng-class="{&apos;mdl-button--colored&apos;: options.dupl == &apos;ignore&apos;}" type="button" ng-click='options.dupl = &apos;ignore&apos;'>
				<?php echo _('dupl_ignore'); ?>
			</button>
			<button class="mdl-button mdl-button--raised mdl-js-button" ng-class="{&apos;mdl-button--colored&apos;: options.dupl == &apos;fill&apos;}" type="button" ng-click='options.dupl = &apos;fill&apos;'>
				<?php echo _('dupl_fill'); ?>
			</button>
			<button class="mdl-button mdl-button--raised mdl-js-button" ng-class="{&apos;mdl-button--colored&apos;: options.dupl == &apos;overwrite&apos;}" type="button" ng-click='options.dupl = &apos;overwrite&apos;'>
				<?php echo _('dupl_overwrite'); ?>
			</button>
			<button class="mdl-button mdl-button--raised mdl-js-button" ng-class="{&apos;mdl-button--colored&apos;: options.dupl == &apos;show&apos;}" type="button" ng-click='options.dupl = &apos;show&apos;'>
				<?php echo _('dupl_show'); ?>
			</button>
		</div>

		<div style='align-self: flex-end; cursor: default;' title='<?php echo htmlentities(_('csv import')); ?>'><i class='material-icons'>keyboard_arrow_right</i></div>
		<div style='justify-content: space-around; align-items: center;' class="flex-container">
			<button style='margin-left: 20px;' type="button" ng-repeat="worksheet in worksheets" class="mdl-button mdl-js-button" ng-class="{'mdl-button--raised': worksheet.id != options.ws}" ng-click="options.ws = worksheet.id" style="display: inline-block;">{{worksheet.name}}</button>
		</div>
		<label class="mdl-checkbox mdl-js-checkbox">
			<input type="checkbox" name='hvcheck' id="checkbox1" class="mdl-checkbox__input" ng-model="options.flip">
			<span class="mdl-checkbox__label"><?php echo htmlentities(_('Swap rows columns'));?></span>
		</label>
		<div style="align-items: center;" class="flex-container">
			<button style='margin-bottom: 20px;' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="options.skip=options.skip - 1" type="button">
				<i class="material-icons">remove</i>
			</button>
			<div class="mdl-textfield mdl-js-textfield" style='width: 50px;'>
				<input class="mdl-textfield__input" type="number" step="1" min="0" ng-model="options.skip" id="numberrow" style='text-align: center;'>
				<label class="mdl-textfield__label" for="numberrow"></label>
			</div>
			<button style='margin-bottom: 20px;' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="options.skip = options.skip + 1" type="button">
				<i class="material-icons">add</i>
			</button>
		</div>
		<div style='display: flex; flex-direction: row;' ng-init='compose = {data: [], title: &apos;zusammengesetzt&apos;, composed: true}' lx-drag-model='compose' lx-drag-start='options.drag_ongoing=true;' lx-drag-end='options.drag_ongoing=false; compose = {data: [], title: &apos;zusammengesetzt&apos;, composed: true};'>
			<div style='display: inline-block; border: 1px dashed black; background: {{options.drag_ongoing ? &apos;yellow&apos; : &apos;white&apos;}}; padding: 5px; margin: 2px;' lx-drag-allow='model != compose && model.title' lx-drag-drop='compose.highlight = false' lx-drag-preview='compose.data.push(model.idx + &apos;:&apos; + model.title);' lx-drag-abort='compose.data.pop();'>Zusammengesetzte Werte</div>
			<div style='display: inline-block; border: 1px solid black; background: white; padding: 5px; margin: 2px' ng-repeat='model in compose.data'>
				{{model|separatorFilter}}
				<button class='mdl-button--icon mdl-js-button mdl-button--fab mdl-button' ng-click='compose.data.splice($index, 1)' type='button'>
					<i class='material-icons'>close</i>
				</button>
			</div>
			<div style='display: inline-block; border: 1px solid black; background: white; padding: 5px; margin: 2px'>
				<input ng-model='compose.tmp_sep' placeholder='Trenner' onkeypress='if (event.keyCode == 13) { this.nextElementSibling.click(); event.preventDefault(); }' style='width: 5em;' ng-trim='false'>
				<button class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="compose.data.push(compose.tmp_sep || ' '); compose.tmp_sep = '';" type="button">
					<i class="material-icons">add</i>
				</button>
			</div>
			<button class='mdl-button--icon mdl-js-button mdl-button--fab mdl-button' ng-click='compose.data = []' type='button'>
				<i class='material-icons'>close</i>
			</button>
		</div>
		<div style='overflow: auto; width: 100%; height: 50vh;'>
			<table style='table-layout: fixed; white-space: nowrap;' ng-if="!options.flip" class='mdl-data-table mdl-js-data-table mdl-shadow--2dp table-dense'>
				<tr>
					<th lx-drag-model='{title: header, idx: $index, filter: &apos;&apos;, data: worksheets[options.ws].data2[$index].slice(options.skip+1)}' lx-drag-start='options.drag_ongoing=true; drag=true' lx-drag-end='options.drag_ongoing=false; drag=false' style='cursor: move; width: 100px; opacity: {{drag ? 0.3 : 1.0}};' class='mdl-data-table__cell--non-numeric' ng-repeat="header in worksheets[options.ws].data[options.skip] track by $index">{{header}}</th>
				</tr>
				<tr ng-repeat="row in worksheets[options.ws].data track by $index" ng-if="$index > options.skip">
					<td lx-drag-model='{title: worksheets[options.ws].data2[$index][options.skip], idx: $index, data: worksheets[options.ws].data2[$index].slice(options.skip+1)}' lx-drag-start='options.drag_ongoing=true; drag=true' lx-drag-end='options.drag_ongoing=false; drag=false' style='cursor: move; width: 100px;' class='mdl-data-table__cell--non-numeric' ng-repeat="cell in row track by $index">{{cell}}</td>
				</tr>
			</table>
			<table style='table-layout: fixed; white-space: nowrap;' ng-if="options.flip" class='mdl-data-table mdl-js-data-table mdl-shadow--2dp table-dense'>
				<tr>
					<th lx-drag-model='{title: header, idx: $index, filter: &apos;&apos;, data: worksheets[options.ws].data[$index].slice(options.skip+1)}' lx-drag-start='options.drag_ongoing=true; drag=true' lx-drag-end='options.drag_ongoing=false; drag=false' style='cursor: move; opacity: {{drag ? 0.3 : 1.0}};' class='mdl-data-table__cell--non-numeric' ng-repeat="header in worksheets[options.ws].data2[options.skip] track by $index">{{header}}</th>
				</tr>			
				<tr ng-repeat="row in worksheets[options.ws].data2 track by $index" ng-if="$index > options.skip">
					<td lx-drag-model='{title: worksheets[options.ws].data[$index][options.skip], idx: $index, data: worksheets[options.ws].data[$index].slice(options.skip+1)}' lx-drag-start='options.drag_ongoing=true; drag=true' lx-drag-end='options.drag_ongoing=false; drag=false' style='cursor: move; width: 100px;' class='mdl-data-table__cell--non-numeric' ng-repeat="cell in row track by $index">{{cell}}</td>
				</tr>
			</table>
		</div>
	</div>
	<div style="position: absolute; top: 0px; bottom: 0px; left: 50%; right: 0px; overflow: auto; flex-direction: column; align-items: start;">
		<!-- rechte Seite: Datensatz -->
		<h4><?php echo htmlentities(_('database-columns'));?></h4>
		<table style='white-space: initial; width: 100%; overflow: hidden;' class='mdl-data-table mdl-js-data-table mdl-shadow--2dp table-dense table-editable'>
			<tr>
				<th>Spalte</th>
				<th class='mdl-data-table__cell--non-numeric'>Zuordnung</th>
				<th class='mdl-data-table__cell--non-numeric'>Wert</th>
			</tr>
			<tr style='border-top: 2px solid gray;'>
				<th colspan='2' style='text-align: center; font-size: 140%; font-weight: bold;'>
					<?php echo(_('Mitglied')); ?>
					
				</th>
				<td style='text-align: left;'>
					<!-- TODO: sauberen Angular-Controller bauen, der die Dependencies richtig anhakt -->
					<div>
						<input type='checkbox' name='ignore_main-mitglied' ng-model='ignore_main_mitglied' ng-change='ignore_sub_ansprechpartner = ignore_sub_ansprechpartner || ignore_main_mitglied;ignore_sub_ansprechpartner = ignore_sub_ansprechpartner || ignore_main_mitglied;ignore_sub_ansprechpartner = ignore_sub_ansprechpartner || ignore_main_mitglied;ignore_sub_ansprechpartner = ignore_sub_ansprechpartner || ignore_main_mitglied;ignore_sub_ansprechpartner = ignore_sub_ansprechpartner || ignore_main_mitglied;ignore_sub_mitgliedPassnummer = ignore_sub_mitgliedPassnummer || ignore_main_mitglied;ignore_sub_mitgliedPassnummer = ignore_sub_mitgliedPassnummer || ignore_main_mitglied;ignore_sub_mitgliedPassnummer = ignore_sub_mitgliedPassnummer || ignore_main_mitglied;ignore_sub_mitgliedPassnummer = ignore_sub_mitgliedPassnummer || ignore_main_mitglied;ignore_sub_mitgliedPassnummer = ignore_sub_mitgliedPassnummer || ignore_main_mitglied;'>
						<?php echo _('ignore dataset'); ?>
						<span ng-show='!ignore_main_mitglied'><br>
							<input type='checkbox' name='force_main-mitglied' ng-model='force_main_mitglied'>
							<?php echo _('force_empty dataset'); ?>
						</span>
					</div>
				</td>
			</tr>
			<?php if ((!\FOP\User::getIsGuest())) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['tarif'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='tarif'>
					
					
					<b><?php echo(_('Mitgliedsbeitrag')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div style='display: flex; flex-direction: row; align-items: center; width: 100%;'><?php
	\Tables\Tarif::renderEditimport_mitglied_Import_main_mitglied_tarifAction($default_main_mitglied['tarif'], [], '');
?> &nbsp;	<?php if (\TablesRouter\Tarif::createAccess()) { ?>  <a tabindex='-1' class='unimportant button' href="#" onclick='var p = $(this).parent(), id = "x"+Math.round(1000000*Math.random()); p.attr("id", id); window.open_over(<?php
		echo json_encode(\TablesRouter\Tarif::createURL2([
			'popup' => true]
		)); ?> + "&from=<?php echo urlencode(\FOP\Util::getCurrentBaseurl()); ?>jscloser.php?action=popup%26type=tarifNull%26colinsert=default[]%26el=" + encodeURIComponent(id) + "%26close%26insert_param=colvalue", "_blank", "width=739, height=395"); return false;'><i class="material-icons">add</i></a> <?php } ?> &nbsp;	<a tabindex='-1' class='unimportant button fop-ddt-search' href="#" onclick='var p = $(this).parent(), id = "x"+Math.round(1000000*Math.random()); p.attr("id", id); window.open_over(<?php
		echo json_encode(\TablesRouter\Tarif::indexURL2([
			'popup' => true]
		)); ?> + "&from=<?php echo urlencode(\FOP\Util::getCurrentBaseurl()); ?>jscloser.php?action=popup%26type=tarifNull%26colinsert=default[]%26el=" + encodeURIComponent(id) + "%26insert_param=colvalue&select=tarifNull", "_blank", "width=739, height=395"); return false;'><i class="material-icons">search</i></a>
	</div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getSuperadmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['superadmin'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='superadmin'>
					
					
					<b><?php echo(_('Super-Admin')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['superadmin']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['superadmin']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canAdmin'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canAdmin'>
					
					
					<b><?php echo(_('Admin')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canAdmin']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canAdmin']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canMitglied'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canMitglied'>
					
					
					<b><?php echo(_('Mitgliederverwaltung')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canMitglied']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canMitglied']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canGruppe'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canGruppe'>
					
					
					<b><?php echo(_('Verwaltung der eigenen Gruppe')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canGruppe']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canGruppe']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canCampaign'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canCampaign'>
					
					
					<b><?php echo(_('Rundmails und Aktionen')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canCampaign']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canCampaign']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canSammlung'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canSammlung'>
					
					
					<b><?php echo(_('Geldsammlungen')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canSammlung']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canSammlung']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canBuchhaltung'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canBuchhaltung'>
					
					
					<b><?php echo(_('Buchhaltung')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canBuchhaltung']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canBuchhaltung']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canProtokoll'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canProtokoll'>
					
					
					<b><?php echo(_('Protokoll')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canProtokoll']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canProtokoll']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getAdmin()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['canDokument'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='canDokument'>
					
					
					<b><?php echo(_('Dokumente')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['canDokument']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['canDokument']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['reminderMitgliedMitglied-gebtagMails'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='reminderMitgliedMitglied-gebtagMails'>
					
					
					<b><?php echo(_('Geburtstage')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='never'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'never') {echo " selected";}?>><?php echo(_('Nie')); ?></option><option value='instant'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'instant') {echo " selected";}?>><?php echo(_('Sofort')); ?></option><option value='hourly'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'hourly') {echo " selected";}?>><?php echo(_('Stündliche Zusammenfassung')); ?></option><option value='daily'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'daily') {echo " selected";}?>><?php echo(_('Tägliche Zusammenfassung')); ?></option><option value='weekly'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'weekly') {echo " selected";}?>><?php echo(_('Wöchentliche Zusammenfassung')); ?></option><option value='monthly'<?php if ($default_main_mitglied['reminderMitgliedMitglied-gebtagMails'] == 'monthly') {echo " selected";}?>><?php echo(_('Monatliche Zusammenfassung')); ?></option></select></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['reminderMitgliedForderungenMails'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='reminderMitgliedForderungenMails'>
					
					
					<b><?php echo(_('Offene Beiträge')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='never'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'never') {echo " selected";}?>><?php echo(_('Nie')); ?></option><option value='instant'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'instant') {echo " selected";}?>><?php echo(_('Sofort')); ?></option><option value='hourly'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'hourly') {echo " selected";}?>><?php echo(_('Stündliche Zusammenfassung')); ?></option><option value='daily'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'daily') {echo " selected";}?>><?php echo(_('Tägliche Zusammenfassung')); ?></option><option value='weekly'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'weekly') {echo " selected";}?>><?php echo(_('Wöchentliche Zusammenfassung')); ?></option><option value='monthly'<?php if ($default_main_mitglied['reminderMitgliedForderungenMails'] == 'monthly') {echo " selected";}?>><?php echo(_('Monatliche Zusammenfassung')); ?></option></select></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['reminderFop_fints_buchungForderungenMails'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='reminderFop_fints_buchungForderungenMails'>
					
					
					<b><?php echo(_('unbehandelte Zahlungseingänge')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='never'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'never') {echo " selected";}?>><?php echo(_('Nie')); ?></option><option value='instant'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'instant') {echo " selected";}?>><?php echo(_('Sofort')); ?></option><option value='hourly'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'hourly') {echo " selected";}?>><?php echo(_('Stündliche Zusammenfassung')); ?></option><option value='daily'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'daily') {echo " selected";}?>><?php echo(_('Tägliche Zusammenfassung')); ?></option><option value='weekly'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'weekly') {echo " selected";}?>><?php echo(_('Wöchentliche Zusammenfassung')); ?></option><option value='monthly'<?php if ($default_main_mitglied['reminderFop_fints_buchungForderungenMails'] == 'monthly') {echo " selected";}?>><?php echo(_('Monatliche Zusammenfassung')); ?></option></select></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['reminderAufgabeAssignedMails'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='reminderAufgabeAssignedMails'>
					
					
					<b><?php echo(_('Mir zugewiesen')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='never'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'never') {echo " selected";}?>><?php echo(_('Nie')); ?></option><option value='instant'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'instant') {echo " selected";}?>><?php echo(_('Sofort')); ?></option><option value='hourly'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'hourly') {echo " selected";}?>><?php echo(_('Stündliche Zusammenfassung')); ?></option><option value='daily'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'daily') {echo " selected";}?>><?php echo(_('Tägliche Zusammenfassung')); ?></option><option value='weekly'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'weekly') {echo " selected";}?>><?php echo(_('Wöchentliche Zusammenfassung')); ?></option><option value='monthly'<?php if ($default_main_mitglied['reminderAufgabeAssignedMails'] == 'monthly') {echo " selected";}?>><?php echo(_('Monatliche Zusammenfassung')); ?></option></select></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['reminderAufgabeNot_assignedMails'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='reminderAufgabeNot_assignedMails'>
					
					
					<b><?php echo(_('Nicht zugewiesen')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='never'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'never') {echo " selected";}?>><?php echo(_('Nie')); ?></option><option value='instant'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'instant') {echo " selected";}?>><?php echo(_('Sofort')); ?></option><option value='hourly'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'hourly') {echo " selected";}?>><?php echo(_('Stündliche Zusammenfassung')); ?></option><option value='daily'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'daily') {echo " selected";}?>><?php echo(_('Tägliche Zusammenfassung')); ?></option><option value='weekly'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'weekly') {echo " selected";}?>><?php echo(_('Wöchentliche Zusammenfassung')); ?></option><option value='monthly'<?php if ($default_main_mitglied['reminderAufgabeNot_assignedMails'] == 'monthly') {echo " selected";}?>><?php echo(_('Monatliche Zusammenfassung')); ?></option></select></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['name'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='name'>
					
					
					<b><?php echo(_('Name')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['name']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['vorname'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='vorname'>
					
					
					<b><?php echo(_('Vorname')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['vorname']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['mnr'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='mnr'>
					
					
					<b><?php echo(_('Mitgliedsnummer')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['mnr']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['geschlecht'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='geschlecht'>
					
					
					<b><?php echo(_('Geschlecht')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div><div class="mdlext-selectfield mdlext-js-selectfield"><select onkeydown='if (event.keyCode == 13) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="selectdropdown mdlext-selectfield__select" name='default[]' id='default[]'><option value='0'<?php if ($default_main_mitglied['geschlecht'] == 0) {echo " selected";}?>><?php echo(_('männlich')); ?></option><option value='1'<?php if ($default_main_mitglied['geschlecht'] == 1) {echo " selected";}?>><?php echo(_('weiblich')); ?></option><option value='2'<?php if ($default_main_mitglied['geschlecht'] == 2) {echo " selected";}?>><?php echo(_('Individuum')); ?></option></select></div>
		<br><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['geburtsdatum'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='geburtsdatum'>
					
					
					<b><?php echo(_('Geburtsdatum')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" ts-locale='<?php echo (\FOP\I18n::getShortLocale()); ?>' ts-format='<?php echo (_('dateformat_moment')); ?>' class="mdl-textfield__input picker_date" id="default[]" type="text" name="default[]" value="<?php echo ($default_main_mitglied['geburtsdatum']) ? strftime(_('dateformat_php2'), intval($default_main_mitglied['geburtsdatum'])) : ''; ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['verstorben'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='verstorben'>
					
					
					<b><?php echo(_('Verstorben am')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" ts-locale='<?php echo (\FOP\I18n::getShortLocale()); ?>' ts-format='<?php echo (_('dateformat_moment')); ?>' class="mdl-textfield__input picker_date" id="default[]" type="text" name="default[]" value="<?php echo ($default_main_mitglied['verstorben']) ? strftime(_('dateformat_php2'), intval($default_main_mitglied['verstorben'])) : ''; ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['land'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='land'>
					
					
					<b><?php echo(_('Land')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['land']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['plz'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='plz'>
					
					
					<b><?php echo(_('Postleitzahl')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['plz']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['ort'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='ort'>
					
					
					<b><?php echo(_('Ort')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['ort']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['strasse'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='strasse'>
					
					
					<b><?php echo(_('Straße und Hausnummer')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['strasse']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['email'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='email'>
					
					
					<b><?php echo(_('E-Mail')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="email" name="default[]"  id="default[]" value="<?php echo htmlentities($default_main_mitglied['email']); ?>"/><label class="mdl-textfield__label" for="default[]"><?php echo(_('email')); ?></label>  <span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['email2'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='email2'>
					
					
					<b><?php echo(_('E-Mail Alternative')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="email" name="default[]"  id="default[]" value="<?php echo htmlentities($default_main_mitglied['email2']); ?>"/><label class="mdl-textfield__label" for="default[]"><?php echo(_('email')); ?></label>  <span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['telefon'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='telefon'>
					
					
					<b><?php echo(_('Telefon')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number49&apos;}" type="button" title="<?php echo(_('+49 (DE)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number49&apos;) ? &apos;number49&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number43&apos;}" type="button" title="<?php echo(_('+43 (AT)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number43&apos;) ? &apos;number43&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number41&apos;}" type="button" title="<?php echo(_('+41 (CH)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number41&apos;) ? &apos;number41&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="text"  name="default[]" value="<?php echo htmlentities($default_main_mitglied['telefon']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['mobil'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='mobil'>
					
					
					<b><?php echo(_('Mobil')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number49&apos;}" type="button" title="<?php echo(_('+49 (DE)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number49&apos;) ? &apos;number49&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number43&apos;}" type="button" title="<?php echo(_('+43 (AT)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number43&apos;) ? &apos;number43&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number41&apos;}" type="button" title="<?php echo(_('+41 (CH)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number41&apos;) ? &apos;number41&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="text"  name="default[]" value="<?php echo htmlentities($default_main_mitglied['mobil']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['eintritt'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='eintritt'>
					
					
					<b><?php echo(_('Eintrittsdatum')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" ts-locale='<?php echo (\FOP\I18n::getShortLocale()); ?>' ts-format='<?php echo (_('dateformat_moment')); ?>' class="mdl-textfield__input picker_date" id="default[]" type="text" name="default[]" value="<?php echo ($default_main_mitglied['eintritt']) ? strftime(_('dateformat_php2'), intval($default_main_mitglied['eintritt'])) : ''; ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['austrittsdatum'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='austrittsdatum'>
					
					
					<b><?php echo(_('Austrittsdatum')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" ts-locale='<?php echo (\FOP\I18n::getShortLocale()); ?>' ts-format='<?php echo (_('dateformat_moment')); ?>' class="mdl-textfield__input picker_date" id="default[]" type="text" name="default[]" value="<?php echo ($default_main_mitglied['austrittsdatum']) ? strftime(_('dateformat_php2'), intval($default_main_mitglied['austrittsdatum'])) : ''; ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['austrittsgrund'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='austrittsgrund'>
					
					
					<b><?php echo(_('Austritts-Grund')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_main_mitglied['austrittsgrund']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['notiz'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='notiz'>
					
					
					<b><?php echo(_('Notiz')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div style="width: 100%;" class="mdl-textfield mdl-js-textfield"><textarea onkeydown='if (event.keyCode == 13 && event.ctrlKey) { event.preventDefault(); event.stopPropagation(); tabNext(this); return false; }' class="mdl-textfield__input" rows="8" cols="80" name="default[]" id="default[]" ><?php echo htmlentities($default_main_mitglied['notiz']); ?></textarea><label class="mdl-textfield__label" for="default[]"><?php echo(_('text')); ?></label><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getBuchhaltung()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['iban'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='iban'>
					
					
					<b><?php echo(_('IBAN')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" style="text-transform: uppercase;" class="mdl-textfield__input"  type="text" name="default[]" pattern="[A-Z]{2}[0-9 \-]{12,26}" value="<?php echo htmlentities($default_main_mitglied['iban']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getBuchhaltung()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['bic'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='bic'>
					
					
					<b><?php echo(_('BIC')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" style="text-transform: uppercase;" class="mdl-textfield__input"  type="text" name="default[]" pattern="[A-Za-z]{6,6}[A-Za-z2-9][A-Na-nP-Zp-z0-9]([A-Za-z0-9]{3,3}){0,1}" value="<?php echo htmlentities($default_main_mitglied['bic']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['password'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='password'>
					
					
					<b><?php echo(_('Passwort')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div ng-controller='dummy' ng-init='pw = <?php echo htmlentities(json_encode(empty($default_main_mitglied['password']) ? '' : '&&'.($default_main_mitglied['password']))); ?>'><div class="mdl-textfield mdl-js-textfield"><input ng-model='pw' class="mdl-textfield__input" type="password" name="default[]" /><label class="mdl-textfield__label" for="default[]"><?php echo(_('password')); ?></label><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
<br><div class="mdl-textfield mdl-js-textfield" compare-password='pw'><input class="mdl-textfield__input" type="password"  /><label class="mdl-textfield__label" for="default[]"><?php echo(_('password repeat')); ?></label><span class="mdl-textfield__error"><?php echo _('passwords must match'); ?></span></div></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['datenschutz'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='datenschutz'>
					
					
					<b><?php echo(_('Datenschutz akzeptiert')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['datenschutz']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['datenschutz']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getBuchhaltung()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['sepa'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='sepa'>
					
					
					<b><?php echo(_('SEPA-Lastschrift')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<input type="hidden" name="default[]" id="default[]" value="<?php echo ($default_main_mitglied['sepa']) ? '1' : '0'; ?>"/><label class="mdl-checkbox mdl-js-checkbox" style="width: unset;"><input onkeydown="
      if (event.keyCode == 13) {
         event.preventDefault();
         event.stopPropagation();
         tabNext(this);
         return false;
      }
   "  class="mdl-checkbox__input" id="default[]__checkbox" type="checkbox" onchange="this.parentElement.previousElementSibling.value = this.checked ? 1 : 0;"<?php if ($default_main_mitglied['sepa']) echo ' checked'; ?>><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></label>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (((\FOP\User::getBuchhaltung()))) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['sepaDate'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='sepaDate'>
					
					
					<b><?php echo(_('Datum SEPA-Lastschrift')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" ts-locale='<?php echo (\FOP\I18n::getShortLocale()); ?>' ts-format='<?php echo (_('dateformat_moment')); ?>' class="mdl-textfield__input picker_date" id="default[]" type="text" name="default[]" value="<?php echo ($default_main_mitglied['sepaDate']) ? strftime(_('dateformat_php2'), intval($default_main_mitglied['sepaDate'])) : ''; ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['main-mitglied']['dynamic:time'] ?? null); ?>}' ng-show='!ignore_main_mitglied'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='main-mitglied'>
					<input type='hidden' name='col[]' value='dynamic:time'>
					
					
					<b><?php echo(_('validfrom')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield fop-monthyear"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	" class="mdl-textfield__input picker_monthyear"  type="text" name="default[]" value="<?php echo ($default_main_mitglied['dynamic:time']) ? date(_('monthyearformat_php'), mktime(1, 1, 1, intval($default_main_mitglied['dynamic:time'])%12 + 1, 1, floor(intval($default_main_mitglied['dynamic:time'])/12))) : ''; ?>" /><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
	<script type="text/javascript">
	$(function () {
        $('.picker_monthyear').datetimepicker({viewMode: 'years', locale: '<?php echo(\FOP\I18n::getShortLocale()); ?>', format: '<?php echo(_('monthyearformat_moment')); ?>'}).on('dp.change', function (e) {e.target.parentElement.MaterialTextfield.checkValidity();})[0].parentElement.MaterialTextfield.checkValidity();
	});
	</script>
	
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			
			<tr style='border-top: 2px solid gray;'>
				<th colspan='2' style='text-align: center; font-size: 140%; font-weight: bold;'>
					<?php echo(_('Kontaktperson')); ?>
					 (<?php echo(_('Mitglied')); ?>)
				</th>
				<td style='text-align: left;'>
					<!-- TODO: sauberen Angular-Controller bauen, der die Dependencies richtig anhakt -->
					<div ng-show='!ignore_main_mitglied'>
						<input type='checkbox' name='ignore_sub-ansprechpartner' ng-model='ignore_sub_ansprechpartner' ng-change=''>
						<?php echo _('ignore dataset'); ?>
						<span ng-show='!ignore_sub_ansprechpartner'><br>
							<input type='checkbox' name='force_sub-ansprechpartner' ng-model='force_sub_ansprechpartner'>
							<?php echo _('force_empty dataset'); ?>
						</span>
					</div>
				</td>
			</tr>
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['vorname'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='vorname'>
					
					
					<b><?php echo(_('Vorname')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_sub_ansprechpartner['vorname']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['name'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='name'>
					
					
					<b><?php echo(_('Nachname')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_sub_ansprechpartner['name']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['stellung'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='stellung'>
					
					
					<b><?php echo(_('Beziehung zum Mitglied')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_sub_ansprechpartner['stellung']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['tel'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='tel'>
					
					
					<b><?php echo(_('Telefon')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number49&apos;}" type="button" title="<?php echo(_('+49 (DE)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number49&apos;) ? &apos;number49&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number43&apos;}" type="button" title="<?php echo(_('+43 (AT)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number43&apos;) ? &apos;number43&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number41&apos;}" type="button" title="<?php echo(_('+41 (CH)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number41&apos;) ? &apos;number41&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="text"  name="default[]" value="<?php echo htmlentities($default_sub_ansprechpartner['tel']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['tel2'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='tel2'>
					
					
					<b><?php echo(_('Telefon 2')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number49&apos;}" type="button" title="<?php echo(_('+49 (DE)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number49&apos;) ? &apos;number49&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number43&apos;}" type="button" title="<?php echo(_('+43 (AT)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number43&apos;) ? &apos;number43&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
						<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-class="{&apos;mdl-button--colored&apos;: col.assign.filter == &apos;number41&apos;}" type="button" title="<?php echo(_('+41 (CH)')); ?>" ng-click='col.assign.filter = (col.assign.filter != &apos;number41&apos;) ? &apos;number41&apos; : &apos;&apos;'>
							<i class="material-icons">filter_alt</i>
						</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="text"  name="default[]" value="<?php echo htmlentities($default_sub_ansprechpartner['tel2']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-ansprechpartner']['email'] ?? null); ?>}' ng-show='!ignore_sub_ansprechpartner'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-ansprechpartner'>
					<input type='hidden' name='col[]' value='email'>
					
					
					<b><?php echo(_('E-Mail')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input class="mdl-textfield__input" type="email" name="default[]"  id="default[]" value="<?php echo htmlentities($default_sub_ansprechpartner['email']); ?>"/><label class="mdl-textfield__label" for="default[]"><?php echo(_('email')); ?></label>  <span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			
			<tr style='border-top: 2px solid gray;'>
				<th colspan='2' style='text-align: center; font-size: 140%; font-weight: bold;'>
					<?php echo(_('Passnummer')); ?>
					 (<?php echo(_('Mitglied')); ?>)
				</th>
				<td style='text-align: left;'>
					<!-- TODO: sauberen Angular-Controller bauen, der die Dependencies richtig anhakt -->
					<div ng-show='!ignore_main_mitglied'>
						<input type='checkbox' name='ignore_sub-mitgliedPassnummer' ng-model='ignore_sub_mitgliedPassnummer' ng-change=''>
						<?php echo _('ignore dataset'); ?>
						<span ng-show='!ignore_sub_mitgliedPassnummer'><br>
							<input type='checkbox' name='force_sub-mitgliedPassnummer' ng-model='force_sub_mitgliedPassnummer'>
							<?php echo _('force_empty dataset'); ?>
						</span>
					</div>
				</td>
			</tr>
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-mitgliedPassnummer']['pnr'] ?? null); ?>}' ng-show='!ignore_sub_mitgliedPassnummer'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-mitgliedPassnummer'>
					<input type='hidden' name='col[]' value='pnr'>
					
					
					<b><?php echo(_('Passnummer')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_sub_mitgliedPassnummer['pnr']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			<?php if (true) { ?>
			<tr style='background: {{col.highlight ? "lightgrey" : col.assign ? "lightgreen" : "none"}};' ng-controller='DynamicImport' ng-init='col = {assign: <?php echo json_encode($preassign['sub-mitgliedPassnummer']['verband'] ?? null); ?>}' ng-show='!ignore_sub_mitgliedPassnummer'>
				<td style='background: {{options.drag_ongoing && !col.highlight ? "yellow" : "none"}};' lx-drag-allow='model.title' lx-drag-drop='col.highlight = false' lx-drag-preview='old = col.assign; col.assign = model; col.highlight = true' lx-drag-abort='col.highlight = false; col.assign = old'>
					<input type='hidden' name='did[]' value='sub-mitgliedPassnummer'>
					<input type='hidden' name='col[]' value='verband'>
					
					
					<b><?php echo(_('Sportverband')); ?></b> 
				</td>	
				<td class='mdl-data-table__cell--non-numeric'>
					<input type='hidden' name='assign[]' value='{{col.assign.composed ? col.assign.data.join(&apos;¬&apos;) : col.assign.title}}'>
					<input type='hidden' name='assignIdx[]' value='{{col.assign.composed ? -1 : col.assign.idx}}'>
					<input type='hidden' name='assignFilter[]' value='{{col.assign.filter}}'>
					<input type='hidden' name='assignUnique[]' value='{{col.assign.unique ? 1 : 0}}'>
					<b>{{col.assign.title}}</b>
					<button ng-show='col.assign' class="mdl-button--icon mdl-js-button mdl-button--fab mdl-button" ng-click="col.assign=null" type="button">
						<i class="material-icons">close</i>
					</button>
					
					<span ng-show="!col.assign"><?php echo _('default value'); ?></span>
				</td>
				<td class='mdl-data-table__cell--non-numeric' style='overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14vw;'>
					<div ng-show='!col.assign || (options.drag_ongoing && col.highlight && !old)' class="mdl-textfield mdl-js-textfield">
						<div class="mdl-textfield mdl-js-textfield"><input onkeydown="
		if (event.keyCode == 13) {
			event.preventDefault();
			event.stopPropagation();
			tabNext(this);
			return false;
		}
	"  class="mdl-textfield__input"  type="text" name="default[]"  value="<?php echo htmlentities($default_sub_mitgliedPassnummer['verband']); ?>"/><span class="mdl-textfield__error"><div><?php echo(_('invalidinput')) ?></div></span></div>
					</div>
					<b ng-show='col.assign && (!options.drag_ongoing || !col.highlight || old)'>{{renderData(col.assign.data, col.assign.filter)}}</b>
				</td>
			</tr><?php } ?>
			
			
		</table>
	</div>
</div>
<div style='height: 30px;'>&nbsp;</div>

									<?php
									$features = [];
									if (true && (true)) {
									$feature = [
										'id' => 'buttons',
										'title' => _('Aktionen'),
										'order' => '300', // 300 (50)
										'mode' => 'area', // 
										'position' => 'full', // 
										'collapsed' => 0, // 
										'canEdit' => ((false)),
										'visibility' => null
									];
									$features[$feature['id']] = $feature;
									}
									

									
									/* load order from database
										schema: fop_form_feature(user, form, subid, key, value)
										key = (order, mode, position, collapsed)
									*/
									$upbar_collapsed = false;
									// default values
									foreach (\FOP\Database::query('SELECT subid, '.qi('key').', (SELECT '.qi('value').' FROM fop_form_feature b WHERE a.subid = b.subid AND a.'.qi('key').' = b.'.qi('key').' AND '.qi('user').' = '.intval(\FOP\User::getID()).' GROUP BY '.qi('value').' ORDER BY COUNT(*) DESC LIMIT 1) AS '.qi('value').' FROM fop_form_feature a WHERE '.qi('user').' = '.intval(\FOP\User::getID()).' GROUP BY subid, '.qi('key'))->fetchAll(\PDO::FETCH_ASSOC) AS $setting) {
										if (isset($features[$setting['subid']])) {
											$features[$setting['subid']][$setting['key']] = $setting['value'];
										}
									}
									// form specific special values
									foreach (\FOP\Database::query('SELECT subid, '.qi('key').', '.qi('value').' FROM fop_form_feature a WHERE form = \'importDynamicmitglied-Import\' AND '.qi('user').' = '.intval(\FOP\User::getID()).'')->fetchAll(\PDO::FETCH_ASSOC) AS $setting) {
										if (isset($features[$setting['subid']])) {
											$features[$setting['subid']][$setting['key']] = $setting['value'];
										} else if ($setting['subid'] == 'upbar' && $setting['key'] == 'collapsed') {
											$upbar_collapsed = (bool) $setting['value'];
										}
									}

									/* fill in the content of the features */
									if (true && (true)) {
										ob_start();
										\EasyEditor\FormFeature::push($features['buttons']);
										?><div id='importDynamicmitglied_Import_buttons' class='mdl-cell mdl-cell--12-col' style='flex-wrap: wrap;'>&nbsp;<?php if (true) { ?><button onclick="
		var errors = $(this).closest('form').find('.fop-form-error:visible, .is-invalid').filter((i, x) => $(x).parents('.novalidate').length ? false : true);
		if (errors.length) {
			event.preventDefault();
			alert(errors.closest('.fop-form-content').prev('.fop-form-label').text() + ' Es sind noch Fehler im Formular bei Feld');
			return;
		} /* TODO: i18n */
		
	" type="submit" name="continue" class="mdl-button mdl-js-button mdl-button--colored mdl-button--raised" ><i class="material-icons">keyboard_arrow_right</i><?php echo(_('import_continue')); ?></button><?php } ?>
									</div><script type='text/javascript'>
		// copy all buttons to #fop-upbar
		$(function () {
    var btn = document.getElementById("fop-bar-mainbutton");
    var upbar = $('#fop-upbar');
    var upbar_buttons = document.getElementById("fop-bar-container");

    // Check if the elements already exist
    if (!btn || !upbar_buttons) {
        if (!btn) {
            btn = $('<div id="fop-bar-mainbutton" class="mdl-button fop-button-half fop-button-margin mdl-button--raised"><i class="material-icons">keyboard_arrow_right</i></div>')
                .click(function () {
                    if (btn.find('i').text() == 'keyboard_arrow_right') {
                        upbar_buttons.fadeOut(400);
                        btn.find('i').text('keyboard_arrow_left');
                    } else {
                        upbar_buttons.fadeIn(400);
                        btn.find('i').text('keyboard_arrow_right');
                    }
                });
            upbar.append(btn);
        }

        if (!upbar_buttons) {
            upbar_buttons = $('<div id="fop-bar-container" style="max-width: 290px"></div>'); //dependant on the mdl-buttons width, caps of upbar buttons at exactly 4 buttons
            upbar.append(upbar_buttons);
        }

        var buttons = $('#importDynamicmitglied_Import_buttons').find('.mdl-button');
        buttons.each(function (i, v) {
            var button = $(v);
            var newbutton = $('<div></div>');
            newbutton.attr('class', button.attr('class'));
            newbutton.attr('title', button.attr('title'));
            newbutton.append(button.find('.material-icons').clone(false));
            newbutton.click(function () {
                button[0].click();
            });
            upbar_buttons.append(newbutton);
        });
    }
});

	</script><?php
										\EasyEditor\FormFeature::pop();
										$features['buttons']['html'] = ob_get_contents();
										ob_end_clean();
									}
									

									uasort($features, function ($a, $b) {
										return strnatcmp($a['order'], $b['order']);
									});
									foreach ($features AS $feature) {
										\EasyEditor\FormFeature::render($feature);
									}
									?><script type='text/javascript'>
										$(function(){
											// bei Änderungen: prüfen, ob Form geändert wurde
											var formData = $('#cardform-importDynamicmitglied_Import').serialize();
											document.body.onbeforeunload = function () {
												if (formData != $('#cardform-importDynamicmitglied_Import').serialize()) {
													return 'Form data has changed - are you sure??';
												}
											};
											$('#cardform-importDynamicmitglied_Import').on('submit', function () {
												document.body.onbeforeunload = undefined;
											});
											<?php if ($upbar_collapsed) {
												?>$('#fop-bar-mainbutton').click();<?php
											} ?>
											$('#fop-bar-mainbutton').click(function () {
												setTimeout(function () {
													setCFF('upbar', 'collapsed', $('#fop-bar-container').is(':visible') ? 0 : 1);
												}, 440); /* perfect timing for fadeOut */
											});
										});
										
										function setCFF(id, key, value) {
											<?php if(!\FOP\User::getIsGuest()) { ?>
											$.get('FOP/Index/setCFF?form=importDynamicmitglied-Import&subid=' + encodeURIComponent(id) + '&key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value)).then(function () {
												if (key == 'reset') {
													location.reload();
												}
											});
											<?php } /* EditAccess */ ?>
										}
										function setCFFOrder(fids) {
											<?php if(!\FOP\User::getIsGuest()) { ?>
											$.get('FOP/Index/setCFFOrder?form=importDynamicmitglied-Import&fids=' + encodeURIComponent(JSON.stringify(fids)));
											<?php } /* EditAccess */ ?>
										}
										$(function () {
											refreshTabHeaders($('#cardform-importDynamicmitglied_Import')); /* provided in js/form.js */
											// preselection
											if (location.hash.startsWith('#select:')) {
												$('[name="' + window.location.hash.slice(8) + '"]').focus().select();
											} else {
												$('#cardform-importDynamicmitglied_Import input[type!="hidden"],textarea,select[tabindex!="-1"]').not('.fop-disabled *').filter(':visible:first').focus().select();
											}
										});

										$(window).keydown(function(event) {
											 if (event.ctrlKey && String.fromCharCode(event.which).toLowerCase() == 's') {
												 event.preventDefault();
												 $('button[type=submit]').click();
												 return false;
											 }
										});

										
										$(document).on('keyup',function(evt) {
										   if (evt.keyCode == 27) {
												if (window.parent) {
													window.close(); // iframe:close
												} else {
													window.history.back();
												}
											}
												});
										
									</script>

							</form>
							

							</div>
						<?php if (!isset($_GET['popup'])) { ?>
					</div>
				</main>
				
			</div>
		<?php } else { ?></div><?php } ?>
<?php if (!isset($_GET['popup'])) { ?><div class='fop-seal'></div><?php } ?></body></html><?php

    
  }


  
  

  
  
}



