<!--#include file="../conn.asp"-->
<!--#include file="chklogin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站信息设置</title>
<link href="css.css" rel="stylesheet" type="text/css">
        <%
		dim rs,sql
		set rs=server.CreateObject("adodb.recordset")
		sql ="Select * from kw_xl"
        rs.open sql,conn,1,1
		%>
<SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();

        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%=rs("xiaolei")%>","<%=rs("dalei")%>","<%=rs("xiaolei")%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.xl.length = 0; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.xl.options[document.myform.xl.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
</head>
<body bgcolor="#FF9999"><br>
<br><br>
<br>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" class="tablebg">
  <tr align="center" bgcolor="#ff6666">
    <td colspan="2" class="font_bt">生 成 HTML 管 理</td>
  </tr>
  <form action="crhtml.asp" method="post" name="myform">
  <tr bgcolor="#ff6666">
    <td width="162" height="30" align="center" bgcolor="#ff6666">问题大类</td>
    <td width="333">&nbsp;&nbsp;
	<select name="dl" onChange="changelocation(document.myform.dl.options[document.myform.dl.selectedIndex].value)">
            <OPTION selected value="">==请选类型==</OPTION>
		<%
		dim i
		set rs=server.CreateObject("adodb.recordset")
		sql ="Select * from kw_dl order by dldm"
        rs.open sql,conn,1,1
		for i=1 to rs.recordcount
		%>
		<OPTION value="<%=rs("dalei")%>"><%=rs("dalei")%></OPTION>
          <%
           rs.movenext
           next
		   rs.close
		   set rs=nothing
          %>
	  </select>
	* 不选择即生成所有	</td>
  </tr>
  <tr bgcolor="#ff6666">
    <td height="30" align="center" bgcolor="#ff6666">问题小类</td>
    <td>&nbsp;&nbsp;
      <select name="xl">
        <option selected value="">==请选类型==</option>
      </select>
      * 同上      </td>
  </tr>
  <tr align="center" bgcolor="#ff6666">
    <td height="30" colspan="2"><input type="submit" name="Submit" value="开始生成"></td>
    </tr>
  </form>
</table>
</body>
</html>
