⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.asp

📁 代码名称: Snitz Forums 2000 代码语言: 英文 代码类型: 国外代码 运行环境: ASP 授权方式: 免费代码 代码大小: 530kb 代码等级: 3 整
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#INCLUDE FILE="inc_adovbs.asp"-->
<%
'#################################################################################
'## 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
'##
'#################################################################################

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

'#################################################################################
'## 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 and edit it so that it points to where your database is!
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("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
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 2000
'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=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;" '## MS SQL Server 6.x/7.x/2000 (OLEDB connection)
'strConnString = "driver={SQL Server};server=SERVER_NAME;uid=UID;pwd=PWD;database=DB_NAME" '## MS SQL Server 6.x/7.x/2000 (ODBC connection)
'strConnString = "driver=MySQL;server=SERVER_IP;uid=UID;pwd=PWD;database=DB_NAME" '## MySQL w/ MyODBC v2.50
'strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=SERVER_IP;user=UID;password=PWD;DATABASE=DB_NAME;" '##MySQL w/ MyODBC v3.51
'strConnString = "DSN_NAME" '## DSN

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -