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

📄 setup.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	       http://bbs.ChinaXP.Net    中国在线--极酷论坛
'#
'#############################################################

ResponseCode = Request.QueryString("RC")
if ResponseCode <> "" then 'No parameter
	blnSetup = "Y"
else
	strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
	Application(strCookieURL & "ConfigLoaded")= ""
end if
%>
<!--#INCLUDE FILE="config.asp" -->
<%
Response.Buffer = True
%>
<html>
<head>
<title>Forum-Setup Page</title>
<meta name="copyright" content="ChinaXP BBS Ver.2001 3.0 SP1 版权所有:中国在线">
<Style><!--
a:link    {color:<% =strLinkColor %>;text-decoration:none;}
a:visited {color:<% =strVisitedLinkColor %>;text-decoration:none;}
a:hover   {color:<% =strHoverFontColor %>;text-decoration:underline;}
--></style>
</head>

<body bgColor="white" text="midnightblue" link="darkblue" aLink=red vLink="red" onLoad="window.focus()">
<%
if ResponseCode = "" then 'No parameter

'	Check to see if all the fields are in the database
'	FORUM_CONFIG doesn't need to be checked, that is done in CONFIG.ASP
	
	on error resume next
	
	set my_Conn = Server.CreateObject("ADODB.Connection")
	my_Conn.Open strConnString	
	
	for counter = 0 to my_conn.Errors.Count -1
		ConnErrorNumber = my_conn.Errors(counter).Number
		if ConnErrorNumber <> 0 then
			my_conn.Errors.Clear
			Response.Redirect "Setup.asp?RC=1&EC=" & ConnErrorNumber
		end if
	next
	
	my_Conn.Errors.Clear

	strSql = "SELECT CAT_ID, FORUM_ID, F_STATUS, F_MAIL, F_SUBJECT, F_URL, F_DESCRIPTION, F_TOPICS, F_COUNT, "
	strSql = strSql & "F_LAST_POST, F_PASSWORD_NEW, F_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR "
	strSql = strSql &  " FROM " & strTablePrefix & "FORUM"
	
	my_Conn.Execute strSql
	
	Call CheckSqlError()
	
	my_Conn.Errors.Clear
	
	strSql = "SELECT CAT_ID, FORUM_ID, TOPIC_ID, T_STATUS, T_MAIL, T_SUBJECT, T_MESSAGE, T_AUTHOR, T_REPLIES, "
	strSql = strSql & "T_VIEW_COUNT, T_LAST_POST, T_DATE, T_LAST_POSTER, T_IP, T_LAST_POST_AUTHOR "
	strSql = strSql & " FROM " & strTablePrefix & "TOPICS"

	my_Conn.Execute strSql

	Call CheckSqlError()
	
	my_Conn.Errors.Clear
	
	strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
	strSql = strSql & "M_SIG, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_YAHOO, M_ICQ, M_POSTS, M_DATE, "
	strSql = strSql & "M_LASTHEREDATE, M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, M_HIDE_EMAIL, "
	strSql = strSql & "M_RECEIVE_EMAIL, M_LAST_IP, M_IP, M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, "
	strSql = strSql & "M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, M_MARSTATUS, "
	strSql = strSql & "M_LINK1, M_LINK2, M_CITY, M_STATE, M_PHOTO_URL FROM " & strMemberTablePrefix & "MEMBERS"
	strSql = strSql & " WHERE MEMBER_ID = 1;"

	my_Conn.Execute strSql

	Call CheckSqlError()
	
	my_Conn.Errors.Clear

	on error goto 0

	if strVersion <> strNewVersion then
		Response.Redirect "setup.asp?RC=2&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&EC=" & Server.UrlEncode("Different or New Version-ID detected")
	end if

'## This part of the code is only reached if all is ok !!
%>
<div align=center><center>
	<p><font face="宋体, Arial, Helvetica" size="4">论坛设置完毕!</font></p>
</center></div>

<table border="0" cellspacing="0" cellpadding="5" width="50%" height="50%" align="center">
	<tr>
		<td bgColor=navyblue align="center">
		<p>
		<font face="宋体, Arial, Helvetica" size="2">
		<b>恭喜!!</b><br>
		论坛已经安装成功.<br>
		现在你可以开始使用 ChinaXP.Net BBS 论坛了.</font></p>
		<font face="宋体, Arial, Helvetica" size="2">
		<b>记得修改默认的论坛管理密码 !!</b></font></p>
		<font face="宋体, Arial, Helvetica" size="2">
		如果你还有什么问题可以到下面的网址跟我们联系: <a href="http://www.chinaxp.net">http://www.ChinaXP.Net</a></font></p></td>
	</tr>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
		<a href="default.asp" target="_top">点击这里进入论坛.</a>
		</font></td>
	</tr>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
		<a href="setup.asp?RC=3" target="_top">更新数据库.</a>
		</font></td>
	</tr>
<% if strDBType <> "access" then %>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
		<a href="setup.asp?RC=5" target="_top">建立数据库.</a>
		</font></td>
	</tr>
<% end if %>
</table>	

<%
elseif ResponseCode = 1 then '## cannot open database

ErrorCode = Request.QueryString("EC")	
CustomCode = Request.QueryString("CC")
%>
<div align=center><center>
	<p><font face="宋体, Arial, Helvetica" size="4">安装不能继续进行,发现一个错误!!</font></p>
</center></div>

