<!-- start module contents -->
<{if $mod_config.show_breadcrumbs}>
<div class="d3f_breadcrumbs">
	<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_D3FORUM_TOP}></a>&nbsp;&gt;&nbsp;
	<{$smarty.const._MD_D3FORUM_TITLE_SEARCH}>
</div>
<{/if}>

<h1 class="d3f_title"><{$smarty.const._MD_D3FORUM_TITLE_SEARCH}></h1>


<form name="search" action="<{$mod_url}>/index.php" method="get">

<p style="display:none;"><input type="hidden" name="page" value="search" /></p>

<table class="outer search d3f_form_table">
	<tr>
		<th class="d3f_head"><label for="keywords"><{$smarty.const._MD_D3FORUM_LABEL_KEYWORDS}></label></th>
		<td class="even">
			<input type="text" name="keyword" id="keywords" size="48" value="<{$keyword}>" />
			<fieldset>
				<legend><{$smarty.const._MD_D3FORUM_LEGEND_WORDSMEANING}></legend>
				<{html_radios name="andor" options=$andor_options selected=$andor_selected}>
			</fieldset>

			<fieldset>
				<legend><{$smarty.const._MD_D3FORUM_LEGEND_SEARCHIN}></legend>
				<{html_radios name="target" options=$target_options selected=$target_selected}>
			</fieldset>

		</td>
	</tr>
	<tr>
		<th class="d3f_head"><{$smarty.const._MD_D3FORUM_FORUM}></th>
		<td class="even">
			<select name="forum_id">
				<option value="">-<{$smarty.const._MD_D3FORUM_WHOLE}>-</option>
				<{$forum_jumpbox_options}>
			</select>
		</td>
	</tr>
	<tr>
		<th class="d3f_head"><label for="searchin_poster"><{$smarty.const._MD_D3FORUM_POSTER}></label></th>
		<td class="even"><input type="text" name="search_username" id="searchin_poster" value="<{$uname}>" /></td>
	</tr>
	<tr>
		<th class="d3f_head"><{$smarty.const._MD_D3FORUM_LABEL_SORTBY}></th>
		<td class="even"><{html_radios name="sortby" options=$sortby_options selected=$sortby_selected}></td>
	</tr>
</table>
<p class="d3f_submit"><input type="submit" name="submit" value="<{$smarty.const._MD_D3FORUM_BTN_SEARCH}>" /></p>

</form>


<{if $show_results}>

<h2 class="d3f_head"><{$smarty.const._MD_D3FORUM_TITLE_SEARCHRESULTS}></h2>

<{if $results}>

<p><{$hits_count|string_format:$smarty.const._MD_D3FORUM_FMT_SEARCHHITS}></p>

<table class="outer searchresult d3f_table">
<thead>
<tr>
	<th abbr="<{$smarty.const._MD_D3FORUM_FORUM}>"><{$smarty.const._MD_D3FORUM_FORUM}></th>
	<th abbr="<{$smarty.const._MD_D3FORUM_SUBJECT}>"><{$smarty.const._MD_D3FORUM_SUBJECT}></th>
	<th abbr="<{$smarty.const._MD_D3FORUM_POSTER}>"><{$smarty.const._MD_D3FORUM_POSTER}></th>
	<th abbr="<{$smarty.const._MD_D3FORUM_VIEWS}>"><{if $mod_config.use_vote}><{$smarty.const._MD_D3FORUM_VOTEPOINTAVG}><{else}><{$smarty.const._MD_D3FORUM_VIEWS}><{/if}></th>
	<th abbr="<{$smarty.const._MD_D3FORUM_ON}>"><{$smarty.const._MD_D3FORUM_ON}></th>
</tr>
</thead>
<!-- start search results -->
<{foreach from=$results item=post}>
<tr>
	<td class="even d3f_topictitle"><a href="<{$mod_url}>/index.php?forum_id=<{$post.forum_id}>"><{$post.forum_title}></a></td>
	<td class="odd d3f_topictitle"><a href="<{$mod_url}>/index.php?post_id=<{$post.post_id}>"><img src="<{$xoops_imageurl}>images/posticon<{$post.icon}>.gif" /><{$post.subject}></a> <{$post.body_length|string_format:$smarty.const._MD_D3FORUM_FMT_BYTE}></td>
	<td class="even"><a href="<{$xoops_url}>/userinfo.php?uid=<{$post.poster_uid}>"><{$post.poster_uname}></a></td>
	<td class="odd"><{if $mod_config.use_vote}><{$post.votes_avg|string_format:"%.2f"}>/<{$post.votes_count}><{else}><{$post.topic_views}><{/if}></td>
	<td class="even"><{$post.post_time_formatted}></td>
</tr>
<{/foreach}>
<!-- end search results -->
</table>

<{else}>

<{* no hit *}>
<p><{$smarty.const._MD_D3FORUM_MSG_NOMATCH}></p>

<{/if}>

<{/if}>

<!-- end module contents -->
