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

📄 gbupdata.asp

📁 一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码
💻 ASP
字号:
<%Server.ScriptTimeout=99999
dim conn,db
%>
<!--#include file="CONN.ASP"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>精点留言本数据库升级程序</title>
</head>

<body>
<table width="75%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#837767" style="border-collapse:collapse">
  <tr>
    <td bgcolor="#FCFAF3"><div align="center">精点留言本数据库升级程序</div></td>
  </tr>
  <tr> 
    <td height="74"><div align="center"><br>
        <br>
<%
If Request.Form("go")=1 Then

set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
'3.2
if Request.Form("jdv")=2 then

strSQL  =  "ALTER TABLE msg "
strSQL  =strSQL  +"ALTER COLUMN  jd_title  nvarchar  (255)  NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)

strSQL  =  "ALTER TABLE admin "
'strSQL  =strSQL  +"ADD  jd_online  tinyint NULL," 
strSQL  =strSQL  +"ADD  jd_regopen  nvarchar (255)  NULL" 
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update admin set jd_regopen=0")

strSQL  =  "ALTER TABLE member "
strSQL  =strSQL  +"ADD  jd_tx  nvarchar (20)  NULL, " 
strSQL  =strSQL  +"jd_rnd nvarchar (20)  NULL " 
Conn.Execute(strSQL)

strSQL  =  "CREATE  TABLE  stopip("
strSQL  =strSQL  +"id int  IDENTITY  (1,1)  NOT  NULL , "  
strSQL  =strSQL  +"oneip  int  NULL , " 
strSQL  =strSQL  +"endip  int  NULL , "
strSQL  =strSQL  +"ip1  nvarchar (15)  NULL , " 
strSQL  =strSQL  +"ip2  nvarchar (15) NULL,  " 
strSQL  =strSQL  +"rdate datetime NULL,  " 
strSQL  =strSQL  +"viw tinyint NULL "
strSQL  =strSQL  +")  "
Conn.Execute(strSQL)

strSQL  =  "ALTER TABLE a "
strSQL  =strSQL  +"ADD  jd_onlinetop  int NULL," 
strSQL  =strSQL  +"  jd_topdate  datetime  NULL "
Conn.Execute(strSQL)
Conn.Execute("update a set jd_onlinetop=0")

end if

'3.1
if Request.Form("jdv")=1 or Request.Form("jdv")=0 then
strSQL  =  "ALTER TABLE admin "
strSQL  =strSQL  +"ADD  jd_online  tinyint NULL" 
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update admin set jd_online=1")

strSQL  =  "CREATE  TABLE  msg("
strSQL  =strSQL  +"id int  IDENTITY  (1,1)  NOT  NULL , "  
strSQL  =strSQL  +"jd_name  nvarchar  (20)  NULL , " 
strSQL  =strSQL  +"jd_come  nvarchar  (20)  NULL , "
strSQL  =strSQL  +"jd_date  datetime  NULL , " 
strSQL  =strSQL  +"jd_title nvarchar (50) NULL,  " 
strSQL  =strSQL  +"jd_msg nvarchar (255) NULL,  " 
strSQL  =strSQL  +"jd_view tinyint NULL "
strSQL  =strSQL  +")  "
Conn.Execute(strSQL)

strSQL  =  "CREATE  TABLE  online("
strSQL  =strSQL  +"id int  IDENTITY  (1,1)  NOT  NULL , "  
strSQL  =strSQL  +"jd_name  nvarchar  (20)  NULL , "  
strSQL  =strSQL  +"jd_date  datetime  NULL , " 
strSQL  =strSQL  +"jd_action nvarchar (50) NULL,  " 
strSQL  =strSQL  +"jd_order tinyint NULL, "
strSQL  =strSQL  +"jd_ip nvarchar (20) NULL, "
strSQL  =strSQL  +"jd_yk nvarchar (50) NULL "
strSQL  =strSQL  +")  "
Conn.Execute(strSQL)
end if

