<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim rs,sql,i,fenlei,Path,fso,html,o,rs1,sql1,fenlei_1
i=0
set rs=server.createobject("adodb.recordset")
sql="select * from [jle_class1] order by paixu desc"
rs.open sql,conn,1,1
do while not rs.eof
fenlei_1=fenlei_1 + "<option value="&rs("id")&">"&rs("class1")&"</option>"
fenlei=fenlei + "<table cellSpacing=""1"" cellPadding=""0"" width=""95%"" align=""center"" border=""0""><tr><td width=""3%""><img src=""image/dd.gif""></td><td width=""92%""><a href=""info.asp?/="&rs("id")&"&cnmai=1""><b><u>"&rs("class1")&"</u></b></a></td></tr>"
fenlei=fenlei + "<tr><td width=""100%"" colspan=""2"">"

set rs1=server.createobject("adodb.recordset")
sql1 = "select * from jle_class2 where class1="&rs("id")&" order by paixu desc"
rs1.open sql1,conn,1,1
o=0
do while not rs1.eof
fenlei=fenlei + "<a href=""info.asp?/="&rs("id")&"&//="&rs1("id")&"&cnmai=2"">"&rs1("class2")&"</a>&nbsp;"
rs1.movenext
o=o+1
if o>=9 then '控制二级分类显示个数如果要全部显示可以删除该判断代码
fenlei=fenlei + "..."
exit do
end if
loop
rs1.close
set rs1=nothing
i=i+1
fenlei=fenlei + "</td></tr>"
rs.movenext 
loop
rs.close
Set rs = nothing
fenlei_1="<select name=class1><option selected value=0>全部类别</option>"&fenlei_1&"</select>"
fenlei=fenlei + "<tr><td vAlign=""top"" width=""8%""></td><td width=""92%""><div align=""right""><a href=""classlist.asp"">更多分类</a></div></td></tr></table>"
fenlei = "" + fenlei + ""
Path = Server.MapPath("../")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set html = fso.CreateTextFile(Path& "\fenlei.html")
html.WriteLine fenlei
Set fso = nothing
html.close

Path = Server.MapPath("../")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set html = fso.CreateTextFile(Path& "\fenlei_1.html")
html.WriteLine fenlei_1
Set fso = nothing
html.close

closedb
%>
分类成功<br><a href="../fenlei.html">查看分类文件</a><p><a href="../fenlei_1.html">查看搜索分类文件</a></p>