<%
'生成企业栏目页静态方法
Function html_To_AboutSort(FileName, Ke01)
	dim newHtml
	set newHtml = new Html

	Call SiteInfo()
	set rs = server.CreateObject("adodb.recordset")
	rs.open "select * from keyicms_System where DataForm=1", conn, 1, 2
	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
	rs.close : set rs = nothing

	Set rs = server.CreateObject("adodb.recordset")
	rs.open "select * from keyicms_About where ViewFlag Order by Sequence asc", conn, 1, 2
	AboutName = rs("AboutName")
	Content = rs("Content")
	UpdateTime = rs("UpdateTime")
	ID = rs("ID")
	rs.close : set rs = nothing

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

	If Checkfile(TemFilePath & "/About.dwt") Then
		TemFile = "About.dwt"
	Else
		TemFile = "AboutView.dwt"
	End If

	If SiteStatus Then
		set rs = server.CreateObject("adodb.recordset")
		rs.open "select top 1 * from keyicms_About where ID<" & ID & " Order by ID desc", Conn, 1, 2
		if rs.eof then
			PrevLink = "#" : PrevName = "暂无"
		else
			PrevLink = rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName : PrevName = rs("AboutName")
		end if
		rs.close
		rs.open "select top 1 * from keyicms_About where ID>" & ID & " Order by ID asc", Conn, 1, 2
		if rs.eof then
			NextLink = "#" : NextName = "暂无"
		else
			NextLink = rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName : NextName = rs("AboutName")
		end if
		rs.close : set rs = nothing
	
		with newHtml
			.ReadFromUTF TemFilePath & "/" & TemFile, "utf-8"
			.Include()
			.Position "", 1
			.ReplaceCommon()

			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:ID}", ID)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:AboutName}", AboutName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:Content}", Content)
			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 = ParseTime(newHtml.replace_code, UpdateTime, "UpdateTime")
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:PrevName}", PrevName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:PrevLink}", PrevLink)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:NextName}", NextName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:NextLink}", NextLink)
	
			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
%>