FoosunCMS-用户自定义栏目会员:修订间差异
来自站长百科
(新页面: <span style="border:1px solid #000; float:right; text-align:center; padding:6px;"><strong>导航:</strong>返回上一页</span> <div style="clear:both;"></div> ...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
<span style="border:1px solid #000; float:right; text-align:center; padding:6px;"><strong>导航:</strong>[[FoosunCMS教程|返回上一页]]</span> | <span style="border:1px solid #000; float:right; text-align:center; padding:6px;"><strong>导航:</strong>[[FoosunCMS教程|返回上一页]]</span> | ||
<div style="clear:both;"></div> | <div style="clear:both;"></div> | ||
[[FoosunCMS]]-用户自定义栏目会员 | |||
关于用户自定义某个栏目会员可以浏览做法 | |||
做法如下: | |||
在要限制的页面加入<!--#include file="../Inc/restrict.asp" --> | |||
restrict.asp 存放位置 [[FoosunCMS]]程序目录/INC/ | |||
restrict.asp 文件内容如下: | |||
<pre> | |||
<!--#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 | |||
%> | |||
</pre> | |||
2010年6月2日 (三) 22:46的最新版本
导航:返回上一页
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 %>