{assign var="page_title" value="Logs durchsuchen"}
{assign var="page_title_long" value="Mitglieder Bereich &raquo; Logs durchsuchen"}
{assign var="page_title_site" value="Logs durchsuchen"}

<b>Information:</b> Leere Felder werden nicht beachtet.<br />
<br />

{form_errors error_list=$form_errors}

<form method="post" action="logs.php">
    <input type="hidden" name="sid" value="{$SID_SHORT}" />
    <table>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Char-ID</b></td>
            <td bgcolor="{$style.bg_a}"><input type="text" name="charid" size="10" maxlength="5" class="input_form" value="{$formvalues.charid}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Char-Namen</b></td>
            <td bgcolor="{$style.bg_b}">
           		<input type="text" name="charnames" maxlength="30" class="input_form" value="{$formvalues.charnames}" />
           		<small>(Mehrere Namen per Komma trennen)</small>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Account-ID</b></td>
            <td bgcolor="{$style.bg_a}">
            	<input type="text" name="accountid_log" size="10" maxlength="5" class="input_form" value="{$formvalues.accountid_log}" />
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Account-Namen</b></td>
            <td bgcolor="{$style.bg_b}">
            	<input type="text" name="accountnames" maxlength="30" class="input_form" value="{$formvalues.accountnames}" />
            	<small>(Mehrere Namen per Komma trennen)</small>
            </td>
        </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>X min/max</b></td>
	        <td bgcolor="{$style.bg_a}">
				<input type="text" name="x_min" size="3" maxlength="5" class="input_form" value="{$formvalues.kl_min}" />
				-
				<input type="text" name="x_max" size="3" maxlength="5" class="input_form" value="{$formvalues.kl_max}" />
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Y min/max</b></td>
	        <td bgcolor="{$style.bg_b}">
				<input type="text" name="y_min" size="3" maxlength="5" class="input_form" value="{$formvalues.kl_min}" />
				-
				<input type="text" name="y_max" size="3" maxlength="5" class="input_form" value="{$formvalues.kl_max}" />
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Z min/max</b></td>
	        <td bgcolor="{$style.bg_a}">
				<input type="text" name="z_min" size="3" maxlength="6" class="input_form" value="{$formvalues.kl_min}" />
				-
				<input type="text" name="z_max" size="3" maxlength="6" class="input_form" value="{$formvalues.kl_max}" />
	        </td>
	    </tr>
	    
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Min Zeit</b></td>
	        <td bgcolor="{$style.bg_b}">
	        	Datum: 
	        	<input type="text" name="time_min_day" size="2" maxlength="2" class="input_form" value="{$formvalues.time_min_day}" />
				.
				<input type="text" name="time_min_month" size="2" maxlength="2" class="input_form" value="{$formvalues.time_min_month}" />
				.
				<input type="text" name="time_min_year" size="4" maxlength="4" class="input_form" value="{$formvalues.time_min_year}" />
	        	Zeit:
	        	<input type="text" name="time_min_hour" size="2" maxlength="2" class="input_form" value="{$formvalues.time_min_hour}" />
				:
				<input type="text" name="time_min_minute" size="2" maxlength="2" class="input_form" value="{$formvalues.time_min_minute}" />
				:
				<input type="text" name="time_min_second" size="2" maxlength="2" class="input_form" value="{$formvalues.time_min_second}" />
			</td>
	    </tr>
	    
	     <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Max Zeit</b></td>
	        <td bgcolor="{$style.bg_a}">
	        	Datum: 
	        	<input type="text" name="time_max_day" size="2" maxlength="2" class="input_form" value="{$formvalues.time_max_day}" />
				.
				<input type="text" name="time_max_month" size="2" maxlength="2" class="input_form" value="{$formvalues.time_max_month}" />
				.
				<input type="text" name="time_max_year" size="4" maxlength="4" class="input_form" value="{$formvalues.time_max_year}" />
	        	Zeit:
	        	<input type="text" name="time_max_hour" size="2" maxlength="2" class="input_form" value="{$formvalues.time_max_hour}" />
				:
				<input type="text" name="time_max_minute" size="2" maxlength="2" class="input_form" value="{$formvalues.time_max_minute}" />
				:
				<input type="text" name="time_max_second" size="2" maxlength="2" class="input_form" value="{$formvalues.time_max_second}" />
			</td>
	    </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Logging-Service:</b></td>
            <td bgcolor="{$style.bg_b}">
            	<select name="service" class="list_form">
                    <option value="">Egal</option>
            		<option value="irc"{if $formvalues.service=="irc"} selected="selected"{/if}>IRC</option>
                    <option value="homepage"{if $formvalues.service=="homepage"} selected="selected"{/if}>Homepage</option>
                    <option value="debug"{if $formvalues.service=="debug"} selected="selected"{/if}>Debug</option>
                    <option value="server"{if $formvalues.service=="server" || !isset($formvalues)} selected="selected"{/if}>Server</option>
                    <option value="sprache"{if $formvalues.service=="sprache"} selected="selected"{/if}>Sprache</option>
                    <option value="core"{if $formvalues.service=="core"} selected="selected"{/if}>Core</option>
                    <option value="support"{if $formvalues.service=="support"} selected="selected"{/if}>Support</option>
                </select>
                <small>Bitte auf Server oder Egal lassen!</small>
            </td>
        </tr>
        
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Logging-Typ:</b></td>
            <td bgcolor="{$style.bg_a}">
            	<select name="types[]" class="list_form" multiple="multiple" size="30">
                    {html_options options=$logging_types selected=$formvalues.types}
                </select>
            </td>
        </tr>
    </table>
    <br />
    <input type="submit" value="Logs durchsuchen" name="send_form" class="button_form" />
</form>
{if isset($logs)}
<p>
<b>Ergebnisse:</b>
<div style="border: 1px solid #000">
{foreach from=$logs item=i}
<table>
	<tr>
		<td align="right"><b>Typ</b></td>
		<td>{$i.typname}</td>
	</tr>
	<tr>
		<td align="right"><b>AccountID</b></td>
		<td>{$i.accountid}</td>
	</tr>
	<tr>
		<td align="right"><b>Charname</b></td>
		<td>{$i.charname}</td>
	</tr>
	<tr>
		<td align="right"><b>Zeit</b></td>
		<td>{$i.zeit}</td>
	</tr>
	<tr>
		<td align="right"><b>Service</b></td>
		<td>{$i.service}</td>
	</tr>
	<tr>
		<td align="right"><b>Position</b></td>
		<td>{$i.x}-{$i.y}-{$i.z}</td>
	</tr>
	<tr>
		<td align="right"><b>Spezial</b></td>
		<td>{$i.spezial}</td>
	</tr>
	<tr>
		<td align="right"><b>Meldung</b></td>
		
		<td>{$i.hp_string|replace:"%charid%":$i.charid|replace:"%meldung%":$i.meldung|nl2br}</td>
	</tr>
</table>
{/foreach}
</div>
</p>
{/if}