<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/function.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
dim catas
set rs=server.CreateObject("adodb.recordset") 
	rs.open "select id,title,parentid from catalogs where parentid="&PlugIn_InfoId&" order by id asc",conn,3,1
	while not rs.eof
		catas=catas&"<h2><a href=""list.asp?pid="&rs(0)&""" title="""&rs(1)&""">"&rs(1)&"</a></h2>"&Chr(10)
		''''''''''''''''''''
		set rs1=server.CreateObject("adodb.recordset") 
		rs1.open "select id,title from catalogs where parentid="&rs(0)&" order by title asc",conn,3,1
		while not rs1.eof
				catas=catas&"<h3><a href=""list.asp?pid="&rs(0)&"&cid="&rs1(0)&""" title="""&rs1(1)&""""&">"&rs1(1)&"</a></h3>"&Chr(10)
			rs1.movenext
		wend
		rs1.close
		set rs1=nothing
		''''''''''''''''
		rs.movenext
	wend
	rs.close
	set rs=nothing
	call SaveTextFile(server.MapPath("/map.htm"),catas)
	response.Write("<p align=""center"">成功生成网站地图，<a href=""/map.htm"" target=""_blank"">点击查看</a></p>")
%>