<table border="0" cellspacing="0" cellpadding="5" width="50%" height="50%" align="center">
	<tr>
		<td bgColor=navyblue align="center">
		<p>
		<font face="宋体, Arial, Helvetica" size="2">
<%
if CustomCode = 1 then
%>
		错误:不能打开数据库!!<br>
		检查你的 config.asp 文件设置好<br><b>strConnString</b>连接数据库参数.<br>
		<br>
<%
elseif CustomCode = 2 then
%>
		不能从数据库中读取 tables.<br> Make sure none of the tables are exclusively locked by another user.<br><br>
<%
elseif CustomCode = 3 then
%>
		错误:不能打开数据库!!<br> 请确定你的数据库用户名跟连接密码是正确的.<br><br>
<%
else
%>
		错误:不能打开数据库!!<br>
		<br>
<%

end if
		if ErrorCode <> "" then
			Response.Write("<p>Code :  " & ErrorCode & "</p>")
		end if
%>
		</font></p></td>
	</tr>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
<%
if Request.QueryString("RET") <> "" then
%>
		<a href="<%=Request.QueryString("RET")%>" target="_top">点击这里返回上一页.</a>
<%
else
%>
		<a href="setup.asp" target="_top">点击这里重试.</a>
<%
end if
%>
		</font></td>
	</tr>
</table>	
<%
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
	Response.Redirect "setup.asp?RC=5&EC=" & ErrorCode
	Response.End
elseif ErrorCode = "-2147217865" then
	if strDBType = "access" then
		Response.Redirect "setup.asp?RC=1&EC=" & server.URLEncode("The Access database has missing tables !!")
		Response.End
	else
		Session(strCookieURL & "Approval") = "15916941253"
%>
<div align=center><center>
	<p><font face="宋体, Arial, Helvetica" size="4">The database needs to be installed !!</font></p>
</center></div>
<table border="0" cellspacing="0" cellpadding="5" width="50%" height="50%" align="center">
	<tr>
		<td bgColor=navyblue align="center">
		<p>
		<font face="宋体, Arial, Helvetica" size="2">
		使用论坛前请先建立数据库.<br>
		</font></p></td>
	</tr>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
		<a href="setup.asp?RC=5&strDBType=<% =strDBType %>"  target="_top">点击这里建立一个数据库.</a><br><br>
		<a href="setup.asp" target="_top">点击这里重试.</a>
		</font></td>
	</tr>
</table>
<%
	end if
else
%>
<div align=center><center>
	<p><font face="宋体, Arial, Helvetica" size="4">The database needs to be upgraded !!</font></p>
</center></div>
<table border="0" cellspacing="0" cellpadding="5" width="50%" height="50%" align="center">
	<tr>
		<td bgColor=navyblue align="center">
		<p>
		<font face="宋体, Arial, Helvetica" size="2">
		The database you are using needs to be upgraded !!<br>
<%
	if MAIL <> ""then
%>
		If you are not a Administrator at this forum<br> please report this error here: <a href="mailto:<% =strSender %>"><% =strSender %></a>.<br><br>
<%
	end if
	if ErrorCode <> "" then
			Response.Write("<p>Code :  " & ErrorCode & "</p>" )
	end if
%>
		</font></p></td>
	</tr>
	<tr>
		<td align="center">
		<font face="宋体, Arial, Helvetica" size="2">
		<a href="setup.asp?RC=3&MAIL=<% =Server.URLEncode(strSender) %>"  target="_top">Click here to upgrade the database.</a><br><br>
		<a href="default.asp" target="_top">Click here to retry.</a>
		</font></td>
	</tr>
</table>	
<%
end if


elseif ResponseCode = 3 then '## upgrade database

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

	'## logon was ok proceed with upgrade
%>	
	<div align=center><center>
<% if strDBType = "sqlserver" then %>
	<p><font face="宋体, Arial, Helvetica" size="4">Select the SQL-Server upgrade options.</font></p>
<% elseif strDBType = "mysql" then  %>
	<p><font face="宋体, Arial, Helvetica" size="4">MySql database upgrade.</font></p>
<% else %>
	<p><font face="宋体, Arial, Helvetica" size="4">Access 97 database upgrade</font></p>
<% end if %>
</center></div>

<table border="0" cellspacing="0" cellpadding="5" width="50%" height="50%" align="center">
	<tr>
		<td bgColor=navyblue <% if strDBType = "sqlserver" then Response.Write("align=""left""") else Response.Write("align=""center""") end if %>>
		<p>
		<font face="宋体, Arial, Helvetica" size="2">
		Select the version you want to upgrade from:
		</p>
        <form action="setup.asp?RC=4&strDBType=<% =strDBType %>" method="post" id=Form1 name=Form1>
          <p><select size="1" name="OldVersion">
            <option value="5" selected>Snitz Forums 2000 V3.1 Service Release 3 Final</option>
            <option value="5">Snitz Forums 2000 V3.1 Service Release 3 Beta 4</option>
            <option value="4">Snitz Forums 2000 V3.1 Service Release 3 Beta 2</option>
            <option value="3">Snitz Forums 2000 V3.1 Service Release 3 Beta 1</option>
            <option value="3">Snitz Forums 2000 V3.1 Service Release 2</option>
            <option value="3">Snitz Forums 2000 V3.1 Service Release 1</option>
            <option value="3">Snitz Forums 2000 V3.1 Final</option>

⌨️ 快捷键说明

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