<!-- module start (bootstrap2)-->
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/modules/tadtools/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/modules/tadtools/bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/modules/tadtools/css/xoops_adm.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/modules/<{$DIRNAME}>/css/module.css" />

<{$Navigation}>

<{if $op=="op_list"}>
  <{$js_code}>
  <link href="<{$xoops_url}>/modules/tadtools/jquery/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css">
  <script src="<{$xoops_url}>/modules/tadtools/jquery/ui/jquery-ui.js"></script>
  <link href="<{$xoops_url}>/modules/tadtools/treeTable/stylesheets/jquery.treetable.css" rel="stylesheet">
  <link href="<{$xoops_url}>/modules/tadtools/treeTable/stylesheets/jquery.treetable.theme.default.css" rel="stylesheet">
  <script type="text/javascript" src="<{$xoops_url}>/modules/tadtools/treeTable/javascripts/src/jquery.treetable.js"></script>
  <script type="text/javascript">
      $(document).ready(function()  {
        //可以展開，預設展開
        $('#form_table').treetable({ expandable: true ,initialState: 'expanded' });

        // 配置拖動節點
        $('#form_table .folder').draggable({
          helper: 'clone',
          opacity: .75,
          refreshPositions: true, // Performance?
          revert: 'invalid',
          revertDuration: 300,
          scroll: true
        });

        // Configure droppable rows
        $('#form_table .folder').each(function() {
          $(this).parents('#form_table tr').droppable({
            accept: '.folder',
            drop: function(e, ui) {
              var droppedEl = ui.draggable.parents('tr');
              $('#form_table').treetable('move', droppedEl.data('ttId'), $(this).data('ttId'));
              //alert( droppedEl.data('ttId'));
              //目地：$(this).data('ttId')
              //自己：droppedEl.data('ttId')
              $.ajax({
                type:   'POST',
                url:    '<{$action}>?op=op_save_drag',
                data:   { ofsn: $(this).data('ttId'), sn: droppedEl.data('ttId') },
                success: function(msg) {
                  $('#save_msg').html(msg);
                }
              });

            },
            hoverClass: 'accept',
            over: function(e, ui) {
              var droppedEl = ui.draggable.parents('tr');
              if(this != droppedEl[0] && !$(this).is('.expanded')) {
                $('#form_table').treetable('expandNode', $(this).data('ttId'));
              }
            }
          });
        });

      });

  </script>
  <div class="row-fluid">
    <script type='text/javascript'>
      $(document).ready(function(){
          $('#sort').sortable({ opacity: 0.6, cursor: 'move', update: function() {
              var order = $(this).sortable('serialize') + '&action=updateRecordsListings';
              $.post('<{$action}>?op=op_update_sort', order, function(theResponse){
                  $('#save_msg').html(theResponse);//傳回訊息
              });
          }
          });
      });
      function op_delete_js(sn){
        var sure = window.confirm("<{$smarty.const._TAD_DEL_CONFIRM}>");
        if (!sure)  return;
        location.href="<{$action}>?op=op_delete&kind=<{$kind}>&sn=" + sn ;
      }
    </script>
    <div id="save_msg"></div>
    <form action='<{$action}>' method='post' id='myForm' class='form-inline'>
      <{$kind_form}>
      <table id="form_table" class="table table-bordered table-striped table-hover">
        <thead>
          <tr>
            <th class="span4 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_TITLE}></th>
            <th class="span4 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_URL}></th>
            <th class="span1 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_1}></th>
            <th class="span1 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE}></th>
            <th class="span2 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_FUN}></th>
          </tr>
        </thead>
        <!-- 根目錄開始 -->
        <tr id='tr_0' data-tt-id="0">
          <td class="text-left" colspan=2>
            <span class='folder'></span>
            <i class="icon-home"></i>
            <{$smarty.const._MD_UGMMOUDEL_KIND_ROOT}>
            <a href="#" class="btn btn-success" onclick="jQuery('#form_table').treetable('expandAll'); return false;"><{$smarty.const._TAD_EXPAND_ALL}></a>
            <a href="#" class="btn btn-danger" onclick="jQuery('#form_table').treetable('collapseAll'); return false;"><{$smarty.const._TAD_CONTACT_ALL}></a>
            <a href="<{$action}>" class="btn  btn-inverse"><{$smarty.const._MD_UGMMOUDEL_KIND_RESET_BUTTON}></a>
            <a href="<{$action}>?op=op_form&ofsn=0&kind=<{$kind}>">
              <img src="<{$xoops_url}>/modules/<{$DIRNAME}>/images/add.gif"  alt="IN (<{$smarty.const._MD_UGMMOUDEL_KIND_ROOT}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>" title="IN (<{$smarty.const._MD_UGMMOUDEL_KIND_ROOT}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>">
            </a>
          </td>
          <td>
          </td>
          <td>
          </td>
          <td class="text-center">
              <a href="<{$action}>?op=op_form&kind=<{$kind}>" class="btn btn-primary"><{$smarty.const._ADD}></a>
          </td>
        </tr>
        <!-- 根目錄結束 -->
        <{if $list}>
          <tbody id='sort'>
            <{foreach item=list key=id from=$list}>
              <!-- 第1層-->
              <tr id='tr_<{$list.sn}>' data-tt-id="<{$list.sn}>" data-tt-parent-id="<{$list.ofsn}>" >
                <!-- 類別名稱-->
                <td class="text-left">
                  <{if $list.icon.folder_i}><span class='folder'></span><{/if}>
                  <{if $list.icon.move_i}>
                    <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/move_s.png" class="folder ui-draggable ui-draggable-handle" alt="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>" title="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>">
                  <{/if}>
                  <{if $list.icon.sort_i}>
                    <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/updown_s.png" style="cursor: s-resize;" alt="<{$smarty.const._TAD_SORTABLE}>" title="<{$smarty.const._TAD_SORTABLE}>">
                  <{/if}>
                  <input type="text" name="title[<{$list.sn}>]" value="<{$list.title}>" id="title_<{$list.sn}>" class="validate[required] span7">
                  <{if $list.icon.add_down_level_i}>
                    <a href="<{$action}>?op=op_form&ofsn=<{$list.sn}>&kind=<{$kind}>">
                      <img src="<{$xoops_url}>/modules/<{$DIRNAME}>/images/add.gif"  alt="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>" title="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>">
                    </a>
                  <{/if}>
                </td>
                <!-- 網址-->
                <td>
                  <input type="text" name="url[<{$list.sn}>]" value="<{$list.url}>" id="url_<{$list.sn}>" class="span12">
                </td>
                <!-- 外連-->
                <td  class="text-center">
                  <{if $list.target}>
                    <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                  <{else}>
                    <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                  <{/if}>
                </td>
                <!-- 狀態-->
                <td class="text-center">
                  <{if $list.enable}>
                    <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                  <{else}>
                    <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                  <{/if}>
                </td>
                <!-- 功能-->
                <td class="text-center">
                  <a href="<{$action}>?op=op_form&sn=<{$list.sn}>&kind=<{$kind}>" class="btn btn-success">
                    <{$smarty.const._EDIT}>
                  </a>
                  <a href="javascript:op_delete_js(<{$list.sn}>);" class="btn btn-danger">
                    <{$smarty.const._DELETE}>
                  </a>
                </td>
              </tr>
              <!-- 第1層 end-->
              <{if $list.sub}>
                <{foreach item=list from=$list.sub}>
                  <!-- 第2層-->
                  <tr id='tr_<{$list.sn}>' data-tt-id="<{$list.sn}>" data-tt-parent-id="<{$list.ofsn}>" >
                    <!-- 類別名稱-->
                    <td class="text-left">
                      <{if $list.icon.folder_i}><span class='folder'></span><{/if}>
                      <{if $list.icon.move_i}>
                        <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/move_s.png" class="folder ui-draggable ui-draggable-handle" alt="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>" title="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>">
                      <{/if}>
                      <{if $list.icon.sort_i}>
                        <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/updown_s.png" style="cursor: s-resize;" alt="<{$smarty.const._TAD_SORTABLE}>" title="<{$smarty.const._TAD_SORTABLE}>">
                      <{/if}>
                      <input type="text" name="title[<{$list.sn}>]" value="<{$list.title}>" id="title_<{$list.sn}>" class="validate[required] span7">
                      <{if $list.icon.add_down_level_i}>
                        <a href="<{$action}>?op=op_form&ofsn=<{$list.sn}>&kind=<{$kind}>">
                          <img src="<{$xoops_url}>/modules/<{$DIRNAME}>/images/add.gif"  alt="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>" title="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>">
                        </a>
                      <{/if}>
                    </td>
                    <!-- 網址-->
                    <td>
                      <input type="text" name="url[<{$list.sn}>]" value="<{$list.url}>" id="url_<{$list.sn}>" class="span12">
                    </td>
                    <!-- 外連-->
                    <td  class="text-center">
                      <{if $list.target}>
                        <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                      <{else}>
                        <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                      <{/if}>
                    </td>
                    <!-- 狀態-->
                    <td class="text-center">
                      <{if $list.enable}>
                        <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                      <{else}>
                        <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                      <{/if}>
                    </td>
                    <!-- 功能-->
                    <td class="text-center">
                      <a href="<{$action}>?op=op_form&sn=<{$list.sn}>&kind=<{$kind}>" class="btn btn-success">
                        <{$smarty.const._EDIT}>
                      </a>
                      <a href="javascript:op_delete_js(<{$list.sn}>);" class="btn btn-danger">
                        <{$smarty.const._DELETE}>
                      </a>
                    </td>
                  </tr>
                  <!-- 第2層 end-->
                  <{if $list.sub}>
                    <{foreach item=list from=$list.sub}>
                      <!-- 第3層-->
                      <tr id='tr_<{$list.sn}>' data-tt-id="<{$list.sn}>" data-tt-parent-id="<{$list.ofsn}>" >
                        <!-- 類別名稱-->
                        <td class="text-left">
                          <{if $list.icon.folder_i}><span class='folder'></span><{/if}>
                          <{if $list.icon.move_i}>
                            <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/move_s.png" class="folder ui-draggable ui-draggable-handle" alt="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>" title="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>">
                          <{/if}>
                          <{if $list.icon.sort_i}>
                            <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/updown_s.png" style="cursor: s-resize;" alt="<{$smarty.const._TAD_SORTABLE}>" title="<{$smarty.const._TAD_SORTABLE}>">
                          <{/if}>
                          <input type="text" name="title[<{$list.sn}>]" value="<{$list.title}>" id="title_<{$list.sn}>" class="validate[required] span7">
                          <{if $list.icon.add_down_level_i}>
                            <a href="<{$action}>?op=op_form&ofsn=<{$list.sn}>&kind=<{$kind}>">
                              <img src="<{$xoops_url}>/modules/<{$DIRNAME}>/images/add.gif"  alt="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>" title="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>">
                            </a>
                          <{/if}>
                        </td>
                        <!-- 網址-->
                        <td>
                          <input type="text" name="url[<{$list.sn}>]" value="<{$list.url}>" id="url_<{$list.sn}>" class="span12">
                        </td>
                        <!-- 外連-->
                        <td  class="text-center">
                          <{if $list.target}>
                            <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                          <{else}>
                            <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                          <{/if}>
                        </td>
                        <!-- 狀態-->
                        <td class="text-center">
                          <{if $list.enable}>
                            <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                          <{else}>
                            <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                          <{/if}>
                        </td>
                        <!-- 功能-->
                        <td class="text-center">
                          <a href="<{$action}>?op=op_form&sn=<{$list.sn}>&kind=<{$kind}>" class="btn btn-success">
                            <{$smarty.const._EDIT}>
                          </a>
                          <a href="javascript:op_delete_js(<{$list.sn}>);" class="btn btn-danger">
                            <{$smarty.const._DELETE}>
                          </a>
                        </td>
                      </tr>
                      <!-- 第3層 end-->

                      <{if $list.sub}>
                        <{foreach item=list from=$list.sub}>
                          <!-- 第4層-->
                          <tr id='tr_<{$list.sn}>' data-tt-id="<{$list.sn}>" data-tt-parent-id="<{$list.ofsn}>" >
                            <!-- 類別名稱-->
                            <td class="text-left">
                              <{if $list.icon.folder_i}><span class='folder'></span><{/if}>
                              <{if $list.icon.move_i}>
                                <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/move_s.png" class="folder ui-draggable ui-draggable-handle" alt="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>" title="<{$smarty.const._MA_TREETABLE_MOVE_PIC}>">
                              <{/if}>
                              <{if $list.icon.sort_i}>
                                <img src="<{$xoops_url}>/modules/tadtools/treeTable/images/updown_s.png" style="cursor: s-resize;" alt="<{$smarty.const._TAD_SORTABLE}>" title="<{$smarty.const._TAD_SORTABLE}>">
                              <{/if}>
                              <input type="text" name="title[<{$list.sn}>]" value="<{$list.title}>" id="title_<{$list.sn}>" class="validate[required] span7">
                              <{if $list.icon.add_down_level_i}>
                                <a href="<{$action}>?op=op_form&ofsn=<{$list.sn}>&kind=<{$kind}>">
                                  <img src="<{$xoops_url}>/modules/<{$DIRNAME}>/images/add.gif"  alt="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>" title="In (<{$list.title}>) <{$smarty.const._MD_UGMMOUDEL_KIND_CREATE_SUB}>">
                                </a>
                              <{/if}>
                            </td>
                            <!-- 網址-->
                            <td>
                              <input type="text" name="url[<{$list.sn}>]" value="<{$list.url}>" id="url_<{$list.sn}>" class="span12">
                            </td>
                            <!-- 外連-->
                            <td  class="text-center">
                              <{if $list.target}>
                                <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                              <{else}>
                                <a href='<{$action}>?op=op_update_target&sn=<{$list.sn}>&target=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                              <{/if}>
                            </td>
                            <!-- 狀態-->
                            <td class="text-center">
                              <{if $list.enable}>
                                <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
                              <{else}>
                                <a href='<{$action}>?op=op_update_enable&sn=<{$list.sn}>&enable=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
                              <{/if}>
                            </td>
                            <!-- 功能-->
                            <td class="text-center">
                              <a href="<{$action}>?op=op_form&sn=<{$list.sn}>&kind=<{$kind}>" class="btn btn-success">
                                <{$smarty.const._EDIT}>
                              </a>
                              <a href="javascript:op_delete_js(<{$list.sn}>);" class="btn btn-danger">
                                <{$smarty.const._DELETE}>
                              </a>
                            </td>
                          </tr>
                          <!-- 第4層 end-->
                        <{/foreach}>
                      <{/if}>
                    <{/foreach}>
                  <{/if}>
                <{/foreach}>
              <{/if}>
            <{/foreach}>

          </tbody>
        <{/if}>
        <tfoot>
          <tr>
            <td colspan=5 class="text-center">
              <input type='hidden' name='op' value="op_all_insert">
              <input type='hidden' name='kind' value="<{$kind}>">
              <button type="submit" class="btn btn-primary"><{$smarty.const._SUBMIT}></button>
            </td>
          </tr>
        </tfoot>
      </table>
    </form>
  </div>
