<{strip}>
<{* 携帯用検索条件 *}>
<{* @author T.Hashimoto,R.Fujiwara /@copyright 2009 AllCreator Co., Ltd. / @license NetCommons License *}>
	<form action=".<{$smarty.const.INDEX_FILE_NAME}>" method="post" >
		<{if $action.total_page > 1}>
        	<{include file="multidatabase_mobile_search_page.html"}>
    	<{/if}>
		<hr />
		<input type="hidden" name="action" value="multidatabase_action_mobile_search" >
		<input type="hidden" name="multidatabase_id" value="<{$action.multidatabase_id}>" >
		<input type="hidden" name="block_id" value="<{$action.block_id}>" >
		<input type="hidden" name="now_page" value="<{$action.now_page}>" >
		<{$token_form|smarty:nodefaults}>
		<{$session_form|smarty:nodefaults}>
		<{*項目名*}>
		<{$lang.mdb_search_keyword|smarty:nodefaults}>:<br />
		<input id="mdb_search_keyword<{$id}>" name="keyword" type="text" value="<{if $action.keyword != ""}><{$action.keyword}><{/if}>" >
		<br /><br />

		<{*検索の種類*}>
		<{$lang.mdb_search_type|smarty:nodefaults}>:<br />
		<select name="select_kind" >
			<option value="<{$smarty.const.MULTIDATABASE_SEARCH_SELECT_AND}>" <{if $action.select_kind == $smarty.const.MULTIDATABASE_SEARCH_SELECT_AND}> selected="selected"<{/if}>><{$lang.mdb_search_type_and|smarty:nodefaults}></option>
			<option value="<{$smarty.const.MULTIDATABASE_SEARCH_SELECT_OR}>" <{if $action.select_kind == $smarty.const.MULTIDATABASE_SEARCH_SELECT_OR}> selected="selected"<{/if}>><{$lang.mdb_search_type_or|smarty:nodefaults}></option>
			<option value="<{$smarty.const.MULTIDATABASE_SEARCH_SELECT_PHRASE}>" <{if $action.select_kind == $smarty.const.MULTIDATABASE_SEARCH_SELECT_PHRASE}> selected="selected"<{/if}>><{$lang.mdb_search_type_phrase|smarty:nodefaults}></option>
		</select>
		<br /><br />
		
		<{* ハンドル *}>
		<{$lang.mdb_search_handle|smarty:nodefaults}>:<br />
		<input name="handle" type="text" value="<{if $action.handle}><{$action.handle}><{/if}>" >
		<br />
		<br />

		<{* 対象日 *}>
		<{$lang.mdb_search_date|smarty:nodefaults}>:<br />
		<input type="text" name="date_from" value="<{$action.date_from}>" >
		<{$lang.mdb_search_separator|smarty:nodefaults}>
		<input type="text" name="date_to" value="<{$action.date_to}>" >
		<br />
		<br />

		<{*状態*}>
		<{$lang.mdb_search_status|smarty:nodefaults}>:<br />
		<select name="status" >
			<option value="<{$smarty.const.MULTIDATABASE_STATUS_ALL}>" <{if $action.status == $smarty.const.MULTIDATABASE_STATUS_ALL || $action.status == ""}> selected="selected"<{/if}>><{$lang.mdb_display_item_all|smarty:nodefaults}></option>
			<option value="<{$smarty.const.MULTIDATABASE_STATUS_AGREE_VALUE}>" <{if $action.status == $smarty.const.MULTIDATABASE_STATUS_AGREE_VALUE}> selected="selected"<{/if}>><{$lang.mdb_search_open|smarty:nodefaults}></option>
			<option value="<{$smarty.const.MULTIDATABASE_STATUS_WAIT_AGREE_VALUE}>" <{if $action.status == $smarty.const.MULTIDATABASE_STATUS_WAIT_AGREE_VALUE}> selected="selected"<{/if}>><{$lang.mdb_search_not_ready|smarty:nodefaults}></option>
		</select>
		<br />
		<br />

		<{* カテゴリ。selectの外にforeachがあるので、カテゴリは複数ありうる *}>
		<{foreach from=$action.section_metadatas item=item key=key}>
			<{$item.name}>:<br />
			<select name="sort_section[<{$key}>]" >
				<option value="0" <{if $action.sort_section.$key === "0" || $action.sort_section == null}> selected="selected"<{/if}>>
					<{$lang.mdb_display_item_all|smarty:nodefaults}>
				</option>
				<{foreach from=$item.select_content_array item=option name=selectloop}>
					<option value="<{$option}>" <{if $action.sort_section.$key == $option}> selected="selected"<{/if}>>
						<{$option}>
					</option>
				<{/foreach}>
			</select>
			<br />
		<{/foreach}>
		<br />
		<br />

		<{* 表示順 *}>
		<{$lang.mdb_search_sort|smarty:nodefaults}>:<br />
		<select name="sort_metadata" >
			<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_SEQUENCE_SORT}>" <{if $action.sort_metadata === $smarty.const.MULTIDATABASE_DEFAULT_SEQUENCE_SORT || $action.sort_metadata == ""}> selected="selected"<{/if}>>
				<{$lang.mdb_default_sort|smarty:nodefaults}>
			</option>
			<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_DATE_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_DATE_SORT}> selected="selected"<{/if}>>
				<{$lang.mdb_date_sort|smarty:nodefaults}>
			</option>
			<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_DATE_ASC_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_DATE_ASC_SORT}> selected="selected"<{/if}>>
				<{$lang.mdb_date_asc_sort|smarty:nodefaults}>
			</option>
			<{if $action.mdb_obj.vote_flag == $smarty.const._ON}>
				<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_VOTE_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_VOTE_SORT}> selected="selected"<{/if}>>
					<{$lang.mdb_vote_sort|smarty:nodefaults}>
				</option>
			<{/if}>
			<{foreach from=$action.sort_metadatas item=option name=selectloop}>
				<option value="<{$option.metadata_id}>" <{if $action.sort_metadata == $option.metadata_id}> selected="selected"<{/if}>>
					<{$option.name}><{$lang.mdb_sort_item|smarty:nodefaults}>
				</option>
			<{/foreach}>
		</select>
		<br />
		<br />
		<input type="submit" name="search" value="<{$lang.mdb_search|smarty:nodefaults}>" >
        <br />
		<a href="?action=multidatabase_view_main_init&amp;multidatabase_id=<{$action.multidatabase_id}>&amp;block_id=<{$action.block_id}><{$session_param}>">
            <{$lang._cancel|smarty:nodefaults}>
        </a>
	</form>
<{/strip}>
