Author |
Topic |
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 October 2013 : 00:17:14
|
I did the "Snitz 6-in-one" mod that included the "Private Messages" mod ages ago and everything worked fine, and still does.
I also did the "PM AddOn - Messenger Style Toast Notifications" mod as well. But, the little pop-up notification at the bottom of your screen doesn't always pop up. . .well, at least not when on some of the different webpages. And, the "sound" alert for "new" private messages included with this mod no longer works at all. Sadly, that is most likely because of a conflict with another mod.
So now, after removing all of the menu links from my inc_header.asp since I have the horizontal menu bar I added, I NEED the private message alert "link" that used to appear in the menu when there was a "new" message. . .I really need that back again.
But, I'm not sure as to how to accomplish this. I would like the alert link to appear in blue text when there's a new PM. Could someone help explain how to accomplish this? Was the "alert" link part of the add-on mod I mentioned above?
I hope all of this makes sense. . .I'm having MEGA brain fog right now!
I hope it helps to look at my inc_header.asp below. I think it would be most obvious for members if the link appeared in the middle below my PayPal donation graphic but right now, I'd settle for it appearing just about anywhere! (lol)
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
' ## Locale Below
%>
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_locale.asp" -->
<%
' ## Locale Above
if strShowTimer = "1" then
'### start of timer code
'=== Zuel's Avatar Add-on -- Added to config.asp ===
'Dim StopWatch(19)
sub StartTimer(x)
StopWatch(x) = timer
end sub
function StopTimer(x)
EndTime = Timer
'Watch for the midnight wraparound...
if EndTime < StopWatch(x) then
EndTime = EndTime + (86400)
end if
StopTimer = EndTime - StopWatch(x)
end function
StartTimer 1
'### end of timer code
end if
strArchiveTablePrefix = strTablePrefix & "A_"
strScriptName = request.servervariables("script_name")
strReferer = chkString(request.servervariables("HTTP_REFERER"),"refer")
if Application(strCookieURL & "down") then
if not Instr(strScriptName,"admin_") > 0 then
Response.redirect("down.asp")
end if
end if
if strPageBGImageURL = "" then
strTmpPageBGImageURL = ""
elseif Instr(strPageBGImageURL,"/") > 0 or Instr(strPageBGImageURL,"\") > 0 then
strTmpPageBGImageURL = " background=""" & strPageBGImageURL & """"
else
strTmpPageBGImageURL = " background=""" & strImageUrl & strPageBGImageURL & """"
end if
If strDBType = "" then
Response.Write "<html>" & vbNewLine & _
"<head>" & vbNewline & _
"<title>" & strForumTitle & "</title>" & vbNewline
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "</head>" & vbNewLine & _
"<body" & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""40%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""navyblue"" align=""center""><p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
"<b>There has been a problem...</b><br /><br />" & _
"Your <b>strDBType</b> is not set, please edit your <b>config.asp</b><br />to reflect your database type." & _
"</font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
"<a href=""default.asp"" target=""_top"">Click here to retry.</a></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</body>" & vbNewLine & _
"</html>" & vbNewLine
Response.End
end if
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
%>
<!--#include file="my_theme2.asp"-->
<%
'##### Ban IP Mod ######
Call banIP()
'#######################
if (strAuthType = "nt") then
call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if
if strGroupCategories = "1" then
if Request.QueryString("Group") = "" then
if Request.Cookies(strCookieURL & "GROUP") = "" Then
Group = 2
else
Group = cLng(Request.Cookies(strCookieURL & "GROUP"))
end if
else
Group = cLng(Request.QueryString("Group"))
end if
'set default
Session(strCookieURL & "GROUP_ICON") = "icon_group_categories.gif"
Session(strCookieURL & "GROUP_IMAGE") = strTitleImage
'Forum_SQL - Group exists ?
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
if rs2.EOF or rs2.BOF then
Group = 2
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
end if
Session(strCookieURL & "GROUP_NAME") = rs2("GROUP_NAME")
if instr(rs2("GROUP_ICON"), ".") then
Session(strCookieURL & "GROUP_ICON") = rs2("GROUP_ICON")
end if
if instr(rs2("GROUP_IMAGE"), ".") then
Session(strCookieURL & "GROUP_IMAGE") = rs2("GROUP_IMAGE")
end if
rs2.Close
set rs2 = nothing
Response.Cookies(strCookieURL & "GROUP") = Group
Response.Cookies(strCookieURL & "GROUP").Expires = dateAdd("d", intCookieDuration, strForumTimeAdjust)
if Session(strCookieURL & "GROUP_IMAGE") <> "" then
strTitleImage = Session(strCookieURL & "GROUP_IMAGE")
end if
end if
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = trim(chkString(Request.Form("Name"),"SQLString"))
if strDBNTFUserName = "" then strDBNTFUserName = trim(chkString(Request.Form("User"),"SQLString"))
if strAuthType = "nt" then
strDBNTUserName = Session(strCookieURL & "userID")
strDBNTFUserName = Session(strCookieURL & "userID")
end if
' Get Private Message count for display
if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmcount] "
else
strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "
Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")
rsPM.close
set rsPM = nothing
' ##### Contact Us - Inserted 5th line below to allow non-members access with forum locked
if strRequireReg = "1" and strDBNTUserName = "" then
if not Instr(strScriptName,"register.asp") > 0 and _
not Instr(strScriptName,"password.asp") > 0 and _
not Instr(strScriptName,"faq.asp") > 0 and _
not Instr(strScriptName,"contact_staff.asp") > 0 and _
not Instr(strScriptName,"login.asp") > 0 then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
if Request.QueryString <> "" then
Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString)
else
Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))))
end if
end if
end if
' ##### Contact Us End #####
select case Request.Form("Method_Type")
case "login"
strEncodedPassword = sha256("" & Request.Form("Password"))
select case chkUser(strDBNTFUserName, strEncodedPassword,-1)
case 1, 2, 3, 4
Call DoCookies(Request.Form("SavePassword"))
strLoginStatus = 1
case else
strLoginStatus = 0
end select
case "logout"
Call ClearCookies()
end select
if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
if mLev = 4 then aAllowed = cLng(IsAdminAllowed(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0
else
MemberID = -1
mLev = 0
end if
CanShowAvatar=1
if mLev > 3 then
'## Forum_SQL - Get membercount from DB
strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS_PENDING"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn
if not rs.EOF then
User_Count = cLng(rs("U_COUNT"))
else
User_Count = 0
end if
rs.close
set rs = nothing
end if
' ## Ban IPs Below
strLead="00"
strStart=Request.ServerVariables("REMOTE_ADDR")
intSeg=0
For i = 1 to len(strStart)
If mid(strStart,i,1)="." Then
intSeg=intSeg+1
If intSeg=1 Then
strPart1=right(strLead&left(strStart,i-1),3)
x=i
End If
If intSeg=2 Then
strPart2=right(strLead&mid(strStart,x+1,i-x-1),3)
y=i
End If
If intSeg=3 Then
strPart3=right(strLead&mid(strStart,y+1,i-y-1),3)
strPart4=right((strLead&mid(strStart,i+1)),3)
End If
End If
Next
strStart=strPart1&"."&strPart2&"."&strPart3&"."&strPart4
strSqlIP="SELECT IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & strStart & "' AND IPEND >= '" & strStart & "'"
Set rsCheck=my_Conn.Execute(strSqlIP)
If not rsCheck.EOF Then
strIPCountry=rsCheck("IPCOUNTRY")
rsCheck.Close
End If
Set rsCheck=Nothing
intBanned=0
strSqlIP="SELECT * FROM " & strTablePrefix & "BAN_IPS WHERE IP_COUNTRY='" & strIPCountry & "'"
Set rsCheck=my_Conn.Execute(strSqlIP)
If not rsCheck.EOF Then
intBanned=1
rsCheck.Close
End If
Set rsCheck=Nothing
strSql = "SELECT * FROM " & strTablePrefix & "BAN_IPS WHERE IP_START <= '" & strStart & "' AND IP_END >= '" & strStart & "'"
Set rsCheck=my_Conn.Execute(strSql)
If not rsCheck.EOF Then
intBanned=1
rsCheck.Close
End If
Set rsCheck=Nothing
If intBanned=1 Then
Response.Write "<table align=""center"" width=""50%"" bgColor=""" & strPopUpBorderColor & """ border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table align=""center"" width=""100%"" bgColor=""" & strPopUpBorderColor & """ border=""1"" cellpadding=""4"" cellspacing=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strCategoryCellColor & """ colspan=""4"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>IP Bans</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>IP address banned." & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
Call ClearCookies
Response.Write "<meta http-equiv=""Refresh"" content=""4; URL=http://localhost"">" & vbNewLine
WriteFooter
Response.End
End If
' ## Ban IPs Above
'####### Begin UserGroup MOD #######
if Session(strCookieURL & "UserGroups" & MemberID) = "" or _
IsNull(Session(strCookieURL & "UserGroups" & MemberID)) then
strGroupMembership = getGroupMembership(MemberID,1)
Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
end if
'####### End UserGroup MOD #######
Response.Write "<html>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<title>" & GetNewTitle(strScriptName) & "</title>" & vbNewline
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<script type=""text/javascript"" src=""ytplaylist.js""></script>" & vbNewLine
Response.Write "<script type=""text/javascript"" src=""formfieldlimiter.js""></script>" & vbNewLine
Response.Write"<script language=""JavaScript1.2"" src=""resizeimgs.js""></script>" & vbNewLine
Response.Write "<script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
"<!-- hide from JavaScript-challenged browsers" & vbNewLine & _
"function openWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=400')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow2(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=450')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow3(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow4(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=525')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow5(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow6(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=500,height=450,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openGameWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=700,scrollbars=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openVideoWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=700,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowHelp(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=470,height=200,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowRadio(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=300,height=46,scrollbars=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowLink(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=275,')" & vbNewLine & _
"}" & vbNewLine & _
"// ################## Poll Mod ##################" & vbNewLine & _
"function openPollWindow(url,w,h) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width='+w+',height='+h+',scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function submitPoll(btnPressed) {" & vbNewLine & _
" btnPressed.disabled=true;" & vbNewLine & _
" if (btnPressed.name == ""results"") {" & vbNewLine & _
" document.Poll.Method_Type.value = ""guest_vote"";" & vbNewLine & _
" } else {" & vbNewLine & _
" document.Poll.Method_Type.value = ""member_vote"";" & vbNewLine & _
" }" & vbNewLine & _
" document.Poll.submit();" & vbNewLine & _
"}" & vbNewLine & _
"// #############################################" & vbNewLine & _
"// done hiding -->" & vbNewLine & _
"function openWindowRadio(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=360,height=210,scrollbars=no, resizable=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowMedia(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=680,height=560,scrollbars=no, resizable=no')" & vbNewLine & _
"}" & vbNewLine & _
"</script>" & vbNewLine & _
"<style type=""text/css"">" & vbNewLine & _
"<!--" & vbNewLine & _
"a:link {color:" & strLinkColor & ";text-decoration:" & strLinkTextDecoration & "}" & vbNewLine & _
"a:visited {color:" & strVisitedLinkColor & ";text-decoration:" & strVisitedTextDecoration & "}" & vbNewLine & _
"a:hover {color:" & strHoverFontColor & ";text-decoration:" & strHoverTextDecoration & "}" & vbNewLine & _
"a:active {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
".spnMessageText a:link {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
".spnMessageText a:hover {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
".spnMessageText a:active {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _
"input.radio {background:" & strPopUpTableColor & ";color:#000000}" & vbNewLine & _
"-->" & vbNewLine & _
"</style>" & vbNewLine & _
"</head>" & vbNewLine & _
vbNewLine & _
"<body onload=walkImages() " & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
"<a name=""top""></a>" & vbNewLine & _
vbNewLine & _
"<a name=""top""></a><font face=""" & strDefaultFontFace & """>" & vbNewLine
if strSiteIntegEnabled = "1" then
response.write "<table width=""100%"" border="""
if strSiteBorder = "1" then
response.write "1"
else
response.write "0"
end if
response.write """ cellspacing=""0"" cellpadding=""0"">" & vbNewLine
if strSiteHeader = "1" then
response.write " <tr>" & vbNewLine & _
" <td"
if strSiteLeft = "1" or strSiteRight = "1" then
if strSiteLeft = "1" and strSiteRight = "1" then
Response.write " colspan=""3"""
else
Response.write " colspan=""2"""
end if
end if
response.write ">"
%><!--#include file="inc_site_header.asp"--><%
response.write "</td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
response.write " <tr>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
if strSiteLeft = "1" then
%><!--#include file="inc_site_left.asp"--><%
response.write "</td>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
end if
end if
response.write vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td valign=""top"" width=""40%""><a href=""default.asp"" tabindex=""-1"">" & getCurrentIcon(strTitleImage & "||",strForumTitle,"") & "</a></td>" & vbNewLine & _
" <td valign=""top"" width=""20%"">"
%>
<!--#INCLUDE FILE="inc_button.asp" -->
<%
Response.write "</td>" & _
" <td align=""center"" valign=""top"" width=""40%"">" & vbNewLine & _
" <table border=""0"" cellPadding=""2"" cellSpacing=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & strForumTitle & "</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine
call sForumNavigation()
Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
select case Request.Form("Method_Type")
case "login"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
if strLoginStatus = 0 then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Your username and/or password were incorrect.</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Please either try again or register for an account.</font></p>" & vbNewLine
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged on successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine
end if
Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=" & strReferer & """>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReferer & """>Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
case "logout"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged out successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
end select
if (mlev = 0) then
if not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "search.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "login.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "password.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "faq.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "contact.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) then
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""login"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine
if (strAuthType = "db") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b></font><br />" & vbNewLine & _
" <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Password:</b></font><br />" & vbNewLine & _
" <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td valign=""bottom"">" & vbNewLine
if strGfxButtons = "1" then
Response.Write " <input src=""" & strImageUrl & "button_login.png"" type=""image"" border=""0"" value=""Login"" id=""submit1"" name=""Login"">" & vbNewLine
else
Response.Write " <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font></td>" & vbNewLine
else
if (strAuthType = "nt") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""1"" color=""" & strHiLiteFontColor & """>Please <a href=""register.asp"" tabindex=""-1"">register</a> to post in these Forums</font></td>" & vbNewLine
end if
end if
Response.Write " </tr>" & vbNewLine
if (lcase(strEmail) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <a href=""password.asp""" & dWStatus("Choose a new password if you have forgotten your current one...") & " tabindex=""-1"">Forgot your "
if strAuthType = "nt" then Response.Write("Admin ")
Response.Write "Password?</a>" & vbNewLine
if (lcase(strNoCookies) = "1") then
Response.Write " |" & vbNewLine & _
" <a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" & vbNewLine
end if
Response.Write " <br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine
end if
else
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine
if strAuthType = "db" then
strSqL = "SELECT MEMBER_ID, M_NAME, M_AVATAR_URL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & MemberID
set rs = my_Conn.Execute (strSql)
If not rs.EOF then
strAvatarURL=rs("M_AVATAR_URL")
rs.close
End if
Set rs=Nothing
if strGfxButtons = "1" and (strAvatarURL <> "noavatar.gif" and strShowAvatar = 1) then
Response.Write " <td align=""center""><font face=""" & strDefaultFontFace & """ color=""#D60202"" & strForumFontColor & """" size=""#"" & strFooterFontSize & """"><b>Click on Avatar to Logout!</b></font><br />" & vbNewLine & _
"<font face=""" & strDefaultFontFace & """ size=""1"" & strFooterFontSize & """"><b>You are logged on as</b><br />"
elseif strGfxButtons = "1" and (strShowAvatar = 0 or strAvatarURL = "noavatar.gif") then
Response.Write "<input src=""" & strImageUrl & "button_logout.png"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
end if
end if
if strAuthType="nt" then
Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _
" <td> "
else
if strAuthType = "db" then
Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
" <td align=""center"">"
if strGfxButtons = "1" and (strAvatarURL <> "noavatar.gif" and strShowAvatar = 1) then
Response.Write "<input src=""" & strAvatarURL & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine
end if
end if
end if
Response.Write "</td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
if (mlev = 4 and aAllowed>0) or (lcase(strNoCookies) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"
if User_Count > 0 then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>")
Response.Write "<br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </form>" & vbNewLine
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine
'########### GROUP Categories ########### %>
<!--#INCLUDE FILE="inc_groupjump_to.asp" -->
<% '######## GROUP Categories ##############
Response.Write " <tr>" & vbNewLine & _
" <td>" & vbNewLine
sub sForumNavigation()
' DEM --> Added code to show the subscription line
if strSubscription > 0 and strEmail = "1" then
if mlev > 0 then
strSql = "SELECT COUNT(*) AS MySubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
set rsCount = my_Conn.Execute (strSql)
if rsCount.BOF or rsCount.EOF then
' No Subscriptions found, do nothing
MySubCount = 0
rsCount.Close
set rsCount = nothing
else
MySubCount = rsCount("MySubCount")
rsCount.Close
set rsCount = nothing
end if
if mLev = 4 and aAllowed>0 then
strSql = "SELECT COUNT(*) AS SubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
set rsCount = my_Conn.Execute (strSql)
if rsCount.BOF or rsCount.EOF then
' No Subscriptions found, do nothing
SubCount = 0
rsCount.Close
set rsCount = nothing
else
SubCount = rsCount("SubCount")
rsCount.Close
set rsCount = nothing
end if
end if
else
SubCount = 0
MySubCount = 0
end if
else
SubCount = 0
MySubCount = 0
end if
end sub
if strGroupCategories = "1" then
if Session(strCookieURL & "GROUP_NAME") = "" then
GROUPNAME = " Default Groups "
else
GROUPNAME = Session(strCookieURL & "GROUP_NAME")
end if
'Forum_SQL - Get Groups
strSql = "SELECT GROUP_ID, GROUP_CATID "
strSql = strSql & " FROM " & strTablePrefix & "GROUPS "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rsgroups = Server.CreateObject("ADODB.Recordset")
rsgroups.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsgroups.EOF then
recGroupCatCount = ""
else
allGroupCatData = rsgroups.GetRows(adGetRowsRest)
recGroupCatCount = UBound(allGroupCatData, 2)
end if
rsgroups.Close
set rsgroups = nothing
end if
' ########################### Ban IP Mod ###############################
sub banIP()
Dim i ' Declare counter
Dim c ' Declare counter
Dim strUserIP ' Declare variable
strUserIP = Request.ServerVariables("REMOTE_ADDR")
if strBanIP = "1" then ' If Ban IP is on then
'## Forum_SQL
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'intBanIP'"
set rsIP = my_Conn.Execute(strSql)
aryIP = split(rsIP("C_VALUE"),"|") ' Get ips into array
'## Check to see if users ip is in the array. If it is, ban him.
for i = 0 to ubound(aryIP)
if strUserIP = aryIP(i) then
Response.Write "<p align=center><b>" & formatStr(strBanMessage) & "</b></p>"
Response.End ' If ip found in array, stop everything else
end if
next
' Close connections
rsIP.close
set rsIP = nothing
end if
if strBanIPRange = "1" then ' if ban ip range is on then
'## Forum_SQL
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'intBanIPRange'"
set rsIPRange = my_Conn.Execute(strSql)
aryIPRange = split(rsIPRange("C_VALUE"),"|") ' Get ips into array
'## Check to see if users ip is in the array. If it is, ban him.
for c = 0 to ubound(aryIPRange) ' cycle through the array
if trim(aryIPRange(c)) <> "" then
if instr(strUserIP, aryIPRange(c)) <> 0 then ' if ip found then...
Response.Write "<p align=center><b>" & formatStr(strBanMessage) & "</b></p>"
Response.End ' If ip found in array, stop everything else
end if
end if
next
' Close connections
rsIPRange.close
set rsIPRange = nothing
end if
end sub
' ##########################################################################
%>
<!--#INCLUDE FILE="inc_adminlevel.asp" -->
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 26 October 2013 07:31:52 |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 26 October 2013 : 08:54:39
|
|
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 October 2013 : 10:30:36
|
Well, that works! YEA!
However; that places it in the upper-left corner above the horizontal menu bar. . . all by itself. Would it be a lot of trouble to place it in another area?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 October 2013 : 13:01:50
|
Oh, does it help to know that my menu bar is in my inc_site_header.asp?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 26 October 2013 : 13:19:04
|
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
' ## Locale Below
%>
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_locale.asp" -->
<%
' ## Locale Above
if strShowTimer = "1" then
'### start of timer code
'=== Zuel's Avatar Add-on -- Added to config.asp ===
'Dim StopWatch(19)
sub StartTimer(x)
StopWatch(x) = timer
end sub
function StopTimer(x)
EndTime = Timer
'Watch for the midnight wraparound...
if EndTime < StopWatch(x) then
EndTime = EndTime + (86400)
end if
StopTimer = EndTime - StopWatch(x)
end function
StartTimer 1
'### end of timer code
end if
strArchiveTablePrefix = strTablePrefix & "A_"
strScriptName = request.servervariables("script_name")
strReferer = chkString(request.servervariables("HTTP_REFERER"),"refer")
if Application(strCookieURL & "down") then
if not Instr(strScriptName,"admin_") > 0 then
Response.redirect("down.asp")
end if
end if
if strPageBGImageURL = "" then
strTmpPageBGImageURL = ""
elseif Instr(strPageBGImageURL,"/") > 0 or Instr(strPageBGImageURL,"\") > 0 then
strTmpPageBGImageURL = " background=""" & strPageBGImageURL & """"
else
strTmpPageBGImageURL = " background=""" & strImageUrl & strPageBGImageURL & """"
end if
If strDBType = "" then
Response.Write "<html>" & vbNewLine & _
"<head>" & vbNewline & _
"<title>" & strForumTitle & "</title>" & vbNewline
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "</head>" & vbNewLine & _
"<body" & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""40%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""navyblue"" align=""center""><p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
"<b>There has been a problem...</b><br /><br />" & _
"Your <b>strDBType</b> is not set, please edit your <b>config.asp</b><br />to reflect your database type." & _
"</font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
"<a href=""default.asp"" target=""_top"">Click here to retry.</a></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</body>" & vbNewLine & _
"</html>" & vbNewLine
Response.End
end if
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
%>
<!--#include file="my_theme2.asp"-->
<%
'##### Ban IP Mod ######
Call banIP()
'#######################
if (strAuthType = "nt") then
call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if
if strGroupCategories = "1" then
if Request.QueryString("Group") = "" then
if Request.Cookies(strCookieURL & "GROUP") = "" Then
Group = 2
else
Group = cLng(Request.Cookies(strCookieURL & "GROUP"))
end if
else
Group = cLng(Request.QueryString("Group"))
end if
'set default
Session(strCookieURL & "GROUP_ICON") = "icon_group_categories.gif"
Session(strCookieURL & "GROUP_IMAGE") = strTitleImage
'Forum_SQL - Group exists ?
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
if rs2.EOF or rs2.BOF then
Group = 2
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
end if
Session(strCookieURL & "GROUP_NAME") = rs2("GROUP_NAME")
if instr(rs2("GROUP_ICON"), ".") then
Session(strCookieURL & "GROUP_ICON") = rs2("GROUP_ICON")
end if
if instr(rs2("GROUP_IMAGE"), ".") then
Session(strCookieURL & "GROUP_IMAGE") = rs2("GROUP_IMAGE")
end if
rs2.Close
set rs2 = nothing
Response.Cookies(strCookieURL & "GROUP") = Group
Response.Cookies(strCookieURL & "GROUP").Expires = dateAdd("d", intCookieDuration, strForumTimeAdjust)
if Session(strCookieURL & "GROUP_IMAGE") <> "" then
strTitleImage = Session(strCookieURL & "GROUP_IMAGE")
end if
end if
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = trim(chkString(Request.Form("Name"),"SQLString"))
if strDBNTFUserName = "" then strDBNTFUserName = trim(chkString(Request.Form("User"),"SQLString"))
if strAuthType = "nt" then
strDBNTUserName = Session(strCookieURL & "userID")
strDBNTFUserName = Session(strCookieURL & "userID")
end if
' ##### Contact Us - Inserted 5th line below to allow non-members access with forum locked
if strRequireReg = "1" and strDBNTUserName = "" then
if not Instr(strScriptName,"register.asp") > 0 and _
not Instr(strScriptName,"password.asp") > 0 and _
not Instr(strScriptName,"faq.asp") > 0 and _
not Instr(strScriptName,"contact_staff.asp") > 0 and _
not Instr(strScriptName,"login.asp") > 0 then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
if Request.QueryString <> "" then
Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString)
else
Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))))
end if
end if
end if
' ##### Contact Us End #####
select case Request.Form("Method_Type")
case "login"
strEncodedPassword = sha256("" & Request.Form("Password"))
select case chkUser(strDBNTFUserName, strEncodedPassword,-1)
case 1, 2, 3, 4
Call DoCookies(Request.Form("SavePassword"))
strLoginStatus = 1
case else
strLoginStatus = 0
end select
case "logout"
Call ClearCookies()
end select
if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
if mLev = 4 then aAllowed = cLng(IsAdminAllowed(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0
else
MemberID = -1
mLev = 0
end if
CanShowAvatar=1
if mLev > 3 then
'## Forum_SQL - Get membercount from DB
strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS_PENDING"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn
if not rs.EOF then
User_Count = cLng(rs("U_COUNT"))
else
User_Count = 0
end if
rs.close
set rs = nothing
end if
' ## Ban IPs Below
strLead="00"
strStart=Request.ServerVariables("REMOTE_ADDR")
intSeg=0
For i = 1 to len(strStart)
If mid(strStart,i,1)="." Then
intSeg=intSeg+1
If intSeg=1 Then
strPart1=right(strLead&left(strStart,i-1),3)
x=i
End If
If intSeg=2 Then
strPart2=right(strLead&mid(strStart,x+1,i-x-1),3)
y=i
End If
If intSeg=3 Then
strPart3=right(strLead&mid(strStart,y+1,i-y-1),3)
strPart4=right((strLead&mid(strStart,i+1)),3)
End If
End If
Next
strStart=strPart1&"."&strPart2&"."&strPart3&"."&strPart4
strSqlIP="SELECT IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & strStart & "' AND IPEND >= '" & strStart & "'"
Set rsCheck=my_Conn.Execute(strSqlIP)
If not rsCheck.EOF Then
strIPCountry=rsCheck("IPCOUNTRY")
rsCheck.Close
End If
Set rsCheck=Nothing
intBanned=0
strSqlIP="SELECT * FROM " & strTablePrefix & "BAN_IPS WHERE IP_COUNTRY='" & strIPCountry & "'"
Set rsCheck=my_Conn.Execute(strSqlIP)
If not rsCheck.EOF Then
intBanned=1
rsCheck.Close
End If
Set rsCheck=Nothing
strSql = "SELECT * FROM " & strTablePrefix & "BAN_IPS WHERE IP_START <= '" & strStart & "' AND IP_END >= '" & strStart & "'"
Set rsCheck=my_Conn.Execute(strSql)
If not rsCheck.EOF Then
intBanned=1
rsCheck.Close
End If
Set rsCheck=Nothing
If intBanned=1 Then
Response.Write "<table align=""center"" width=""50%"" bgColor=""" & strPopUpBorderColor & """ border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table align=""center"" width=""100%"" bgColor=""" & strPopUpBorderColor & """ border=""1"" cellpadding=""4"" cellspacing=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strCategoryCellColor & """ colspan=""4"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>IP Bans</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>IP address banned." & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
Call ClearCookies
Response.Write "<meta http-equiv=""Refresh"" content=""4; URL=http://localhost"">" & vbNewLine
WriteFooter
Response.End
End If
' ## Ban IPs Above
'####### Begin UserGroup MOD #######
if Session(strCookieURL & "UserGroups" & MemberID) = "" or _
IsNull(Session(strCookieURL & "UserGroups" & MemberID)) then
strGroupMembership = getGroupMembership(MemberID,1)
Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
end if
'####### End UserGroup MOD #######
Response.Write "<html>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<title>" & GetNewTitle(strScriptName) & "</title>" & vbNewline
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<script type=""text/javascript"" src=""ytplaylist.js""></script>" & vbNewLine
Response.Write "<script type=""text/javascript"" src=""formfieldlimiter.js""></script>" & vbNewLine
Response.Write"<script language=""JavaScript1.2"" src=""resizeimgs.js""></script>" & vbNewLine
Response.Write "<script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
"<!-- hide from JavaScript-challenged browsers" & vbNewLine & _
"function openWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=400')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow2(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=450')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow3(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow4(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=400,height=525')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow5(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindow6(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=500,height=450,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openGameWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=700,scrollbars=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openVideoWindow(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=700,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowHelp(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=470,height=200,scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowRadio(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=300,height=46,scrollbars=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowLink(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=700,height=275,')" & vbNewLine & _
"}" & vbNewLine & _
"// ################## Poll Mod ##################" & vbNewLine & _
"function openPollWindow(url,w,h) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width='+w+',height='+h+',scrollbars=yes')" & vbNewLine & _
"}" & vbNewLine & _
"function submitPoll(btnPressed) {" & vbNewLine & _
" btnPressed.disabled=true;" & vbNewLine & _
" if (btnPressed.name == ""results"") {" & vbNewLine & _
" document.Poll.Method_Type.value = ""guest_vote"";" & vbNewLine & _
" } else {" & vbNewLine & _
" document.Poll.Method_Type.value = ""member_vote"";" & vbNewLine & _
" }" & vbNewLine & _
" document.Poll.submit();" & vbNewLine & _
"}" & vbNewLine & _
"// #############################################" & vbNewLine & _
"// done hiding -->" & vbNewLine & _
"function openWindowRadio(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=360,height=210,scrollbars=no, resizable=no')" & vbNewLine & _
"}" & vbNewLine & _
"function openWindowMedia(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=680,height=560,scrollbars=no, resizable=no')" & vbNewLine & _
"}" & vbNewLine & _
"</script>" & vbNewLine & _
"<style type=""text/css"">" & vbNewLine & _
"<!--" & vbNewLine & _
"a:link {color:" & strLinkColor & ";text-decoration:" & strLinkTextDecoration & "}" & vbNewLine & _
"a:visited {color:" & strVisitedLinkColor & ";text-decoration:" & strVisitedTextDecoration & "}" & vbNewLine & _
"a:hover {color:" & strHoverFontColor & ";text-decoration:" & strHoverTextDecoration & "}" & vbNewLine & _
"a:active {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
".spnMessageText a:link {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
".spnMessageText a:hover {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
".spnMessageText a:active {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _
"input.radio {background:" & strPopUpTableColor & ";color:#000000}" & vbNewLine & _
"-->" & vbNewLine & _
"</style>" & vbNewLine & _
"</head>" & vbNewLine & _
vbNewLine & _
"<body onload=walkImages() " & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
"<a name=""top""></a>" & vbNewLine & _
vbNewLine & _
"<a name=""top""></a><font face=""" & strDefaultFontFace & """>" & vbNewLine
if strSiteIntegEnabled = "1" then
response.write "<table width=""100%"" border="""
if strSiteBorder = "1" then
response.write "1"
else
response.write "0"
end if
response.write """ cellspacing=""0"" cellpadding=""0"">" & vbNewLine
if strSiteHeader = "1" then
response.write " <tr>" & vbNewLine & _
" <td"
if strSiteLeft = "1" or strSiteRight = "1" then
if strSiteLeft = "1" and strSiteRight = "1" then
Response.write " colspan=""3"""
else
Response.write " colspan=""2"""
end if
end if
response.write ">"
%><!--#include file="inc_site_header.asp"--><%
' Get Private Message count for display
if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmcount] "
else
strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "
Set rsPM = my_Conn.Execute(strSql)
If not rsPM.EOF Then
pmcount = rsPM("pmcount")
rsPM.close
Response.Write "<br /><center><a href=""pm_view.asp""><font color=""blue"">Private Message (<font color=""" & strHiliteFontColor & """><b>" & pmcount & "</b></font>)</font></a></center>"
End If
set rsPM = nothing
response.write "</td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
response.write " <tr>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
if strSiteLeft = "1" then
%><!--#include file="inc_site_left.asp"--><%
response.write "</td>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
end if
end if
response.write vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td valign=""top"" width=""40%""><a href=""default.asp"" tabindex=""-1"">" & getCurrentIcon(strTitleImage & "||",strForumTitle,"") & "</a></td>" & vbNewLine & _
" <td valign=""top"" width=""20%"">"
%>
<!--#INCLUDE FILE="inc_button.asp" -->
<%
Response.write "</td>" & _
" <td align=""center"" valign=""top"" width=""40%"">" & vbNewLine & _
" <table border=""0"" cellPadding=""2"" cellSpacing=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & strForumTitle & "</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine
call sForumNavigation()
Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
select case Request.Form("Method_Type")
case "login"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
if strLoginStatus = 0 then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Your username and/or password were incorrect.</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Please either try again or register for an account.</font></p>" & vbNewLine
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged on successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine
end if
Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=" & strReferer & """>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReferer & """>Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
case "logout"
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged out successfully!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</font></a></p>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine
WriteFooter
Response.End
end select
if (mlev = 0) then
if not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "search.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "login.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "password.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "faq.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "contact.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) then
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""login"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine
if (strAuthType = "db") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b></font><br />" & vbNewLine & _
" <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Password:</b></font><br />" & vbNewLine & _
" <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
" <td valign=""bottom"">" & vbNewLine
if strGfxButtons = "1" then
Response.Write " <input src=""" & strImageUrl & "button_login.png"" type=""image"" border=""0"" value=""Login"" id=""submit1"" name=""Login"">" & vbNewLine
else
Response.Write " <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font></td>" & vbNewLine
else
if (strAuthType = "nt") then
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""1"" color=""" & strHiLiteFontColor & """>Please <a href=""register.asp"" tabindex=""-1"">register</a> to post in these Forums</font></td>" & vbNewLine
end if
end if
Response.Write " </tr>" & vbNewLine
if (lcase(strEmail) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <a href=""password.asp""" & dWStatus("Choose a new password if you have forgotten your current one...") & " tabindex=""-1"">Forgot your "
if strAuthType = "nt" then Response.Write("Admin ")
Response.Write "Password?</a>" & vbNewLine
if (lcase(strNoCookies) = "1") then
Response.Write " |" & vbNewLine & _
" <a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" & vbNewLine
end if
Response.Write " <br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine
end if
else
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine
if strAuthType = "db" then
strSqL = "SELECT MEMBER_ID, M_NAME, M_AVATAR_URL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & MemberID
set rs = my_Conn.Execute (strSql)
If not rs.EOF then
strAvatarURL=rs("M_AVATAR_URL")
rs.close
End if
Set rs=Nothing
if strGfxButtons = "1" and (strAvatarURL <> "noavatar.gif" and strShowAvatar = 1) then
Response.Write " <td align=""center""><font face=""" & strDefaultFontFace & """ color=""#D60202"" & strForumFontColor & """" size=""#"" & strFooterFontSize & """"><b>Click on Avatar to Logout!</b></font><br />" & vbNewLine & _
"<font face=""" & strDefaultFontFace & """ size=""1"" & strFooterFontSize & """"><b>You are logged on as</b><br />"
elseif strGfxButtons = "1" and (strShowAvatar = 0 or strAvatarURL = "noavatar.gif") then
Response.Write "<input src=""" & strImageUrl & "button_logout.png"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
end if
end if
if strAuthType="nt" then
Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _
" <td> "
else
if strAuthType = "db" then
Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
" <td align=""center"">"
if strGfxButtons = "1" and (strAvatarURL <> "noavatar.gif" and strShowAvatar = 1) then
Response.Write "<input src=""" & strAvatarURL & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine
end if
end if
end if
Response.Write "</td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
if (mlev = 4 and aAllowed>0) or (lcase(strNoCookies) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"
if User_Count > 0 then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>")
Response.Write "<br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.Write " </form>" & vbNewLine
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine
'########### GROUP Categories ########### %>
<!--#INCLUDE FILE="inc_groupjump_to.asp" -->
<% '######## GROUP Categories ##############
Response.Write " <tr>" & vbNewLine & _
" <td>" & vbNewLine
sub sForumNavigation()
' DEM --> Added code to show the subscription line
if strSubscription > 0 and strEmail = "1" then
if mlev > 0 then
strSql = "SELECT COUNT(*) AS MySubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
set rsCount = my_Conn.Execute (strSql)
if rsCount.BOF or rsCount.EOF then
' No Subscriptions found, do nothing
MySubCount = 0
rsCount.Close
set rsCount = nothing
else
MySubCount = rsCount("MySubCount")
rsCount.Close
set rsCount = nothing
end if
if mLev = 4 and aAllowed>0 then
strSql = "SELECT COUNT(*) AS SubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
set rsCount = my_Conn.Execute (strSql)
if rsCount.BOF or rsCount.EOF then
' No Subscriptions found, do nothing
SubCount = 0
rsCount.Close
set rsCount = nothing
else
SubCount = rsCount("SubCount")
rsCount.Close
set rsCount = nothing
end if
end if
else
SubCount = 0
MySubCount = 0
end if
else
SubCount = 0
MySubCount = 0
end if
end sub
if strGroupCategories = "1" then
if Session(strCookieURL & "GROUP_NAME") = "" then
GROUPNAME = " Default Groups "
else
GROUPNAME = Session(strCookieURL & "GROUP_NAME")
end if
'Forum_SQL - Get Groups
strSql = "SELECT GROUP_ID, GROUP_CATID "
strSql = strSql & " FROM " & strTablePrefix & "GROUPS "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rsgroups = Server.CreateObject("ADODB.Recordset")
rsgroups.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsgroups.EOF then
recGroupCatCount = ""
else
allGroupCatData = rsgroups.GetRows(adGetRowsRest)
recGroupCatCount = UBound(allGroupCatData, 2)
end if
rsgroups.Close
set rsgroups = nothing
end if
' ########################### Ban IP Mod ###############################
sub banIP()
Dim i ' Declare counter
Dim c ' Declare counter
Dim strUserIP ' Declare variable
strUserIP = Request.ServerVariables("REMOTE_ADDR")
if strBanIP = "1" then ' If Ban IP is on then
'## Forum_SQL
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'intBanIP'"
set rsIP = my_Conn.Execute(strSql)
aryIP = split(rsIP("C_VALUE"),"|") ' Get ips into array
'## Check to see if users ip is in the array. If it is, ban him.
for i = 0 to ubound(aryIP)
if strUserIP = aryIP(i) then
Response.Write "<p align=center><b>" & formatStr(strBanMessage) & "</b></p>"
Response.End ' If ip found in array, stop everything else
end if
next
' Close connections
rsIP.close
set rsIP = nothing
end if
if strBanIPRange = "1" then ' if ban ip range is on then
'## Forum_SQL
strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'intBanIPRange'"
set rsIPRange = my_Conn.Execute(strSql)
aryIPRange = split(rsIPRange("C_VALUE"),"|") ' Get ips into array
'## Check to see if users ip is in the array. If it is, ban him.
for c = 0 to ubound(aryIPRange) ' cycle through the array
if trim(aryIPRange(c)) <> "" then
if instr(strUserIP, aryIPRange(c)) <> 0 then ' if ip found then...
Response.Write "<p align=center><b>" & formatStr(strBanMessage) & "</b></p>"
Response.End ' If ip found in array, stop everything else
end if
end if
next
' Close connections
rsIPRange.close
set rsIPRange = nothing
end if
end sub
' ##########################################################################
%>
<!--#INCLUDE FILE="inc_adminlevel.asp" -->
|
Edited by - Carefree on 27 October 2013 06:35:03 |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 26 October 2013 : 14:14:40
|
I received an error message "Expected statement" regarding the <br /><center>, Carefree.
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 26 October 2013 14:24:42 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 October 2013 : 06:35:28
|
Fixed above, had a brain dump. |
|
|
MaGraham
Senior Member
USA
1297 Posts |
Posted - 27 October 2013 : 11:47:12
|
That worked!
It's PERFECT!
Thank you so much, Carefree!
You're the BEST!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 October 2013 : 19:29:57
|
You're welcome. |
|
|
|
Topic |
|
|
|