<!--#include file="config.asp"-->
<%
	if not(checkloginstaus) then
		eycms.echo "0登录失败"
		eycms.die
	end if
	if webmode<3 then
		eycms.echo "0系统未开启静态模式"
		eycms.die
	end if
	thisurl=""
	dim temproot:temproot=""
	dim id:id=eycms.getint(eycms.fget("id",0),0)
	'根据ID获取内容模型
	dim filed
	filed="classid,title,createdate,lastupdate,hits,style"'0-5
	filed=filed&",pic,ispic,tags,url,isurl,keyword,description,"'6-12
	filed=filed&"islock,isnice,ontop,iscomment,likeid,comments,point,c.catedir,"'13-20
	filed=filed&"author,comefrom,intro,userid,id,isact"'21-26

	dim data:data=eycms.db.dbload(1,filed,"ey_content n left join ey_category c on n.classid=c.cateid","id="&id&" and islock=1","")
	if ubound(data)<0 then
		eycms.echo "0&#24744;&#35201;&#26597;&#30475;&#30340;&#20869;&#23481;&#19981;&#23384;&#22312;&#65292;&#25110;&#24050;&#34987;&#21024;&#38500;"
		eycms.db.dbclose
		eycms.die
	else
		dim classid,title,createdate,lastupdate,hits,style,catedir
		dim pic,ispic,tags,url,isurl,seotitle,seokey,seodesc
		dim islock,isnice,ontop,iscomment,likeid,comments
		dim htmlrule,content,userid,parentname
		dim point,author,comefrom,intro,isact
		dim this_file
		classid=data(0,0)
		title=data(1,0)
		createdate=data(2,0)
		lastupdate=data(3,0)
		hits=data(4,0)
		style=data(5,0)
		pic=data(6,0)
		ispic=data(7,0)
		tags=eycms.get_tags_arr(data(8,0))
		url=data(9,0)
		isurl=data(10,0)
		seokey=data(11,0)
		seodesc=data(12,0)
		islock=data(13,0)
		isnice=data(14,0)
		ontop=data(15,0)
		iscomment=data(16,0)
		likeid=data(17,0)
		comments=data(18,0)
		point=data(19,0)
		catedir=data(20,0)
		author=data(21,0)
		comefrom=data(22,0)
		intro=data(23,0)
		userid=data(24,0)
		isact=data(26,0)
		htmlrule=webroot&htmldir&data(20,0)&"/"&url&"_[page].html"
	end if
	data=eycms.getclassdb(classid)
	if not isarray(data) then
		eycms.echo "0&#26639;&#30446;&#19981;&#23384;&#22312;&#25110;&#24050;&#34987;&#21024;&#38500;"
		eycms.db.dbclose
		eycms.die
	end if
	dim classname:classname=data(1)
	dim followid:followid=data(3)
	dim sonid:sonid=data(5)
	dim parentid:parentid=data(6)
	dim rootid:rootid=split(parentid,"]")(0)
		rootid=replace(rootid,"[","")
		rootid=CInt(rootid)
	dim cateurl:cateurl=data(9)
	dim modeid:modeid=data(10)
	dim catepic,rootpic
	catepic=data(15)
	rootpic=eycms.get_catepic(rootid)
	If catepic="" Then catepic=rootpic

	if eycms.strlen(eycms.getsys("eycms.plug.seoset"))>0 then
		dim fdata
		fdata=eycms.db.dbload(1,"seoTit,seoWord,seoDesc","ey_plug_seoset","lx=0 and zt=1 and classid="&rootid,"")
		if ubound(fdata)>=0 Then
			seotitle=replace(fdata(0,0),"{title}",title)
			if eycms.strlen(seokey)=0 then seokey=eycms.setseotitle(fdata(1,0),title)
			if eycms.strlen(seodesc)=0 then 
				seodesc=replace(fdata(2,0),"{title}",title)
				seodesc=replace(seodesc,"{classname}",classname)
				seodesc=replace(seodesc,"{intro}",eycms.cutstr(eycms.dishtml(intro),284,0))
			end if
		End if
	end if
	if eycms.strlen(seotitle)=0 then seotitle=title
	if eycms.strlen(seokey)=0 then seokey=title&","&classname
	if eycms.strlen(seodesc)=0 then seodesc=eycms.cutstr(eycms.dishtml(intro),284,0)&"_"&eycms.getsys("webname")

	temproot=eycms.iif(len(data(21))=0,(data(24)),(data(21)))
	if ismobile and len(data(21))>0 then
		temproot=data(24)
	end if

	dim contenturl:contenturl=weburl&webroot&htmldir&data(2)&"/"&url&".html"
	if followid=0 then
		parentname=classname
	else
		parentname=eycms.getcatename(followid)
	end if
	dim model_tablename:model_tablename=data(12)
	dim rsshow
	set rsshow=eycms.db.exedb("select top 1 * from "&model_tablename&" where cid="&id&"")
	if rsshow.eof then
		eycms.echo "0&#33719;&#21462;&#20869;&#23481;&#22833;&#36133;"
		rsshow.close
		set rsshow=nothing
		eycms.db.dbclose
		eycms.die
	else
		if model_tablename="ey_model_down" or point=0 Then
			On Error Resume next
			content=eycms.get_content_split(rsshow("content"),htmlrule)
		else
			dim isbuy:isbuy=0
			dim isvip:isvip=false
			content=""
		end If
		'response.write rsshow("piclist")
		dim foldername:foldername=data(2)&"/"
		dim filename:filename=url
		if page>1 then filename=filename&"_"&page
		htmlshow temproot,webroot&htmldir&foldername,filename,""
		rsshow.close
		set rsshow=nothing
	end if
	eycms.db.dbclose
%>
