<form action="{{ form_url }}" method="get">
<div class="search-page">
	<header class="sub-title"><h1>{{ lang['search.site_search'] }}</h1></header>
	<div id="searchtable" class="searchtable">
		<table style="width:100%;">
			<tr>
				<td class="search">
					<div align="center">
						<table style="width:100%;">
							<tr style="vertical-align: top;">
								<td class="search">
									<fieldset style="margin:0px">
										<legend>{{ lang['search.title'] }}:</legend>
										<table style="width:100%;padding:3px;">
											<tr>
												<td class="search">
													<div><input type=text name="search" value="{{ search }}" /></div>
												</td>
											</tr>
										</table>
									</fieldset>
								</td>
								<td class="search" valign="top">
									<fieldset style="margin:0px">
										<legend>{{ lang['search.filter.author'] }}</legend>
										<table style="width:100%;">
											<tr>
												<td class="search">
													<input type="text" name="author" value="{{ author }}" />
												</td>
											</tr>
										</table>
									</fieldset>
								</td>
							</tr>
							<tr style="vertical-align: top;">
								<td width="50%" class="search" valign="top">
									<fieldset style="margin:0px">
										<legend>{{ lang['search.filter.category'] }}</legend>
										<div style="padding:3px">
											<div>
												{{ catlist }}
											</div>
										</div>
									</fieldset>
								</td>
								<td width="50%" class="search" valign="top">
									<fieldset style="margin:0px">
										<legend>{{ lang['search.filter.date'] }}</legend>
										<div style="padding:3px">
											<div>
												<select name="postdate"><option value=""></option>{{ datelist }}</select>
											</div>
										</div>
									</fieldset>
								</td>
							</tr>
							<tr>
								<td class="search" colspan="2">
									<div style="margin-top:6px">
										<input type="submit" class="bbcodes" value="{{ lang['search.submit'] }}" />
									</div>
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</table>
	</div>
	{% if (flags.found) %}
		<div class="berrors clr">
			{{ lang['search.found'] }}: <b>{{ count }}</b>
		</div>
	{% endif %}
	{% if (flags.notfound) %}
		<div class="berrors clr">
			{{ lang['search.notfound'] }}
		</div>
	{% endif %}
	{% if (flags.error) %}
		<div class="berrors clr">
			{{ lang['search.error'] }}
		</div>
	{% endif %}
</div>
</form>
{{ entries }}