请先登录 | 注册
MYCSG.CN
[求助]关于vip会员访问论坛的判断代码问题,请教大家? - 文章首页返回版区
■标题:[求助]关于vip会员访问论坛的判断代码问题,请教大家?
■作者:wwwtym [2005/3/23 14:53:51]
inc/validate.asp文件中

<%
if pass="0" then
error("<li>本论坛暂时关闭,不再接受访问!")
elseif pass="2" then
if Request.Cookies("username")=empty then error("<li>只有<a href=login.asp>登录</a>后才能浏览论坛")
elseif pass="3" then
if instr("|"&userlist&"|","|"&Request.Cookies("username")&"|")<=0 or Request.Cookies("username")=empty then error("<li>该论坛并未授权您访问!")
elseif pass="4" then
if instr(""&Request.ServerVariables("script_name")&"","newtopic.asp") > 0 and instr("|"&userlist&"|","|"&Request.Cookies("username")&"|")<=0 then error("<li>该论坛并未授权您发帖!")
elseif pass="5" then (说明:这是vip论坛值)
if [RED]rs("membercode")<3 [/RED] then error("<li>对不起!VIP认证会员才能浏览") (说明数据库中vip会员的membercode值为3)
end if


if password<>empty then
if password<>Request.Cookies("password") then response.redirect "login.asp?menu=password&url=http://"&Request.ServerVariables("server_name")&Request.ServerVariables("script_name")&"?"&Request.ServerVariables("Query_String")&""
end if
%>

但是总是有问题,请教大家红颜色的地方应该怎样修改才对??


回复/版区/上篇/下篇/发贴/仅文字/HTML
【倒序/最近21条回复】
■作者:IPSC [2005/3/23 16:56:47]
你这个rs("membercode")是否有值先,也就是这里的RS是否合法,如果合法才能有值,有值才能进行小于的判断

(查看完整版网页)



短讯|首页|登录|算法|电脑版 .
DK MiniBBS Plus v2.0
mm0759.com
140 毫秒 .