<%
'生成视频详细静态方法
Function html_To_Video(ID, Ke01)
	dim newHtml
	set newHtml = new Html

	Call SiteInfo()
	Set rs = server.CreateObject("adodb.recordset")
	rs.open "select * from keyicms_Video where ID="&ID,conn,1,2
	VideoName = rs("VideoName")
	ClassSeo = rs("ClassSeo")
	Content = rs("Content")
	AddTime = rs("AddTime")
	UpdateTime = rs("UpdateTime")

	FileUrl = rs("FileUrl")
	FilePic = rs("FilePic")
	SortName = Conn.execute("select * from keyicms_VideoSort where ID="&rs("SortID"))("SortName")
	
	SeoTitle = rs("VideoName")
	If rs("SeoKeywords") <> "" Then
		SeoKeywords = rs("SeoKeywords")
	Else
		SeoKeywords = rs("VideoName")
	End If
	If rs("SeoDescription") <> "" Then
		SeoDescription = rs("SeoDescription")
	Else
		SeoDescription = rs("VideoName")
	End If
	rs.close : set rs = nothing
	
	If Ke01 = "PC" Then
		replace_code = ReadFromUTF(TemplatePath&"/html/VideoView.dwt","utf-8")
		FilePath = "/"&VideoDir&"/"&ClassSeo&Separated&ID&"."&HTMLName&""
		TemplatePath = TemplatePath
	End If
	If Ke01 = "Mobile" Then
		replace_code = ReadFromUTF(mTemplatePath&"/html/VideoView.dwt","utf-8")
		FilePath = "/m/"&VideoDir&"/"&ClassSeo&Separated&ID&"."&HTMLName&""
		TemplatePath = mTemplatePath
	End If
	If SiteStatus Then
		with newHtml
			.ReadFromUTF TemFilePath & "/TeamView.dwt", "utf-8"
			.Include()
			.Position SortID, 8
			.ReplaceCommon()
			.ReplacePic OtherPic, OtherDes

			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:SortName}", SortName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:ID}", ID)
			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 = replace(newHtml.replace_code, "{keyicms:FileUrl}", FileUrl)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:FilePic}", FilePic)	
			
			newHtml.replace_code = ParseTime(newHtml.replace_code, AddTime, "AddTime")
			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)

			.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
%>