{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" id="ac"        name="action"         value="">
  <input type="hidden" id="cd"        name="cd"             value="">
  <input type="hidden" id="structcd"  name="structcd"       value="">
  <input type="hidden" id="janc"      name="jancode"        value="{$action.jancode}">
  <input type="hidden" id="hb"        name="hinban"         value="{$action.hinban}">
  <input type="hidden" id="t"         name="itemtitle"      value="{$action.itemtitle}">
  <input type="hidden" id="rds"       name="release_date_start" value="{$action.release_date_start}">
  <input type="hidden" id="rde"       name="release_date_end"   value="{$action.release_date_end}">
  <input type="hidden" id="pds"       name="publish_date_start" value="{$action.publish_date_start}">
  <input type="hidden" id="pde"       name="publish_date_end"   value="{$action.publish_date_end}">
  <input type="hidden" id="mc"        name="maker_capital"      value="{$action.maker_capital}">
  <input type="hidden" id="mn"        name="maker_name"         value="{$action.maker_name}">
  <input type="hidden" id="mda"       name="media"              value="{$action.media}">
  <input type="hidden" id="cst"       name="cast"               value="{$action.cast}">
  <input type="hidden" id="stut"      name="situation"          value="{$action.situation}">
  <input type="hidden" id="phs"       name="photo_situation"    value="{$action.photo_situation}">
  <input type="hidden" id="pus"       name="publish_situation"  value="{$action.publish_situation}">
  <input type="hidden" id="srt"       name="sort"               value="{$action.sort}">
{foreach name=list from=$action.genre_select item=genre}
  <input type="hidden" id="gnr" name="genre_select[]" value="{$genre}">
{/foreach}
  <input type="hidden" id="itd"       name="imgtypediv"         value="1">
  <input type="hidden" id="gcd"       name="generalcd"          value="{$action.itemcd}">
  <input type="hidden" id="iit"       name="imgintotitle"       value="{$action.itemnm}">
  <input type="hidden" id="frac"      name="fromaction"         value="admin_itemmanage_change_form">
  <input type="hidden" name="updcnt" value="{$action.updcnt}">
  <input type="hidden" name="webupdcnt" value="{$action.webupdcnt}">
  <input type="hidden" name="cas" value="{$action.cas}">
  <input type="hidden" name="from" value="{$action.from}">
  <input type="hidden" name="return" value="1">
  
  <!-- ↓項目などの内容 -->

  
  {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}
  
  <!-- ↓項目 -->

    <table border="0" cellspacing="0" cellpadding="0" class="hyou">
      <tr>
        <th align="left">品目コード</th>
        <td align="left" colspan="3">{$action.cd}</td>
      </tr>
      <tr>
        <th align="left">タイトル</th>
        <td align="left"  colspan="3">
          <input type="text" name="itemnm" value="{$action.itemnm}" size="65"></td>
      </tr>
      <tr>
        <th align="left">タイトルかな</th>
        <td align="left"  colspan="3">
          <input type="text" name="itemnmkana" value="{$action.itemnmkana}" size="65"></td>
      </tr>
{*
      <tr>
        <th align="left">メーカー</th>
        <td align="left">
          <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>
        <th align="left">ジャンル</th>
        <td align="left"  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>
          </td>
      </tr>
      <tr>
        <th align="left">商品説明</th>
        <td align="left"  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"  colspan="3">
          <input type="text" name="comment" value="{$action.comment|nl2br}" size="65"></td>
      </tr>
      <tr>
{*
        <th align="left">ランク</th>
        <td align="left">
          <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">公開日</th>
        <td align="left">
          <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>

<!-- オプション情報 -->
{action->getOption assign=option}
{foreach from=$option item="option" key="key" name="opt"}
      <tr>
        <th align="left">{$option.name}</th>
        <td align="left"  colspan="3">
{assign var="div" value=$smarty.foreach.opt.iteration|string_format:"%02s"}
{assign var="nm" value="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 align="right" colspan="4">
          <input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_change_check'; 
                                        document.getElementById('cd').value='{$action.cd}';" value="変更確認">
          <input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_reference'; 
                                        document.getElementById('cd').value='{$action.cd}';" value="詳細画面へ"></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"}
