{if $fold}

<div class="form_wrapper">
	<form method="post" action="/admin/log/1" id="logc_form">
		<div>
			<select name="log_category" id="log_category">
				<option value="null">Összes log</option>
				{foreach $logc_array as $logc}
					<option value="{$logc->get_logc_id()}"{if $logc->get_logc_id()==$selected} selected{/if}>{$logc->get_logc_title()}</option>
				{/foreach}
			</select>
		</div>
	</form>
</div>

<div class="navigator">
	<div class="previous">
		{if $previous_id}
			<a href="/admin/log/{$previous_id}">
		{/if}
		<img src="/_image/previous.png" {if !$previous_id}class="grayscale"{/if}>
		{if $previous_id}
			</a>
		{/if}
	</div>
	<div class="next">
		{if $next_id}
			<a href="/admin/log/{$next_id}">
		{/if}
		<img src="/_image/previous.png" {if !$next_id}class="grayscale"{/if}>
		{if $next_id}
			</a>
		{/if}
	</div>
</div>

{/if}

<div style="overflow-x:auto;">
	<table class="log">
		{foreach $log_array as $log}
			<tr class="{$log->get_log_img()}">
				<td><img src="/_image/{$log->get_log_img()}.png"></td>
				<td>#{$log->get_log_id()}</td>
				<td>{$log->get_log_date()}</td>
				<td>
					{if $log->get_log_category()->get_logc_type() == 1}
						{$log->get_log_user()->get_ua_name()}
					{elseif $log->get_log_category()->get_logc_type() == 2}
						{$log->get_log_user()->get_uk_name()}
					{elseif $log->get_log_category()->get_logc_type() == 3}
						{$log->get_log_user()->get_cu_email()}
					{elseif $log->get_log_category()->get_logc_type() == 4}
						{$log->get_log_user()->get_ucl_name()}
					{/if}
				</td>
				<td>{$log->get_log_category()->get_logc_title()}</td>
				<td>{$log->get_log_text()}</td>
			</tr>
		{/foreach}
	</table>

</div>

<div class="navigator">
	<div class="previous">
		{if $previous_id}
			<a href="/admin/log/{$previous_id}">
		{/if}
		<img src="/_image/previous.png" {if !$previous_id}class="grayscale"{/if}>
		{if $previous_id}
			</a>
		{/if}
	</div>
	<div class="next">
		{if $next_id}
			<a href="/admin/log/{$next_id}">
		{/if}
		<img src="/_image/previous.png" {if !$next_id}class="grayscale"{/if}>
		{if $next_id}
			</a>
		{/if}
	</div>
</div>

<script type="text/javascript">
	$("#log_category").change(function() {
		$("#logc_form").submit();
	});
</script>