#set($title = "ポイント交換申請検索")
#set($menukubun = "3")
#parse( "/WEB-INF/view/common/header_admin.vm" )

<script language="javascript" type="text/javascript" charset="utf-8">
<!--

	function report_download(){
		document.frm.action="#q('/admin/enquete/giftExchangeSearch/reportDownload/')";
		document.frm.submit();
	}

	function gift_exchange_search(){
		document.frm.action="#q('/admin/enquete/giftExchangeSearch/giftExchangeSearch/1')";
		document.frm.submit();
	}

	//開始日
	$(function() {
	  $('#fromDay').datepick({showTrigger: '#calFromDate'
	});
	});

	//終了日
	$(function() {
	  $('#toDay').datepick({showTrigger: '#calToDate'});
	});

	// -->
</script>

<div id="contents">
<div id="contents_main">
<div id="breadcrumbsWrap">

</div><!--[ /breadcrumbsWrap ]-->
<div id="main" class="clearfix">
<h2 class="contents_title">ポイント交換申請検索</h2>
<form method="POST" action="#q('/admin/enquete/giftExchangeSearch/giftExchangeSearch/1')" name="frm">
<div id="right_contents">
	<div id="search">
$!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateError_2")
		<table border="0" cellspacing="5" cellpadding="0" class="stripe3 w790">

			<tr class="gray">
				<td class="w100">申請日(From)</td>
				<td><input name="fromDay" id="fromDay" type="text"  class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.fromDay)">
				<div style="display: none;"><img id="calFromDate" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div>
				</td>
				<td class="w100">申請日(To)</td>
				<td><input name="toDay" id="toDay" type="text"  class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.toDay)">
				<div style="display: none;"><img id="calToDate" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div></td>
			</tr>

			<tr>
			<td align="center" colspan="7"><br>
				##<a href="#" onclick="gift_exchange_search(); return false;"><img src="/em/images/enq_01_btn_03_off.jpg" width="100" height="35" alt="検索" /></a>
				<input type="button" class="button" value="検索" onclick="gift_exchange_search();"/>
			</td>
			</tr>
		</table>
	</div>



#if($giftExchangeSearchForm.searchResultList && $!giftExchangeSearchForm.searchResultList.size() > 0)
	■該当件数  $!{giftExchangeSearchForm.pagingMap.paging.totalCnt}件中 &nbsp;&nbsp;$!{giftExchangeSearchForm.pagingMap.paging.firstIndex} ~ $!{giftExchangeSearchForm.pagingMap.paging.lastIndex}件
	<BR><BR>
	<h3 class="table_title">検索結果一覧</h3>


	<div style="width:844px; overflow-x: auto;">
	<table border="0" cellpadding="0" cellspacing="0" class="stripe" style="width:1244px;">
		<colgroup>
			<col width="100px">
			<col width="80px">
			<col width="100px">
			<col width="120px">
			<col width="80px">
			<col width="80px">
			<col width="100px">
			<col width="184px">
			<col width="200px">
			<col width="200px">
		</colgroup>
		<thead>
			<tr>
			<th class="t_center">申請日</th>
			<th class="t_center">会員ID</th>
			<th class="t_center">氏名</th>
			<th class="t_center">メールアドレス</th>
			<th class="t_center">申請枚数</th>
			<th class="t_center">郵便番号</th>
			<th class="t_center">都道府県</th>
			<th class="t_center">市区町村</th>
			<th class="t_center">町名・番地</th>
			<th class="t_center">建物名</th>
			</tr>
		</thead>
		<tbody>
			#foreach($giftExchange in $!giftExchangeSearchForm.searchResultList)
				<tr  #if($velocityCount % 2 == 0) class="white dot_line" #else class="gray" #end >
				<td class="tdDiv t_center">$date.format("yyyy/MM/dd",$!giftExchange.applyDate)</td>
				<td class="tdDiv">$!giftExchange.memberId</td>
				<td class="tdDiv">$!escape.html($!giftExchange.member.firstName) $!escape.html($!giftExchange.member.lastName)&nbsp;</td>
				<td class="tdDiv">$!giftExchange.member.pcEmail&nbsp;</td>
				<td class="tdDiv">$!giftExchange.cnt</td>
				<td class="tdDiv">$!giftExchange.member.zipCode</td>
				<td class="tdDiv">$!giftExchange.member.prefecture.prefecture</td>
				<td class="tdDiv">$!escape.html($!giftExchange.member.cityName)</td>
				<td class="tdDiv">$!escape.html($!giftExchange.member.areaName)</td>
				<td class="tdDiv">$!escape.html($!giftExchange.member.buildingName)</td>
				</tr>
			#end
		</tbody>
	</table>
	</div>

<!--▼ページング▼-->
<ul class="pageNav01">
	#makeLink("#q('/admin/enquete/giftExchangeSearch/giftExchangeSearch/')",$giftExchangeSearchForm.pagingMap.paging)
	<a href="#" onclick="report_download(); return false;"><button class="button1">ポイント交換申請結果CSV出力</button></a>
</ul>
<!--▲ページング▲-->

#else
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
#end

<br/>

</div>
</form>
</div>

<div id="contents_bottom">
<img src="/em/images/bg_contents_bottom.jpg" width="1036" height="15" /> </div> </div>
</div>

</div>
</div>

#parse( "/WEB-INF/view/common/footer_admin.vm" )