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

📄 setup.asp

📁 代码名称: Snitz Forums 2000 代码语言: 英文 代码类型: 国外代码 运行环境: ASP 授权方式: 免费代码 代码大小: 530kb 代码等级: 3 整
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	elseif ErrorCode <> "" then
		Response.Write("    <p>Code :  " & ErrorCode & "</p>" & vbNewLine)
		if ErrorDesc <> "" then
			Response.Write("	<p><b>Error Description</b> : <br />" & ErrorDesc & "</p>" & vbNewLine)
		end if
	end if
	Response.Write	"    </font></p></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"  <tr>" & vbNewLine & _
			"    <td align=""center"">" & vbNewLine & _
			"    <font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine
	if Request.QueryString("RET") <> "" then
		Response.Write	"    <a href=""" & Request.QueryString("RET") & """ target=""_top"">Click here to return to the previous screen.</a>" & vbNewLine
	else
		Response.Write	"    <a href=""setup.asp"" target=""_top"">Click here to retry.</a>" & vbNewLine
	end if
	Response.Write	"    </font></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine

elseif ResponseCode = 2 then '## cannot find all the fields in the database

	strSender = Request.QueryString("MAIL")
	strVersion = Request.QueryString("VER")
	ErrorCode = Request.QueryString("EC")
	CustomCode = Request.QueryString("CC")

	if ErrorCode = "-2147467259" then
		if strVersion <> "" then
			Response.Redirect "setup.asp?RC=3&VER=" & strVersion
			Response.End
		else
			Response.Redirect "setup.asp?RC=5&EC=" & ErrorCode
			Response.End
		end if
	elseif ErrorCode = "-2147217865" then
		if strVersion <> "" then
			Response.Redirect "setup.asp?RC=3&VER=" & strVersion
			Response.End
		end if
		Response.Write	"<div align=""center""><center>" & vbNewLine & _
				"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">The database needs to be installed !!</font></p>" & vbNewLine & _
				"</center></div>" & vbNewLine & _
				"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""50%"" align=""center"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td bgColor=""#9FAFDF"" align=""center"">" & vbNewLine & _
				"    <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    You need to create all the tables in the database before you can start using the forum.<br />" & vbNewLine & _
				"    </font></p></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td align=""center"">" & vbNewLine & _
				"    <font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    <a href=""setup.asp?RC=5&strDBType=" & strDBType & """ target=""_top"">Click here to create the tables in the database.</a><br /><br />" & vbNewLine & _
				"    <a href=""setup.asp"" target=""_top"">Click here to retry.</a>" & vbNewLine & _
				"    </font></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"</table>" & vbNewLine
	else
		Response.Write	"<div align=""center""><center>" & vbNewLine & _
				"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">The database needs to be upgraded !!</font></p>" & vbNewLine & _
				"</center></div>" & vbNewLine & _
				"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""50%"" align=""center"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td bgColor=""#9FAFDF"" align=""center"">" & vbNewLine & _
				"    <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    The database you are using needs to be upgraded !!<br />" & vbNewLine
		if MAIL <> "" then
			Response.Write	"    If you are not an Administrator at this forum<br /> please report this error here: <a href=""mailto:" & strSender & """>" & strSender & "</a>.<br /><br />" & vbNewLine
		end if
		if ErrorCode <> "" and ErrorCode < "0" then
			Response.Write("    <p>Code :  " & Hex(ErrorCode) & "</p>" & vbNewLine)
		elseif ErrorCode <> "" then
			Response.Write("    <p>Code :  " & ErrorCode & "</p>" & vbNewLine)
		end if
		Response.Write	"    </font></p></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td align=""center"">" & vbNewLine & _
				"    <font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    <a href=""setup.asp?RC=3&MAIL=" & Server.URLEncode(strSender) & """ target=""_top"">Click here to upgrade the database.</a><br /><br />" & vbNewLine & _
				"    <a href=""default.asp"" target=""_top"">Click here to retry.</a>" & vbNewLine & _
				"    </font></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"</table>" & vbNewLine
	end if

