{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}">
  <input type="hidden" id="ac"    name="action"             value="">
  <input type="hidden" id="cd"    name="cd"                 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"            name="code"               value="{$action.cd}">
  <input type="hidden"            name="itemcd"             value="{$action.itemcd}">
  <input type="hidden"            name="itemnm"             value="{$action.itemnm}">
  <input type="hidden"            name="itemnmkana"         value="{$action.itemnmkana}">
  <input type="hidden"            name="subtitle"           value="{$action.subtitle}">
  <input type="hidden"            name="originaltitle"      value="{$action.originaltitle}">
  <input type="hidden"            name="productyear"        value="{$action.productyear}">
  <input type="hidden"            name="productcountry"     value="{$action.productcountry}">
  <input type="hidden"            name="title"              value="{$action.title}">
  <input type="hidden"            name="maker_capital"      value="{$action.maker_capital}">
  <input type="hidden"            name="makercd"            value="{$action.makercd}">
  <input type="hidden"            name="labelcd"            value="{$action.labelcd}">
  <input type="hidden"            name="seriescd"           value="{$action.seriescd}">
  <input type="hidden"            name="iteminfo"           value="{$action.iteminfo}">
  <input type="hidden"            name="comment"            value="{$action.comment}">
  <input type="hidden"            name="itemexp"            value="{$action.itemexp}">
{foreach from=$action.genre item="item" key="key"}  
  <input type="hidden" name="genre[{$key}]" value="{$item}">
{/foreach}
  <input type="hidden"            name="return"            value="1">
  <input type="hidden" name="itemdivcd"     value="{$action.itemdivcd}">
  <input type="hidden" name="eirinrating"   value="{$action.eirinrating}">
  <input type="hidden" name="examgroupcd"   value="{$action.examgroupcd}">
  <input type="hidden" name="examno"        value="{$action.examno}">
  <input type="hidden" name="rankingrate"   value="{$action.rankingrate}">
  <input type="hidden" name="releasedate"   value="{$action.releasedate}">
  <input type="hidden" name="updcnt"    value="{$action.updcnt}">
  <input type="hidden" name="webupdcnt" value="{$action.webupdcnt}">
  <input type="hidden" name="actionnm"  value="{$action.actionnm}">
  <input type="hidden" name="cas"       value="{$action.cas}">
  <input type="hidden" name="jcd"       value="{$action.jcd}">
  <input type="hidden" name="from" value="{$action.from}">
{if $action.actionnm <> "delete"}
  <input type="hidden"   name="makername"     value="{action->getMakernm|escape}">
  <input type="hidden"   name="serisename"    value="{action->getSeriesnm|escape}">
  <input type="hidden"   name="labelname"     value="{action->getLabelnm|escape}">
{/if}
  
  <!-- ↓項目 --> 

<table border="0" cellspacing="0" cellpadding="0">
    
{if $action.actionnm == "delete"}
      <tr>
        <td colspan="2">
            <strong><font color="#ff0000">本当に削除しますか?</font></strong>
       </td>
      </tr>
{/if}
</table>
  
<table border="0" cellspacing="0" cellpadding="0" class="hyou">    
     <tr>
       <td colspan="2" align="right"><input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_reference';
                                              document.getElementById('cd').value='{$action.cd}';" value="詳細画面へ"></td>
     </tr>

      <tr>
              <th align="left">品目コード</th>
              <td align="left">{$action.cd}</td>
      </tr>
      <tr>
        <th align="left">タイトル</th>
        <td align="left">{$action.itemnm}</td>
      </tr>
      <tr>
        <th align="left">タイトルかな</th>
        <td align="left">{$action.itemnmkana}</td>
      </tr>
{*
      <tr>
        <th align="left">メーカー</th>
        <td align="left">
{if $action.actionnm == "delete"}
          {$action.makernm}
{else}
          {action->getMakernm|escape}
{/if}
          </td>
      </tr>
*}

      <tr>
        <th align="left">ジャンル</th>
        <td align="left">
{action->getGenrenmList assign=genrenm}
{foreach from=$genrenm item=g1 name=g}{foreach from=$g1 item=g2 name=k}
{$g2.genrenm}{if $smarty.foreach.k.last}<br />{else}&nbsp;&gt;&nbsp;{/if}
{/foreach}{/foreach}
          </td>
      </tr>
      <tr>
        <th align="left">商品説明</th>
        <td align="left">
          {$action.itemexp|nl2br}</td>
      </tr>

      <tr>
        <th align="left">お店のコメント</th>
        <td align="left">
          {$action.comment|nl2br}</td>
      </tr>
      <tr>
{*
        <th align="left">ランク</th>
        <td align="left">
          {section name=rank loop=$action.rankingrate max=5}★{/section}</td>
*}
        <th align="left">公開日</th>
        <td align="left">
          {$action.releasedate|replace:"-":"/"}</td>
      </tr>
      
<!-- オプション情報 -->
{action->getOption assign=option}
{foreach from=$option item="option" key="key" name="opt"}
      <tr>
        <th align="left" class="basic1">{$option.name}</th>
        <td align="left"  class="basic1">
{assign var="div" value=$smarty.foreach.opt.iteration|string_format:"%02s"}
{assign var="nm" value="option$div"}
{if is_array($option.attributes)}
{assign var="c" value=$action.$nm}
          <input type="hidden" name="{$nm}" value="{$action.$nm}">{$option.attributes.$c}
{else}
          <input type="hidden" name="{$nm}" value="{$action.$nm}">{$action.$nm}
{/if}
        </td>
      </tr>
{/foreach}


      <tr>
        <td align="right" colspan="2">
{if $action.actionnm == "delete"}
          <input type="submit" onclick="document.getElementById('ac').value='admin_itemmanage_change_delete_done'; 
                                        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="戻る">
{else}
          <input type="submit" onclick="document.getElementById('ac').value='admin_itemmanage_change_update_done'; 
                                        document.getElementById('cd').value='{$action.cd}';" value="更新">
          <input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_change_update_form'; 
                                        document.getElementById('cd').value='{$action.cd}';" value="戻る">
{/if}
          </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"}
