<!-- 
'========================================================================================
' 文 件 名: updata.asp
' 版    本: 岭峰网行业专用留言系统3.10.0 ( LFMessS 2020 - 3.10.0.F Build 200604 )
' 说    明: 通用数据库升级文件 4.1 | 请勿自行修改该处文件，以确保程序正确的执行
' 文件日期: 2020-06-04
' 设 计 者: 疾风之狼
'========================================================================================
' 郑州文达岭峰网络科技有限公司.
'========================================================================================
' Copyright (C) 2001-2020 岭峰网. All rights reserved.
' 网    站: http://www.lfmesss.com
' 电子邮件: support@lfmesss.com
' 联系ＱＱ: 85112407
'========================================================================================
-->
<%@ language="vbscript" codepage="936" %>
<!-- #include file="../common/sub_inc.asp" -->
<!-- #include file="../common/commfun.asp" -->
<!-- #include file="../common/ip_purview.asp" -->
<!-- #include file="../common/md5_32.asp" -->
<% 
On Error Resume Next
Response.Buffer = true
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma", "No-Cache"
Response.AddHeader "Cache-Control", "Private"
Response.CacheControl ="No-Cache"
Set conn = Server.CreateObject("ADODB.Connection")
'conn.connectiontimeout=20
dbnow = "../data/"& db
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbnow)
conn.Open connstr
IF Request.Form("up") = 8 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.90.0版架构升级到V1.98.0版架构。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 7 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.80版架构升级到V1.98.0版架构。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 6 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.80第五测试版架构升级到V1.98.0版架构。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 5 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER TABLE lfmessb "
sql = sql&"ALTER COLUMN re text"
conn.execute(sql)
Call errok()
sql = "UPDATE ok SET okpass='登录'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add readmin varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET readmin='超级管理员'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add retime date default '"&Now()&"'"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET retime=addtime"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.80第一至第四测试版架构升级到V1.98.0版架构。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 4 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add enpass varchar(32) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='0' where isnull(enpass)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='202cb962ac59075b964b07152d234b70' where silentlywords=1"
conn.execute(sql)
Call errok()
sql = "ALTER TABLE lfmessb "
sql = sql&"ALTER COLUMN re text"
conn.execute(sql)
Call errok()
sql = "UPDATE ok SET okpass='登录'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add readmin varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET readmin='超级管理员'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add retime date default '"&Now()&"'"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET retime=addtime"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.78版架构升级到V1.98.0版架构。如果过去您的留言系统已经包含了隐私留言，那密码将统一升级为: “123”（不包括引号）。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 3 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add encrypt int default 0"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add silentlywords int default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET encrypt=0 where isnull(encrypt)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET silentlywords=0 where isnull(silentlywords)"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add enpass varchar(32) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='0' where isnull(enpass)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='202cb962ac59075b964b07152d234b70' where silentlywords=1"
conn.execute(sql)
Call errok()
sql = "ALTER TABLE lfmessb "
sql = sql&"ALTER COLUMN re text"
conn.execute(sql)
Call errok()
sql = "UPDATE ok SET okpass='登录'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add readmin varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET readmin='超级管理员'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add retime date default '"&Now()&"'"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET retime=addtime"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.70版架构升级到V1.98.0版架构。您已经可以体验到新版本给您带来的新的应用体验。');window.close();</script>"
ElseIF Request.Form("up") = 2 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add face varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET face='1.jpg' where isnull(face)"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add encrypt int default 0"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add silentlywords int default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET encrypt=0 where isnull(encrypt)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET silentlywords=0 where isnull(silentlywords)"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add enpass varchar(32) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='0' where isnull(enpass)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='202cb962ac59075b964b07152d234b70' where silentlywords=1"
conn.execute(sql)
Call errok()
sql = "ALTER TABLE lfmessb "
sql = sql&"ALTER COLUMN re text"
conn.execute(sql)
Call errok()
sql = "UPDATE ok SET okpass='登录'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add readmin varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET readmin='超级管理员'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add retime date default '"&Now()&"'"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET retime=addtime"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将您的数据库从V1.50版架构升级到V1.98.0版架构。您已经可以体验到新版本的无穷魅力了。');window.close();</script>"
ElseIF Request.Form("up") = 1 Then
sql = "ALTER table lfmessb add filemulu varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET filemulu='0'"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add re text default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET re='0' where isnull(re)"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add face varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET face='1.jpg' where isnull(face)"
conn.execute(sql)
Call errok()
'''
sql = "ALTER table lfmessb add encrypt int default 0"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add silentlywords int default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET encrypt=0 where isnull(encrypt)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET silentlywords=0 where isnull(silentlywords)"
'''
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add enpass varchar(32) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='0' where isnull(enpass)"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET enpass='202cb962ac59075b964b07152d234b70' where silentlywords=1"
conn.execute(sql)
Call errok()
sql = "ALTER TABLE lfmessb "
sql = sql&"ALTER COLUMN re text"
conn.execute(sql)
Call errok()
sql = "UPDATE ok SET okpass='登录'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add readmin varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET readmin='超级管理员'"
conn.execute(sql)
Call errok()
sql = "ALTER table lfmessb add retime date default '"&Now()&"'"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET retime=addtime"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add topok int default 1"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET topok=1"
conn.execute(sql)
Call errok()
''
sql = "ALTER table lfmessb add lylx varchar(50) default 0"
conn.execute(sql)
Call errok()
sql = "UPDATE lfmessb SET lylx='无'"
conn.execute(sql)
Call errok()
conn.close
Set conn = Nothing
Set rs = Nothing
Response.Write "<script>alert('恭喜: \n\n 已经成功地将数据库从V1.00版架构升级到V1.98.0版架构。您已经可以体验到新版本的无穷魅力了。');window.close();</script>"
Else
%>
<html>
<head>
<title>岭峰网行业专用留言系统 -- 全系列主数据库一键升级程序</title>
<%  
  Call htmlmeta() 
