{assign var="do_not_display_add" value=true}
<form method=GET>
	<input type="hidden" name="action" value="query" />
	<table width="100%" bgcolor="Gray">
		<tr>
			<td>
				<select name="op1" class="list_form" />
					{html_options options=$options selected=$op1}
				</select>
			</td>
			<td>
				<input type="text" name="op1v" value="{$op1v}" class="input_form" />
			</td>
			<td>
				<select name="op2" class="list_form" />
					{html_options options=$options selected=$op2}
				</select>
			</td>
			<td>
				<input type="text" name="op2v" value="{$op2v}" class="input_form" />
			</td>
		</tr>
		<tr>
			<td>
				<select name="op3" class="list_form" />
					{html_options options=$options selected=$op3}
				</select>
			</td>
			<td>
				<input type="text" name="op3v" value="{$op3v}" class="input_form" />
			</td>
			<td>
				<select name="op4" class="list_form" />
					{html_options options=$options selected=$op4}
				</select>
			</td>
			<td>
				<input type="text" name="op4v" value="{$op4v}" class="input_form" />
			</td>
		</tr>
		<tr>
			<td><b>Geschlecht</b></td>
			<td>
				<select name="geschlecht" class="list_form" />
					<option value="-1" {if $geschlecht == -1}>egal{/if}</option>
					<option value="m" {if $geschlecht == "m"}selected{/if}>Männlich</option>
					<option value="w" {if $geschlecht == "w"}selected{/if}>Weiblich</option>
				</select>
			</td>
			<td><b>Volk</b></td>
			<td> 
				<select name="volk" class="list_form" />
					{html_options options=$voelker selected=$volk}
				</select>
			</td>
		</tr>
		<tr>
			<td><b>Charakterstatus</b></td>
			<td>
				<select name="aktiviert" class="list_form" />
					<option value="-1" {if $aktiviert == -1}selected{/if}>egal</option>
					<option value="0" {if $aktiviert == 0}selected{/if}>freizuschaltend</option>
					<option value="1" {if $aktiviert == 1}selected{/if}>aktiviert</option>
					<option value="2" {if $aktiviert == 2}selected{/if}>zurückgestellt</option>
					<option value="3" {if $aktiviert == 3}selected{/if}>nur gespeichert</option>
					<option value="9" {if $aktiviert == 9}selected{/if}>gelöscht</option>
				</select>
			</td>
			<td><b>Server</b></td>
			<td>
				<select name="testserver" class="list_form" />
					<option value="0" {if $testserver == 0}selected{/if}>Live</option>
					<option value="1" {if $testserver == 1}selected{/if}>Testserver</option>
					{if $user->rank >= 5}{/if}<option value="2" {if $testserver == 2}selected{/if}>Bauserver</option>
				</select>
			</td>
		</tr>
		<tr>
			<td><b>Typ</b></td>
			<td>
				<select name="chartype" class="list_form" />
					<option value="0"{if $chartype == ""}selected{/if}>egal</option>
					<option value="player" {if $chartype == "player"}selected{/if}>Player</option>
					{if $canQuestchars === true}<option value="quest" {if $chartype == "quest"}selected{/if}>Quest</option>{/if}
					<option value="staff" {if $chartype == "staff"}selected{/if}>Staff</option>
				</select>
			</td>
			<td><b>Anzahl pro Seite</b></td>
			<td>
				<select name="records" class="list_form" />
					<option value="25" {if $records == 25}selected{/if}>25</option>
					<option value="50" {if $records == 50}selected{/if}>50</option>
					<option value="100"{if $records == 100}selected{/if}>100</option>
					<option value="250"{if $records == 250}selected{/if}>250</option>
				</select>
			</td>
		</tr>
		<tr>
			<td><b>Hat Profession</b></td>
			<td>
				<select name="hatProfession" class="list_form" />
					{html_options options=$professionen selected=$hatProfession}
				</select>
			</td>
			<td><b>Sortierung</b></td>
			<td>
				<select name="sort" class="list_form" />
					{html_options options=$sortDropdown selected=$sort}
				</select>
			</td>
		</tr>
		<tr>
			<td colspan="4">
				<input type="submit" name="Suchen" value="Suchen"/>
				<input type="submit" name="Maske leeren" value="Maske leeren" />
			</td>
		</tr>
	</table>
</form>
<p>{$msg}</p>
{if $count}
	<p>Es wurden {$count} Chars gefunden.</p>
	<p>{$browse}</p>
	{if $canActivate===true && $mv === true}
		<form method="POST">
		<input type="hidden" name="mvc" value="true">
	{/if}
	<table width="100%">
		<tr style="background-color: {$style.bg_2}">
			<td>ID</td>
			<td>Name</td>
			<td nowrap>G</td>
			<td>St.</td>
			<td>T</td>
			<td>S</td>
			<td>Typ</td>
			<td nowrap>AccountID (Name)</td>
			<td>AP</td>
			<td width="100%">&nbsp;</td>
		</tr>
		{foreach from=$chars item=char}
		<tr style="background-color: {$style.bg_1}">
			<td>{$char.charid}</td>
			<td nowrap><a href="charinfo.php?charid={$char.charid}">{$char.name}</a></td>
			<td>{$char.geschlecht}</td>
			<td>{$char.level}</td>
			<td>{if $char.testserver == 1}X{else}&nbsp;{/if}</td>
			<td>{if $char.aktiviert == 0}F{elseif $char.aktiviert == 1}A{elseif $char.aktiviert == 2}Z{elseif $char.aktiviert == 9}G{/if}</td>
			<td>{$char.chartype}</td>
			<td><a href="?action=query&op3=accountid&op3v={$char.accountid}{if $testserver == 1}&testserver=1{/if}">{$char.accountid}</a> (<a href="accounts_admin.php?edit_account={$char.accountid}">{$char.accountname}</a>)</td>
			<td>{$char.vergebene_ausbilderpunkte}</td>
			<td width="100%" nowrap>{if $char.aktiviert!=9 && $canAdministrate===true}<!--bearbeiten-->{if ($char.aktiviert != 9 && $canAdministrate===true) || ($canQuestchars && $char.chartype == 'quest')} | <a href="char.php?action=delete&charid={$char.charid}">löschen</a>{/if}{if $canActivate === true && $char.aktiviert==0} | <a href="char_activation.php?action=char_view&charid={$char.charid}">freischalten</a>{/if}{if $char.aktiviert == 1}<!-- | jailen-->{/if}{/if}
				{if $canActivate===true && $mv === true}<input type="checkbox" name="midslist_{$char.name}" value="{$char.name}" />{/if}
			</td>
		</tr>
		{/foreach}
	</table>
	{if $canActivate===true && $mv === true}
	<input type="submit" value="Massen-Eintrag bei verbotenen Namen ausführen!" />&nbsp;&nbsp;<input type="reset" />
	</form>{/if}
<p>T(estserver); S(tatus): A(ktiviert), G(elöscht), F(reizuschaltend), Z(urückgestellt)</p>
<p>{$browse}</p>
{else}Es wurden (noch) keine Chars gefunden!{/if}