<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.asp"-->
<%Call SQLin()
Cid=Trim(Request("id"))
if Cid="" or not IsNumeric(Cid) then
Response.end()
else
session(FRHRCMS&"ChannelID") = Cid
session(FRHRCMS&"TypeID") = ""
Select Case Cid
	Case 0:MTID=0
	Case 1:MTID=1
	Case 2:MTID=2
	Case 3:MTID=3
	Case 5:MTID=4
	Case Else:MTID=0
End Select
Set fso = Server.CreateObject(FR_HR_FSO)
If CreateHTML=1 and CreateTime<>0 then
	if fso.FileExists(server.MapPath(""&FormatLink(0,Cid,0,0,0)&"")) then
		If datediff("s",ShowFileInfo(""&FormatLink(0,Cid,0,0,0)&""),Now())>60*CreateTime then
			Call TempIndex()
		End if
	else
		Call TempIndex()
	end if
End if
end if
Sub TempIndex()
if Cid<>0 then
	set rs=conn.execute("select * from JOB_Channel where ChannelID="&Cid&"")
	ChannelName=rs("ChannelName")
	ChannelDir=rs("ChannelDir")
	ChannelKeywords=rs("Meta_Keywords")
	ChannelDescription=rs("Meta_Description")
	rs.close
	set rs=nothing
'读取模版内容
html=LoadTemplate(Cid,1,0)
else
html=LoadTemplate(Cid,0,0)
end if
html=ReplaceLableFlag(ReplaceAllLabel(html))
html=Replace(html,"{$FR_频道名称}",ChannelName)
html=Replace(html,"{$FR_频道目录}",ChannelDir)
html=Replace(html,"{$FR_频道关键词}",""&ChannelKeywords&"")
html=Replace(html,"{$FR_频道描述}",""&ChannelDescription&"")
html=Replace(html,"{$FR_频道栏目}",GetArticletype(Cid,0))
html=Replace(html,"{$FR_频道编号}",Cid)
html=Replace(html,"{$FR_会员类型编号}",MTID)
html=Replace(html,"{$FR_本站公告}",""&Announcehtml(Cid,0)&"")
HtmlFileName=Server.MapPath(""&FormatLinks(0,Cid,0,0,0)&"")
Set fout = fso.CreateTextFile(HtmlFileName)
	fout.WriteLine CreateHTMLReplace(html)&"<script src="&InstallDir&"autohtml/index.asp?id="&Cid&"></script>"
Set fout = Nothing
End Sub
Set fso = Nothing
Call CloseConn
%>