'2.10
if Request.Form("jdv")=0 then
strSQL  =  "ALTER TABLE admin "
strSQL  =strSQL  +"ALTER COLUMN   jd_top_addr  nvarchar  (255)  NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)

' 3.0
strSQL  =  "ALTER TABLE admin "
strSQL  =strSQL  +"ADD   jd_kt  tinyint NULL ," 
strSQL  =strSQL  +"  jd_qmpic  tinyint NULL, " 
strSQL  =strSQL  +"  jd_editorstyle  tinyint NULL, " 
strSQL  =strSQL  +"  jd_upfile  tinyint NULL " 
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update admin set jd_kt=0,jd_qmpic=1,jd_editorstyle=1,jd_upfile=0")

strSQL  =  "CREATE  TABLE  forum("
strSQL  =strSQL  +"id int  IDENTITY  (1,1)  NOT  NULL , "  
strSQL  =strSQL  +"jd_name  nvarchar  (50)  NULL , "  
strSQL  =strSQL  +"jd_style  nvarchar  (50)  NULL , "  
strSQL  =strSQL  +"jd_top  nvarchar  (255)  NULL , " 
strSQL  =strSQL  +"jd_cls   tinyint NULL , " 
strSQL  =strSQL  +"jd_order  int  NULL,  " 
strSQL  =strSQL  +"jd_bg nvarchar (255) NULL, "  
strSQL  =strSQL  +"jd_ad nvarchar (255) NULL " 
strSQL  =strSQL  +")  "
Conn.Execute(strSQL)
Conn.Execute("insert into forum(jd_name,jd_cls,jd_order)values('精点留言',0,1)")
strSQL  =  "ALTER TABLE topics "
strSQL  =strSQL  +"ADD jd_forumid int NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update topics set jd_forumid=1")

strSQL  =  "ALTER TABLE a "
strSQL  =strSQL  +"ADD   jd_t int  NULL, "  
strSQL  =strSQL  +"jd_z int NULL ," 
strSQL  =strSQL  +"jd_m int NULL, " 
strSQL  =strSQL  +"jd_o int NULL " 
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update a set jd_z=0,jd_m=0,jd_t=0,jd_o=0")

strSQL  =  "ALTER TABLE member "
strSQL  =strSQL  +"ADD   jd_count int  NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update member set jd_count=0")

strSQL  =  "ALTER TABLE member "
strSQL  =strSQL  +"ADD  jd_jf int  NULL, "
strSQL  =strSQL  +"jd_ww int  NULL ,"
strSQL  =strSQL  +"jd_st int  NULL "
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update member set jd_jf=0,jd_ww=0,jd_st=0")

strSQL  =  "ALTER TABLE topics "
strSQL  =strSQL  +"ADD  jd_jf  int NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update topics set jd_jf=0")

strSQL  =  "ALTER TABLE admin "
strSQL  =strSQL  +"ADD  jd_bkww  int NULL, "
strSQL  =strSQL  +"jd_jf  int NULL "
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update admin set jd_bkww=8,jd_jf=100")


On Error Resume Next
'精华贴功能,2.1版请删除这段再升级
strSQL  =  "ALTER TABLE topics "
strSQL  =strSQL  +"ADD   jd_cls  tinyint NULL "  
strSQL  =strSQL  +"  "
Conn.Execute(strSQL)
Conn.Execute("update topics set jd_cls=0")
'精华贴功能结束
end if
conn.close
set conn=nothing
Response.write ("升级成功,本程序只需运行一次,请不要重复升级")
Response.write ("<br><br>升级后,请删除本文件")


        else
        %>
        <form name="form1" method="post" action="">
		  2.0升级到3.1<input type="radio" name="jdv" value="0">  3.0升级到3.1<input type="radio" name="jdv" value="1">  3.1升级到3.2<input type="radio" name="jdv" value="2">    <br>
<br>
		  <input type="hidden" name="go" value="1">
          <input type="submit" name="Submit" value=" 开 始 ">
        </form>
		<%End if
		%>
      <br>
<br>

</div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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