{literal}
<script language="JavaScript">
<!--

function open_window(frm_id){
	window.open('../frmlist/result.php?frm_id='+frm_id, 'result', 'height=600, width=700, menubar=no, toolbar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

// -->
</script>
{/literal}
<div id="bsmContentArea">
	<!--タイトル/-->
	<h2 id="pageTitle">フォームジェネレータ</h2>
	<!--/タイトル-->
	<!--ローカルナビゲーション/-->
	<div id="localNavi">
		<h3>フォーム一覧&nbsp;&gt;&nbsp;受付一覧</h3>
	</div>
	<!--/ローカルナビゲーション-->
	<div id="bsmMainArea">
		<div class="inner">
			<h3 class="pageTitle">受付一覧</h3>
<!--
			<div class="bsmContentsComment">
				<p>説明</p>
			</div>
-->
			<!--list/-->
			<div class="bsmContentsList">
				<form {$form.attributes}>
				<div class="bsmContentsSearchList">
                {$form.hidden}
				<table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="rt w9">メールアドレス：</td>
						<td class="textLl lt w20">{$form.ihea_mail_address.html}</td>
						<td class="rt w9">受付日：</td>
						<td class="textLl lt w10">{$form.ihea_request_date_to.html}</td>
						<td>～</td>
						<td class="textLl lt w10">{$form.ihea_request_date_from.html}</td>
					</tr>
					<tr>
						<td class="rt w9">対応状況：</td>
						<td class="textLl lt w20">{$form.ihea_responseflg.html}</td>
						<td class="rt w9"></td>
						<td colspan="3">入力例：2009-01-01　～ 2009-01-10</td>
					</tr>
				</table>
				</div>
				<div class="bsmContentsBtnArea">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td class="lt w4"><input class="bsmBtnSearch" type="submit" name="BTNsearch" id="BTNsearch" value="表示"></td>
							<!-- <td class="lt"><input class="bsmBtnCsv" type="submit" name="BTNcsv" id="BTNcsv" value="CSVで書き出す"></td> -->
							<td class="lt">{if $list|@count != 0}<input class="bsmBtnCsv" type="button" name="BTNcsv" id="BTNcsv" value="CSVで書き出す" onclick="location.href='{$csv_download}'">{/if}</td>
						</tr>
					</table>
				</div>
				</form>
			</div>
			<!--/list-->

			<!--list/-->
			<div class="bsmContentsList">
			<div style="margin: 0 0 10px 0;">
				<input class="bsmBtnListBack" type="button" value="一覧に戻る" onClick="location.href='../frmlist/index.php'">
				{if $exist_select}
				<input class="bsmBtnSelectVotes" type="button" value="選択項目集計" onClick="open_window({$frm_id})">
				{/if}
			</div>
			<div>{$Pages}</div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bsmContentTable">
				<tr class="bsmContentTable">
                    <th class="ct w5">対応状況</th>
					<th class="ct w10">受付日時</th>
                    <th class="ct w10">対応日時</th>
                    <th class="ct w15">メールアドレス</th>
					<th class="ct">備考</th>
                    <th class="ct w5">詳細</th>
				</tr>
			{foreach from="$list" item="record" name="tpl"}
				<tr>
                    <td class="ct">{if $record.ihea_responseflg == 0}<span class="nonComp">未対応</span>{else}対応済{/if}</td>
					<td class="ct">{$record.ihea_request_date|date_format:"%Y-%m-%d %H:%M"}</td>
                    <td class="ct">{$record.ihea_response_date|date_format:"%Y-%m-%d %H:%M"}</td>
                   <!--  <td><a href="mailto:{$record.ihea_mail_address}">{$record.ihea_mail_address}</a></td> -->
                    <td>
                    {foreach from=$record.mail item="mail" name="tpl"}
                    	{if $mail != ""}<a href="mailto:{$mail}">{$mail|escape}</a><br/>{/if}
                    {/foreach}
                    </td>
					<td>{$record.ihea_response_comment|escape}</td>
					<td class="ct">
						<form name="edit" method="post" action="../inqpre/index.php">
							<input type="submit" name="BTNedit" value="詳細" class="bsmBtnDetail">
							<input type="hidden" name="ihea_id" value="{$record.ihea_id|escape}">
							<input type="hidden" name="ihea_frm_id" value="{$record.ihea_frm_id|escape}">
							<input type="hidden" name="ihea_responseflg" value="{$record.ihea_responseflg|escape}">
							<input type="hidden" name="ihea_response_comment" value="{$record.ihea_response_comment|escape}">
              				<input type="hidden" name="p" value="{$p|escape}">
						</form>
				    </td>
				</tr>
			{foreachelse}
				<tr>
					<td colspan="6" class="ct">登録されたお問い合わせ履歴はありません</td>
				</tr>
			{/foreach}
			</table>
			<div>{$Pages}</div>
			</div>
			<!--/list-->

		</div>
	</div>
	<div id="bsmMenuArea">
		<div class="inner">
			{include file=$MENU}
		</div>
	</div>
	<div class="clr"></div>
</div>