<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  <title>更新标签</title>
  <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  <link rel="stylesheet" href="../static/web/css/select2.min.css">
  <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  <link rel="stylesheet" href="../static/web/css/admin.css">
  <script language="javascript" src="../static/web/js/jquery.min.js"></script>
  <script language="javascript" src="../static/web/js/select2.full.min.js"></script>
  <script language="javascript" src="../static/web/js/i18n/zh-CN.js"></script>
  <script>
    $(function(){
        $('#tagid').select2({
          language: "zh-CN",
          ajax: {
            url: 'makehtml_taglist.php?action=search',
            delay: 500,
            data: function (params) {
              var query = {
                search: params.term,
              }
              return query;
            },
            processResults: function (data) {
              data = JSON.parse(data);
              return {
                results: data.data
              };
            }
          }
        });
    });
  </script>
</head>
<body background='../static/web/img/allbg.gif' leftmargin='8' topmargin='8'>
  <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D1DDAA" align="center" class="table maintable table-bordered mt-3">
    <form name="form1" action="makehtml_tag_action_list.php" method="get" target='stafrm'>
      <tr>
        <td height="26" colspan="2" background='../static/web/img/tbg.gif'>
          <table width="98%" border="0" cellpadding="0" cellspacing="0" class="table table-borderless">
            <tr>
              <td width="30%" height="18">更新标签</td>
              <td width="70%" align="right">
                <a href="tags_main.php" class="btn btn-success btn-sm">标签管理</a>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="300" valign="top" bgcolor="#FFFFFF">输入标签：</td>
        <td width="377" valign="top" bgcolor="#FFFFFF">
          <select id='tagid' name='tagid' style='width:300px'></select>（请输入标签搜索）
        </td>
      </tr>
      <tr>
        <td height="26" valign="top" bgcolor="#FFFFFF">每次最大创建页数：</td>
        <td height="26" valign="top" bgcolor="#FFFFFF"><input name="maxpagesize" type="text" id="maxpagesize" value="50" size="10"> 个文件</td>
      </tr>
      <tr>
        <td height="26" valign="top" bgcolor="#FFFFFF">说明：</td>
        <td height="26" valign="top" bgcolor="#FFFFFF">
          更新所有Tag将会智能更新在[Tag标签管理]中重新获取更新的内容<br>
          Tag首页模板文件：<?php echo $cfg_templets_dir; ?>/<?php echo $cfg_df_style?>/tag.htm<br>
          Tag列表页模板文件：<?php echo $cfg_templets_dir; ?>/<?php echo $cfg_df_style?>/taglist.htm<br>
          生成静态文件后，访问动态文件则直接跳转到静态文件，如果需要动态访问，删除对应文件即可
        </td>
      </tr>
      <tr>
        <td height="26" colspan="2" bgcolor="#FAFAF1" align="center">
          <button name="b112" type="button" class="btn btn-success btn-sm" onClick="document.form1.action='makehtml_taglist_action.php';document.form1.submit();">生成标签</button>
        </td>
      </tr>
    </form>
    <tr bgcolor="#f8f8f8">
      <td height="26" colspan="2">
        <table width="100%" class="table table-borderless">
          <tr>
            <td width="74%">进行状态：</td>
            <td width="26%" align="right">
              <script language='javascript'>
                function ResizeDiv(obj, ty) {
                  if (ty == "+") document.all[obj].style.pixelHeight += 50;
                  else if (document.all[obj].style.pixelHeight > 80) document.all[obj].style.pixelHeight = document.all[obj].style.pixelHeight - 50;
                }
              </script>
              [<a href='javascript:;' onClick="ResizeDiv('mdv','+');">增大</a>] [<a href='javascript:;' onClick="ResizeDiv('mdv','-');">缩小</a>]
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td colspan="2" id="mtd">
        <div id='mdv' style='width:100%;height:350px;'>
          <iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
        </div>
      </td>
    </tr>
  </table>
</body>
</html>