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

📄 update_2005.asp

📁 《动易网站管理系统》2005 SP2正式版中
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<%@language=vbscript codepage=936 %>
<%
Option Explicit
Server.ScriptTimeOut = 9999999
%>
<!--#include file="conn.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<html>
<head>
<title>动易4.03版 To 2005版 数据库升级程序</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
Dim Action, BeginTime, EndTime, i
Dim conn_old, db_type, db_access, db_sql
Dim UpdateTable, TableName, Info_CurrentUpdate
Dim RecordNum, RecordIndex, TotalRecordNum, TotalRecordIndex
Dim arrUserLevel, arrGroupID
Dim ArrSkinID(), ArrTemplateID()
ReDim ArrSkinID(0, 0), ArrTemplateID(0, 0)

Dim strInstallDir, ChannelDir
If Right(InstallDir, 1) <> "/" Then
    strInstallDir = InstallDir & "/"
Else
    strInstallDir = InstallDir
End If

TotalRecordIndex = 0
Action = Trim(request("Action"))
If Action = "step1" Then
    Call step1
ElseIf Action = "step2" Then
    Call step2
ElseIf Action = "Update" Then
    Call Update
Else
    Call Main
End If
Call CloseConn
Response.Write "</body></html>"


Sub Main()
%>
<form name="myform" method="post" action="Update_2005.asp">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
    <tr align="center" class="title">
      <td height="30"><strong>动易4.03版 To 2005版 数据库升级程序</strong></td>
    </tr>
    <tr class="tdbg">
      <td>
        <p align="center">
          <font color="#FF0000">使用前请一定要认真仔细的阅读下面的操作步骤及注意事项!!!<br></font>
        </p>
        <p>
        <strong>操作步骤:</strong><br>
        1、保证是使用全新安装的2005版数据库,没有添加任何栏目和信息!SQL版请运行install.asp安装好系统。<br>
        2、将本文件(Update_2005.asp)和动易4.03版的数据库文件复制到动易2005版的安装目录下。<br>
        3、在浏览器中输入本文件的地址,如http://localhost/Update_2005.asp,运行本程序。<br>
        4、认真阅读本说明后点“下一步”,开始升级操作。<br><font color="#FF0000">
        5、数据库升级成功后,您还需要完成以下工作(每一步都不能漏过):<br>
&nbsp;&nbsp;&nbsp;①运行install.asp进行系统安装并配置相关网站信息。<br>
&nbsp;&nbsp;&nbsp;②将4.03版中各频道的上传文件复制到2005版的相关频道中。注意,2005版已经将原4.03的图片频道的UploadThumbs和UploadPhotos两个目录合并为一个UploadPhotos目录,复制文件时请注意。<br>
&nbsp;&nbsp;&nbsp;③后台——系统设置——网站信息配置,检查各项网站配置情况。后台——管理员管理,将系统默认使用的管理员<font color="blue">Admin</font>删除,或者修改其密码。<br>
&nbsp;&nbsp;&nbsp;④后台——系统设置——网站风格管理,将其中一个风格设为默认风格。即使不想改变默认风格,也需要做此步。<br>
&nbsp;&nbsp;&nbsp;⑤后台——各个频道——栏目管理,刷新栏目JS——专题管理,刷新专题JS——JS文件管理,刷新所有JS文件。<br>
&nbsp;&nbsp;&nbsp;⑥后台——系统设置——频道管理,如果有自定义的频道,请刷新频道文件,并检查各频道的参数设置情况。<br>
&nbsp;&nbsp;&nbsp;⑦后台——各个频道——栏目管理,检查各个栏目的参数设置情况。特别是浏览/查看权限。因为2005版在前台的权限管理上与4.03版有很大不同,所以如果你的网站做了权限设置的话,请一定要认真检查此项。<br>
&nbsp;&nbsp;&nbsp;⑧后台——用户管理——会员组管理,检查会员组的各项参数设置情况。特别是在各个频道和栏目的权限。4.03版的会员组权限是上下级关系,会员组在各个栏目的权限是直接保存在栏目表,而2005版的会员组是平级关系,各会员组在栏目中的权限是互相独立的。所以一定要认真检查此项。<br>
&nbsp;&nbsp;&nbsp;⑨如果网站启用了生成HTML功能的,请重新生成所有页面。<br>
        </font></p>
        <p><strong>注意事项:</strong> <br>
        1、本升级程序只适用于官方发布版本的数据库升级,不适用于其他修改版或美化版的升级工作。<br>
        2、本操作不建议您直接在服务器上进行,最好在本地架起调试环境然后进行升级工作。<br>
        3、本操作的更新时间视您数据的多少以及服务器(或本地机器)的配置决定,如果数据很多,更新可能很慢。<br>
        4、升级过程中千万不能刷新页面或关闭浏览器,如果出现超时或者错误提示,请使用备份数据重新进行升级操作。<br>
        5、若您是直接在服务器进行升级,则操作成功完成后,一定要删除此文件!以免带来安全隐患。<br><br>
        </p>
      </td>
    </tr>
    <tr class="tdbg">
      <td align="center"><input type='hidden' name='Action' value='step1'>
        <input name="Submit" type="submit" id="Submit" value="下一步">
      </td>
    </tr>
  </table>
