<%
'生成产品列表静态方法
Function html_To_ProductSort(ID, FileName, ke01)
	dim newHtml
	set newHtml = new Html

	Call SiteInfo()
	If ID = "" Then
		set rs = server.CreateObject("adodb.recordset")
		rs.open "select * from keyicms_System where DataForm=3", Conn, 1, 2
		SortName = rs("SeoTitle")
		SeoTitle = rs("SeoTitle")
		If rs("SeoKeywords") <> "" Then
			SeoKeywords = rs("SeoKeywords")
		Else
			SeoKeywords = SeoTitle
		End If
		If rs("SeoDescription") <> "" Then
			SeoDescription = rs("SeoDescription")
		Else
			SeoDescription = SeoTitle
		End If
		Content = ""
		SortPath = "0,"
		FolderName = ""
		rs.close : set rs = nothing
	Else
		Set rs = server.CreateObject("adodb.recordset")
		rs.open "select * from keyicms_ProductSort where ID=" & ID, Conn, 1, 2
		SortName = rs("SortName")
		SortPath = rs("SortPath")
		Content = changeNull(rs("Content"))

		SeoTitle = rs("SortName")
		If rs("SeoKeywords") <> "" Then
			SeoKeywords = rs("SeoKeywords")
		Else
			SeoKeywords = SeoTitle
		End If
		If rs("SeoDescription") <> "" Then
			SeoDescription = rs("SeoDescription")
		Else
			SeoDescription = SeoTitle
		End If
		FolderName = "/" & rs("FolderName")
		rs.close : set rs = nothing
	End If

	If Ke01 = "PC" Then
		FilePath = RootHost & "/" & ProDir & FolderName & "/" & FileName
		TemplatePath = TemplatePath
		TemplatePath = TemplatePath
	End If
	If Ke01 = "Mobile" Then
		FilePath = RootHost & "/" & mFolder & "/" & ProDir & FolderName & "/" & FileName
		TemplatePath = mTemplatePath
		TemplatePath = mTemplatePath
	End If

	If ID = "" and Page = "" and Checkfile(TemFilePath & "/Product.dwt") Then
		TemFile = "Product.dwt"
	Else
		TemFile = "ProductList.dwt"
	End If

	If SiteStatus Then
		with newHtml
			.ReadFromUTF TemFilePath & "/" & TemFile, "utf-8"
			.Include()
			.Position ID, 3
			.ReplaceCommon()

			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:ID}", ID)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:SortName}", SortName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:SeoTitle}", SeoTitle)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:SeoKeywords}", SeoKeywords)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:SeoDescription}", SeoDescription)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:Content}", Content)

			set newMainClass = new MainClass
			With newMainClass
				.Load(newHtml.replace_code)
				.KE01_Product(ID)
				newHtml.replace_code = newMainClass.Content
			End With
			set newMainClass = nothing

			.KE01_If()

			If Ke01 = "PC" Then newHtml.replace_code = newHtml.replace_code & ConstJs
		end with
	Else
		newHtml.replace_code = ExplainJS
	End If

	newHtml.WriteToUTF(FilePath)
	set newHtml = nothing
End Function
%>