<?php

namespace DataView;

class AggMitgliedGeschlecht {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function exportCSVAction($attachTo = null ) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: before-header ---
    
		$data = self::getData('', $_GET);
	
    // --- BLOCK: before-header-filename ---
    
	$filename = preg_replace('/[~"#%&\*:<>\?\/\\\{|\}]/', '_', 'export' . ' ' . self::getFilterHTML($_GET, ', ', false) . '.csv'); // sanitize
    // --- BLOCK: before-main ---
    
	if (!$attachTo) {
		header('Content-Type: ' . 'text/csv');
		header('Content-Disposition: attachment; filename="'.$filename.'"');
	} else if ($attachTo === 'string') {
		
	ob_start();
	} else if ($attachTo === 'file') {
		
		$ob_tmp = tempnam(sys_get_temp_dir(), 'fop-file');
		$ob_tmp_handle = fopen($ob_tmp, 'w');
		ob_start(function ($data) use ($ob_tmp_handle) {
			fwrite($ob_tmp_handle, $data);
			return '';
		}, 1024*1024);
	} else if ($attachTo instanceof \PHPMailer\PHPMailer\PHPMailer) {
		
		ob_start();
	} else if ($attachTo instanceof \ZipArchive) {
		
		ob_start();
	} else {
		throw new \FOP\AccessDeniedException('unknown attachment object');
	}
    // --- BLOCK: main ---
    
		?>"Geschlecht";"count";"count-%"<?php
		echo "\n";
		$sums = ['_count' => 0,'_count_percent' => 0];
		foreach ($data['items'] AS $item) {
			$val = $item['geschlecht'];
			$val = \Types\Geschlechtstyp::toString($val);
			if (is_numeric($val)) {
				echo $val;
			} else {
				echo '"' . str_replace("\n", "\\n", str_replace('"', '""', $val)) . '"';
			}
			echo ';';
			$val = $item['_count'];
			if(is_numeric($val)) $sums['_count'] += $val;
			$val = \Types\Integer::print($val)
	;
			if (is_numeric($val)) {
				echo $val;
			} else {
				echo '"' . str_replace("\n", "\\n", str_replace('"', '""', $val)) . '"';
			}
			echo ';';
			$val = $item['_count_percent'];
			if(is_numeric($val)) $sums['_count_percent'] += $val;
			$val = \Types\Percent2::print($val) .  ' %'
	;
			if (is_numeric($val)) {
				echo $val;
			} else {
				echo '"' . str_replace("\n", "\\n", str_replace('"', '""', $val)) . '"';
			}
			
			echo "\n";
		}
		echo "\n\n";
		
		
		
		echo ';';
		echo json_encode(round((float) $sums['_count'], 2));
		
		echo ';';
		echo json_encode(round((float) $sums['_count_percent'], 2));
		
		
		
	
    // --- BLOCK: main-~method ---
    
	if (!$attachTo) { ;
	} else if ($attachTo === 'string') {
		
	$content = ob_get_clean();
	return $content;
	} else if ($attachTo === 'file') {
		
		ob_end_flush();
		fclose($ob_tmp_handle);
		return \FOP\Files::uploadFromFile($ob_tmp, $filename);
	} else if ($attachTo instanceof \PHPMailer\PHPMailer\PHPMailer) {
		
		$content = ob_get_clean();
		$attachTo->AddStringAttachment($content, $filename);

	} else if ($attachTo instanceof \ZipArchive) {
		
		$content = ob_get_clean();
		$attachTo->addFromString($filename, $content);
	
	}
    
  }

  public static function renderTabTableAction() { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
     ?><div class='fop-dv-buttonbar'><?php if((!\FOP\User::getIsGuest())) { ?>
	<?php if ((true) && (true)) { ?>
	<div class='fop-dv-aggregate' data-column='_count' title='<?php echo(_('count')); ?>'>
		<div class='fop-dv-aggregate-caption' style='text-align: right'><?php echo(_('count')); ?></div>
		<div class='fop-dv-aggregate-value'>-...-</div>
	</div>
	<?php } ?><?php }if((!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest())) { ?><a class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored" href="#" onclick="reloadaggMitgliedGeschlecht({action: 'exportCSV'}); return false;">
		<i class="material-icons">view_comfy</i>
		<?php echo(_('CSV-Export')); ?>
	</a><?php } ?></div><?php ?><div style='position: relative;'>
		
		<table class='mdl-data-table mdl-js-data-table mdl-shadow--2dp table-editable noprint' style='position: absolute; right: 0px; top: 0px; z-index: 1010;'>
			<tr style='border-bottom: 2px solid;'>
				<th>Filter<i class='material-icons' style='cursor: pointer;' onclick='
					if (this.innerText == "expand_less") {
						this.innerText = "expand_more";
						$(this).closest("table").find(".fop-collapsible").hide();
					} else {
						this.innerText = "expand_less";
						$(this).closest("table").find(".fop-collapsible").show();
					}
				'>expand_less</i></th>
			</tr>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_name'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_name'] = text.val(); } else { delete query['search_mitglied_name']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_name'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_name'] = text2.val(); } else { delete query['searchnot_mitglied_name']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'name ASC') {
			query['sort_mitglied'] = 'name DESC';
		 } else if (query['sort_mitglied'] == 'name DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'name ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Name')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_vorname'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_vorname'] = text.val(); } else { delete query['search_mitglied_vorname']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_vorname'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_vorname'] = text2.val(); } else { delete query['searchnot_mitglied_vorname']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'vorname ASC') {
			query['sort_mitglied'] = 'vorname DESC';
		 } else if (query['sort_mitglied'] == 'vorname DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'vorname ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Vorname')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_mnr'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_mnr'] = text.val(); } else { delete query['search_mitglied_mnr']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_mnr'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_mnr'] = text2.val(); } else { delete query['searchnot_mitglied_mnr']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'mnr ASC') {
			query['sort_mitglied'] = 'mnr DESC';
		 } else if (query['sort_mitglied'] == 'mnr DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'mnr ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Mitgliedsnummer')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_geschlecht', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_geschlecht', '0', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('männlich')); ?><br/>').append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_geschlecht', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_geschlecht', '1', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('weiblich')); ?><br/>').append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_geschlecht', '2') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_geschlecht', '2', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('Individuum')); ?><br/>');
		return false;
	"><?php echo(_('Geschlecht')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}}, 600);
		date_filter(win, 'mitglied', 'geburtsdatum', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadmitglied(); reloadaggMitgliedGeschlecht();  reloadmitglied(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'geburtsdatum ASC') {
			query['sort_mitglied'] = 'geburtsdatum DESC';
		 } else if (query['sort_mitglied'] == 'geburtsdatum DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'geburtsdatum ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Geburtsdatum')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}}, 600);
		date_filter(win, 'mitglied', 'verstorben', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadmitglied(); reloadaggMitgliedGeschlecht();  reloadmitglied(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'verstorben ASC') {
			query['sort_mitglied'] = 'verstorben DESC';
		 } else if (query['sort_mitglied'] == 'verstorben DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'verstorben ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Verstorben am')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_land'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_land'] = text.val(); } else { delete query['search_mitglied_land']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_land'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_land'] = text2.val(); } else { delete query['searchnot_mitglied_land']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'land ASC') {
			query['sort_mitglied'] = 'land DESC';
		 } else if (query['sort_mitglied'] == 'land DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'land ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Land')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_plz'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_plz'] = text.val(); } else { delete query['search_mitglied_plz']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_plz'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_plz'] = text2.val(); } else { delete query['searchnot_mitglied_plz']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'plz ASC') {
			query['sort_mitglied'] = 'plz DESC';
		 } else if (query['sort_mitglied'] == 'plz DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'plz ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Postleitzahl')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_ort'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_ort'] = text.val(); } else { delete query['search_mitglied_ort']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_ort'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_ort'] = text2.val(); } else { delete query['searchnot_mitglied_ort']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'ort ASC') {
			query['sort_mitglied'] = 'ort DESC';
		 } else if (query['sort_mitglied'] == 'ort DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'ort ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Ort')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_strasse'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_strasse'] = text.val(); } else { delete query['search_mitglied_strasse']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_strasse'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_strasse'] = text2.val(); } else { delete query['searchnot_mitglied_strasse']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'strasse ASC') {
			query['sort_mitglied'] = 'strasse DESC';
		 } else if (query['sort_mitglied'] == 'strasse DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'strasse ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Straße und Hausnummer')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_email'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_email'] = text.val(); } else { delete query['search_mitglied_email']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_email'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_email'] = text2.val(); } else { delete query['searchnot_mitglied_email']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'email ASC') {
			query['sort_mitglied'] = 'email DESC';
		 } else if (query['sort_mitglied'] == 'email DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'email ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('E-Mail')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_email2'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_email2'] = text.val(); } else { delete query['search_mitglied_email2']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_email2'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_email2'] = text2.val(); } else { delete query['searchnot_mitglied_email2']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'email2 ASC') {
			query['sort_mitglied'] = 'email2 DESC';
		 } else if (query['sort_mitglied'] == 'email2 DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'email2 ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('E-Mail Alternative')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_telefon'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_telefon'] = text.val(); } else { delete query['search_mitglied_telefon']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_telefon'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_telefon'] = text2.val(); } else { delete query['searchnot_mitglied_telefon']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'telefon ASC') {
			query['sort_mitglied'] = 'telefon DESC';
		 } else if (query['sort_mitglied'] == 'telefon DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'telefon ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Telefon')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_mobil'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_mobil'] = text.val(); } else { delete query['search_mitglied_mobil']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_mobil'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_mobil'] = text2.val(); } else { delete query['searchnot_mitglied_mobil']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'mobil ASC') {
			query['sort_mitglied'] = 'mobil DESC';
		 } else if (query['sort_mitglied'] == 'mobil DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'mobil ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Mobil')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}}, 600);
		date_filter(win, 'mitglied', 'eintritt', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadmitglied(); reloadaggMitgliedGeschlecht();  reloadmitglied(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'eintritt ASC') {
			query['sort_mitglied'] = 'eintritt DESC';
		 } else if (query['sort_mitglied'] == 'eintritt DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'eintritt ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Eintrittsdatum')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}}, 600);
		date_filter(win, 'mitglied', 'austrittsdatum', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadmitglied(); reloadaggMitgliedGeschlecht();  reloadmitglied(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'austrittsdatum ASC') {
			query['sort_mitglied'] = 'austrittsdatum DESC';
		 } else if (query['sort_mitglied'] == 'austrittsdatum DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'austrittsdatum ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Austrittsdatum')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_austrittsgrund'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_austrittsgrund'] = text.val(); } else { delete query['search_mitglied_austrittsgrund']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_austrittsgrund'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_austrittsgrund'] = text2.val(); } else { delete query['searchnot_mitglied_austrittsgrund']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'austrittsgrund ASC') {
			query['sort_mitglied'] = 'austrittsgrund DESC';
		 } else if (query['sort_mitglied'] == 'austrittsgrund DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'austrittsgrund ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Austritts-Grund')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_notiz'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_notiz'] = text.val(); } else { delete query['search_mitglied_notiz']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_notiz'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_notiz'] = text2.val(); } else { delete query['searchnot_mitglied_notiz']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'notiz ASC') {
			query['sort_mitglied'] = 'notiz DESC';
		 } else if (query['sort_mitglied'] == 'notiz DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'notiz ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Notiz')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getBuchhaltung())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_iban'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_iban'] = text.val(); } else { delete query['search_mitglied_iban']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_iban'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_iban'] = text2.val(); } else { delete query['searchnot_mitglied_iban']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'iban ASC') {
			query['sort_mitglied'] = 'iban DESC';
		 } else if (query['sort_mitglied'] == 'iban DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'iban ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('IBAN')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getBuchhaltung())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_mitglied_bic'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_mitglied_bic'] = text.val(); } else { delete query['search_mitglied_bic']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_mitglied_bic'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_mitglied_bic'] = text2.val(); } else { delete query['searchnot_mitglied_bic']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_mitglied').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'bic ASC') {
			query['sort_mitglied'] = 'bic DESC';
		 } else if (query['sort_mitglied'] == 'bic DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'bic ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('BIC')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getBuchhaltung())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_mitglied_forderungen']).on('change keyup paste', function () { query['range_min_mitglied_forderungen'] = von.val(); delete query['page_mitglied']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_mitglied_forderungen']).on('change keyup paste', function () { query['range_max_mitglied_forderungen'] = bis.val(); delete query['page_mitglied']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'forderungen ASC') {
			query['sort_mitglied'] = 'forderungen DESC';
		 } else if (query['sort_mitglied'] == 'forderungen DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'forderungen ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Guthaben Beiträge')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_datenschutz', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_datenschutz', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_datenschutz', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_datenschutz', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Datenschutz akzeptiert')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getBuchhaltung())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_sepa', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_sepa', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_sepa', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_sepa', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('SEPA-Lastschrift')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getBuchhaltung())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}}, 600);
		date_filter(win, 'mitglied', 'sepaDate', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadmitglied(); reloadaggMitgliedGeschlecht();  reloadmitglied(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_mitglied'] == 'sepaDate ASC') {
			query['sort_mitglied'] = 'sepaDate DESC';
		 } else if (query['sort_mitglied'] == 'sepaDate DESC') {
		 	delete query['sort_mitglied'];
		 } else {
			query['sort_mitglied'] = 'sepaDate ASC';
		 }
		 reloadmitglied();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	"><?php echo(_('Datum SEPA-Lastschrift')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getSuperadmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_superadmin', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_superadmin', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_superadmin', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_superadmin', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Super-Admin')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canAdmin', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canAdmin', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canAdmin', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canAdmin', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Admin')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canMitglied', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canMitglied', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canMitglied', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canMitglied', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Mitgliederverwaltung')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canGruppe', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canGruppe', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canGruppe', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canGruppe', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Verwaltung der eigenen Gruppe')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canCampaign', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canCampaign', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canCampaign', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canCampaign', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Rundmails und Aktionen')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canSammlung', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canSammlung', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canSammlung', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canSammlung', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Geldsammlungen')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canBuchhaltung', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canBuchhaltung', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canBuchhaltung', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canBuchhaltung', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Buchhaltung')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canProtokoll', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canProtokoll', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canProtokoll', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canProtokoll', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Protokoll')); ?></td></tr>
				<?php } ?>
			
				<?php if((\FOP\User::getAdmin())){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		win
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canDokument', '0') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canDokument', '0', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('off')); ?><br/>')
	.append($('<input type=\'checkbox\'' + (querySet('filter_mitglied_canDokument', '1') ? ' checked>': '>')).change(function (){querySet('filter_mitglied_canDokument', '1', $(this).prop('checked')); delete query['page_mitglied']; changed=true;})).append(' <?php echo(_('on')); ?><br/>')