elseif ResponseCode = 3 then '## upgrade database

	if strVersion = "" then
		strVersion = Request.QueryString("VER")
	end if
	if Session(strCookieURL & "Approval") = "15916941253" then

		'## logon was ok proceed with upgrade
		Response.Write	"<div align=""center""><center>" & vbNewLine
		if strDBType = "sqlserver" then
			Response.Write	"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">Select the SQL-Server upgrade options.</font></p>" & vbNewLine
		elseif strDBType = "mysql" then
			Response.Write	"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">MySql database upgrade.</font></p>" & vbNewLine
		else
			Response.Write	"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">Access 97/2000/2002 database upgrade</font></p>" & vbNewLine
		end if
		Response.Write	"</center></div>" & vbNewLine & _
				"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""50%"" align=""center"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td bgColor=""#9FAFDF"""
		if strDBType = "sqlserver" then Response.Write(" align=""left""") else Response.Write(" align=""center""")
		Response.Write	">" & vbNewLine & _
				"    <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    Select the version you want to upgrade from:" & vbNewLine & _
				"    </font></p>" & vbNewLine & _
				"    <form action=""setup.asp?RC=4&strDBType=" & strDBType & """ method=""post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
				"    <p><select size=""1"" name=""OldVersion"">" & vbNewLine & _
				"    <option value=""11""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.4.04") & ">Snitz Forums 2000 Version 3.4.04</option>" & vbNewLine & _
				"    <option value=""10""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.4.03") & ">Snitz Forums 2000 Version 3.4.03</option>" & vbNewLine & _
				"    <option value=""10""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.4.02") & ">Snitz Forums 2000 Version 3.4.02</option>" & vbNewLine & _
				"    <option value=""10""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.4.01") & ">Snitz Forums 2000 Version 3.4.01</option>" & vbNewLine & _
				"    <option value=""9""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.4") & ">Snitz Forums 2000 Version 3.4</option>" & vbNewLine & _
				"    <option value=""8""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3.05") & ">Snitz Forums 2000 Version 3.3.05</option>" & vbNewLine & _
				"    <option value=""7""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3.04") & ">Snitz Forums 2000 Version 3.3.04</option>" & vbNewLine & _
				"    <option value=""7""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3.03") & ">Snitz Forums 2000 Version 3.3.03</option>" & vbNewLine & _
				"    <option value=""6""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3.02") & ">Snitz Forums 2000 Version 3.3.02</option>" & vbNewLine & _
				"    <option value=""6""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3.01") & ">Snitz Forums 2000 Version 3.3.01</option>" & vbNewLine & _
				"    <option value=""6""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.3 Final") & ">Snitz Forums 2000 Version 3.3 Final</option>" & vbNewLine & _
				"    <option value=""5""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.1 SR4") & ">Snitz Forums 2000 V3.1 Service Release 4</option>" & vbNewLine & _
				"    <option value=""5""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.1 SR3 Final") & ">Snitz Forums 2000 V3.1 Service Release 3 Final</option>" & vbNewLine & _
				"    <option value=""5""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.1 SR3b4") & ">Snitz Forums 2000 V3.1 Service Release 3 Beta 4</option>" & vbNewLine & _
				"    <option value=""4"">Snitz Forums 2000 V3.1 Service Release 3 Beta 2</option>" & vbNewLine & _
				"    <option value=""3"">Snitz Forums 2000 V3.1 Service Release 3 Beta 1</option>" & vbNewLine & _
				"    <option value=""3"">Snitz Forums 2000 V3.1 Service Release 2</option>" & vbNewLine & _
				"    <option value=""3""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.1 Service Release 1 ") & ">Snitz Forums 2000 V3.1 Service Release 1</option>" & vbNewLine & _
				"    <option value=""3""" & CheckSelected(strVersion,"Snitz Forums 2000 Version 3.1 final ") & ">Snitz Forums 2000 V3.1 Final</option>" & vbNewLine & _
				"    <option value=""3"">Snitz Forums 2000 V3.1 Beta 5</option>" & vbNewLine & _
				"    <option value=""3"">Snitz Forums 2000 V3.1 Beta 4</option>" & vbNewLine & _
				"    <option value=""2"">Snitz Forums 2000 V3.1 Beta 3</option>" & vbNewLine & _
				"    <option value=""1"">Snitz Forums 2000 V3.1 Beta 2</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3.0 Service Release 2</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3.0 Service Release 1</option>" & vbNewLine & _
				"    <option value=""0""" & CheckSelected(strVersion,"Snitz Forums 2000 v3.0") & ">Snitz Forums 2000 Version 3.0 Final</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3 RC5</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3 RC4</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3 RC3</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3 RC2</option>" & vbNewLine & _
				"    <option value=""0"">Snitz Forums 2000 V3 RC1</option>" & vbNewLine & _
				"    </select></p>" & vbNewLine & _
				"    <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    Current database versionstring =<br /><b> " & strVersion & "</b>" & vbNewLine & _
				"    </font></p>" & vbNewLine
		if strDBType = "sqlserver" then
			Response.Write	"    <p>Select the SQL-server version you are using:</p>" & vbNewLine & _
					"    <p><input type=""radio"" class=""radio"" name=""SQL_Server"" value=""SQL6"">SQL-Server 6.5<br />" & vbNewLine & _
					"    <input type=""radio"" class=""radio"" checked name=""SQL_Server"" value=""SQL7"">SQL-Server 7/2000</p>" & vbNewLine
		end if
		if strDBType <> "access" then
			Response.Write	"    <p>To upgrade the database you need to provide a username" & vbNewLine & _
					"    and password of a user that has table creation/modification rights at the database you use.<br />" & vbNewLine & _
					"    This might not be the same user as you use in your connectionstring !<br />" & vbNewLine & _
					"    <br />" & vbNewLine & _
					"    Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=""text"" name=""DBUserName"" size=""20""><br />" & vbNewLine & _
					"    Password: <input type=""password"" name=""DBPassword"" size=""20""></p>" & vbNewLine
		end if
		Response.Write	"    </td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td align=""center""><input type=""submit"" value=""Continue"" id=""Submit1"" name=""Submit1""></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"</form>" & vbNewLine & _
				"</table>" & vbNewLine
	else
		strSender = Request.QueryString("MAIL")

		Response.Write	"<div align=""center""><center>" & vbNewLine & _
				"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">You need to logon first.</font></p>" & vbNewLine & _
				"</center></div>" & vbNewLine & _
				"<form action=""setup_login.asp"" method=""post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
				"<input type=""hidden"" name=""setup"" value=""Y"">" & vbNewLine & _
				"<input type=""hidden"" name=""ReturnTo"" value=""RC=3&VER=" & strVersion & """>" & vbNewLine & _
				"<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""50%"" align=""center"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td bgColor=""#9FAFDF"" align=""left"">" & vbNewLine & _
				"    <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine & _
				"    To upgrade the database you need to be logged on as a forum administrator.<br />" & vbNewLine
		if strSender <> "" then
			Response.Write	"    If you are not the Administrator of this forum<br /> please report this error here: <a href=""mailto:" & strSender & """>" & strSender & "</a>.<br /><br />" & vbNewLine
		end if
		Response.Write	"    </font></p></td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td>" & vbNewLine & _
				"      <table border=""0"" cellspacing=""2"" cellpadding=""0"" align=""center"">" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td align=""center"" colspan=""2"" bgColor=""#9FAFDF""><b><font face=""Verdana, Arial, Helvetica"" size=""2"">Admin Login</font></b></td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td align=""right"" nowrap><b><font face=""Verdana, Arial, Helvetica"" size=""2"">UserName:</font></b></td>" & vbNewLine & _
				"          <td><input type=""text"" name=""Name""></td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td align=""right"" nowrap><b><font face=""Verdana, Arial, Helvetica"" size=""2"">Password:</font></b></td>" & vbNewLine & _
				"          <td><input type=""Password"" name=""Password""></td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"        <tr>" & vbNewLine & _
				"          <td colspan=""2"" align=""right""><input type=""submit"" value=""Login"" id=""Submit1"" name=""Submit1""></td>" & vbNewLine & _
				"        </tr>" & vbNewLine & _
				"      </table>" & vbNewLine & _
				"    </td>" & vbNewLine & _
				"  </tr>" & vbNewLine & _
				"</table>" & vbNewLine & _
				"</form>" & vbNewLine & _
				"</font>" & vbNewLine
	end if
	