</form>
<%
End Sub


Sub step1()
%>
<form name="myform" method="post" action="Update_2005.asp">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
    <tr align="center" class="title">
      <td height="30"><strong>动易4.03版 To 2005版 数据库升级程序</strong></td>
    </tr>
    <tr class="tdbg">
      <td width="100%" height="150" align=center valign="middle"><br>
        <table border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td><b>第一步、请选择数据库类型及数据库名称或连接字符串:</b></td>
          </tr>
          <tr>
            <td>
              <fieldset><legend>数据库连接</legend>
              <table width="700" border="0" cellpadding="10" cellspacing="5">
                <tr>
                  <td><input type="radio" name="db_type" value='ACCESS' checked> ACCESS版数据库文件名:</td>
                  <td>
                    <input name="db_access" type="text" value="PowerEasy4.mdb" size="28">
                    <font color="#FF0000">(请确定已复制到动易2005版的目录下)</font>
                  </td>
                </tr>
                <tr>
                  <td><input type="radio" name="db_type" value='SQL'> SQL版数据库连接字符串:</td>
                  <td><textarea name="db_sql" cols="55" rows="3">Provider = Sqloledb; User ID = PowerEasy; Password = PowerEasy*9988; Initial Catalog = PowerEasy40; Data Source = 127.0.0.1;</textarea></td>
                </tr>
              </table>
              </fieldset>
            </td>
          </tr>
          <tr>
            <td align='center'><input type='hidden' name='Action' value='step2'><input name="Submit" type="submit" id="Submit" value="下一步"></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
<%
End Sub


Sub step2()
    If chkdatabase() = False Then Exit Sub
%>

