Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Addon to: Ban By Cookie Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Fuzion
Junior Member

162 Posts

Posted - 20 July 2002 :  18:11:11  Show Profile
Heres a code change to the Ban By Cookie Mod that allows you to ban a person from your ENTIRE FORUM/WEBSITE (entire meaning EVERY PAGE) not just policy.asp and register.asp. Look below at the code in red and replace your code with that code.


This is the sub which is located in INC_TOP.ASP

'########## Ban User by Cookie Mod
Sub banUser()
if Request.Form("Method_Type") = "login" AND strLoginStatus = 0 then
'## Forum SQL - Get user status
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_STATUS "
strSql = strSql & "FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & "WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & getMemberNumber(strDBNTFUserName) & " "
strSql = strSql & "AND " & strMemberTablePrefix & "MEMBERS.M_PASSWORD = '" & ChkString(Request.Form("Password"), "SQLString") & "'"
set rsSTATUS = my_Conn.Execute(strSql)

if rsSTATUS.EOF OR rsSTATUS.BOF then
'DO Nothing
elseif rsSTATUS("M_STATUS") = "0" then
if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "Status").Path = strCookieURL
else
Response.Cookies(strUniqueID & "Status").Path = "/"
end if
Response.Cookies(strUniqueID & "Status")("banUser") = "1"
Response.Cookies(strUniqueID & "Status").Expires = dateAdd("d", 3650, strForumTimeAdjust)
errMsg = "Your account has been de-activated!"
end if
rsSTATUS.close
set rsSTATUS = nothing
end if

Dim strScriptName, aryScriptName
aryScriptName = Split(Request.ServerVariables("SCRIPT_NAME"), "/")
strScriptName = aryScriptName(UBound(aryScriptName))

if Request.Cookies(strUniqueID & "Status")("banUser") = "1" then
Response.Redirect "ur_banned.asp"
end if

end Sub
'########## END Ban User by Cookie Mod

NeilQuest Hosting Service:
http://www.NeilQuest.com

Site Designs For Sale:
http://www.NeilQuest.com/designstore.asp

Just giving my two cents worth.
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07