%>
<link rel="stylesheet" href="../style/css/<%= LingFengNet_MS_web_css %>.css" type="text/css">
<style>
td {
	font-size:18px !important;
}
input[type="radio"] {
	width: 18px;
	height:18px;
}
</style>
<link rel="shortcut icon" href="../pic/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="../pic/favicon.ico" type="image/x-icon">
</head>
<body><br><br>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" style="background:url(../pic/update_bg.png);">
  <tr>
    <td width="20%"></td>
    <td width="60%"><form name="up" method="post" action="update.asp">
        <br><p>
        <strong>岭峰网行业专用留言系统&ensp;--&ensp;全系列数据库升级程序（版本4.1）</strong>
        </p>
        <strong>程序基本介绍: <br>
        </strong>
        <ul>
          <li>本升级程序支持&ensp;岭峰网（原：自由岭峰）全系列的留言系统&ensp;的&ensp;数据库&ensp;一次性升级到当前最新的版本1.98.0架构（之后版本如：3.10.0依然沿用该架构）。</li>
          <li>支持从2005年开始的 1.0 版本到2020年的 3.10.0 版本，十五年间所有版本全部支持一键升级。</li>
        </ul>
        <br>
        <strong>程序升级选项: <br>
        </strong>
        <ul>
          <label>
          <li>
            <input name="up" type="radio" value="8" checked>
            1.90.0版架构（适用于 1.90.0 版本到 1.97.0 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input name="up" type="radio" value="7">
            1.80版架构（适用于 1.80 版本到 1.88 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input name="up" type="radio" value="6">
            1.80测试版（适用于 1.80 beta&ensp;5&ensp;版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input name="up" type="radio" value="5">
            1.80测试版（适用于 1.80 beta&ensp;1&ensp;--&ensp;4 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input name="up" type="radio" value="4">
            1.78版架构（适用于 1.78 版本到 1.79 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input name="up" type="radio" value="3">
            1.70版架构（适用于 1.70 版本到 1.77 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input type="radio" name="up" value="2">
            1.50版架构（适用于 1.50 版本到 1.61 版本） ==&gt; 1.98.0版架构主数据库升级程序</li>
          </label>
          <label>
          <li>
            <input type="radio" name="up" value="1">
            1.00版架构（适用于 1.00 版本到 1.42 版本） ==&gt;&ensp;1.98.0版架构主数据库升级程序</li>
          </label>
        </ul>
        <br>
        <strong>升级注意事项: <br>
        </strong>
        <ul>
          <li>首先请您确认当前正在使用的留言系统的版本号。</li>
          <li>如果您的留言系统版本等于或高于 1.98.0 版本，则无需升级数据库。</li>
          <li>确认您的旧版本数据库与本升级程序均在新版本留言系统的根目录。</li>
          <li>如您的版本不在上述版本区间中或和是其他内容，这就存在系统被黑客或不法人士恶意修改的可能！请首先联系软件官方咨询协助升级（免费服务），切勿直接升级！</li>
          <li>仅仅升级数据库而不升级留言系统程序，系统将不能正常启动或者在使用中会存在错误。</li>
        </ul>
        <p><br>
          <input name="qdsj" type="submit" id="qdsj" class="buttonface" value=" 启动升级 ">
        </p>
      </form>
      <p> <br>
        版权所有&ensp;&copy;&ensp;2001-2020&ensp;岭峰网(郑州文达岭峰)&ensp;版权所有</p><br></td>
    <td width="20%">&nbsp;</td>
  </tr>
</table><br><br>
<%
End IF
Sub errok()
	IF err <> 0 Then
		Response.Write"<script>alert('错误: 您的数据库版本已经升级到最新的V1.98版本架构，无需要再次升级，本次操作取消。');windows.close();</script>"
		Response.end
	End IF
End Sub  
%>
</body></html>
