Fuzion
Junior Member
162 Posts |
Posted - 20 July 2002 : 18:11:11
|
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. |
|