FoosunCMS-用户自定义栏目会员

来自站长百科
跳转至: 导航、​ 搜索

导航:返回上一页

FoosunCMS-用户自定义栏目会员

关于用户自定义某个栏目会员可以浏览做法

做法如下:


在要限制的页面加入

restrict.asp 存放位置 FoosunCMS程序目录/INC/

restrict.asp 文件内容如下:

<!--#include file="Const.asp" -->
<!--#include file="Cls_DB.asp" -->
<%
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="MemberCheck.asp" -->
<%
Dim GroupID,UserPoint
Dim ConfigDoMain
Set ConfigDoMain=conn.execute("select domain,IndexExtName from config")
MemName = Request.Cookies("Foosun")("MemName")
Sub GetGroupID(Val)
GroupID = Val
End Sub 

Sub GetUserPoint(Val)
UserPoint = Val
End Sub
Dim Rs,Rs1,ReadTF,Rs2
Set Rs=Conn.execute("select * from Members where MemName='"&MemName&"'")
Set Rs1=Conn.execute("select * from MemGroup where ID="&Rs("GroupID")&"")
If clng(UserPoint)<>0 then
If clng(UserPoint)>Rs("Point") Then
  Response.Write "<title>浏览</title>"
  Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" 
  Response.Write "<style>body{font-size:9pt;line-height:140%}</style>"
  Response.Write "<body>" 
  Response.Write "<meta http-equiv='Refresh' content='5; URL="&ConfigDoMain("domain")&"/index."&ConfigDoMain("IndexExtName")&"'>" & Chr(13)
  Response.Write("你的点数不足!5秒后自动<a href="&ConfigDoMain("domain")&"/index."&ConfigDoMain("IndexExtName")&">返回首页</a>...")  
  response.End
End if
End if
%>



参考来源[ ]