<% '################################################################################# '## Snitz Forums 2000 v3.4.05 '################################################################################# '## Copyright (C) 2000-05 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 '## '################################################################################# %> <% if strShowTimer = "1" then '### start of timer code 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 "" & vbNewLine & _ "" & vbNewline & _ "" & strForumTitle & "" & vbNewline '## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "" & vbNewline '## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "

" & _ "There has been a problem...

" & _ "Your strDBType is not set, please edit your config.asp
to reflect your database type." & _ "

" & _ "Click here to retry.
" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine Response.End end if set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString 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 = 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 if strRequireReg = "1" and strDBNTUserName = "" then if not Instr(strScriptName,"policy.asp") > 0 and _ not Instr(strScriptName,"register.asp") > 0 and _ not Instr(strScriptName,"password.asp") > 0 and _ not Instr(strScriptName,"faq.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 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)) chkCookie = 0 else MemberID = -1 mLev = 0 end if if mLev = 4 and strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" then '## Forum_SQL - Get membercount from DB strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS_PENDING WHERE M_APPROVE = " & 0 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 Response.Write "" & vbNewline & vbNewline & _ "" & vbNewline & _ "" & GetNewTitle(strScriptName) & "" & vbNewline '## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "" & vbNewline '## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & getCurrentIcon(strTitleImage & "||",strForumTitle,"") & "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine select case Request.Form("Method_Type") case "login" Response.Write "
" & strForumTitle & "
" & vbNewLine call sForumNavigation() Response.Write "
" & vbNewLine & _ "
" & vbNewLine if strLoginStatus = 0 then Response.Write "

Your username and/or password were incorrect.

" & vbNewLine & _ "

Please either try again or register for an account.

" & vbNewLine else Response.Write "

You logged on successfully!

" & vbNewLine & _ "

Thank you for your participation.

" & vbNewLine end if Response.Write "" & vbNewLine & _ "

Back To Forum

" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine WriteFooter Response.End case "logout" Response.Write "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "" & vbNewLine & _ "

You logged out successfully!

" & vbNewLine & _ "

Thank you for your participation.

" & vbNewLine & _ "" & vbNewLine & _ "

Back To Forum

" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if else Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if Response.Write " " & vbNewLine end if Response.Write "
" & 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"), "policy.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"), "post.asp") > 0) then Response.Write "
" & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if (strAuthType = "db") then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine else if (strAuthType = "nt") then Response.Write " " & vbNewLine end if end if Response.Write " " & vbNewLine if (lcase(strEmail) = "1") then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if Response.Write "
Username:
" & vbNewLine & _ "
Password:
" & vbNewLine & _ "
" & vbNewLine if strGfxButtons = "1" then Response.Write " " & vbNewLine else Response.Write " " & vbNewLine end if Response.Write "
" & vbNewLine & _ " Save PasswordPlease register to post in these Forums
" & vbNewLine & _ " Forgot your " if strAuthType = "nt" then Response.Write("Admin ") Response.Write "Password?" & vbNewLine if (lcase(strNoCookies) = "1") then Response.Write " |" & vbNewLine & _ " Admin Options" & vbNewLine end if Response.Write "

" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
You are logged on as
" if strAuthType="nt" then Response.Write "" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")
 " else if strAuthType = "db" then Response.Write "" & profileLink(ChkString(strDBNTUserName, "display"),MemberID) & "" if strGfxButtons = "1" then Response.Write "" else Response.Write "" end if end if end if Response.Write "
" & vbNewLine & _ "
Admin Options" if mLev = 4 and (strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" and User_Count > 0) then Response.Write(" | (" & User_Count & ") Member(s) awaiting approval") Response.Write "

" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine '########### GROUP Categories ########### %> <% '######## GROUP Categories ############## Response.Write " " & vbNewLine & _ "
" & 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 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 Response.Write " Home" & vbNewline & _ " |" & vbNewline if strUseExtendedProfile then Response.Write " Profilo" & vbNewline else Response.Write " Profilo" & vbNewline end if if strAutoLogon <> "1" then if strProhibitNewMembers <> "1" then Response.Write " |" & vbNewline & _ " Registrati" & vbNewline end if end if Response.Write " |" & vbNewline & _ " Discussioni attive" & vbNewline ' DEM --> Start of code added to show subscriptions if they exist if (strSubscription > 0) then if mlev = 4 and SubCount > 0 then Response.Write " |" & vbNewline & _ " Tutte le discussioni" & vbNewline end if if MySubCount > 0 then Response.Write " |" & vbNewline & _ " Le tue discussioni" & vbNewline end if end if ' DEM --> End of Code added to show subscriptions if they exist Response.Write " |" & vbNewline & _ " Utenti" & vbNewline & _ " |" & vbNewline & _ " "" then Response.Write("?FORUM_ID=" & cLng(Request.QueryString("FORUM_ID"))) Response.Write """" & dWStatus("Esegui una ricerca per parola chiave, data, e/o nome...") & " tabindex=""-1"">Cerca" & vbNewline & _ " |" & vbNewline & _ " FAQ" 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 %>