Filen heter config.asp :
<!--#INCLUDE FILE="inc_adovbs.asp"-->
<%
Session.LCID = 1033 '## Do Not Edit
Response.Buffer = true
dim strDBType, strConnString, strTablePrefix, strMemberTablePrefix, strFilterTablePrefix '## Do Not Edit
Dim counter, ConnErrorNumber, ConnErrorDesc, blnSetup '## Do Not Edit
strDBType = "mysql"
strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=localhost;user=username;password=password;DATABASE=databasnamn;" '
strTablePrefix = "FORUM_"
strMemberTablePrefix = "FORUM_"
strFilterTablePrefix = "FORUM_" 'used for BADWORDS and NAMEFILTER tables
'#################################################################################
'## If you have deleted the default Admin account, you may need to change the
'## value below. Otherwise, it should be left unchanged. (such as with a new
'## installation)
'#################################################################################
Const intAdminMemberID = 1
'#################################################################################
'## intCookieDuration is the amount of days before the forum cookie expires
'## You can set it to a higher value
'## For example for one year you can set it to 365
'## (default is 30 days)
'#################################################################################
Const intCookieDuration = 30
%>
<!--#INCLUDE FILE="inc_iconfiles.asp"-->
<%
'#################################################################################
'## Do Not Edit Below This Line - It could destroy your forums and lose data
'#################################################################################
Dim mLev, strLoginStatus, MemberID, strArchiveTablePrefix
Dim strVersion, strForumTitle, strCopyright, strTitleImage, strHomeURL
Dim strForumURL, strAuthType, strSetCookieToForum, strEmail, strUniqueEmail
Dim strMailMode, strMailServer, strSender, strDateType, strTimeAdjust
Dim strTimeType, strMoveTopicMode, strMoveNotify, strIPLogging, strPrivateForums
Dim strShowModerators, strAllowForumCode, strIMGInPosts, strAllowHTML, strNoCookies
Dim strHotTopic, intHotTopicNum, strSecureAdmin
Dim strAIM, strICQ, strMSN, strYAHOO
Dim strFullName, strPicture, strSex, strCity, strState
Dim strAge, strAgeDOB, strCountry, strOccupation, strBio
Dim strHobbies, strLNews, strQuote, strMarStatus, strFavLinks
Dim strRecentTopics, strAllowHideEmail, strHomepage, strUseExtendedProfile, strIcons
Dim strGfxButtons, strEditedByDate, strBadWordFilter, strBadWords, strDefaultFontFace
Dim strDefaultFontSize, strHeaderFontSize, strFooterFontSize, strPageBGColor, strDefaultFontColor
Dim strLinkColor, strLinkTextDecoration, strVisitedLinkColor, strVisitedTextDecoration
Dim strActiveLinkColor, strActiveTextDecoration, strHoverFontColor, strHoverTextDecoration
Dim strHeadCellColor, strHeadFontColor, strCategoryCellColor, strCategoryFontColor
Dim strForumFirstCellColor, strForumCellColor, strAltForumCellColor, strForumFontColor
Dim strForumLinkColor, strForumLinkTextDecoration, strForumVisitedLinkColor, strForumVisitedTextDecoration
Dim strForumActiveLinkColor, strForumActiveTextDecoration, strForumHoverFontColor, strForumHoverTextDecoration
Dim strTableBorderColor, strPopUpTableColor, strPopUpBorderColor, strNewFontColor, strHiLiteFontColor, strSearchHiLiteColor
Dim strTopicWidthLeft, strTopicNoWrapLeft, strTopicWidthRight, strTopicNoWrapRight, strShowRank
Dim strRankAdmin, strRankMod, strRankColorAdmin, strRankColorMod
Dim strRankLevel0, strRankLevel1, strRankLevel2, strRankLevel3, strRankLevel4, strRankLevel5
Dim strRankColor0, strRankColor1, strRankColor2, strRankColor3, strRankColor4, strRankColor5
Dim intRankLevel0, intRankLevel1, intRankLevel2, intRankLevel3, intRankLevel4, intRankLevel5
Dim strSignatures, strDSignatures, strShowStatistics, strShowImagePoweredBy, strLogonForMail
Dim strShowPaging, strShowTopicNav, strPageSize, strPageNumberSize, strForumTimeAdjust
Dim strNTGroups, strAutoLogon, strModeration, strSubscription, strArchiveState, strUserNameFilter
Dim strFloodCheck, strFloodCheckTime, strTimeLimit, strEmailVal, strProhibitNewMembers, strRequireReg, strRestrictReg
Dim strGroupCategories, strPageBGImageUrl, strImageUrl, strJumpLastPost, strStickyTopic, strShowSendToFriend
Dim strShowPrinterFriendly, strShowTimer, strTimerPhrase, strShowFormatButtons, strShowSmiliesTable, strShowQuickReply
Dim SubCount, MySubCount
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
Err.Clear
my_Conn.Open strConnString
for counter = 0 to my_conn.Errors.Count -1
ConnErrorNumber = Err.Number
ConnErrorDesc = my_Conn.Errors(counter).Description
If ConnErrorNumber \<\> 0 Then
If blnSetup \<\> "Y" Then
my_Conn.Errors.Clear
Err.Clear
Response.Redirect "setup.asp?RC=1&CC=1&strDBType=" & strDBType & "&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc)
else
blnLoadConfig = FALSE
end if
end if
next
my_Conn.Errors.Clear
Err.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 = Err.Number
If ConnErrorNumber \<\> 0 Then
If blnSetup \<\> "Y" Then
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT C_STRVERSION, 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
if strVersion = "" then
strSql = "SELECT C_VALUE "
strSql = strSql & " FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'strVersion' "
set rsInfo = my_Conn.Execute (StrSql)
strVersion = rsInfo("C_VALUE")
rsInfo.Close
set rsInfo = nothing
strSql = "SELECT C_VALUE "
strSql = strSql & " FROM " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " WHERE C_VARIABLE = 'strSender' "
set rsInfo = my_Conn.Execute (StrSql)
strSender = rsInfo("C_VALUE")
rsInfo.Close
set rsInfo = nothing
end if
my_Conn.Close
set my_Conn = nothing
Response.Redirect "setup.asp?RC=2&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&strDBType="& strDBType & "&EC=" & ConnErrorNumber
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