{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_simpel.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>Koordinaten</b></td>
	        <td bgcolor="{$style.bg_a}">
	        	X
				<input type="text" name="x" size="3" maxlength="5" class="input_form" value="{$formvalues.x}" />
				Y
				<input type="text" name="y" size="3" maxlength="5" class="input_form" value="{$formvalues.y}" />
		        Radius
		        <input type="text" name="radius" size="3" maxlength="5" class="input_form" value="{$formvalues.radius}" />
	        </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}" />
	        	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}" />
			</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}" />
	        	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}" />
			</td>
	    </tr>
	    <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Text</b></td>
            <td bgcolor="{$style.bg_b}">
            	<input type="text" name="suchtext" maxlength="30" class="input_form" value="{$formvalues.suchtext}" />
            </td>
        </tr>
    </table>
    <br />
    <input type="submit" value="Logs durchsuchen (Mit RestHP)" name="send_form" class="button_form" />
    <input type="submit" value="Logs durchsuchen (Extrafenster)" name="send_form_newwindow" class="button_form" />
</form>
{if isset($logs)}
<p>
<b>Ergebnisse:</b>
<div style="border: 1px solid #000">
<table border="1">
	<tr>		
		<td align="center"><b>Zeit</b></td>	
		<td align="center"><b>Acc</b></td>
		<td align="center"><b>AccID</b></td>
		<td align="center"><b>Charname</b></td>
		<td align="center"><b>Position</b></td>
		<td align="center"><b>Meldung</b></td>		
	</tr>
	{foreach from=$logs item=i}	
	<tr>
		<td align="left"><small>{$i.zeit}</small></td>
		<td align="left"><small>{$i.accountname}</small></td>
		<td align="left"><small>{$i.accountid}</small></td>
		<td align="left"><small>{$i.charname}</small></td>		
		<td align="left"><small>{$i.x} {$i.y} {$i.z}</small></td>		
		<td align="left"><small>{$i.hp_string|replace:"%charid%":$i.charid|replace:"%meldung%":$i.meldung|nl2br}</small></td>
	</tr>
	{/foreach}
</table>
</div>
</p>
{/if}