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

<div id="container">

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

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

<h3>{$action.title}</h3>

<form method="post" action="{$scriptName}" id="form1" name="form1">
  <input type="hidden" name="div" value="{$action.div}">
  <input type="hidden" id="ac" name="action" value="">

  <!-- ↓項目などの内容 -->
    
    <!--↓エラーメッセージ -->
    {errorList->getMessages assign=errmsg}
    {if $errmsg}
    <br>
    <div class="error">
      <ul class="alert">
      {foreach from=$errmsg item=msg}
        <li>{$msg|escape}</li>
      {/foreach}
      </ul>
    </div>
    {/if}
    <!--↑エラーメッセージ -->
    
    <!-- ↓項目（上） -->
	<table border="0" cellspacing="0" cellpadding="0" class="hyou">
	<tr>
<td colspan="4" class="hyou-smid"><strong>基本情報</strong></td>
</tr>
	      
	      <tr>
          <th align="left">販売方法</th>
          <td align="left" class="reference1" colspan="3">
            <input type="radio" name="download" value="0"{if $action.download != 1} checked{/if}>一般販売&nbsp;
            <input type="radio" name="download" value="1"{if $action.download == 1} checked{/if}>ダウンロード販売
          </td>
        </tr>
        <tr>
          <th align="left">商品名(<span style="color:red;">*</span>)</th>
          <td align="left" class="reference1" colspan="3">
            <input type="text" name="itemnm" value="{$action.itemnm}" size="65"></td>
        </tr>
        <tr>
          <th align="left">商品名かな</th>
          <td align="left" class="reference1" colspan="3">
            <input type="text" name="itemnmkana" value="{$action.itemnmkana}" size="65"></td>
        </tr>

<!-- 検索用追加 基本情報-->
 <input type="hidden" name="makercd" id="makercd" value="0">
 <input type="hidden" name="labelcd" id="label_name" value="0">
 <input type="hidden" name="seriescd" id="series_name" value="0">
 <input type="hidden" name="itemdivcd"  value="">
 <input type="hidden" name="eirinrating" value="">
 <input type="hidden" name="examgroupcd" value="0">
 <input type="hidden" name="examno" value="">
  <input type="hidden" name="rankingrate" value="5">
 
 
<!-- 検索用追加 -->

{*
				        <tr>
				          <th align="left">メーカー</th>
				          <td align="left" class="reference1">
				            <select name="maker_capi" id="maker_capi" onChange="changeMakerCapital('maker_capi', 'makercd', '{$action.div}', 'all');">
				              <option value=""{if $action.maker_capi==""} selected{/if}>未選択</option>
				              <option value="a"{if $action.maker_capi=="a"} selected{/if}>あ行</option>
				              <option value="ka"{if $action.maker_capi=="ka"} selected{/if}>か行</option>
				              <option value="sa"{if $action.maker_capi=="sa"} selected{/if}>さ行</option>
				              <option value="ta"{if $action.maker_capi=="ta"} selected{/if}>た行</option>
				              <option value="na"{if $action.maker_capi=="na"} selected{/if}>な行</option>
				              <option value="ha"{if $action.maker_capi=="ha"} selected{/if}>は行</option>
				              <option value="ma"{if $action.maker_capi=="ma"} selected{/if}>ま行</option>
				              <option value="ya"{if $action.maker_capi=="ya"} selected{/if}>や行</option>
				              <option value="ra"{if $action.maker_capi=="ra"} selected{/if}>ら行</option>
				              <option value="wa"{if $action.maker_capi=="wa"} selected{/if}>わ行</option>
				            </select>
				            <script>loadMaker('makercd', '{$action.maker_capi}', '{$action.makercd}', '{$action.div}', 'all');</script>
				{if $action.div==""}
				          <select name="makercd" id="makercd" onChange="changeSeries('makercd', 'series_name');">
				{else}
				          <select name="makercd" id="makercd" onChange="changeLabel('makercd', 'label_name', 'all');
				                                                        changeSeries('makercd', 'series_name');">
				{/if}
				              <option value="0">メーカー名</option>
			              </select>
			            </td>			
				        </tr>
*}
        <tr>
          <th align="left">ジャンル(<span style="color:red;">*</span>)</th>
          <td align="left" class="reference4" colspan="3">
{action->getGenreCheckbox assign=genrelist}
{assign var="genre_l" value=$genrelist.l}
{assign var="genre_s" value=$genrelist.s}


 <ul style="list-style:none; line-height:1.6;">


