<%
'生成招聘列表静态方法
Function html_To_Job(ID, ke01)
	dim newHtml
	set newHtml = new Html

	Call SiteInfo()
	Set rs = server.CreateObject("adodb.recordset")
	rs.open "select * from keyicms_Job where ID=" & ID,conn,1,2
	JobName = rs("JobName")
	JobAddress = rs("JobAddress")
	JobNumber = rs("JobNumber")
	Emolument = rs("Emolument")
	Requirement = rs("Requirement")
	StartDate = rs("StartDate")
	EndDate = rs("EndDate")
	ClassSeo = rs("ClassSeo")
	UpdateTime = rs("UpdateTime")
	SeoTitle = rs("JobName")
	SeoKeywords = rs("JobName")
	SeoDescription = rs("JobName")
	rs.close : set rs = nothing
	
	If Ke01 = "PC" Then Flag = "ViewFlag"
	If Ke01 = "Mobile" Then Flag = "MobileFlag"
	If Ke01 = "PC" Then
		FilePath = RootHost & "/" & JobDir & "/" & ClassSeo & Separated & ID & "." & HTMLName
		TemplatePath = TemplatePath
		TemplatePath = TemplatePath
	End If
	If Ke01 = "Mobile" Then
		FilePath = RootHost & "/" & mFolder & "/" & JobDir & "/" & ClassSeo & Separated & ID & "." & HTMLName
		TemplatePath = mTemplatePath
		TemplatePath = mTemplatePath
	End If

	If SiteStatus Then
		set rs = server.CreateObject("adodb.recordset")
		rs.open "select top 1 * from keyicms_Job where ID<" & ID & " and " & Flag & " Order by ID desc", Conn, 1, 2
		if rs.eof then
			PrevLink = "#" : PrevName = "暂无"
		else
			PrevLink = rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName : PrevName = rs("JobName")
		end if
		rs.close
		rs.open "select top 1 * from keyicms_Job where ID>" & ID & " and " & Flag & " Order by ID asc", Conn, 1, 2
		if rs.eof then
			NextLink = "#" : NextName = "暂无"
		else
			NextLink = rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName : NextName = rs("JobName")
		end if
		rs.close : set rs = nothing

		with newHtml
			.ReadFromUTF TemFilePath & "/JobView.dwt", "utf-8"
			.Include()
			.Position "", 6
			.ReplaceCommon()

			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:ID}", ID)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:JobName}", JobName)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:JobAddress}", JobAddress)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:JobNumber}", JobNumber)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:Emolument}", Emolument)
			newHtml.replace_code = replace(newHtml.replace_code, "{keyicms:Requirement}", Requirement)
			newHtml.replace_code = ParseTime(newHtml.replace_code, StartDate, "StartDate")
			newHtml.replace_code = ParseTime(newHtml.replace_code, EndDate, "EndDate")
			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)

			.KE01_If()

			If Ke01 = "PC" Then newHtml.replace_code = newHtml.replace_code & ConstJs
		end with
	Else
		replace_code = ExplainJS
	End If
	
	newHtml.WriteToUTF(FilePath)
	set newHtml = nothing
End Function
%>