<{elseif $op=="op_form"}>
  <{$js_code}>
  <div class='row-fluid'>
    <form action='<{$action}>' method='post' id='myForm' class='form-inline'>
      <table id='form_table' class='table table-bordered table-condensed'>
        <!--父分類-->
        <tr>
          <th class='span3 text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_OFSN}></th>
          <td class='span9'>
            <select name="ofsn" size="1" id="ofsn" >
              <option value="0">/</option>
              <{$DBV.ofsn_option}>
            </select>
          </td>
        </tr>
        <!--類別標題-->
        <tr>
          <th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_TITLE}></th>
          <td>
            <input type='text' name='title' value='<{$DBV.title}>' id='title' class='validate[required] span10'>
          </td>
        </tr>
        <!--類別狀態-->
        <tr>
          <th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE}></th>
          <td>
            <input type='radio' name='enable' id='enable_1' value='1' <{if  $DBV.enable==1}>checked<{/if}>>
            <label for='enable_1'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}></label>&nbsp;&nbsp;
            <input type='radio' name='enable' id='enable_0' value='0' <{if $DBV.enable==0}>checked<{/if}>>
            <label for='enable_0'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}></label>
          </td>
        </tr>
        <!--目標狀態-->
        <tr>
          <th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET}></th>
          <td>
            <input type='radio' name='target' id='target_1' value='1' <{if  $DBV.target==1}>checked<{/if}>>
            <label for='target_1'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_1}></label>&nbsp;&nbsp;
            <input type='radio' name='target' id='target_0' value='0' <{if $DBV.target==0}>checked<{/if}>>
            <label for='target_0'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_0}></label>
          </td>
        </tr>
        <!--網址-->
        <tr>
          <th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_URL}></th>
          <td>
            <input type='text' name='url' value='<{$DBV.url}>' id='url' class='span10' placeholder="http://">
          </td>
        </tr>
        <tr>
          <td colspan='2' class='text-center'>
            <input type='hidden' name='op' value='<{$DBV.op}>'>
            <input type='hidden' name='sn' value='<{$DBV.sn}>'>
            <input type='hidden' name='kind' value='<{$DBV.kind}>'>
            <button type='submit' class='btn btn-primary'><{$smarty.const._SUBMIT}></button>
          </th>
        </tr>
      </table>
    </form>
  </div>
<{/if}>