<% '################################################################################# '## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen '## '## 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 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 support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# Session.LCID = 1033 '## Do Not Edit Response.Buffer = true dim strDBType, strConnString, strTablePrefix, strMemberTablePrefix '## Do Not Edit '################################################################################# '## SELECT YOUR DATABASE TYPE AND CONNECTION TYPE (access, sqlserver or mysql) '################################################################################# 'strDBType = "sqlserver" strDBType = "access" 'strDBType = "mysql" '## Make sure to uncomment one of the strConnString lines! 'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("snitz_forums_2000.mdb") '## MS Access 97 using virtual path 'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 97 on Brinkster 'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 97 'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/tools/snitz_forums_2000.mdb") '## MS Access 2000 using virtual path 'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 2000 on Brinkster 'DEV STRING 'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\_Websites\bt_interface\workspace\nwnode\forum\tools\nwn0d3w0rkspf0r4m.mdb" '## MS Access 2000 'LIVE STRING strConnString = MM_workspace_forum_STRING '## MS Access 2000 'strConnString = "driver={SQL Server};server=SERVER_NAME;uid=UID;pwd=PWD;database=DB_NAME" '## MS SQL Server 7 'strConnString = "driver={SQL Server};server=SERVER_NAME;uid=UID;pwd=PWD;database=DB_NAME" '## MS SQL Server 2000 'strConnString = "driver=MySQL;server=SERVER_IP;uid=UID;pwd=PWD;database=DB_NAME" '## MySQL strTablePrefix = "FORUM_" strMemberTablePrefix = "FORUM_" '################################################################################# '## Do Not Edit Below This Line - It could destroy your forums and lose data '################################################################################# dim strVersion, strForumTitle, strCopyright, strTitleImage, strHomeURL, strForumURL, strCookieURL dim strAuthType, strSetCookieToForum dim strEmail, strUniqueEmail, strMailMode, strMailServer, strSender dim strDateType, strTimeAdjust, strTimeType, strForumTimeAdjust dim strMoveTopicMode, strMoveNotify, strIPLogging, strPrivateForums, strShowModerators, strShowRank, strAllowForumCode, strAllowHTML dim strNoCookies, strEditedByDate dim intHotTopicNum, strHotTopic dim strIMGInPosts dim strHomepage, strICQ, strAIM, strInForumAdmin, strSecureAdmin, strIcons, strGfxButtons dim strBadWordFilter, strBadWords dim strDefaultFontFace, strDefaultFontSize, strHeaderFontSize, strFooterFontSize dim strPageBGColor, strDefaultFontColor dim strLinkColor, strLinkTextDecoration, strVisitedLinkColor, strVisitedTextDecoration, strActiveLinkColor, strHoverFontColor, strHoverTextDecoration dim strHeadCellColor, strHeadFontColor, strCategoryCellColor, strCategoryFontColor dim strForumFirstCellColor, strForumCellColor, strAltForumCellColor, strForumFontColor, strForumLinkColor dim strTableBorderColor, strPopUpTableColor, strPopUpBorderColor, strNewFontColor, strTopicWidthLeft, strTopicNoWrapLeft, strTopicWidthRight, strTopicNoWrapRight dim strRankColor1, strRankColor2, strRankColor3 dim strRankLevel0, strRankLevel1, strRankLevel2, strRankLevel3, strRankLevel4, strRankLevel5 dim intRankLevel0, intRankLevel1, intRankLevel2, intRankLevel3, intRankLevel4, intRankLevel5 dim strShowStatistics, strShowImagePoweredBy, strLogonForMail, strShowPaging, strShowTopicNav, strPageSize, strPageNumberSize dim strNTGroupsSTR dim strModeration, strSubscription strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/")) strUniqueID = "Snitz00" if Application(strCookieURL & "ConfigLoaded")= "" or IsNull(Application(strCookieURL & "ConfigLoaded")) or blnSetup="Y" then on error resume next blnLoadConfig = TRUE set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Errors.Clear my_Conn.Open strConnString for counter = 0 to my_conn.Errors.Count -1 ConnErrorNumber = my_conn.Errors(counter).Number if my_conn.Errors(counter).Number <> 0 then if blnSetup <> "Y" then my_conn.Errors.Clear Response.Redirect "setup.asp?RC=1&CC=1&strDBType=" & strDBType & "&EC=" & ConnErrorNumber else blnLoadConfig = FALSE end if end if next my_conn.Errors.Clear '## if the configvariables aren't loaded into the Application object '## or after the admin has changed the configuration '## the variables get (re)loaded '## Forum_SQL strSql = "SELECT * FROM " & strTablePrefix & "CONFIG_NEW " set rsConfig = my_Conn.Execute (strSql) for counter = 0 to my_conn.Errors.Count -1 ConnErrorNumber = my_conn.Errors(counter).Number if my_conn.Errors(counter).Number <> 0 then if blnSetup <> "Y" then my_conn.Errors.Clear myConnError = my_Conn.Errors(counter).Number my_Conn.Errors.Clear Err.Clear strSql = "SELECT " & strTablePrefix & "CONFIG.C_STRVERSION, " strSql = strSql & strTablePrefix & "CONFIG.C_STRSENDER " strSql = strSql & " FROM " & strTablePrefix & "CONFIG " set rsInfo = my_Conn.Execute (StrSql) strVersion = rsInfo("C_STRVERSION") strSender = rsInfo("C_STRSENDER") rsInfo.Close set rsInfo = nothing my_Conn.Close set my_Conn = nothing Response.Redirect "setup.asp?RC=3&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&strDBType="& strDBType & "&EC=" & myConnError else my_conn.Errors.Clear blnLoadConfig = FALSE end if end if next my_conn.Errors.Clear if blnLoadConfig then Application.Lock do while not rsConfig.EOF Application(strCookieURL & Trim(UCase(rsConfig("C_VARIABLE")))) = Trim(rsConfig("C_VALUE")) rsConfig.MoveNext loop Application.UnLock rsConfig.close end if my_Conn.Close set my_Conn = nothing on error goto 0 Application.Lock Application(strCookieURL & "ConfigLoaded")= "YES" Application.UnLock end if ' ## Read the config-info from the application variables... strVersion = Application(strCookieURL & "STRVERSION") strForumTitle = Application(strCookieURL & "STRFORUMTITLE") strCopyright = Application(strCookieURL & "STRCOPYRIGHT") strTitleImage = Application(strCookieURL & "STRTITLEIMAGE") strHomeURL = Application(strCookieURL & "STRHOMEURL") strForumURL = Application(strCookieURL & "STRFORUMURL") strAuthType = Application(strCookieURL & "STRAUTHTYPE") strSetCookieToForum = Application(strCookieURL & "STRSETCOOKIETOFORUM") strEmail = Application(strCookieURL & "STREMAIL") strUniqueEmail = Application(strCookieURL & "STRUNIQUEEMAIL") strMailMode = Application(strCookieURL & "STRMAILMODE") strMailServer = Application(strCookieURL & "STRMAILSERVER") strSender = Application(strCookieURL & "STRSENDER") strDateType = Application(strCookieURL & "STRDATETYPE") strTimeAdjust = Application(strCookieURL & "STRTIMEADJUST") strTimeType = Application(strCookieURL & "STRTIMETYPE") strMoveTopicMode = Application(strCookieURL & "STRMOVETOPICMODE") strMoveNotify = Application(strCookieURL & "STRMOVENOTIFY") strIPLogging = Application(strCookieURL & "STRIPLOGGING") strPrivateForums = Application(strCookieURL & "STRPRIVATEFORUMS") strShowModerators = Application(strCookieURL & "STRSHOWMODERATORS") strAllowForumCode = Application(strCookieURL & "STRALLOWFORUMCODE") strIMGInPosts = Application(strCookieURL & "STRIMGINPOSTS") strAllowHTML = Application(strCookieURL & "STRALLOWHTML") strNoCookies = Application(strCookieURL & "STRNOCOOKIES") strSecureAdmin = Application(strCookieURL & "STRSECUREADMIN") strHotTopic = Application(strCookieURL & "STRHOTTOPIC") intHotTopicNum = Application(strCookieURL & "INTHOTTOPICNUM") strICQ = Application(strCookieURL & "STRICQ") strYAHOO = Application(strCookieURL & "STRYAHOO") strAIM = Application(strCookieURL & "STRAIM") strFullName = Application(strCookieURL & "STRFULLNAME") strPicture = Application(strCookieURL & "STRPICTURE") strSex = Application(strCookieURL & "STRSEX") strCity= Application(strCookieURL & "STRCITY") strState = Application(strCookieURL & "STRSTATE") strAge = Application(strCookieURL & "STRAGE") strCountry = Application(strCookieURL & "STRCOUNTRY") strOccupation = Application(strCookieURL & "STROCCUPATION") strBio = Application(strCookieURL & "STRBIO") strHobbies = Application(strCookieURL & "STRHOBBIES") strLNews = Application(strCookieURL & "STRLNEWS") strQuote = Application(strCookieURL & "STRQUOTE") strMarStatus = Application(strCookieURL & "STRMARSTATUS") strFavLinks = Application(strCookieURL & "STRFAVLINKS") strRecentTopics = Application(strCookieURL & "STRRECENTTOPICS") strAllowHideEmail = "1" '##not yet used ! strHomepage = Application(strCookieURL & "STRHOMEPAGE") strUseExtendedProfile = (strBio + strHobbies + strLNews + strRecentTopics + strPicture + strQuote) > 0 strUseExtendedProfile = strUseExtendedProfile or ((strICQ + strYAHOO + strAIM + strFullName*2 + strSex + strCity + strState + strAge + strCountry + strOccupation + strFavLinks*2) > 5) strIcons = Application(strCookieURL & "STRICONS") strGfxButtons = Application(strCookieURL & "STRGFXBUTTONS") strEditedByDate = Application(strCookieURL & "STREDITEDBYDATE") strBadWordFilter = Application(strCookieURL & "STRBADWORDFILTER") strBadWords = Application(strCookieURL & "STRBADWORDS") strDefaultFontFace = Application(strCookieURL & "STRDEFAULTFONTFACE") strDefaultFontSize = Application(strCookieURL & "STRDEFAULTFONTSIZE") strHeaderFontSize = Application(strCookieURL & "STRHEADERFONTSIZE") strFooterFontSize = Application(strCookieURL & "STRFOOTERFONTSIZE") strPageBGColor = Application(strCookieURL & "STRPAGEBGCOLOR") strDefaultFontColor = Application(strCookieURL & "STRDEFAULTFONTCOLOR") strLinkColor = Application(strCookieURL & "STRLINKCOLOR") strLinkTextDecoration = Application(strCookieURL & "STRLINKTEXTDECORATION") strVisitedLinkColor = Application(strCookieURL & "STRVISITEDLINKCOLOR") strVisitedTextDecoration = Application(strCookieURL & "STRVISITEDTEXTDECORATION") strActiveLinkColor = Application(strCookieURL & "STRACTIVELINKCOLOR") strHoverFontColor = Application(strCookieURL & "STRHOVERFONTCOLOR") strHoverTextDecoration = Application(strCookieURL & "STRHOVERTEXTDECORATION") strHeadCellColor = Application(strCookieURL & "STRHEADCELLCOLOR") strHeadFontColor = Application(strCookieURL & "STRHEADFONTCOLOR") strCategoryCellColor = Application(strCookieURL & "STRCATEGORYCELLCOLOR") strCategoryFontColor = Application(strCookieURL & "STRCATEGORYFONTCOLOR") strForumFirstCellColor = Application(strCookieURL & "STRFORUMFIRSTCELLCOLOR") strForumCellColor = Application(strCookieURL & "STRFORUMCELLCOLOR") strAltForumCellColor = Application(strCookieURL & "STRALTFORUMCELLCOLOR") strForumFontColor = Application(strCookieURL & "STRFORUMFONTCOLOR") strForumLinkColor = Application(strCookieURL & "STRFORUMLINKCOLOR") strTableBorderColor = Application(strCookieURL & "STRTABLEBORDERCOLOR") strPopUpTableColor = Application(strCookieURL & "STRPOPUPTABLECOLOR") strPopUpBorderColor = Application(strCookieURL & "STRPOPUPBORDERCOLOR") strNewFontColor = Application(strCookieURL & "STRNEWFONTCOLOR") strTopicWidthLeft = Application(strCookieURL & "STRTOPICWIDTHLEFT") strTopicNoWrapLeft = Application(strCookieURL & "STRTOPICNOWRAPLEFT") strTopicWidthRight = Application(strCookieURL & "STRTOPICWIDTHRIGHT") strTopicNoWrapRight = Application(strCookieURL & "STRTOPICNOWRAPRIGHT") strShowRank = Application(strCookieURL & "STRSHOWRANK") strRankAdmin = Application(strCookieURL & "STRRANKADMIN") strRankMod = Application(strCookieURL & "STRRANKMOD") strRankLevel0 = Application(strCookieURL & "STRRANKLEVEL0") strRankLevel1 = Application(strCookieURL & "STRRANKLEVEL1") strRankLevel2 = Application(strCookieURL & "STRRANKLEVEL2") strRankLevel3 = Application(strCookieURL & "STRRANKLEVEL3") strRankLevel4 = Application(strCookieURL & "STRRANKLEVEL4") strRankLevel5 = Application(strCookieURL & "STRRANKLEVEL5") strRankColorAdmin = Application(strCookieURL & "STRRANKCOLORADMIN") strRankColorMod = Application(strCookieURL & "STRRANKCOLORMOD") strRankColor0 = Application(strCookieURL & "STRRANKCOLOR0") strRankColor1 = Application(strCookieURL & "STRRANKCOLOR1") strRankColor2 = Application(strCookieURL & "STRRANKCOLOR2") strRankColor3 = Application(strCookieURL & "STRRANKCOLOR3") strRankColor4 = Application(strCookieURL & "STRRANKCOLOR4") strRankColor5 = Application(strCookieURL & "STRRANKCOLOR5") intRankLevel0 = Application(strCookieURL & "INTRANKLEVEL0") intRankLevel1 = Application(strCookieURL & "INTRANKLEVEL1") intRankLevel2 = Application(strCookieURL & "INTRANKLEVEL2") intRankLevel3 = Application(strCookieURL & "INTRANKLEVEL3") intRankLevel4 = Application(strCookieURL & "INTRANKLEVEL4") intRankLevel5 = Application(strCookieURL & "INTRANKLEVEL5") strShowStatistics = Application(strCookieURL & "STRSHOWSTATISTICS") strShowImagePoweredBy = Application(strCookieURL & "STRSHOWIMAGEPOWEREDBY") strLogonForMail = Application(strCookieURL & "STRLOGONFORMAIL") strShowPaging = Application(strCookieURL & "STRSHOWPAGING") strShowTopicNav = Application(strCookieURL & "STRSHOWTOPICNAV") strPageSize = Application(strCookieURL & "STRPAGESIZE") strPageNumberSize = Application(strCookieURL & "STRPAGENUMBERSIZE") strForumTimeAdjust = DateAdd("h", strTimeAdjust , Now()) strNTGroups = Application(strCookieURL & "STRNTGROUPS") strAutoLogon = Application(strCookieURL & "STRAUTOLOGON") strModeration = Application(strCookieURL & "STRMODERATION") strSubscription = Application(strCookieURL & "STRSUBSCRIPTION") if strSecureAdmin = "0" then Session(strCookieURL & "Approval") = "15916941253" end if if strAuthType = "db" then strDBNTSQLName = "M_NAME" strAutoLogon ="0" strNTGroups ="0" else strDBNTSQLName = "M_USERNAME" end if %>