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

<div id="container">

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

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

<h3>{$action.title}</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 method="POST">
  <input type="hidden" name="div" value="{$action.div}">
  <!-- ↓アイテム -->
    <table class="hyou">
{if $action.actionnm == "insert"}
  {action->getMakernm assign=fmlmakernm}
  {if $action.makercd!=""}
      <tr>
        <th class="name">メーカーCD</th><td class="name">{$action.makercd}</td></tr>
      <tr>
        <th class="name">メーカー名</th>
        <td class="name">{$fmlmakernm}
            <input type="hidden" name="makercd" value="{$action.makercd}"></td></tr>
  {elseif $action.frommakerlist!=""}
      <tr>
        <th class="name">メーカーCD</th><td class="name">{$action.frommakerlist}</td></tr>
      <tr>
        <th class="name">メーカー名</th>
        <td class="name">{$fmlmakernm}
            <input type="hidden" name="makercd" value="{$action.frommakerlist}">
            <input type="hidden" name="frommakerlist" value="{$action.frommakerlist}"></td></tr>
  {else}
    {action->getMakeroptions assign=maker}
      <tr>
        <th class="name">メーカー名</th>
        <td class="name">
          <select name="makercd">
            <option value="0">選択してください</option>
    {foreach item=item from=$maker}
            <option value="{$item.makercd}"{if $action.makercd == $item.makercd} selected="selected"{/if}>{$item.makernm}</option>
    {/foreach}
          </select></td></tr>
  {/if}
{elseif $action.actionnm == "update"}
{action->getMakernm assign=fmlmakernm}
      <tr>
        <th class="name">メーカーCD</th><td class="name">{$action.makercd}</td></tr>
      <tr>
        <th class="name">メーカー名</th><td class="name">{$fmlmakernm}</td></tr>
      <tr>
        <th class="name">レーベルCD</th><td class="name">{$action.code}</td></tr>
      <input type="hidden" name="makercd" value="{$action.makercd}">
{/if}
      <tr>
        <th class="name">レーベル名</th><td class="name"><input type="text" name="name" value="{$action.name}"></td></tr>
      <tr>
        <th class="name">ふりがな（全角ひらがな）</th><td class="name"><input type="text" name="kana" value="{$action.kana}"></td></tr>
      <tr>
        <th class="name">おすすめ</th>
        <td class="name">
          <input type="checkbox" name="recdiv"{if $action.recdiv==1} checked{/if} value="1" >
          おすすめレーベルとしてレーベル一覧の上部に表示させる</td></tr>
     </table>
  <!-- ↑アイテム -->
  
  <input type="hidden" name="code" value="{$action.code}">
  <input type="hidden" name="updcnt" value="{$action.updcnt}">
  <input type="hidden" name="srcword" value="{$action.srcword}">
  <input type="hidden" name="srcrecommenddiv" value="{$action.srcrecommenddiv}">
  <input type="hidden" name="srcdispnum" value="{$action.srcdispnum}">
  <input type="hidden" name="from" value="{$action.from}">
  <input type="submit" name="dispatch_admin_datamanage_label_{$action.actionnm}_check" value="確認">
{if $action.frommakerlist!=""}
  <input type="submit" name="dispatch_admin_datamanage_maker_list" value="一覧に戻る">
{else}
  <input type="submit" name="dispatch_admin_datamanage_label_list" value="一覧に戻る">
{/if}
</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"}
