<!--#include file="../Include/Head.asp"-->

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="Html.asp">静态化管理</a></li>
    </ul>
    </div>
    
    <div class="formbody">
        <div class="formtitle"><span>网站地图生成</span></div>
        <ul class="forminfo">
        <li>
        
<%
	strTemp="<?xml version=""1.0"" encoding=""utf-8""?>"   & vbnewline
	strTemp=strTemp&"<urlset xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9"" " & vbnewline
	strTemp=strTemp&" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" " & vbnewline
	strTemp=strTemp&" xsi:schemaLocation=""http://www.sitemaps.org/schemas/sitemap/0.9 " & vbnewline
	strTemp=strTemp&" http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"">" & vbnewline
	
	'栏目导航
	set rs = Server.CreateObject("adodb.recordset")  
	rs.open "select * from Jin_Class where ModuleID="&Web_ModuleID&" and ParentID=0  and ShowNav and RootID<99 ORDER BY RootID,OrdeRs",conn,1,1 
	
	Dim arrary,i
	if not rs.eof then  
		do while not rs.eof
			strTemp=strTemp&"<url>" & vbnewline
			strTemp=strTemp&"<loc>http://www.xgweb.net"&getPageUrl(Rs("Url"),Rs("ClassName_en"))&"</loc>" & vbnewline
			strTemp=strTemp&"<lastmod>"&Now()&"</lastmod>" & vbnewline
			strTemp=strTemp&"<changefreq>daily</changefreq>" & vbnewline
			strTemp=strTemp&"</url>" & vbnewline
			If Rs("Child")>0 Then
				SQLa = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ParentID="&Rs("ID")&" and ShowNav and RootID<99 ORDER BY RootID,OrdeRs"
				Set Rsa = Server.CreateObject("ADODB.Recordset")
				Rsa.Open SQLa, Conn, 1, 1
				For j=1 To Rsa.Recordcount
				strTemp=strTemp&"<url>" & vbnewline
				strTemp=strTemp&"<loc>http://www.xgweb.net"&getClassUrl(Rs("Url"),Rsa("ID"))&"</loc>" & vbnewline
				strTemp=strTemp&"<lastmod>"&Now()&"</lastmod>" & vbnewline
				strTemp=strTemp&"<changefreq>daily</changefreq>" & vbnewline
				strTemp=strTemp&"</url>" & vbnewline
				Rsa.movenext
				Next
				Rsa.Close
				Set Rsa = Nothing
			End If
		 rs.movenext  
		loop  
	end if  
	rs.close  
	set rs=nothing  
	
	'赣州各县区网站制作首页
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select * from Jin_County order by SortID asc,sysID desc"
	Rs.open Sql,conn,1,3
	For i=1 to Rs.recordcount
		strTemp=strTemp&"<url>" & vbnewline
		strTemp=strTemp&"<loc>http://www.xgweb.net"&getPageUrl("Jianzhan/BuildSite.asp?t="&Rs("CountyName_en"),"Jianzhan/"&Rs("CountyName_en")&".html")&"</loc>" & vbnewline
		strTemp=strTemp&"<lastmod>"&Now()&"</lastmod>" & vbnewline
		strTemp=strTemp&"<changefreq>daily</changefreq>" & vbnewline
		strTemp=strTemp&"</url>" & vbnewline
	Rs.movenext  
	next  
	Rs.close  
	set Rs=nothing  
	
	'最新十条新闻
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select top 10 * from Jin_Article where Title<>'' order by sysID desc"
	Rs.open Sql,conn,1,3
	For i=1 to Rs.recordcount
		strTemp=strTemp&"<url>" & vbnewline
		strTemp=strTemp&"<loc>http://www.xgweb.net"&getNewsUrl(Rs("sysID"))&"</loc>" & vbnewline
		strTemp=strTemp&"<lastmod>"&Now()&"</lastmod>" & vbnewline
		strTemp=strTemp&"<changefreq>daily</changefreq>" & vbnewline
		strTemp=strTemp&"</url>" & vbnewline
	Rs.movenext  
	next  
	Rs.close  
	set Rs=nothing   
	
	'最新十个案例
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select top 10 * from Jin_Photos where Title<>'' order by sysID desc"
	Rs.open Sql,conn,1,3
	For i=1 to Rs.recordcount
		strTemp=strTemp&"<url>" & vbnewline
		strTemp=strTemp&"<loc>http://www.xgweb.net"&getProUrl(Rs("sysID"))&"</loc>" & vbnewline
		strTemp=strTemp&"<lastmod>"&Now()&"</lastmod>" & vbnewline
		strTemp=strTemp&"<changefreq>daily</changefreq>" & vbnewline
		strTemp=strTemp&"</url>" & vbnewline
	Rs.movenext  
	next  
	Rs.close  
	set Rs=nothing  
	
	
	strTemp=strTemp&"</urlset>" & vbnewline
	
	  
	Function saveXml(Text,FileName)      
		dim xmldoc,path   
		set xmldoc= server.CreateObject("MSXML.DOMDocument")   
		path = Server.MapPath(FileName)   
		xmldoc.LoadXML(Text)   
		xmldoc.save(path)   
		set xmldoc= nothing  
	End Function  
	  
	call saveXml(strTemp,"../../sitemap.xml")
	
	strUrl=request.ServerVariables("HTTP_REFERER")   
	Response.Write("<A href=""../../sitemap.xml"" target=""_blank"">生成成功！</a>")  

%>
        
        
        </li>
        <li></li>
        </ul>
    </div>

    

</body>

</html>

<%
connclose()
%>
