{assign var="consumer" value=$action.consumer|default:''}
{assign var="seller" value=$action.seller|default:''}

{include file="admin/header.html"}
{include file="admin/gnavi.html"}

<div id="container">

{include file="admin/menu/submenu_user.html"}

<!-- ↓段組み メイン側 -->
<div id="main">

<h3>ユーザ情報検索</h3>


<!-- ↓エラーメッセージ -->
{errorList->getMessages assign=errmsg}
{if $errmsg}
<div class="error">
<ul class="alert">
  {foreach from=$errmsg item=msg}
  <li>{$msg|escape}</li>
  {/foreach}
</ul>
</div>
{/if}
<!-- ↑エラーメッセージ -->

<form action="{$scriptName}" method="POST">
<table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
    <td>
	     <table border="0" cellspacing="0" cellpadding="3">
	      <tr>
	        <th width="90"><div align="right">会員コード</div></th>
	        <td><input type="text" name="mcd" value="{$action.mcd}"></td>
	      </tr>
	      <tr>
	        <th><div align="right">名前</div></th>
	        <td><input type="text" size="50" name="username" value="{$action.username}"></td>
	      </tr>
	      <tr>
	        <th><div align="right">性別</div></th>
	        <td><label><input type="checkbox"{if in_array('male', $action.sex)} checked{/if} name="sex[]" value="male">男性</label>&nbsp;<label><input type="checkbox"{if in_array('female', $action.sex)} checked{/if} name="sex[]" value="female">女性</label></td>
	      </tr>
	      <tr>
	        <th><div align="right">都道府県</div></th>
	        <td>
              <select name="prefcd">
              <option value="">都道府県&nbsp;</option>
{foreach from=$action.prefdatas item=prefdata name=pref}
              <option value="{$prefdata.prefcd}" {if $action.prefcd == $prefdata.prefcd}selected{/if}>{$prefdata.prefnm}</option>
{/foreach}
              </select>
            </td>
	      </tr>
	      <tr>
	        <th><div align="right">誕生日</div></th>
	        <td>
            <select name="birth_year1">
            <option value="">------</option>
{section name=year loop=$action.year_cnt}
            <option value="{$smarty.section.year.index+1900}" {if $action.birth_year1 == $smarty.section.year.index+1900}selected{/if}>{$smarty.section.year.index+1900}
{/section}
            </select> 年
            <select name="birth_month1">
            <option value="">----</option>
{section name=month loop=12}
            <option value="{$smarty.section.month.index+1}" {if $action.birth_month1 == $smarty.section.month.index+1}selected{/if}>{$smarty.section.month.index+1}  
{/section}
            </select> 月
            <select name="birth_day1">
            <option value="">----</option>
{section name=day loop=31}
            <option value="{$smarty.section.day.index+1}" {if $action.birth_day1 == $smarty.section.day.index+1}selected{/if}>{$smarty.section.day.index+1}  
{/section}
            </select> 日 〜
            <select name="birth_year2">
            <option value="">------</option>
{section name=year loop=$action.year_cnt}
            <option value="{$smarty.section.year.index+1900}" {if $action.birth_year2 == $smarty.section.year.index+1900}selected{/if}>{$smarty.section.year.index+1900}
{/section}
            </select> 年
            <select name="birth_month2">
            <option value="">----</option>
{section name=month loop=12}
            <option value="{$smarty.section.month.index+1}" {if $action.birth_month2 == $smarty.section.month.index+1}selected{/if}>{$smarty.section.month.index+1}  
{/section}
            </select> 月
            <select name="birth_day2">
            <option value="">----</option>
{section name=day loop=31}
            <option value="{$smarty.section.day.index+1}" {if $action.birth_day2 == $smarty.section.day.index+1}selected{/if}>{$smarty.section.day.index+1}  
{/section}
            </select> 日
            </td>
	      </tr>
	      <tr>
	        <th><div align="right">誕生月</div></th>
	        <td>
            <select name="month">
            <option value="">----</option>
{section name=month loop=12}
            <option value="{$smarty.section.month.index+1|string_format:'%02d'}" {if $action.month == $smarty.section.month.index+1}selected{/if}>{$smarty.section.month.index+1}  
{/section}
            </select> 月
            </td>
	      </tr>
	      <tr>
	        <th><div align="right">メールアドレス</div></th>
	        <td><input type="text" size="50" name="mailaddr" value="{$action.mailaddr}"></td>
	      </tr>
	      <tr>
	        <th><div align="right">電話番号</div></th>
	        <td><input type="text" size="50" name="telno" value="{$action.telno}"></td>
	      </tr>

	      <tr>
	        <th><div align="right">登録日</div></th>
	        <td>
            <select name="add_year1">
            <option value="">------</option>
{section name=year loop=$action.year_cnt}
            <option value="{$smarty.section.year.index+1900}" {if $action.add_year1 == $smarty.section.year.index+1900}selected{/if}>{$smarty.section.year.index+1900}
{/section}
            </select> 年
            <select name="add_month1">
            <option value="">----</option>
{section name=month loop=12}
            <option value="{$smarty.section.month.index+1}" {if $action.add_month1 == $smarty.section.month.index+1}selected{/if}>{$smarty.section.month.index+1}  
{/section}
            </select> 月
            <select name="add_day1">
            <option value="">----</option>
{section name=day loop=31}
            <option value="{$smarty.section.day.index+1}" {if $action.add_day1 == $smarty.section.day.index+1}selected{/if}>{$smarty.section.day.index+1}  
{/section}
            </select> 日 〜
            <select name="add_year2">
            <option value="">------</option>
{section name=year loop=$action.year_cnt}
            <option value="{$smarty.section.year.index+1900}" {if $action.add_year2 == $smarty.section.year.index+1900}selected{/if}>{$smarty.section.year.index+1900}
{/section}
            </select> 年
            <select name="add_month2">
            <option value="">----</option>
{section name=month loop=12}
            <option value="{$smarty.section.month.index+1}" {if $action.add_month2 == $smarty.section.month.index+1}selected{/if}>{$smarty.section.month.index+1}  
{/section}
            </select> 月
            <select name="add_day2">
            <option value="">----</option>
{section name=day loop=31}
            <option value="{$smarty.section.day.index+1}" {if $action.add_day2 == $smarty.section.day.index+1}selected{/if}>{$smarty.section.day.index+1}  
{/section}
            </select> 日
            </td>
	      </tr>
	      <tr>
	        <th><div align="right">メール配信希望</div></th>
	        <td><label><input type="radio" name="maildiv"{if $action.maildiv==="1"} checked{/if} value="1">希望する</label>&nbsp;<label><input type="radio" name="maildiv"{if $action.maildiv==="0"} checked{/if} value="0">希望しない</label>&nbsp;<label><input type="radio" name="maildiv"{if $action.maildiv===""} checked{/if} value="">無視</label></td>
	      </tr>
	    </table>
    </td>
  </tr>
  <tr>
  　<td>
  		<table border="0" cellspacing="0" cellpadding="0">
   		 <tr>
       	   <td width="228" bgcolor="#F7F5ED">
	         <div align="left">購入者登録</div>
		     <input type="radio" name="consumer" id="cs01" value="registed" {if $consumer=='registed'}checked{/if}>
		     <label for="cs01">登録済み</label>
		     <input type="radio" name="consumer" id="cs02" value="unregisted" {if $consumer=='unregisted'}checked{/if}>
		     <label for="cs02">未登録</label>
		     <input type="radio" name="consumer" id="cs03" value="" {if $consumer==''}checked{/if}>
		     <label for="cs03">無視</label>
      	  </td>
          <td width="228" bgcolor="#F7F5ED">
  		    <div align="left">出品者登録</div>
	       <input type="radio" name="seller" id="cs11" value="registed" {if $seller=='registed'}checked{/if}>
	       <label for="cs11">登録済み</label>
	       <input type="radio" name="seller" id="cs12" value="unregisted" {if $seller=='unregisted'}checked{/if}>
	       <label for="cs12">未登録</label>
	       <input type="radio" name="seller" id="cs13" value="" {if !$seller}checked{/if}>
	       <label for="cs13">無視</label>
          </td>
    	</tr>
  		</table>
  	</td>
  </tr>
