<!--#include file="{nextpath}fy_inc/fy.User.asp"-->
  <% 
	 Dim  ACT_L,rs,SqlStr,TemplateContent,ACT_Lable,ModeID
	 Dim pages,UID,CurrPage
	Application(fycmsN & "fycms_TCJ_Type")= "OTHER"
	Application(fycmsN & "fycmsTCJ")="{name}"
	Application(fycmsN & "link")=fycms.actsys&"{path}"
	Application(fycmsN & "ClassID")="0"
	Application(fycmsN & "ModeID")={modeid}
	 Set rs=fycms.actexe("select top 1 * from diyplus_fy where id={id}")
	 If rs.eof Then die "ڸò"
	 CurrPage = ChkNumeric(request("page"))
	 TemplateContent =  LoadTemplate("{template}")
	 TemplateContent = rep(TemplateContent, "{info:title}", rs("title"))
	 Dim rs1,diyurl
	 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 
	 Set rs1=fycms.actexe("select  * from plusget_fy where cid={id} and isLock=0")
	 If Not  rs1.eof Then  
		Do While Not rs1.eof 
		
			 Select Case rs1("istype")
				Case "1"
					tempurl=server.URLEncode(rsql(fycms.s(rs1("entitle"))))
				Case "2"
					tempurl=ChkNumeric(rsql(fycms.s(rs1("entitle"))))
				Case "3"
				Case Else 
					tempurl=server.URLEncode(rsql(fycms.s(rs1("entitle"))))
			 End Select 

			Dim tempurl
			If rs("rewrite")="1" Then 
				diyurl=diyurl&rs1("entitle")&"="&server.URLEncode(rsql(fycms.s(rs1("entitle"))))&"&"
			End If 

 		rs1.movenext
		Loop
 		If rs("rewrite")="1" Then 
			 pages=fycms.actsys&rs("filepath")&"?"&diyurl&"page="
		Else 
			 pages=fycms.actsys&rewriteurlstr(rs("rewriteurl"),rs("id"))&"page/"
		End If 
	 Else 

		If rs("rewrite")="1" Then 
			 pages=fycms.actsys&rs("filepath")&"?page="
		Else 
			 pages=fycms.actsys&diyurl&"page/"
		End If 
	 End If 
	Dim newt:Set newt=New Cls_Template
	 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 	 
	 TemplateContent=newt.GetTabContentPage(TemplateContent,"0",CurrPage,"","index.html",false,pages)'Զ庯
 echo   TemplateContent
 %>

 