<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->
<%
server.ScriptTimeout=3600
Response.Buffer=True
response.contenttype="text/html;charset=gb2312"
CountStartTime=Timer
IF Not ChkPost() Then
	'response.Redirect G_error_page_1
	'response.End()
End IF

id=request("id")

f2=Request("f2")

bf=Request("bf")

id1=StayNub(id)
IF id1="" Then id1=0
IF Not Get_result(MD61) Then session_=false




'+++++++++++++++++++++判断静态页是否存在++++++++++++++++++
idn=Trim(Request("idn")) '新闻名

oopen=Request("open") '是否判断静态页是否存在 1要判断

op3=Trim(Request("p3")) '播放类型

oFlags=True


'---------------------判断静态页是否存在-------------------


IF oFlags Then

Allcontent_top=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/"&G_moban_html&"/top.html")))
Allcontent_buttom=Qingtiandy_getfilecontent(server.MapPath(Add_Root_Dir("/template/"&G_moban&"/"&G_moban_html&"/button.html")))
oldurl=Add_Root_Dir("/template/"&G_moban&"/"&G_moban_html&"/NewsDetail.html")
Allcontent=Qingtiandy_getfilecontent(server.MapPath(oldurl))
Allcontent=replace(replace(replace(replace(replace(Allcontent,"{qt:template_top}",Allcontent_top),"{qt:template_button}",Allcontent_buttom),"../images/","../template/"&G_moban&"/images/"),"../css/","../template/"&G_moban&"/css/"),"../js/","../template/"&G_moban&"/js/")
Allcontent=replace(Allcontent,"{qt:indexurl}","../")



	detaili_name=id1
	'生成详细页面		
	'saveurl=Add_Root_Dir("/"&G_JIN_TAI_SMALL&"/movie/"&detaili_name&G_HTML)	
	


		
	'------------写入基本信息----------------------------------------------
	sql_u="select id,n_type1,n_title from qingtiandy_News where id="&detaili_name
	Set rs_d=server.CreateObject(G_RS)
	rs_d.open sql_u,conn,1,1
	
	IF  Not rs_d.Eof Then
		kkkkk_id=rs_d("id")
		kkkkk_m_name=rs_d("n_title")
		kkkkk_m_type1=rs_d("n_type1")
		saveurl=url_(Array("n",detaili_name,kkkkk_m_name))
		Allcontent=replace(Allcontent,"{qt:当前地址栏}","http://"&Request.ServerVariables("HTTP_HOST")&saveurl)
		Allcontent_t=Allcontent
		Allcontent_t=replace(Allcontent_t,"{qt:newsm_id}",rs_d("id"))
		Allcontent_t=replace(Allcontent_t,"{qt:newsm_type1}",kkkkk_m_type1)		
		Timerx "Ajax_makedetailNews.asp-开始生成详细页",""
		IF f2="1" Then
			Allcontent_t=MakeHTML_CMS(Allcontent_t)		
			Timerx "Ajax_makedetailNews.asp-详细页生成完毕",""
			'----------------------------------------------------------------------	
			'**********************写入文件*****************************
			N_Fso.WriteToFile saveurl,Allcontent_t
			Timerx "Ajax_makedetailNews.asp-详细页写入文件完毕",""
		End IF
	End IF
	rs_d.close:set rs_d=Nothing
	response.Write "新闻ID："&kkkkk_id&",新闻名："&kkkkk_m_name
	CloseConn
Else
	response.Write "[已经存在] 新闻ID："&kkkkk_id&",新闻名："&kkkkk_m_name
End IF
%>