</table>
 
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="right">
        <input type="Submit" name="dispatch_admin_usermanage_customer_customerlist" value="検索">
		<button onclick="JavaScript:location.href='{$scriptName}?action=admin_usermanage_customer_customerlist&membercd={$action.membercd|escape:'url'}&username={$action.username|escape:'url'}&mailaddr={$action.mailaddr|escape:'url'}&prefcd={$action.prefcd|escape:'url'}&sex[]={$action.sex.0|escape:'url'}&sex[]={$action.sex.1|escape:'url'}&telno={$action.telno|escape:'url'}&month={$action.month|escape:'url'}&birth_year1={$action.birth_year1|escape:'url'}&birth_month1={$action.birth_year1|escape:'url'}&birth_day1={$action.birth_year1|escape:'url'}&birth_year2={$action.birth_year2|escape:'url'}&birth_month2={$action.birth_month2|escape:'url'}&birth_day2={$action.birth_day2|escape:'url'}&add_year1={$action.add_year1|escape:'url'}&add_month1={$action.add_year1|escape:'url'}&add_day1={$action.add_year1|escape:'url'}&add_year2={$action.add_year2|escape:'url'}&add_month2={$action.add_month2|escape:'url'}&add_day2={$action.add_day2|escape:'url'}&maildiv={$action.maildiv|escape:'url'}&consumer={$action.consumer}&seller={$action.seller}&pageID={$action.pageID}&sort={$action.sort}'; return false;">戻る</button>
	</td>
  </tr>
</table>

</form>

<div class="pagetop" title="ページトップへ"><a href="#top">ページトップへ</a></div>

</div>
<!--End of main-->

<div class="cr"></div>
</div>
<!--End of container-->

{include file="admin/footer.html"}
