<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  <title>更新TAG HTML</title>
  <link href="css/base.css" rel="stylesheet" type="text/css">
</head>

<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D1DDAA" align="center">
    <form name="form1" action="makehtml_tag_action_list.php" method="get" target='stafrm'>
      <tr>
        <td height="28" colspan="2" background='images/tbg.gif'>
          <table width="98%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="30%" height="18"><strong>更新TAG HTML</strong> </td>
              <td width="70%" align="right">
                <a href="tags_main.php" class="coolbg np">TAG标签管理</a>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="300" valign="top" bgcolor="#FFFFFF">选择TAG：</td>
        <td width="377" valign="top" bgcolor="#FFFFFF">
          <?php
       $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均
       $sql="select * from #@__tagindex where total > {$dd['tt']} order by tag asc"; 
       $dsql->Execute('al',$sql);
     echo "<select name='tagid' style='width:300px'>\r\n";
      if($tid == 0) echo "<option value='0' selected='1'>更新所有TAG...</option>\r\n";

       while($row=$dsql->GetObject('al')){     
        if($tid > 0 && $tid == $row->id) echo "<option value='".$row->id."' selected='1'>".$row->tag."</option>";
        else echo "<option value='".$row->id."'>".$row->tag."</option>";
	   }
       echo "</select>";
		?>
        </td>
      </tr>
      <tr>
        <td height="20" valign="top" bgcolor="#FFFFFF">每次最大创建页数：</td>
        <td height="20" valign="top" bgcolor="#FFFFFF"><input name="maxpagesize" type="text" id="maxpagesize" value="50"
            size="10">
          个文件 </td>
      </tr>
      <tr>
        <td height="20" valign="top" bgcolor="#FFFFFF">说明：</td>
        <td height="20" valign="top" bgcolor="#FFFFFF">
          仅更新文档数多于<?php echo $dd['tt'];?>的关键词<br>
          更新所有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="20" colspan="2" bgcolor="#FAFAF1" align="center">
          
          <input name="b112" type="button" class="coolbg np" value="生成TAG HTML"
            onClick="document.form1.action='makehtml_taglist_action.php';document.form1.submit();" style="width:120px">
        </td>
      </tr>
    </form>
    <tr bgcolor="#F9FCEF">
      <td height="20" colspan="2">
        <table width="100%">
          <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='#' onClick="ResizeDiv('mdv','+');">增大</a>] [<a href='#' 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>