elseif ResponseCode = 4 then '## start upgrading database

	if Session(strCookieURL & "Approval") = "15916941253" Then

		'## logon was ok proceed with upgrade
		Response.Write	"<div align=""center""><center>" & vbNewLine & _
				"<p><font face=""Verdana, Arial, Helvetica"" size=""4"">Please Wait until the upgrade has been completed !</font></p>" & vbNewLine

		strSQL_Server = Request.Form("Sql_Server")

		if strDBType = "access" or not Instr(strConnString,"uid=") > 0 then
			strUpgradeString = strConnString
		else
			strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
		end if

		on error resume next

		set my_Conn = Server.CreateObject("ADODB.Connection")
		my_Conn.Open strUpgradeString

		for counter = 0 to my_Conn.Errors.Count -1
			ConnErrorNumber = Err.Number
			ConnErrorDesc = my_conn.Errors(counter).Description
			if ConnErrorNumber <> 0 then 
				my_Conn.Errors.Clear
				Err.Clear 
				Response.Redirect "setup.asp?RC=1&CC=3&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc) & "&RET=" & Server.URLEncode("setup.asp?RC=3")
			end if
		next

		on error goto 0

		dim intCriticalErrors, intWarnings, Prefix, FieldName, TableName, DataType
		intCriticalErrors = 0
		intWarnings = 0

⌨️ 快捷键说明

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