<!--#include file="../../fy_inc/fy.User.asp"-->
  <% 
	 Dim  ACT_L,rs,SqlStr,TemplateContent,KeyWord,ModeID
	 Dim pages,UID,CurrPage,title,ClassID,ID
	Application(fycmsN & "fycms_TCJ_Type") = "ARTICLECONTENT"
	Application(fycmsN & "fycmsTCJ")="评论"
	Application(fycmsN & "link")=fycms.actsys&"plus/Comment/index.asp"
 	 CurrPage = ChkNumeric(request("page"))
 	 ClassID=ChkNumeric(request("ClassID"))
 	 ID=ChkNumeric(request("ID"))
	 ModeID=fycms.ACT_L(ClassID,10) 
	 If ModeID=0 Then ModeID=1
 	 pages="index.asp?ClassID="&ClassID&"&ID="&ID&"&page="
	 TemplateContent =  LoadTemplate(fycms.ACT_C(ModeID,10))
	Application(fycmsN & "modeid")=ModeID
	Application(fycmsN & "classid")=classid
	Application(fycmsN & "id")=id
	 
	 
	 Dim newt:Set newt=New Cls_Template
	 Dim UserHS,userlogin
	 Set UserHS = New ACT_User
	 userlogin=CBool(UserHS.UserLoginChecked)
	 If userlogin=True Then 
		TemplateContent=rep(TemplateContent,"{fy:userlogin}","1=1")
	 Else 
		TemplateContent=rep(TemplateContent,"{fy:userlogin}","1=0")
 	 End If 
  
	 If  fycms.ACT_C(ModeID,13)=0 Then 
		TemplateContent=rep(TemplateContent,"{fy:Commentcode}","1=1")
	 Else 
		TemplateContent=rep(TemplateContent,"{fy:Commentcode}","1=0")
 	 End If 



 TemplateContent=newt.GetTabContentPage(TemplateContent,classid,CurrPage,"","index.html",false,pages)'自定义函数
	If userlogin=True Then 
		Dim usersqlstr,usrs
		usersqlstr="select f.* from User_fy F inner join "&fycms.ACT_U(UserHS.UModeID,2)&" U on F.userid=U.userid where u.userid="&userhs.userid&"   order by u.userid desc"
		Set usrs=fycms.actexe(usersqlstr)
		If  Not   usrs.eof Then  TemplateContent = newt.GetUserInfo(TemplateContent,usrs)
	Else 
		TemplateContent = newt.GetnoUserInfo(TemplateContent,"")
	End If 

	 Set Rs=fycms.actexe("Select * From "&fycms.ACT_C(ModeID,2)&" where id="&ID)
	 If Rs.Eof And Rs.Bof Then
		Call fycms.Alert("您要查看的文章已删除。或是您非法传递注入参数!!",fycms.Domain):Response.End
	 ElseIf Rs("actlink") = 1 Then
		 Response.Redirect Rs("FileName")
	End If
	  TemplateContent=newt.GetContent(ModeID,rs,TemplateContent,"")'自定义函数
	 echo   TemplateContent
	
 %>
 