;
		return false;
	"><?php echo(_('Dokumente')); ?></td></tr>
				<?php } ?>
			
				<?php if(true){ ?>
					<tr class='fop-collapsible'><td style='cursor: pointer;' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadmitglied(); reloadaggMitgliedGeschlecht(); 
		}});
		
		win.append(getfilter_mitglied_tarifListMultiFilter()); win.find('input').first().focus();
		return false;
	"><?php echo(_('Mitgliedsbeitrag')); ?></td></tr>
				<?php } ?>
			
		</table>
	
		<?php 
								\FOP\User::getIsGuest();
								$itemheight = 32;
								$itemsperpage = ceil(1080 / $itemheight * 0.8);
								$page = (isset($_GET['page_aggMitgliedGeschlecht']) ? intval($_GET['page_aggMitgliedGeschlecht']) : 0);
								$addlines = (isset($_GET['addlines_aggMitgliedGeschlecht']) ? intval($_GET['addlines_aggMitgliedGeschlecht']) : 0);
								$firstitem = $page * $itemsperpage;
								$sqladdon = ' LIMIT ' . ($itemsperpage * 2) . ' OFFSET ' . ($firstitem);
								$data = self::getData($sqladdon, $_GET);
								$arr = $data["items"];
								$itemcount = $data["itemcount"];
								$lastPage = ceil($itemcount/$itemsperpage-1);
								// calculate width of first column: 67px + 32px for each shortcut
								$firstColumnWidth = 34;
								$additionalLines = 0;
								$renderAggregateRow = function ($item) use (&$columns, $firstColumnWidth) {
										if (!(true)) {
											return; // no access
										}
										?><div class="fop-table-row fop-table-row-aggregate">
											<div class="fop-table-column noprint" style="width: <?php echo json_encode($firstColumnWidth); ?>px;"><?php echo $item['::cnt']; ?> x</div><?php
											foreach ($columns AS $col) {
												$col['renderSum']($item);
											} ?>
										</div><?php
								};
								$checkAggregates = function ($last, $current) use ($data, $renderAggregateRow) {
									
								};

									// Spaltenliste zuerst aufbauen, damit sie noch umsortiert werden kann
									$order = 1000;
									$columns = [];
									
										if(true){
											$col = [
												'id' => 'geschlecht',
												'desc' => _('Geschlecht'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['geschlecht'] = $col;
										}
									
										if(true){
											$col = [
												'id' => '_count',
												'desc' => _('count'),
												'order' => ++$order,
												'width' => 60, // default value
												'collapsed' => 0

											];
											$columns['_count'] = $col;
										}
									
										if(true){
											$col = [
												'id' => '_count_percent',
												'desc' => _('count-%'),
												'order' => ++$order,
												'width' => 120, // default value
												'collapsed' => 0

											];
											$columns['_count_percent'] = $col;
										}
									

									// gespeicherte Spaltenanordnung
									foreach (\FOP\Database::query('SELECT * FROM fop_dataview WHERE '.qi('user').' = ' . \FOP\Database::quote(\FOP\User::getID()) . ' AND dataview = ' . \FOP\Database::quote('aggMitgliedGeschlecht'))->fetchAll(\PDO::FETCH_ASSOC) AS $column => $c) {
										if (isset($columns[$c['column']])) {
											$columns[$c['column']]['order'] = $c['order']; // order, width, collapsed
											$columns[$c['column']]['width'] = $c['width']; // order, width, collapsed
											$columns[$c['column']]['collapsed'] = $c['collapsed']; // order, width, collapsed
										}
									}

									// DOM vor-rendern
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='geschlecht'
												data-order='<?php echo intval($columns['geschlecht']['order']); ?>'
												data-width='<?php echo intval($columns['geschlecht']['width']); ?>'
												data-collapsed='<?php echo intval($columns['geschlecht']['collapsed']); ?>'
												style='width: <?php echo intval($columns['geschlecht']['width']); ?>px; <?php if ($columns['geschlecht']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaggMitgliedGeschlecht(); 
		}});
		win.append($('<input type=\'checkbox\'' + (querySet('filter_aggMitgliedGeschlecht_geschlecht', '0') ? ' checked>': '>')).change(function (){querySet('filter_aggMitgliedGeschlecht_geschlecht', '0', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('männlich')); ?><br/>').append($('<input type=\'checkbox\'' + (querySet('filter_aggMitgliedGeschlecht_geschlecht', '1') ? ' checked>': '>')).change(function (){querySet('filter_aggMitgliedGeschlecht_geschlecht', '1', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('weiblich')); ?><br/>').append($('<input type=\'checkbox\'' + (querySet('filter_aggMitgliedGeschlecht_geschlecht', '2') ? ' checked>': '>')).change(function (){querySet('filter_aggMitgliedGeschlecht_geschlecht', '2', $(this).prop('checked')); changed=true;})).append('<span> </span><?php echo(_('Individuum')); ?><br/>');
		return false;
	">
													<span class='title-title' title='<?php echo(_('Geschlecht')); ?>'><?php echo(_('Geschlecht')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == 'geschlecht ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == 'geschlecht DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['range_max_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['deps_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['fullsearch_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['dynamic_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['search_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['searchnot_aggMitgliedGeschlecht_geschlecht']) || isset($_GET['filter_aggMitgliedGeschlecht_geschlecht'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['geschlecht']['header'] = ob_get_contents(); ob_end_clean();
											$columns['geschlecht']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['geschlecht']['width']); ?>px; <?php if ($columns['geschlecht']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='geschlecht'><?php echo htmlentities(\Types\Geschlechtstyp::toStringShort($item['geschlecht'])); ?></div><?php
											};
											$columns['geschlecht']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='geschlecht'
													data-order='<?php echo intval($columns['geschlecht']['order']); ?>'
													data-width='<?php echo intval($columns['geschlecht']['width']); ?>'
													data-collapsed='<?php echo intval($columns['geschlecht']['collapsed']); ?>'
													style='width: <?php echo intval($columns['geschlecht']['width']); ?>px; <?php if ($columns['geschlecht']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='_count'
												data-order='<?php echo intval($columns['_count']['order']); ?>'
												data-width='<?php echo intval($columns['_count']['width']); ?>'
												data-collapsed='<?php echo intval($columns['_count']['collapsed']); ?>'
												style='width: <?php echo intval($columns['_count']['width']); ?>px; <?php if ($columns['_count']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaggMitgliedGeschlecht(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_aggMitgliedGeschlecht__count']).on('change keyup paste', function () { query['range_min_aggMitgliedGeschlecht__count'] = von.val(); delete query['page_aggMitgliedGeschlecht']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_aggMitgliedGeschlecht__count']).on('change keyup paste', function () { query['range_max_aggMitgliedGeschlecht__count'] = bis.val(); delete query['page_aggMitgliedGeschlecht']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aggMitgliedGeschlecht'] == '_count ASC') {
			query['sort_aggMitgliedGeschlecht'] = '_count DESC';
		 } else if (query['sort_aggMitgliedGeschlecht'] == '_count DESC') {
		 	delete query['sort_aggMitgliedGeschlecht'];
		 } else {
			query['sort_aggMitgliedGeschlecht'] = '_count ASC';
		 }
		 reloadaggMitgliedGeschlecht();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	" style='text-align: right;'>
													<span class='title-title' title='<?php echo(_('count')); ?>'><?php echo(_('count')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == '_count ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == '_count DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aggMitgliedGeschlecht__count']) || isset($_GET['range_max_aggMitgliedGeschlecht__count']) || isset($_GET['deps_aggMitgliedGeschlecht__count']) || isset($_GET['fullsearch_aggMitgliedGeschlecht__count']) || isset($_GET['dynamic_aggMitgliedGeschlecht__count']) || isset($_GET['search_aggMitgliedGeschlecht__count']) || isset($_GET['searchnot_aggMitgliedGeschlecht__count']) || isset($_GET['filter_aggMitgliedGeschlecht__count'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['_count']['header'] = ob_get_contents(); ob_end_clean();
											$columns['_count']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['_count']['width']); ?>px; <?php if ($columns['_count']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='_count'><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Integer::print($item['_count'])); ?>
	</span></div><?php
											};
											$columns['_count']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='_count'
													data-order='<?php echo intval($columns['_count']['order']); ?>'
													data-width='<?php echo intval($columns['_count']['width']); ?>'
													data-collapsed='<?php echo intval($columns['_count']['collapsed']); ?>'
													style='width: <?php echo intval($columns['_count']['width']); ?>px; <?php if ($columns['_count']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													<b><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Integer::print($item['_count'])); ?>
	</span></b></div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='_count_percent'
												data-order='<?php echo intval($columns['_count_percent']['order']); ?>'
												data-width='<?php echo intval($columns['_count_percent']['width']); ?>'
												data-collapsed='<?php echo intval($columns['_count_percent']['collapsed']); ?>'
												style='width: <?php echo intval($columns['_count_percent']['width']); ?>px; <?php if ($columns['_count_percent']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaggMitgliedGeschlecht(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_aggMitgliedGeschlecht__count_percent']).on('change keyup paste', function () { query['range_min_aggMitgliedGeschlecht__count_percent'] = von.val(); delete query['page_aggMitgliedGeschlecht']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_aggMitgliedGeschlecht__count_percent']).on('change keyup paste', function () { query['range_max_aggMitgliedGeschlecht__count_percent'] = bis.val(); delete query['page_aggMitgliedGeschlecht']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aggMitgliedGeschlecht'] == '_count_percent ASC') {
			query['sort_aggMitgliedGeschlecht'] = '_count_percent DESC';
		 } else if (query['sort_aggMitgliedGeschlecht'] == '_count_percent DESC') {
		 	delete query['sort_aggMitgliedGeschlecht'];
		 } else {
			query['sort_aggMitgliedGeschlecht'] = '_count_percent ASC';
		 }
		 reloadaggMitgliedGeschlecht();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	" style='text-align: right;'>
													<span class='title-title' title='<?php echo(_('count-%')); ?>'><?php echo(_('count-%')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == '_count_percent ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aggMitgliedGeschlecht']) && $_GET['sort_aggMitgliedGeschlecht'] == '_count_percent DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aggMitgliedGeschlecht__count_percent']) || isset($_GET['range_max_aggMitgliedGeschlecht__count_percent']) || isset($_GET['deps_aggMitgliedGeschlecht__count_percent']) || isset($_GET['fullsearch_aggMitgliedGeschlecht__count_percent']) || isset($_GET['dynamic_aggMitgliedGeschlecht__count_percent']) || isset($_GET['search_aggMitgliedGeschlecht__count_percent']) || isset($_GET['searchnot_aggMitgliedGeschlecht__count_percent']) || isset($_GET['filter_aggMitgliedGeschlecht__count_percent'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['_count_percent']['header'] = ob_get_contents(); ob_end_clean();
											$columns['_count_percent']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['_count_percent']['width']); ?>px; <?php if ($columns['_count_percent']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='_count_percent'><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Percent2::print($item['_count_percent'])); ?><?php echo '&nbsp;' .  htmlentities('%'); ?>
	</span></div><?php
											};
											$columns['_count_percent']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='_count_percent'
													data-order='<?php echo intval($columns['_count_percent']['order']); ?>'
													data-width='<?php echo intval($columns['_count_percent']['width']); ?>'
													data-collapsed='<?php echo intval($columns['_count_percent']['collapsed']); ?>'
													style='width: <?php echo intval($columns['_count_percent']['width']); ?>px; <?php if ($columns['_count_percent']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													<b><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Percent2::print($item['_count_percent'])); ?><?php echo '&nbsp;' .  htmlentities('%'); ?>
	</span></b></div><?php
											};
										}
										
									

									// sort by order
									uasort($columns, function ($a, $b) {
										return $a['order'] - $b['order'];
									});
									?>
									<style type='text/css'>
										#aggMitgliedGeschlecht-table .fop-table-header {
											height: <?php echo 32; ?>px;
										}
										#aggMitgliedGeschlecht-table .fop-table-header .fop-table-column .title,
										#aggMitgliedGeschlecht-table .fop-column-handle,
										#aggMitgliedGeschlecht-table .fop-table-row,
										#aggMitgliedGeschlecht-table .fop-table-row .fop-table-column,
										#aggMitgliedGeschlecht-table .fop-table-column-multicontrol,
										#aggMitgliedGeschlecht-table .fop-filter-button {
											height: 32px;
											line-height: 32px;
										}
										</style>
											<div class="fop-table" data-table-id="aggMitgliedGeschlecht">
											<div class="fop-legend"></div>
											<div class="fop-filter-string-wrapper"><div class="fop-filter-string"><label>Filter:</label> <span><?php echo self::getFilterHTML($_GET); ?></span></div></div>
											<br>
											<?php if (isset($_GET['select'])) { echo '<br>'; } ?>
											<div class="fop-table-header">
											<?php if (!isset($_GET['select'])) { ?>
												<div class="fop-table-column noprint" style="width: <?php echo json_encode($firstColumnWidth); ?>px;">
													
												</div><?php }
												
												foreach ($columns AS $col) {
													// Spalten-Überschrift rendern
													echo $col['header'];
												} ?>
											 </div>
											
											<div class="fop-table-body" id="table_aggMitgliedGeschlecht" <?php \EasyEditor\Navigation::printScroll('dv.AggMitgliedGeschlecht', '/* scroll horiz */ this.nextElementSibling.firstElementChild.style.marginLeft = this.previousElementSibling.firstElementChild.style.marginLeft = \'-\' + this.scrollLeft + \'px\';
												/* scroll verti */
												var self = this;
												if (window.DataViewScrollReloadTimeout) clearTimeout(window.DataViewScrollReloadTimeout);
												window.DataViewScrollReloadTimeout = setTimeout(function () {
													var currentPage = parseInt(query[\'page_aggMitgliedGeschlecht\'] || 0);
													var paddingTop = parseInt( self.lastElementChild.style.paddingTop, 10);
													var wantedPage = Math.max(0, currentPage + Math.floor((self.scrollTop - paddingTop) / ' . ($itemheight * $itemsperpage) . '));
													if (wantedPage != currentPage) {
														query[\'page_aggMitgliedGeschlecht\'] = wantedPage;
														reloadaggMitgliedGeschlecht(undefined, undefined, true);
													}
												}, 50);
											'); ?>>
												<div class="fop-table-body-inner" style="min-height: <?php echo 12 + $itemheight * ($itemcount + $additionalLines); ?>px; padding-top: <?php echo $itemheight * $itemsperpage * $page; ?>px;">
												<?php foreach($arr as $itempos => $item) {
													
													if ($itempos != 0) $checkAggregates(null, $item);?>
													<div class="fop-table-row" style="">

													<?php if (!isset($_GET['select'])) { ?>
													<div class='fop-table-column noprint' style="width: <?php echo json_encode($firstColumnWidth); ?>px;" onclick="$(this).find('input[type=checkbox]').first().click(); event.stopPropagation();"><button type="button" class="mdl-button mdl-js-button mdl-button--icon aggMitgliedGeschlecht__action" onclick="
														event.stopPropagation();
														dropDownFixPosition($(this), $(this).next());
														
	var self = $(this);
	$.get(reloadaggMitgliedGeschlecht({
		action: 'getIDItems',
		value: <?php echo htmlentities(json_encode($item['geschlecht'])); ?>
	}, true)).then(function (idlist) {
		idlist = new IDList(idlist);
		checkmitglied(idlist, 'ID', 'set'); // this assumes that the original dataview is also present on the same page...; if not: load at least its scripts
		$('.fop-scroll-menu').find('.cnt').text(idlist.count());
	});">
														<i class="material-icons">more_vert</i>
													</button><ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu" id="fop-scroll-menu-aggMitgliedGeschlecht-action-<?php echo $item['ID'] ?? 0; ?>">
														<?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterall" style="margin-right:auto; text-align:left;"
					onclick="for (key in query) if (key.indexOf('range_min_mitglied_') == 0 || key.indexOf('range_max_mitglied_') == 0 || key.indexOf('deps_mitglied_') == 0 || key.indexOf('fullsearch_mitglied_') == 0 || key.indexOf('dynamic_mitglied_') == 0 || key.indexOf('search_mitglied_') == 0 || key.indexOf('searchnot_mitglied_') == 0 || key.indexOf('filter_mitglied_') == 0) delete query[key]; reloadmitglied(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">list</i></span><span class="fop-menu-caption" title="<?php echo(_('view all elements')); ?>"><?php echo(_('view all elements')); ?> 
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filteronly" style="margin-right:auto; text-align:left;"
					onclick="query['filter_mitglied_ID'] = checkmitglied(null, 'ID'); delete query['page_mitglied']; reloadmitglied(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">arrow_forward</i></span><span class="fop-menu-caption" title="<?php echo(_('view only these elements')); ?>"><?php echo(_('view only these elements')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterrange" style="margin-right:auto; text-align:left;"
					onclick="
		var ticks = new IDList(checkmitglied(null, 'ID'));
		var range = prompt('Bitte geben Sie den Bereich ein', '1-' + ticks.count());
		var newticks = new IDList();
		if (range) {
			range = range.split('-');
			if (range.length == 1) {
				range.push(range[0]);
			}
			var skip = (range[0] || 1) - 1;
			var take = (range[1] || Infinity) - skip;
			for (var item of ticks.all()) {
				if (skip > 0) {
					skip--;
				} else if (take > 0) {
					newticks.push(item);
					take--;
				} else break;
			}
			checkmitglied(newticks, 'ID', 'set');
		} $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">colorize</i></span><span class="fop-menu-caption" title="<?php echo(_('limit range')); ?>"><?php echo(_('limit range')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && ((\FOP\User::getCampaign()) && (\FOP\User::getCampaign()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="campaignTargetAdd" style="margin-right:auto; text-align:left;"
					onclick="location.href = 'Tables/CampaignTarget/multiadd?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&column_target=' + escape(checkmitglied(null, 'ID')); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">add</i></span><span class="fop-menu-caption" title="<?php echo(sprintf(_('Zu %s hinzufügen'), _('Aktion'))); ?>"><?php echo(sprintf(_('Zu %s hinzufügen'), _('Aktion'))); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && (!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest())) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="exportCSV_multi" style="margin-right:auto; text-align:left;"
					onclick="location.href = 'DataView/Mitglied/exportCSV?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&filter_mitglied_ID=' + escape(checkmitglied(null, 'ID')); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">view_comfy</i></span><span class="fop-menu-caption" title="<?php echo(_('CSV-Export')); ?>"><?php echo(_('CSV-Export')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && ((\FOP\User::getGruppe()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="gruppeItemAdd" style="margin-right:auto; text-align:left;"
					onclick="location.href = 'Tables/GruppeItem/multiadd?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&column_item=' + escape(checkmitglied(null, 'ID')); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">add</i></span><span class="fop-menu-caption" title="<?php echo(sprintf(_('Zu %s hinzufügen'), _('Gruppe'))); ?>"><?php echo(sprintf(_('Zu %s hinzufügen'), _('Gruppe'))); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && (!\FOP\User::getIsGuest()) && ((\FOP\User::getGruppe()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="lifecycleEnd" style="margin-right:auto; text-align:left;"
					onclick="location.href = 'Tables/Mitglied/lifecycleEnd?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&id=' + escape(checkmitglied(null, 'ID')); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">stop</i></span><span class="fop-menu-caption" title="<?php echo(sprintf(_('%s setzen'), _('Austrittsdatum'))); ?>"><?php echo(sprintf(_('%s setzen'), _('Austrittsdatum'))); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && ((\FOP\User::getGruppe()))) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="delete" style="margin-right:auto; text-align:left;"
					onclick="if(!confirm(<?php echo htmlentities(json_encode(_('confirmdelete'))); ?>)) return;$.get('Tables/Mitglied/delete?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&id=' + escape(checkmitglied(null, 'ID'))).then(function () { reloadmitglied(); }, function (err) { if (err.responseText.startsWith('http')) { window.location.href = err.responseText; } else {alert(err.responseText); }}); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">delete</i></span><span class="fop-menu-caption" title="<?php echo(_('delete')); ?>"><?php echo(_('delete')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?>
													</ul>
													</div><?php } ?><?php
													
													foreach ($columns AS $col) {
														$col['render']($item);
													}
													?></div>
												 <?php }
												$checkAggregates(null, null);?>

													</div>
												</div>
												<?php
												// allerletzte Zeile
												$renderAggregateRow($data['aggregate']);
												?>

												
												
												</div><?php
												?></div><?php
	
    
  }

  public static function renderScript() { 
    
    
    // --- BLOCK: main ---
    
								\FOP\I18n::ensureIsLoaded();
								?>
								<script type="text/javascript">
									
									
    function changefilter_mitglied_tarifListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_mitglied_tarif', val, cb.checked);
		  } else {
			  delete query['filter_mitglied_tarif'];
		  }reloadmitglied();
        reloadaggMitgliedGeschlecht();
        
    }

		var i7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54timeout = null;
		function changefilter_mitglied_tarifSearchFilter(val, callback) {
			if(i7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54timeout) clearTimeout(i7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54timeout);

			i7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54timeout = setTimeout(function() {
				$.getJSON(reloadmitglied({action: 'getfilter_mitglied_tarifItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_mitglied_tarif_orig'] = val;
				});
			}, 300);
		}

	function getfilter_mitglied_tarifListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_mitglied_tarif_orig']) ? json_encode($_GET['filter_mitglied_tarif_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54" type="text">' +
			'<label class="mdl-textfield__label" for="7c1aa0c4bdc6b24947100f53312e0262bfc9e430b9e6fc9b8fedbe3e13c9ce54">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_mitglied_tarif', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_mitglied_tarif_orig'] = '';
					delete query['filter_mitglied_tarif'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadmitglied();
					reloadaggMitgliedGeschlecht();
					
				} else {
					$('#table_mitglied').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_mitglied_tarifSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\Mitglied::getfilter_mitglied_tarifItemsByStringAction(''));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_mitglied_tarif_orig'] = '';
				delete query['filter_mitglied_tarif'];
				reload('', items);reloadmitglied();
				reloadaggMitgliedGeschlecht();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_mitglied_tarif', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_mitglied_tarifListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
									function updateNumberaggMitgliedGeschlecht(col) {
										//var checklist = window.DataViewChecked['aggMitgliedGeschlecht'][col];
										//if (checklist.id) {
											// checklist is online
											// TODO: check if cache is alive, otherwise reload from ajax, delay execution and return now
											//checklist.ranges = [[1,10000000]]; // mostly we use indirect idlists to tick all marks; so this is an approximation
										//}
										// checkboxes aktualisieren
										if (window.DataViewChecked && window.DataViewChecked['aggMitgliedGeschlecht'] && window.DataViewChecked['aggMitgliedGeschlecht'][col].ranges.length > 0) {
											$('.aggMitgliedGeschlecht__mass-action').css('visibility', 'visible');
											$('.aggMitgliedGeschlecht__action').css('visibility', 'hidden');
										} else {
											$('.aggMitgliedGeschlecht__mass-action').css('visibility', 'hidden');
											$('.aggMitgliedGeschlecht__action').css('visibility', 'visible');
										}
										$('.aggMitgliedGeschlecht__checkbox').each(function (idx, x) {
											for (var cssclass of x.classList) {
												if (cssclass.startsWith('aggMitgliedGeschlecht__checkbox-'+col+'-')) {
													var my_id = cssclass.substr(('aggMitgliedGeschlecht__checkbox-'+col+'-').length);
													if (window.DataViewChecked) {
														x.MaterialCheckbox[checklist.has(my_id) ? 'check' : 'uncheck']();
													}
												}
											}
										});
									}
									function reloadaggMitgliedGeschlecht (params, returnUrl, onlyScroll, addPadding = 0) {
										// copy query
										let nq = JSON.parse(JSON.stringify(query));
										nq['parent_request'] = <?php echo json_encode(strtok(\FOP\Util::getBackUrl(), '?')); ?>;
										<?php if (isset($_GET['select'])) { ?>nq['select'] = 'select';<?php } ?>
										
										if (params) {
											for (var i in params) nq[i] = params[i];
											var action = nq['action'];
											delete nq['action'];
											let querystr = "DataView/AggMitgliedGeschlecht/" + action + "?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// direkt aufrufen (ist wohl ein Download oder so)
											if (returnUrl) return querystr;
											window.location.href = querystr;
										} else {
											let querystr;
											
											
											<?php if ((!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest())) { ?>
											delete nq['action'];
											querystr = "DataView/AggMitgliedGeschlecht/renderTabTable?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// per Ajax laden
											if(!$("#aggMitgliedGeschlecht-table")?.parent()?.parent()?.hasClass('fop-form-feature-collapsed') || $("#aggMitgliedGeschlecht-table")?.parent()?.parent()?.hasClass('fop-form-feature-mode-area')) {
											$.get(querystr, function(data){
												var tab = $("#aggMitgliedGeschlecht-table");
												var top = tab.find('.fop-table-body-inner');
												var el;
												if (onlyScroll && (el = $('<div class="tabcontent">' + data + '</div>').find('.fop-table-body-inner'))) {
													// nur Scroll-Bereich ersetzen
													var paddingTop = parseInt(el.css('paddingTop') || '0px', 10);
													var minHeight = parseInt(el.css('minHeight'), 10)
													paddingTop += addPadding;
													minHeight += addPadding;
													top.css({paddingTop: paddingTop.toString()+'px', minHeight: minHeight.toString()+'px'}); // Offset
													el = el.children();
													top.empty();
													top.append(el);
													el = top; // top-upgrade doppelt machen, dadurch vermeiden wir das Array-upgrade => Performance
												} else {
													// gesamten Tab ersetzen
													tab.children().remove();
													el = tab.html('<div class="tabcontent">' + data + '</div>');
												}
												try {
													for (var i = 0; i < el.length; i++) upgradeDOM(el[i]);
												} catch (e) {
													console.log(e);
												}
												upgradeTable(el.find('.fop-table .fop-table-header')); // Falls es Tabellen-Layout ist: Spalten-Order anpassen
												flushURL(); // Neue URL in Titelleiste eintragen

												// Checkbox-Auswahl ankreuzen
												updateNumberaggMitgliedGeschlecht('');
											});
											} else {
												// gesamten Tab ersetzen
												var tab = $("#aggMitgliedGeschlecht-table");
												tab.children().remove();
												el = tab.html('<div class="fop-lazy-reload" onclick="reloadaggMitgliedGeschlecht()"></div>');
											}
											<?php } ?>
											
										}
									}
									function checkaggMitgliedGeschlecht (id, col, checked) {
										// ID-Liste aufbauen
										if (!window.DataViewChecked) window.DataViewChecked = {};
										if (!window.DataViewChecked['aggMitgliedGeschlecht']) window.DataViewChecked['aggMitgliedGeschlecht'] = {};
										if (!window.DataViewChecked['aggMitgliedGeschlecht'][col]) window.DataViewChecked['aggMitgliedGeschlecht'][col] = new IDList();

										// Abfrage aller gecheckten IDs für eine Tabelle
										if (!id) {
											return window.DataViewChecked['aggMitgliedGeschlecht'][col].toString();
										}

										// check all, check id
										if (id == 'all') {
											// TODO: umbauen #1289: 'all' auch nur auf ne idlist reduzieren
											if (checked) {
												$.get(reloadaggMitgliedGeschlecht({action: 'getids', col: col}, true), function (ids) {
													window.DataViewChecked['aggMitgliedGeschlecht'][col] = new IDList(ids);
													updateNumberaggMitgliedGeschlecht(col);
												});
											} else {
												window.DataViewChecked['aggMitgliedGeschlecht'][col] = new IDList();
												updateNumberaggMitgliedGeschlecht(col);
											}
										} else {
											var ids = new IDList(id);
											var allcb = $('#aggMitgliedGeschlecht__all-checkbox');
											if (allcb[0]) {
												allcb[0].parentElement.MaterialCheckbox.uncheck(); // TODO: prüfen, ob Gruppen-CBs voll werden
											}
											if (checked == 'set') {
												window.DataViewChecked['aggMitgliedGeschlecht'][col] = ids;
											} else for (id of ids.all()) {
												if (checked) {
													window.DataViewChecked['aggMitgliedGeschlecht'][col].push(id);
												} else {
													window.DataViewChecked['aggMitgliedGeschlecht'][col].remove(id);
												}
											}
											updateNumberaggMitgliedGeschlecht(col);
										}
									}
								</script><?php

    
  }

  public static function renderSpecialFilters() { 
    
    
    // --- BLOCK: main ---
    ?>
	
	<script type"text/javascript">
		function updateSpecialFilter(param, val) {
			query[param] = val.toString();reloadaggMitgliedGeschlecht();
			
		}

	</script>
	<?php
	
    
  }

  public static function getIDItemsAction($value) { 
    
    
    // --- BLOCK: access ---
    if(!((!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest()))) throw new \FOP\AccessDeniedException();
    // --- BLOCK: main ---
    
		// evtl. value als idlist auffassen und multi erlauben??
		$sql = 'SELECT '.qi('ID').' FROM (SELECT t.'.qi('ID').',
		/* geschlecht */ t.'.qi('geschlecht').' AS '.qi('geschlecht').'' . \DataView\Mitglied::getSQL($_GET) . ') t WHERE t.'.qi('geschlecht').' = ' . \FOP\Database::quote($value);
		$q = \FOP\Database::query($sql);
		$idlist = new \FOP\IDList();
		while ($id = $q->fetch(\PDO::FETCH_COLUMN)) {
			$idlist->push($id);
		}
		echo $idlist->toString();
	
    
  }

  public static function getSQL($params) { 
    
    
    // --- BLOCK: main ---
    
								// returns a sql snippet 'FROM (...) AS t WHERE' where you can prepend your select clauses and append your ORDER LIMIT
								$sql = 'FROM (SELECT /* _count */ COUNT(*) AS '.qi('_count').',
		/* _count_percent */ COUNT(*)*100/(SUM(COUNT(*)) OVER ()) AS '.qi('_count_percent').',
		/* geschlecht */ '.qi('geschlecht').' AS '.qi('geschlecht').'
		FROM (SELECT /* ID */ '.qi('ID').' AS '.qi('ID').',
									/* austrittsdatum */ '.qi('austrittsdatum').' AS '.qi('austrittsdatum').',
									/* austrittsgrund */ '.qi('austrittsgrund').' AS '.qi('austrittsgrund').',
									/* bic */ '.qi('bic').' AS '.qi('bic').',
									/* canAdmin */ '.qi('canAdmin').' AS '.qi('canAdmin').',
									/* canBuchhaltung */ '.qi('canBuchhaltung').' AS '.qi('canBuchhaltung').',
									/* canCampaign */ '.qi('canCampaign').' AS '.qi('canCampaign').',
									/* canDokument */ '.qi('canDokument').' AS '.qi('canDokument').',
									/* canGruppe */ '.qi('canGruppe').' AS '.qi('canGruppe').',
									/* canMitglied */ '.qi('canMitglied').' AS '.qi('canMitglied').',
									/* canProtokoll */ '.qi('canProtokoll').' AS '.qi('canProtokoll').',
									/* canSammlung */ '.qi('canSammlung').' AS '.qi('canSammlung').',
									/* datenschutz */ '.qi('datenschutz').' AS '.qi('datenschutz').',
									/* eintritt */ '.qi('eintritt').' AS '.qi('eintritt').',
									/* email */ '.qi('email').' AS '.qi('email').',
									/* email2 */ '.qi('email2').' AS '.qi('email2').',
									/* fop_favorites */ '.qi('fop_favorites').' AS '.qi('fop_favorites').',
									/* forderungen */ (SELECT SUM('.qi('rhU469mT').'.'.qi('betrag').') FROM '.qi('mitgliedBuchung').' '.qi('rhU469mT').' WHERE '.qi('rhU469mT').'.'.qi('mitglied').' = '.qi('mitglied').'.'.qi('ID').' LIMIT 1) AS '.qi('forderungen').',
									/* geburtsdatum */ '.qi('geburtsdatum').' AS '.qi('geburtsdatum').',
									/* geschlecht */ '.qi('geschlecht').' AS '.qi('geschlecht').',
									/* iban */ '.qi('iban').' AS '.qi('iban').',
									/* land */ '.qi('land').' AS '.qi('land').',
									/* mnr */ '.qi('mnr').' AS '.qi('mnr').',
									/* mobil */ '.qi('mobil').' AS '.qi('mobil').',
									/* name */ '.qi('name').' AS '.qi('name').',
									/* notiz */ '.qi('notiz').' AS '.qi('notiz').',
									/* operation::1WAAkasU */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AS '.qi('operation::1WAAkasU').',
									/* operation::02c0b43ead22418f3d9ea400e2fa7f63e6376c9a98f4b3e74f9b2b9a3d285502 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::02c0b43ead22418f3d9ea400e2fa7f63e6376c9a98f4b3e74f9b2b9a3d285502').',
									/* operation::2a29124105f32c9d564abb8dc811fd076169bd1a608e1269d6683456eb97f374 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::2a29124105f32c9d564abb8dc811fd076169bd1a608e1269d6683456eb97f374').',
									/* operation::2b57632bfd6886109859996c8bf8d48427c5507c3b2c7805853512aaaf559156 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::2b57632bfd6886109859996c8bf8d48427c5507c3b2c7805853512aaaf559156').',
									/* operation::03e82f68b440a9f0da149e3eec506bff3f02491cc5062f7eeb2472d03703472f */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::03e82f68b440a9f0da149e3eec506bff3f02491cc5062f7eeb2472d03703472f').',
									/* operation::3bdea05a9091fde81219c95001e4af9313bf13e9c462887c9df6802f55de1c05 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::3bdea05a9091fde81219c95001e4af9313bf13e9c462887c9df6802f55de1c05').',
									/* operation::04fe1ec8e235cde37a5a9866c7ddedbb9fad99380a65be1554a9823c058e1fbd */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::04fe1ec8e235cde37a5a9866c7ddedbb9fad99380a65be1554a9823c058e1fbd').',
									/* operation::4c43396cd0f9ac80815c6039f6042bea2559504fec9524eda88b19b7601d57ad */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::4c43396cd0f9ac80815c6039f6042bea2559504fec9524eda88b19b7601d57ad').',
									/* operation::6b0cde9a2067c38af939224c86b0fb613e6a825a1b7d2ecf93d8e406d18f2488 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::6b0cde9a2067c38af939224c86b0fb613e6a825a1b7d2ecf93d8e406d18f2488').',
									/* operation::07bcf506555fb816417836612bedd796a872065bba9a8f23840da2153046f92b */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::07bcf506555fb816417836612bedd796a872065bba9a8f23840da2153046f92b').',
									/* operation::8bf80e4c6873da2abd32440909f6ba9510311791624b30f85debfd794bd36b48 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::8bf80e4c6873da2abd32440909f6ba9510311791624b30f85debfd794bd36b48').',
									/* operation::8e2b9bbb438642e40e69c07228f3c7796aa1cf07523a61d852877ad1f9e50056 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::8e2b9bbb438642e40e69c07228f3c7796aa1cf07523a61d852877ad1f9e50056').',
									/* operation::8fe84fa5f17d902eb0d8e68c8426f71dc9f58b1cd50747ebaa20f6f915d9de75 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::8fe84fa5f17d902eb0d8e68c8426f71dc9f58b1cd50747ebaa20f6f915d9de75').',
									/* operation::8oS4CA4y */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END) AS '.qi('operation::8oS4CA4y').',
									/* operation::9dab5326cadbd2dd37bf6b3645c0f8df1e03c67e35c696e8224514b511886671 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::9dab5326cadbd2dd37bf6b3645c0f8df1e03c67e35c696e8224514b511886671').',
									/* operation::9f33e2c16c6eeb1a01a6a5b169ceee6481bf4ef3273fe0ad098f1e1dccb1493c */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::9f33e2c16c6eeb1a01a6a5b169ceee6481bf4ef3273fe0ad098f1e1dccb1493c').',
									/* operation::31b6950bd71930cd7719d3e71cccf6ddbf127cd1f2da8d91e4208d6807d4dd67 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::31b6950bd71930cd7719d3e71cccf6ddbf127cd1f2da8d91e4208d6807d4dd67').',
									/* operation::42dfa054f53a8dc5f15e9f7b8c2fee6620a94ffa9a7da7b144d50c77ad0a2158 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::42dfa054f53a8dc5f15e9f7b8c2fee6620a94ffa9a7da7b144d50c77ad0a2158').',
									/* operation::51bf515f5b56b5b667829470e51cf0abf57b68acd927b4a9369cd53f8e1cf97c */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::51bf515f5b56b5b667829470e51cf0abf57b68acd927b4a9369cd53f8e1cf97c').',
									/* operation::52c734b9bf1f2e72cdbf8d8e4d203fb6be46c1d5bb09524bd662ce4bfe219871 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::52c734b9bf1f2e72cdbf8d8e4d203fb6be46c1d5bb09524bd662ce4bfe219871').',
									/* operation::059ccb47f40b24c45d09e88ece29a717c38c53cdd6bbd308d35ca3d6d7e6fbff */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::059ccb47f40b24c45d09e88ece29a717c38c53cdd6bbd308d35ca3d6d7e6fbff').',
									/* operation::62db987005c84afa05d4e60a19eddbc05c70f0b14a79a39869eb0f6bb72116b1 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::62db987005c84afa05d4e60a19eddbc05c70f0b14a79a39869eb0f6bb72116b1').',
									/* operation::66e348f9938f1dff0cde235c85dff7c2ab436eeb003b37f79a812d4ccdb683be */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::66e348f9938f1dff0cde235c85dff7c2ab436eeb003b37f79a812d4ccdb683be').',
									/* operation::67e9f725ec4a6f135f76042f5f1eaa32b789d75ae0289218864f16d148c506a0 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::67e9f725ec4a6f135f76042f5f1eaa32b789d75ae0289218864f16d148c506a0').',
									/* operation::80b16ab9cc059ddecc533d3e0e617bcc21290674c245dffb10d7edde0c258328 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::80b16ab9cc059ddecc533d3e0e617bcc21290674c245dffb10d7edde0c258328').',
									/* operation::89b4a456e8cfffec8fa65ef60c93792f3185024ec40a42fb4ad7265bc2929a0c */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::89b4a456e8cfffec8fa65ef60c93792f3185024ec40a42fb4ad7265bc2929a0c').',
									/* operation::157b6c83f57aba598dd5d1897eae7ec49bd8d00c54f9031253a3c605f18a95c4 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::157b6c83f57aba598dd5d1897eae7ec49bd8d00c54f9031253a3c605f18a95c4').',
									/* operation::416df539433f669f8810e6f6bc344c3b6aaf9b5081bc42ec0c057ddfdfff1855 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::416df539433f669f8810e6f6bc344c3b6aaf9b5081bc42ec0c057ddfdfff1855').',
									/* operation::803fa8da37d0b2d8523d3c02d27eb771b1ca5520382a98ec19f3f05e0aa9a506 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::803fa8da37d0b2d8523d3c02d27eb771b1ca5520382a98ec19f3f05e0aa9a506').',
									/* operation::898b895c45aa4d56f28f5d25983326c9e79f413707b1a7155be0c73bfd83a008 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::898b895c45aa4d56f28f5d25983326c9e79f413707b1a7155be0c73bfd83a008').',
									/* operation::1488d33dc849cb3f7adce2029ac1e57d857add915a3588bd73b0a15673348dea */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::1488d33dc849cb3f7adce2029ac1e57d857add915a3588bd73b0a15673348dea').',
									/* operation::2644f33555f2b2904b8f60d9ab217121a0733b19271cb336c2385527606d7a81 */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::2644f33555f2b2904b8f60d9ab217121a0733b19271cb336c2385527606d7a81').',
									/* operation::3360dbb864cc4a294a9ec2692d270f1d4e14bfd22588108902d4d3c668c398a8 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::3360dbb864cc4a294a9ec2692d270f1d4e14bfd22588108902d4d3c668c398a8').',
									/* operation::76200c630cc17e886287a909feb8905edae1c0e739cb6f929f14b4378a489012 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::76200c630cc17e886287a909feb8905edae1c0e739cb6f929f14b4378a489012').',
									/* operation::2254433c7cafb478df0c5143397d66343a2255be4462781a093fabd4f1169dab */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::2254433c7cafb478df0c5143397d66343a2255be4462781a093fabd4f1169dab').',
									/* operation::4245433963b94e42fe263d8a1930e69bfbc5004c51f62b487e8c36a7f67de65b */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::4245433963b94e42fe263d8a1930e69bfbc5004c51f62b487e8c36a7f67de65b').',
									/* operation::33622561575f96ee1a5af44522429b727692af04c60f0eeed06db618cd91e86f */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::33622561575f96ee1a5af44522429b727692af04c60f0eeed06db618cd91e86f').',
									/* operation::E71HKnkg */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::E71HKnkg').',
									/* operation::a6ee0177bb206a1fb53fb6e8f992d8cecacf99dcd79d511c788ecc36a5572dd3 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::a6ee0177bb206a1fb53fb6e8f992d8cecacf99dcd79d511c788ecc36a5572dd3').',
									/* operation::a063c166ec6fe67264d5838f4ae28d9000279c10704b0b564eb7bb6ca523edc3 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::a063c166ec6fe67264d5838f4ae28d9000279c10704b0b564eb7bb6ca523edc3').',
									/* operation::a35083dfd44fd5d689ab623e07fb63e3b52ad651601be2f9aaa4d23be9ab810a */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::a35083dfd44fd5d689ab623e07fb63e3b52ad651601be2f9aaa4d23be9ab810a').',
									/* operation::aeb39a6d45bb7e82654703d55a0d09f2dfb28be4645a42b63e732388940481d9 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::aeb39a6d45bb7e82654703d55a0d09f2dfb28be4645a42b63e732388940481d9').',
									/* operation::aknxOsQe */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AS '.qi('operation::aknxOsQe').',
									/* operation::b03e779952403f61356b7f1b4bc571994e5b205b6a9d240d3cffa7dcdb2d1e65 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::b03e779952403f61356b7f1b4bc571994e5b205b6a9d240d3cffa7dcdb2d1e65').',
									/* operation::b23f2bcb60f744e3bc726cdb01d13d73ee7b523d274d232f7a3d4e72d2f0dce7 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::b23f2bcb60f744e3bc726cdb01d13d73ee7b523d274d232f7a3d4e72d2f0dce7').',
									/* operation::bd03fdb3db8ab1cd32382734929c0cd808cfa618dfa20d273abda23ea35513b4 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::bd03fdb3db8ab1cd32382734929c0cd808cfa618dfa20d273abda23ea35513b4').',
									/* operation::bf5b70a66d1efe2bcf50d0b902544c544509c1ec747aaae7be408649287de236 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::bf5b70a66d1efe2bcf50d0b902544c544509c1ec747aaae7be408649287de236').',
									/* operation::c3b0f4943b4c44cac6173b8c74cca886f1bc134666fa470b2c91ac6a822101b8 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::c3b0f4943b4c44cac6173b8c74cca886f1bc134666fa470b2c91ac6a822101b8').',
									/* operation::c3e8cbec9269e0047c06e404422debe2a884f40ce97f3ea70404e1ec4709506b */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::c3e8cbec9269e0047c06e404422debe2a884f40ce97f3ea70404e1ec4709506b').',
									/* operation::c49a471ef93d465bc27480d02581e3c23e1498a8b66b9429797fcb08a18fbabb */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::c49a471ef93d465bc27480d02581e3c23e1498a8b66b9429797fcb08a18fbabb').',
									/* operation::c0236d211a4e66ce89f4ce05e416e1670c69e5884e7436b54bcffdee1c507cfd */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::c0236d211a4e66ce89f4ce05e416e1670c69e5884e7436b54bcffdee1c507cfd').',
									/* operation::cf779ed9165ca301c46e4284bc3a34f10789f027bb4579ae5142488c9f1105a4 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::cf779ed9165ca301c46e4284bc3a34f10789f027bb4579ae5142488c9f1105a4').',
									/* operation::create */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AND ('.\FOP\Database::quote(\FOP\User::getGruppe()).') AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::create').',
									/* operation::dac21a21d029d767160541828571586ded80f4e0d58b3cabeae47955545ec959 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::dac21a21d029d767160541828571586ded80f4e0d58b3cabeae47955545ec959').',
									/* operation::dbb74edc2335cd97ad43f19e11eee87f93243544a4055c265b6c0b7d18b66fbb */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::dbb74edc2335cd97ad43f19e11eee87f93243544a4055c265b6c0b7d18b66fbb').',
									/* operation::ddb84f1c75dd2ab00f3a67628be54f224d9b6e4d1be1bf3cde21639c1cb0cbaa */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::ddb84f1c75dd2ab00f3a67628be54f224d9b6e4d1be1bf3cde21639c1cb0cbaa').',
									/* operation::ded54537f0c80a1e87645a5d6ef427193a6d2d498b3732ed698562639e579702 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END AS '.qi('operation::ded54537f0c80a1e87645a5d6ef427193a6d2d498b3732ed698562639e579702').',
									/* operation::delete */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AND ('.\FOP\Database::quote(\FOP\User::getGruppe()).') AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::delete').',
									/* operation::e866a0187efe374ada04f6f5595dba9fba6929ce3c87669f02f445d2a05380b8 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::e866a0187efe374ada04f6f5595dba9fba6929ce3c87669f02f445d2a05380b8').',
									/* operation::e2067debc5ef2db2c8fe820802f3b8434dc5b9b99ca74235ffdc650aee76c069 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::e2067debc5ef2db2c8fe820802f3b8434dc5b9b99ca74235ffdc650aee76c069').',
									/* operation::e42771909fc7f1b541febb4639fbe94eb2d1f4cfb1ce9069fc13779caa8f53c0 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::e42771909fc7f1b541febb4639fbe94eb2d1f4cfb1ce9069fc13779caa8f53c0').',
									/* operation::edit */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AND ('.\FOP\Database::quote(\FOP\User::getGruppe()).') AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::edit').',
									/* operation::f97cfc07fe38fb37ab53e8a372a613f2008578541ed4839d4dd0cd330d246631 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::f97cfc07fe38fb37ab53e8a372a613f2008578541ed4839d4dd0cd330d246631').',
									/* operation::f749ad6f1bae97dcf0d06df22906582e04725fb867f23433243baf631cd255d3 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::f749ad6f1bae97dcf0d06df22906582e04725fb867f23433243baf631cd255d3').',
									/* operation::f75907aaa1c65bab516e95636351dafc4867a42c983fe3e55917483836903642 */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END AS '.qi('operation::f75907aaa1c65bab516e95636351dafc4867a42c983fe3e55917483836903642').',
									/* operation::fa7c8c890c23ff18ce436c6a1a88ca11ee5249b981f6382069e4e866ec9168df */ CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END AS '.qi('operation::fa7c8c890c23ff18ce436c6a1a88ca11ee5249b981f6382069e4e866ec9168df').',
									/* operation::ff615a734d71d65458e9fab8e416d8ae353042865fdc251cd799a53fe808f3cf */ '.\FOP\Database::quote(\FOP\User::getGruppe()).' AS '.qi('operation::ff615a734d71d65458e9fab8e416d8ae353042865fdc251cd799a53fe808f3cf').',
									/* operation::index */ ' . (!\FOP\User::getIsGuest() ? 1 : 0) . ' AS '.qi('operation::index').',
									/* operation::mDdHq6xV */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::mDdHq6xV').',
									/* operation::select */ '.(\FOP\User::getIsGuest() ? 'false' : 'true').' AS '.qi('operation::select').',
									/* operation::t0aG1aFV */ ('.\FOP\Database::quote(\FOP\User::getGruppe()).') AS '.qi('operation::t0aG1aFV').',
									/* operation::view */ (CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END) AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END) AS '.qi('operation::view').',
									/* ort */ '.qi('ort').' AS '.qi('ort').',
									/* password */ '.qi('password').' AS '.qi('password').',
									/* plz */ '.qi('plz').' AS '.qi('plz').',
									/* recovery_token */ '.qi('recovery_token').' AS '.qi('recovery_token').',
									/* reminderAufgabeAssignedMails */ '.qi('reminderAufgabeAssignedMails').' AS '.qi('reminderAufgabeAssignedMails').',
									/* reminderAufgabeNot_assignedMails */ '.qi('reminderAufgabeNot_assignedMails').' AS '.qi('reminderAufgabeNot_assignedMails').',
									/* reminderFop_fints_buchungForderungenMails */ '.qi('reminderFop_fints_buchungForderungenMails').' AS '.qi('reminderFop_fints_buchungForderungenMails').',
									/* reminderMitgliedForderungenMails */ '.qi('reminderMitgliedForderungenMails').' AS '.qi('reminderMitgliedForderungenMails').',
									/* reminderMitgliedMitglied-gebtagMails */ '.qi('reminderMitgliedMitglied-gebtagMails').' AS '.qi('reminderMitgliedMitglied-gebtagMails').',
									/* sepa */ '.qi('sepa').' AS '.qi('sepa').',
									/* sepaDate */ '.qi('sepaDate').' AS '.qi('sepaDate').',
									/* sepaDate::vis */ '.qi('mitglied').'.'.qi('sepa').' AS '.qi('sepaDate::vis').',
									/* strasse */ '.qi('strasse').' AS '.qi('strasse').',
									/* superadmin */ '.qi('superadmin').' AS '.qi('superadmin').',
									/* tarif */ (SELECT ('.qi('tvyml1ds').'.'.qi('tarif').') FROM '.qi('mitgliedDynamicMonthyear').' '.qi('tvyml1ds').' WHERE '.qi('tvyml1ds').'.'.qi('dynamic:parent').' = '.qi('mitglied').'.'.qi('ID').' AND (('.qi('tvyml1ds').'.'.qi('dynamic:time').') <= (' . \FOP\Database::sessionVarSQL('time') . ')) ORDER BY '.qi('tvyml1ds').'.'.qi('dynamic:time').' DESC LIMIT 1) AS '.qi('tarif').',
									/* tarif::canView */ '.qi('ref:tarif').'.'.qi('tarif:canView').' AS '.qi('tarif::canView').',
									/* tarif::description */ '.qi('ref:tarif').'.'.qi('tarif:description').' AS '.qi('tarif::description').',
									/* telefon */ '.qi('telefon').' AS '.qi('telefon').',
									/* verstorben */ '.qi('verstorben').' AS '.qi('verstorben').',
									/* vorname */ '.qi('vorname').' AS '.qi('vorname').',
									1
								FROM '.qi('mitglied').' '.qi('mitglied').'
								LEFT JOIN (SELECT '.qi('ID').' AS '.qi('tarif:ID').', '.qi('tarif').'.'.qi('name').' AS '.qi('tarif:description').', (('.\FOP\Database::quote(\FOP\User::getBuchhaltung()).')) AS '.qi('tarif:canView').' FROM '.qi('tarif').') '.qi('ref:tarif').' ON '.qi('ref:tarif').'.'.qi('tarif:ID').' = (SELECT ('.qi('tvyml1ds').'.'.qi('tarif').') FROM '.qi('mitgliedDynamicMonthyear').' '.qi('tvyml1ds').' WHERE '.qi('tvyml1ds').'.'.qi('dynamic:parent').' = '.qi('mitglied').'.'.qi('ID').' AND (('.qi('tvyml1ds').'.'.qi('dynamic:time').') <= (' . \FOP\Database::sessionVarSQL('time') . ')) ORDER BY '.qi('tvyml1ds').'.'.qi('dynamic:time').' DESC LIMIT 1)
								WHERE (((CASE WHEN '.\FOP\Database::quote(\FOP\User::getGruppe()).' THEN TRUE ELSE NOT (('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) END) AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getMitglied()).' THEN TRUE ELSE NOT ((('.qi('mitglied').'.'.qi('ID').') <> ('.\FOP\Database::sessionVarSQL('user').')) AND (NOT (EXISTS (SELECT (TRUE) FROM '.qi('gruppeItem').' '.qi('7sncgH3z').' WHERE '.qi('7sncgH3z').'.'.qi('item').' = '.qi('mitglied').'.'.qi('ID').' AND (EXISTS (SELECT (TRUE) FROM '.qi('gruppeVerantwortlich').' '.qi('eHueOsQC').' WHERE '.qi('eHueOsQC').'.'.qi('gruppe').' = '.qi('7sncgH3z').'.'.qi('list').' AND (('.qi('eHueOsQC').'.'.qi('mitglied').') = ('.\FOP\Database::sessionVarSQL('user').')) LIMIT 1)) LIMIT 1)))) END) AND (CASE WHEN '.\FOP\Database::quote(\FOP\User::getSuperadmin()).' THEN TRUE ELSE NOT ('.qi('mitglied').'.'.qi('superadmin').') END)))
									AND (' . (isset($_GET['select']) && $_GET['select'] == 'mitglied' ? 'TRUE' : 'TRUE') . ')
									AND (' . (isset($_GET['select']) && $_GET['select'] == 'mitgliedNull' ? 'TRUE' : 'TRUE') . ')
									AND (' . (isset($_GET['select']) && $_GET['select'] == 'mitgliedNullDMS' ? 'TRUE' : 'TRUE') . ')
									AND (' . (isset($_GET['select']) && $_GET['select'] == 'mitgliedNullAssigned' ? 'TRUE' : 'TRUE') . ')) AS t
		WHERE ' . (isset($params['range_min_mitglied_forderungen']) ? ($params['range_min_mitglied_forderungen'] !== '' && is_numeric($params['range_min_mitglied_forderungen']) ? 't.'.qi('forderungen').' >= ' . \FOP\Database::quote($params['range_min_mitglied_forderungen']) . ' AND ' : '') : '') . 
		(isset($params['range_min_mitglied_sepaDate']) ? ($params['range_min_mitglied_sepaDate'] !== '' && is_numeric($params['range_min_mitglied_sepaDate']) ? 't.'.qi('sepaDate').' >= ' . \FOP\Database::quote($params['range_min_mitglied_sepaDate']) . ' AND ' : '') : '') . 
		(isset($params['range_min_mitglied_geburtsdatum']) ? ($params['range_min_mitglied_geburtsdatum'] !== '' && is_numeric($params['range_min_mitglied_geburtsdatum']) ? 't.'.qi('geburtsdatum').' >= ' . \FOP\Database::quote($params['range_min_mitglied_geburtsdatum']) . ' AND ' : '') : '') . 
		(isset($params['range_min_mitglied_eintritt']) ? ($params['range_min_mitglied_eintritt'] !== '' && is_numeric($params['range_min_mitglied_eintritt']) ? 't.'.qi('eintritt').' >= ' . \FOP\Database::quote($params['range_min_mitglied_eintritt']) . ' AND ' : '') : '') . 
		(isset($params['range_min_mitglied_austrittsdatum']) ? ($params['range_min_mitglied_austrittsdatum'] !== '' && is_numeric($params['range_min_mitglied_austrittsdatum']) ? 't.'.qi('austrittsdatum').' >= ' . \FOP\Database::quote($params['range_min_mitglied_austrittsdatum']) . ' AND ' : '') : '') . 
		(isset($params['range_min_mitglied_verstorben']) ? ($params['range_min_mitglied_verstorben'] !== '' && is_numeric($params['range_min_mitglied_verstorben']) ? 't.'.qi('verstorben').' >= ' . \FOP\Database::quote($params['range_min_mitglied_verstorben']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_forderungen']) ? ($params['range_max_mitglied_forderungen'] !== '' && is_numeric($params['range_max_mitglied_forderungen']) ? 't.'.qi('forderungen').' <= ' . \FOP\Database::quote($params['range_max_mitglied_forderungen']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_sepaDate']) ? ($params['range_max_mitglied_sepaDate'] !== '' && is_numeric($params['range_max_mitglied_sepaDate']) ? 't.'.qi('sepaDate').' <= ' . \FOP\Database::quote($params['range_max_mitglied_sepaDate']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_geburtsdatum']) ? ($params['range_max_mitglied_geburtsdatum'] !== '' && is_numeric($params['range_max_mitglied_geburtsdatum']) ? 't.'.qi('geburtsdatum').' <= ' . \FOP\Database::quote($params['range_max_mitglied_geburtsdatum']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_eintritt']) ? ($params['range_max_mitglied_eintritt'] !== '' && is_numeric($params['range_max_mitglied_eintritt']) ? 't.'.qi('eintritt').' <= ' . \FOP\Database::quote($params['range_max_mitglied_eintritt']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_austrittsdatum']) ? ($params['range_max_mitglied_austrittsdatum'] !== '' && is_numeric($params['range_max_mitglied_austrittsdatum']) ? 't.'.qi('austrittsdatum').' <= ' . \FOP\Database::quote($params['range_max_mitglied_austrittsdatum']) . ' AND ' : '') : '') . 
		(isset($params['range_max_mitglied_verstorben']) ? ($params['range_max_mitglied_verstorben'] !== '' && is_numeric($params['range_max_mitglied_verstorben']) ? 't.'.qi('verstorben').' <= ' . \FOP\Database::quote($params['range_max_mitglied_verstorben']) . ' AND ' : '') : '') . 
		(isset($params['filter_mitglied_forderungen']) ? ($params['filter_mitglied_forderungen'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_forderungen']))->toSQL('t.'.qi('forderungen').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_sepa']) ? ($params['filter_mitglied_sepa'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_sepa']))->toSQL('t.'.qi('sepa').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_sepaDate']) ? ($params['filter_mitglied_sepaDate'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_sepaDate']))->toSQL('t.'.qi('sepaDate').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_superadmin']) ? ($params['filter_mitglied_superadmin'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_superadmin']))->toSQL('t.'.qi('superadmin').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_name']) ? ($params['filter_mitglied_name'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_name']))->toSQL('t.'.qi('name').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_vorname']) ? ($params['filter_mitglied_vorname'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_vorname']))->toSQL('t.'.qi('vorname').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_geschlecht']) ? ($params['filter_mitglied_geschlecht'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_geschlecht']))->toSQL('t.'.qi('geschlecht').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_datenschutz']) ? ($params['filter_mitglied_datenschutz'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_datenschutz']))->toSQL('t.'.qi('datenschutz').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_geburtsdatum']) ? ($params['filter_mitglied_geburtsdatum'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_geburtsdatum']))->toSQL('t.'.qi('geburtsdatum').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_land']) ? ($params['filter_mitglied_land'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_land']))->toSQL('t.'.qi('land').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_plz']) ? ($params['filter_mitglied_plz'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_plz']))->toSQL('t.'.qi('plz').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_ort']) ? ($params['filter_mitglied_ort'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_ort']))->toSQL('t.'.qi('ort').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_strasse']) ? ($params['filter_mitglied_strasse'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_strasse']))->toSQL('t.'.qi('strasse').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_eintritt']) ? ($params['filter_mitglied_eintritt'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_eintritt']))->toSQL('t.'.qi('eintritt').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_email']) ? ($params['filter_mitglied_email'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_email']))->toSQL('t.'.qi('email').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_email2']) ? ($params['filter_mitglied_email2'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_email2']))->toSQL('t.'.qi('email2').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_telefon']) ? ($params['filter_mitglied_telefon'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_telefon']))->toSQL('t.'.qi('telefon').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_mobil']) ? ($params['filter_mitglied_mobil'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_mobil']))->toSQL('t.'.qi('mobil').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_mnr']) ? ($params['filter_mitglied_mnr'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_mnr']))->toSQL('t.'.qi('mnr').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_austrittsdatum']) ? ($params['filter_mitglied_austrittsdatum'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_austrittsdatum']))->toSQL('t.'.qi('austrittsdatum').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_austrittsgrund']) ? ($params['filter_mitglied_austrittsgrund'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_austrittsgrund']))->toSQL('t.'.qi('austrittsgrund').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_verstorben']) ? ($params['filter_mitglied_verstorben'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_verstorben']))->toSQL('t.'.qi('verstorben').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_notiz']) ? ($params['filter_mitglied_notiz'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_notiz']))->toSQL('t.'.qi('notiz').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_iban']) ? ($params['filter_mitglied_iban'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_iban']))->toSQL('t.'.qi('iban').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_bic']) ? ($params['filter_mitglied_bic'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_bic']))->toSQL('t.'.qi('bic').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_password']) ? ($params['filter_mitglied_password'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_password']))->toSQL('t.'.qi('password').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canAdmin']) ? ($params['filter_mitglied_canAdmin'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canAdmin']))->toSQL('t.'.qi('canAdmin').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canMitglied']) ? ($params['filter_mitglied_canMitglied'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canMitglied']))->toSQL('t.'.qi('canMitglied').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canGruppe']) ? ($params['filter_mitglied_canGruppe'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canGruppe']))->toSQL('t.'.qi('canGruppe').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canCampaign']) ? ($params['filter_mitglied_canCampaign'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canCampaign']))->toSQL('t.'.qi('canCampaign').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canSammlung']) ? ($params['filter_mitglied_canSammlung'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canSammlung']))->toSQL('t.'.qi('canSammlung').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canBuchhaltung']) ? ($params['filter_mitglied_canBuchhaltung'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canBuchhaltung']))->toSQL('t.'.qi('canBuchhaltung').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canProtokoll']) ? ($params['filter_mitglied_canProtokoll'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canProtokoll']))->toSQL('t.'.qi('canProtokoll').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_canDokument']) ? ($params['filter_mitglied_canDokument'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_canDokument']))->toSQL('t.'.qi('canDokument').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_tarif']) ? ($params['filter_mitglied_tarif'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_tarif']))->toSQL('t.'.qi('tarif').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_reminderMitgliedMitglied-gebtagMails']) ? ($params['filter_mitglied_reminderMitgliedMitglied-gebtagMails'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_reminderMitgliedMitglied-gebtagMails']))->toSQL('t.'.qi('reminderMitgliedMitglied-gebtagMails').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_reminderMitgliedForderungenMails']) ? ($params['filter_mitglied_reminderMitgliedForderungenMails'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_reminderMitgliedForderungenMails']))->toSQL('t.'.qi('reminderMitgliedForderungenMails').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_reminderFop_fints_buchungForderungenMails']) ? ($params['filter_mitglied_reminderFop_fints_buchungForderungenMails'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_reminderFop_fints_buchungForderungenMails']))->toSQL('t.'.qi('reminderFop_fints_buchungForderungenMails').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_reminderAufgabeAssignedMails']) ? ($params['filter_mitglied_reminderAufgabeAssignedMails'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_reminderAufgabeAssignedMails']))->toSQL('t.'.qi('reminderAufgabeAssignedMails').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_reminderAufgabeNot_assignedMails']) ? ($params['filter_mitglied_reminderAufgabeNot_assignedMails'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_reminderAufgabeNot_assignedMails']))->toSQL('t.'.qi('reminderAufgabeNot_assignedMails').'') . ') AND ') : '') : '') . 
		(isset($params['filter_mitglied_ID']) ? ($params['filter_mitglied_ID'] !== '' ? ('(' . (new \FOP\IDList($params['filter_mitglied_ID']))->toSQL('t.'.qi('ID').'') . ') AND ') : '') : '') . 
		(isset($params['search_mitglied_name']) ? 't.'.qi('name').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_name'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_vorname']) ? 't.'.qi('vorname').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_vorname'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_land']) ? 't.'.qi('land').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_land'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_plz']) ? 't.'.qi('plz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_plz'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_ort']) ? 't.'.qi('ort').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_ort'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_strasse']) ? 't.'.qi('strasse').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_strasse'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_email']) ? 't.'.qi('email').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_email'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_email2']) ? 't.'.qi('email2').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_email2'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_telefon']) ? 't.'.qi('telefon').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_telefon'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_mobil']) ? 't.'.qi('mobil').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_mobil'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_mnr']) ? 't.'.qi('mnr').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_mnr'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_austrittsgrund']) ? 't.'.qi('austrittsgrund').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_austrittsgrund'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_notiz']) ? 't.'.qi('notiz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_notiz'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_iban']) ? 't.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_iban'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied_bic']) ? 't.'.qi('bic').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied_bic'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_name']) ? 'NOT t.'.qi('name').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_name'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_vorname']) ? 'NOT t.'.qi('vorname').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_vorname'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_land']) ? 'NOT t.'.qi('land').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_land'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_plz']) ? 'NOT t.'.qi('plz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_plz'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_ort']) ? 'NOT t.'.qi('ort').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_ort'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_strasse']) ? 'NOT t.'.qi('strasse').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_strasse'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_email']) ? 'NOT t.'.qi('email').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_email'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_email2']) ? 'NOT t.'.qi('email2').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_email2'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_telefon']) ? 'NOT t.'.qi('telefon').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_telefon'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_mobil']) ? 'NOT t.'.qi('mobil').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_mobil'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_mnr']) ? 'NOT t.'.qi('mnr').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_mnr'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_austrittsgrund']) ? 'NOT t.'.qi('austrittsgrund').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_austrittsgrund'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_notiz']) ? 'NOT t.'.qi('notiz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_notiz'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_iban']) ? 'NOT t.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_iban'] . '%') . ' AND ' : '') . 
		(isset($params['searchnot_mitglied_bic']) ? 'NOT t.'.qi('bic').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_mitglied_bic'] . '%') . ' AND ' : '') . 
		(isset($params['search_mitglied']) ? '(' . 't.'.qi('name').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('vorname').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('land').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('plz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('ort').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('strasse').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('email').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('email2').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('telefon').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('mobil').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('mnr').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('austrittsgrund').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('notiz').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('iban').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ' OR ' . 't.'.qi('bic').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_mitglied'] . '%') . ') AND ' : '') . 
		 '1
		GROUP BY t.'.qi('geschlecht').'
		) AS t
								WHERE ' . (isset($params['range_min_aggMitgliedGeschlecht__count']) ? ($params['range_min_aggMitgliedGeschlecht__count'] !== '' && is_numeric($params['range_min_aggMitgliedGeschlecht__count']) ? 't.'.qi('_count').' >= ' . \FOP\Database::quote($params['range_min_aggMitgliedGeschlecht__count']) . ' AND ' : '') : '') . 
								(isset($params['range_min_aggMitgliedGeschlecht__count_percent']) ? ($params['range_min_aggMitgliedGeschlecht__count_percent'] !== '' && is_numeric($params['range_min_aggMitgliedGeschlecht__count_percent']) ? 't.'.qi('_count_percent').' >= ' . \FOP\Database::quote($params['range_min_aggMitgliedGeschlecht__count_percent']) . ' AND ' : '') : '') . 
								(isset($params['range_max_aggMitgliedGeschlecht__count']) ? ($params['range_max_aggMitgliedGeschlecht__count'] !== '' && is_numeric($params['range_max_aggMitgliedGeschlecht__count']) ? 't.'.qi('_count').' <= ' . \FOP\Database::quote($params['range_max_aggMitgliedGeschlecht__count']) . ' AND ' : '') : '') . 
								(isset($params['range_max_aggMitgliedGeschlecht__count_percent']) ? ($params['range_max_aggMitgliedGeschlecht__count_percent'] !== '' && is_numeric($params['range_max_aggMitgliedGeschlecht__count_percent']) ? 't.'.qi('_count_percent').' <= ' . \FOP\Database::quote($params['range_max_aggMitgliedGeschlecht__count_percent']) . ' AND ' : '') : '') . 
								(isset($params['filter_aggMitgliedGeschlecht__count']) ? ($params['filter_aggMitgliedGeschlecht__count'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aggMitgliedGeschlecht__count']))->toSQL('t.'.qi('_count').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aggMitgliedGeschlecht__count_percent']) ? ($params['filter_aggMitgliedGeschlecht__count_percent'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aggMitgliedGeschlecht__count_percent']))->toSQL('t.'.qi('_count_percent').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aggMitgliedGeschlecht_geschlecht']) ? ($params['filter_aggMitgliedGeschlecht_geschlecht'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aggMitgliedGeschlecht_geschlecht']))->toSQL('t.'.qi('geschlecht').'') . ') AND ') : '') : '') . 
								'
								 TRUE ';
								return $sql;
	
    
  }

  public static function getidsAction($col) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
			$q = \FOP\Database::query('SELECT t.'.qi($col).' '.self::getSQL($_GET));
			$result = new \FOP\IDList();
			while ($item = $q->fetchColumn()) {
				$result->push($item);
			}
			die($result->toString());

    
  }

  public static function permissionsAction($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		$ids = new \FOP\IDList($id);
		header('Content-Type: application/json');
		
		return $perms;
	
    
  }

  public static function getData($sqladdon, $params, $stream = false ) { 
    
    
    // --- BLOCK: main ---
    
								$sql = self::getSQL($params);

								$order = (\FOP\Util::array_value(array(
									'_count ASC' => 'ORDER BY t.'.qi('_count').' ASC',
									'_count_percent ASC' => 'ORDER BY t.'.qi('_count_percent').' ASC',
									'_count DESC' => 'ORDER BY t.'.qi('_count').' DESC',
									'_count_percent DESC' => 'ORDER BY t.'.qi('_count_percent').' DESC',
									'' => ''), isset($params['sort_aggMitgliedGeschlecht']) ? $params['sort_aggMitgliedGeschlecht'] : '') ?: 'ORDER BY '.qi('t').'.'.qi('_count').' DESC');
								// wenn sqladdon bereits ein ORDER enthält, kein order aufbauen
								if (strpos($sqladdon, 'ORDER') !== false) {
									$order = '';
								}
								if ($stream) {
									// als Stream (währenddessen darf keine weitere SQL-Query laufen) für große Datenmengen und Statistiken
									$result = (function () use ($sql, $order, $sqladdon) {
										$stream = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
										while ($item = $stream->fetch(\PDO::FETCH_ASSOC)) {
											$item['_count'] = \Types\Integer::unpack($item['_count']);
											$item['_count_percent'] = \Types\Percent2::unpack($item['_count_percent']);
											$item['geschlecht'] = \FOP\Util::IntStringNull($item['geschlecht']);
											
											yield $item;
										}
									})();
								} else {
									// als RAM-Array
									$result = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
									$arr = $result->fetchAll(\PDO::FETCH_ASSOC);
									$itemcount = count($arr);

									foreach($arr as $i => &$item){
										$item['_count'] = \Types\Integer::unpack($item['_count']);
										$item['_count_percent'] = \Types\Percent2::unpack($item['_count_percent']);
										$item['geschlecht'] = \FOP\Util::IntStringNull($item['geschlecht']);
										
									}
									unset($item);

									$result = ["items" => $arr, "itemcount" => $itemcount];

									
										$result['aggregate'] = \FOP\Database::query('SELECT COUNT(*) AS '.qi('::cnt').', SUM(t.'.qi('_count').') AS '.qi('_count').', SUM(t.'.qi('_count_percent').') AS '.qi('_count_percent').' ' . $sql)->fetch(\PDO::FETCH_ASSOC);
										$result['aggregate']['_count'] = \Types\Integer::unpack($result['aggregate']['_count']);$result['aggregate']['_count_percent'] = \Types\Percent2::unpack($result['aggregate']['_count_percent']);
										
									
								}

								return $result;
	
    
  }

  public static function getFilterHTML($params, $delimiter = ', ' , $showButton = true ) { 
    
    
    // --- BLOCK: main ---
    
		// Contract: ist showButton == false, sollten keine HTML-Tags im Output enthalten sein (Verwendung in Dateinamen!!)
		$filters = [];
		
	if (isset($params['range_min_aggMitgliedGeschlecht__count']) && isset($params['range_max_aggMitgliedGeschlecht__count'])) {
		array_push($filters, _('count') . ': ' . (\Types\Integer::print($params['range_min_aggMitgliedGeschlecht__count'])
	) . ' ' . _('filters_between') . ' ' . (\Types\Integer::print($params['range_max_aggMitgliedGeschlecht__count'])
	));
	} else if (isset($params['range_min_aggMitgliedGeschlecht__count'])) {
		array_push($filters, _('count') . ': ' . _('filters_from') . ' ' . (\Types\Integer::print($params['range_min_aggMitgliedGeschlecht__count'])
	));
	} else if (isset($params['range_max_aggMitgliedGeschlecht__count'])) {
		array_push($filters, _('count') . ': ' . _('filters_to') . ' ' . (\Types\Integer::print($params['range_max_aggMitgliedGeschlecht__count'])
	));
	}
	if (isset($params['range_min_aggMitgliedGeschlecht__count_percent']) && isset($params['range_max_aggMitgliedGeschlecht__count_percent'])) {
		array_push($filters, _('count-%') . ': ' . (\Types\Percent2::print($params['range_min_aggMitgliedGeschlecht__count_percent']) .  ' %'
	) . ' ' . _('filters_between') . ' ' . (\Types\Percent2::print($params['range_max_aggMitgliedGeschlecht__count_percent']) .  ' %'
	));
	} else if (isset($params['range_min_aggMitgliedGeschlecht__count_percent'])) {
		array_push($filters, _('count-%') . ': ' . _('filters_from') . ' ' . (\Types\Percent2::print($params['range_min_aggMitgliedGeschlecht__count_percent']) .  ' %'
	));
	} else if (isset($params['range_max_aggMitgliedGeschlecht__count_percent'])) {
		array_push($filters, _('count-%') . ': ' . _('filters_to') . ' ' . (\Types\Percent2::print($params['range_max_aggMitgliedGeschlecht__count_percent']) .  ' %'
	));
	}if (isset($params['filter_aggMitgliedGeschlecht__count'])) {
		if ($params['filter_aggMitgliedGeschlecht__count'] == '_null') {
			array_push($filters, _('count') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aggMitgliedGeschlecht__count']))->all() AS $val) {
				$value = \Types\Integer::print($val)
	;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('count') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aggMitgliedGeschlecht__count_percent'])) {
		if ($params['filter_aggMitgliedGeschlecht__count_percent'] == '_null') {
			array_push($filters, _('count-%') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aggMitgliedGeschlecht__count_percent']))->all() AS $val) {
				$value = \Types\Percent2::print($val) .  ' %'
	;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('count-%') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aggMitgliedGeschlecht_geschlecht'])) {
		if ($params['filter_aggMitgliedGeschlecht_geschlecht'] == '_null') {
			array_push($filters, _('Geschlecht') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aggMitgliedGeschlecht_geschlecht']))->all() AS $val) {
				$value = \Types\Geschlechtstyp::toString($val);
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Geschlecht') . ': ' . implode(', ', $values));
		}
	}
		if (count($filters)) {
			$result = implode($delimiter, array_map(function ($filter) {
				if (is_array($filter)) {
					return implode('', $filter);
				}
				return htmlentities($filter);
			}, $filters))
			// Button, um Filter zu entfernen
			. ($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="for (var q in query) {if (q.includes(\'_aggMitgliedGeschlecht_\')) delete query[q];} reloadaggMitgliedGeschlecht(); ">clear</i>' : '');
		} else {
			$result = _('no_filter');
		}
		return $result . ' + ' . \DataView\Mitglied::getFilterHTML($params, $delimiter, $showButton);
	
    
  }

  public static function openAction($fop_table, $fop_id, $fop_from) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    

die();
    
  }

  public static function stepAction($tbl, $id, $step) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
	$dv = \FOP\Session::getPayload('dv-'.$tbl);
	$url = $dv['from'];
	$parts = parse_url($url);
	parse_str($parts['query'], $query);
	$data = self::getData('', $query);
	$col = $dv['idcol'];
	$ids = array_map(function ($x) use ($col) {return $x[$col];}, $data['items']);
	if (!count($ids)) {
		header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])));
		die();
	}
	$idx = array_search($id, $ids);
	$idx += count($ids) + $step;
	$idx = $idx % count($ids);
	header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])) . '/view?id=' . urlencode($ids[$idx]));
	die();

    
  }


  
  

  
  
}



