<[include file="common/group_list.tpl"]>
<div id="contents">
<[include file="common/group_menu.tpl"]>
  <div id="site-info">
    <table width="100%">
      <tr>
        <td width="50%" align="left">
          <h3><img src="<[$TEMPLATE_DIR]>/img/icon_large/sakuin.jpg" width="38" height="44" align="absmiddle" style="margin-right:8px;">カテゴリ一覧</h3>
        </td>
        <td width="50%" align="right" valign="bottom"><a href="./index.php?mode=18&group_code=<[$current_group.group_code]>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('shinki','','<[$TEMPLATE_DIR]>/img/btn/shinki_on.gif',1)"><img name="shinki" border="0" src="<[$TEMPLATE_DIR]>/img/btn/shinki_off.gif" alt="新規登録"></a></td>
      </tr>
    </table>
    <table id="view-table" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <th width="60" valign="middle" nowrap>並び替え</th>
        <th nowrap>タイトル</th>
        <th width="40" nowrap>編集</th>
        <th width="40" nowrap>削除</th>
      </tr>
    <[foreach from=$group_category_array item=group_category name=group_category]>
      <form method="post" action="./index.php?mode=1&group_code=<[$current_group.group_code]>" name="form<[$group_category.category_code]>">
      <input name="category_code" type="hidden" value="<[$group_category.category_code]>" />
      <input name="per_page" type="hidden" value="<[$smarty.session.per_page.1[$current_group.group_code]]>" />
      <input name="search_word" type="hidden" value="<[$smarty.session.search.1[$current_group.group_code].search_word|escape]>" />
      <tr class="<[cycle values="odd,even"]>">
        <td>
        <[if !$smarty.foreach.group_category.first]>
          <a href="./index.php?mode=21&group_code=<[$current_group.group_code]>&category_code=<[$group_category.category_code]>&move=up"><img src="<[$TEMPLATE_DIR]>/img/icon/up.gif" width="16" height="16" border="0"></a>
        <[else]>
          <img src="<[$TEMPLATE_DIR]>/img/global/space.gif" width="16" height="16" border="0">
        <[/if]>
        &nbsp;
        <[if !$smarty.foreach.group_category.last]>
          <a href="./index.php?mode=21&group_code=<[$current_group.group_code]>&category_code=<[$group_category.category_code]>&move=down"><img src="<[$TEMPLATE_DIR]>/img/icon/down.gif" width="16" height="16" border="0"></a>
        <[else]>
          <img src="<[$TEMPLATE_DIR]>/img/global/space.gif" width="16" height="16" border="0">
        <[/if]>
        </td>
        <td style="text-align:left;"><a href="javascript:document.form<[$group_category.category_code]>.submit();"><[$group_category.category_name|escape]></a></td>
        <td><a href="./index.php?mode=19&group_code=<[$current_group.group_code]>&category_code=<[$group_category.category_code]>"><img src="<[$TEMPLATE_DIR]>/img/icon/s_edit.gif" border="0"></a></td>
        <td><a href="./index.php?mode=20&group_code=<[$current_group.group_code]>&category_code=<[$group_category.category_code]>" onclick="return confirm('\'<[$group_category.category_name|escape:"javascriptall"|escape]>\'&nbsp;を削除しますか？\n（関連した記事データも全て削除されます）');"><img src="<[$TEMPLATE_DIR]>/img/icon/trash.gif" border="0"></a></td>
      </tr>
      </form>
    <[foreachelse]>
      <tr colspan="4">
        <td>カテゴリデータはありません。</td>
      </tr>
    <[/foreach]>
    </table>
  </div>
</div>