<script language = "JavaScript">
var IDindex=0
function show_userlevel(){
  if(document.myform.UpdateTable[17].checked==true){
    PE_UserLevel_Config.style.display='';
    document.myform.StartUpdate.disabled=true;
  }
  else{
    PE_UserLevel_Config.style.display='none';
    document.myform.StartUpdate.disabled=false;
  }
}
function import_userlevel()
{
  if(document.myform.FromUserLevel.selectedIndex>=0&&document.myform.ToUserGroup.selectedIndex>=0)
  {
    for(var i=0; i<document.myform.FromUserLevel.length; i++)
    {
      if(document.myform.FromUserLevel.options[i].selected==true)
      {
        document.myform.LevelName[IDindex].value = document.myform.FromUserLevel.options[i].text;
        document.myform.UserLevel[IDindex].value = document.myform.FromUserLevel.options[i].value;
        document.myform.GroupName[IDindex].value = document.myform.ToUserGroup.options[document.myform.ToUserGroup.selectedIndex].text;
        document.myform.GroupID[IDindex].value = document.myform.ToUserGroup.options[document.myform.ToUserGroup.selectedIndex].value;
        document.myform.FromUserLevel.options[document.myform.FromUserLevel.selectedIndex]=null;
        IDindex=IDindex+1;
        i=i-1;
      }
    }
    document.myform.ToUserGroup.selectedIndex=-1;
    if(document.myform.FromUserLevel.length==0)
    {
      document.myform.btImport.disabled=true;
      document.myform.StartUpdate.disabled=false;
    }
  }
}
function clear_import()
{
  for ( var i=0; i<document.myform.LevelName.length; i++){
    if(document.myform.LevelName[i].value!=""){
      document.myform.FromUserLevel.options[document.myform.FromUserLevel.length]=new Option(document.myform.LevelName[i].value,document.myform.UserLevel[i]);
      document.myform.LevelName[i].value = "";
      document.myform.UserLevel[i].value = "";
      document.myform.GroupName[i].value = "";
      document.myform.GroupID[i].value = "";
    }
  }
  IDindex = 0
  document.myform.btImport.disabled=false;
  document.myform.StartUpdate.disabled=true;
}
</script>
<form name="myform" method="post" action="Update_2005.asp">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
    <tr align="center" class="title">
      <td height="30"><strong>动易4.03版 To 2005版 数据库升级程序</strong></td>
    </tr>
    <tr class="tdbg">
      <td width="100%" height="150" align=center valign="middle"><br>
        <table border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td><b>第二步、请选择要升级的数据库内容:</b></td>
          </tr>
          <tr>
            <td><fieldset><legend>必选内容</legend>
              <table width="700" border="0" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Admin" checked>管 理 员</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Config" checked>网站配置</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Skin" checked>网站风格</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Template" checked>网站模板</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Channel" checked>网站频道</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Class" checked>网站栏目</td>
                </tr>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Article" checked>所有文章</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Soft" checked>所有软件</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Photo" checked>所有图片</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Special" checked>所有专题</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_JsFile" checked>JS数据</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Comment" checked>所有评论</td>
                </tr>
              </table>
              </fieldset></td>
          </tr>
          <tr>
            <td><fieldset><legend>可选内容</legend>
              <table width="700" border="0" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Guest" checked>网站留言</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Announce" checked>网站公告 </td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Vote" checked>网站调查 </td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_FriendSite" checked>友情链接</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_Message" checked>用户短消息</td>
                  <td width="16%"><input name="UpdateTable" type="checkbox" id="UpdateTable" value="PE_User" onClick='show_userlevel();'>注册用户</td>
                </tr>
              </table>
              </fieldset></td>
          </tr>
          <tr id="PE_UserLevel_Config" style="display:'none'">
            <td><fieldset><legend>配置用户组升级设置</legend>
              <table width="700" border="0" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="50%">
                    <fieldset><legend>指定用户组对应关系</legend>
                      <table width="100%" height="180" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td>
                            <select name='FromUserLevel' multiple size='2' style='height:170px;width:160px;'>
                            <% Call Show_UserLevel() %>
                            </select>
                          </td>
                          <td>&nbsp;&gt;&gt;&nbsp;</td>
                          <td>
                            <select name='ToUserGroup' size='2' style='height:170px;width:160px;'>
                            <% Call Show_UserGroup() %>
                            </select>
                          </td>
                        </tr>
                      </table>
                      <div align='center'><input type="button" name="btImport" id="btImport" value="增加对应关系&gt;&gt;" onclick="import_userlevel();"></div>
                    </fieldset>
                  </td>
                  <td width="50%">
                    <fieldset><legend>导入后用户组情况</legend>
                      <table width="100%" height="180" border="0" cellpadding="0" cellspacing="0">
                        <tr align="center">
                          <td>
                            <% Call Show_Import() %>
                          </td>
                        </tr>
                      </table>
                      <div align='center'><input type="button" name="Import" id="Import" value="重新设置关系" onclick="clear_import();"></div>
                    </fieldset>
                  </td>
                </tr>
              </table>
              </fieldset></td>
          </tr>
          <tr>

⌨️ 快捷键说明

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