{counter name=g start=0 assign=key}
{foreach item=value from=$genre_l}

  <li>
     <label name="genre"><strong>{$value.genrenm}</strong>&nbsp;</label>
{***
    <label name="genre">
    <input type="checkbox" name="genre[{$key|escape}]" value="{$value.genrecd}" {if $value.genrecd == $action.genre[$key]}checked="checked"{/if}>
    <strong>{$value.genrenm}</strong>&nbsp;
    </label>
***}

{counter name=g}

{if $value.child !=""}
<div class="genrelist clearfix">
 <ul style="list-style:none;">
     {include file="admin/itemmanage/change/form_genretree.html" child=$value.child}
</ul>
  </div><!-- clearfix  -->
{/if}
  </li>
{/foreach}
</ul>


{*
{action->getGenreCheckbox assign=chklist}
{foreach from=$chklist key="key" item="value" name="row"}
            <input type="checkbox" name="genre[{$key|escape}]" value="{$value.genrecd}"{if $value.genrecd == $action.genre[$key]}checked="checked"{/if}>{$value.genrenm}&nbsp;
{/foreach}
*}
        </td>
        </tr>
        <tr>
          <th align="left">商品説明(<span style="color:red;">*</span>)</th>
          <td align="left" class="reference4" colspan="3">
            <textarea name="itemexp" cols=60 rows=8>{$action.itemexp}</textarea>
            <br />
            <input type="button" onClick="window.open('{$scriptName}?action=admin_itemmanage_imglist', '', 'width=600,height=550,toolbar=no,scrollbars=yes,left=10,top=10');" value="画像追加">
            <input type="submit" onClick="document.getElementById('form1').target='_blank';document.getElementById('ac').value='admin_itemmanage_preview';" value="商品説明のみプレビュー">
          </td>
        </tr>
        
         <tr>
          <th align="left">お店からのコメント</th>
          <td align="left" class="reference1" colspan="3">
            <input type="text" name="comment" value="{$action.comment|nl2br}" size="65"></td>
        </tr>
        <tr>
{*               
		          <th align="left">ランク</th>
		          <td align="left" class="reference7">
		            <select name="rankingrate">
		              <option value="5"{if $action.rankingrate==5} selected{/if}>★★★★★</option>
		              <option value="4"{if $action.rankingrate==4} selected{/if}>★★★★</option>
		              <option value="3"{if $action.rankingrate==3} selected{/if}>★★★</option>
		              <option value="2"{if $action.rankingrate==2} selected{/if}>★★</option>
		              <option value="1"{if $action.rankingrate==1} selected{/if}>★</option>
		            </select>
        </td>
*}           
            
          <th align="left">公開日(<span style="color:red;">*</span>)</th>
          <td align="left" colspan="3">
            <input type="text" name="releasedate" id="releasedate" value="{$action.releasedate}">
            <img id="calendar-button" src="./images/calendar.png" width="16" height="16" align="middle" onClick="var cal1 = new JKL.Calendar('calendar1','form1','releasedate');cal1.write();">
            <div id="calendar1" style="display:inline;"></div>
        </td>
            
        </tr>

	<tr><td colspan="4" class="hyou-smid"><strong>基本情報(自由追加項目）</strong></td></tr>

<!-- オプション情報 -->
{action->setBasicOption assign=basic_option}
{foreach from=$basic_option item="option" key="key" name="opt"}
      <tr>
        <th align="left">{$option.name}</th>
        <td align="left"  class="reference1" colspan="3">
{assign var="div" value=$smarty.foreach.opt.iteration|string_format:"%02s"}
{assign var="nm" value="basic_option$div"}
{if is_array($option.attributes)}
        <select name="{$nm}">
          <option value="">未選択</option>
          {html_options options=$option.attributes selected=$action.$nm}
        </select>
{else}
          <input type="text" name="{$nm}" value="{$action.$nm}" size="65">
{/if}
        </td>
      </tr>
{/foreach}

	<tr><td colspan="4" class="hyou-smid"><strong>構成情報</strong></td></tr>
		

        
 <!-- 検索用追加 構成情報-->
 <input type="hidden" name="mediacd" value="">
 <input type="hidden" name="isbncd" value="">
 <input type="hidden" name="saleformcd" value="">
 <input type="hidden" name="makerprice" value="0">       
        
   
      <tr>
          <th align="left" class="up1">バリエーション名</th>
          <td align="left" class="up2" colspan="3">
            <input type="text" name="variationnm" value="{$action.variationnm}" size="60">
          </td>
      </tr>  
      <tr>
          <th align="left" class="up1">品番</th>
          <td align="left" class="up2">
            <input type="text" name="makeritemcd" value="{$action.makeritemcd}"></td>
          <th align="left" class="up1">JANコード</th>
          <td align="left" class="up2">
            <input type="text" name="jancd" value="{$action.jancd}"></td>
      </tr>  
      <tr>
          <th align="left" class="up1">発売日(<span style="color:red;">*</span>)</th>
          <td align="left" class="up2">
            <input type="text" name="salestartdate" id="salestartdate" value="{$action.salestartdate}">
            <img id="calendar-button" src="./images/calendar.png" width="16" height="16" align="middle" onClick="var cal2 = new JKL.Calendar('calendar2','form1','salestartdate');cal2.write();">
            <div id="calendar2" style="display:inline;"></div>
      </td>
          <th align="left" class="up1">発注締切日</th>
          <td align="left" class="up2">
            <input type="text" name="orderclosedate" id="orderclosedate" value="{$action.orderclosedate}">
            <img id="calendar-button" src="./images/calendar.png" width="16" height="16" align="middle" onClick="var cal3 = new JKL.Calendar('calendar3','form1','orderclosedate');cal3.write();">
            <div id="calendar3" style="display:inline;"></div>
      </td>
    </tr>  
{*
        <tr>
          <th align="left" class="up1">メーカー定価</th>
          <td align="left" class="up2">
	        <input type="text" name="makerprice" value="{$action.makerprice}" size="10">&nbsp;円</td>
        </tr>
*}
        <tr>
          <th align="left" class="up1">構成情報のコメント</th>
          <td align="left" class="up1" colspan="3">
            <input type="text" name="struct_comment" size="60" value="{$action.struct_comment|nl2br}"></td>
        </tr>

	<tr><td colspan="4" class="hyou-smid"><strong>構成情報(自由追加項目)</strong></td></tr>

<!-- オプション情報 -->
{action->setStructOption assign=struct_option}
{foreach from=$struct_option item="option" key="key" name="opt"}
      <tr>
        <th align="left" class="up1">{$option.name}</th>
        <td align="left"  class="up1" colspan="3">
{assign var="div" value=$smarty.foreach.opt.iteration|string_format:"%02s"}
{assign var="nm" value="struct_option$div"}
{if is_array($option.attributes)}
        <select name="{$nm}">
          <option value="">未選択</option>
          {html_options options=$option.attributes selected=$action.$nm}
        </select>
{else}
          <input type="text" name="{$nm}" value="{$action.$nm}" size="65">
{/if}
        </td>
      </tr>
{/foreach}
</table>

<table border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="4" align="right">
            <input type="submit" value="確認" onClick="document.getElementById('ac').value='admin_itemmanage_item_check';"></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"}
