mdb_rename.asp

来自「核心惊云下载系统」· ASP 代码 · 共 104 行

ASP
104
字号
<%Admin="SysMdbRC"%>
<!--#include file="check.asp"-->
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>管理中心 - 下载系统(HTML版)</title>
<style>
td{font-size:9pt;line-height:160%} 
body{font-size:9pt;line-height:160%} 

a:link       { color: #0033CC; text-decoration: none }
a:visited    { color: #0033CC; text-decoration: none }
a:active     { color: #FF0000; text-decoration: none }
a:hover      { color: #000000; text-decoration: underline}
</style>
</head>
<body topmargin="6"><center>
<%
if request("type")="save" then
if request("mdb")="down" then
mdb="mdb_path_down_name.asp"
elseif request("mdb")="info" then
mdb="mdb_path_info_name.asp"
elseif request("mdb")="user" then
mdb="mdb_path_user_name.asp"
end if
JyDownMDBname=request("JyDownMDBname")
JyDownMDBnameNew=request("JyDownMDBnameNew")
if JyDownMDBnameNew="" then
  JyDownMsg="错误:文件名不能为空."
end if
if JyDownMDBname=JyDownMDBnameNew then
  JyDownMsg="错误:文件名相同."
end if
if JyDownMsg="" then
Set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFile Server.MapPath("data\"&JyDownMDBname&".asp"),Server.MapPath("data\"&JyDownMDBnameNew&".asp")
Set TS1 = fs.CreateTextFile(Server.MapPath(""&mdb&""), True) 
TS1.write "<"&chr(37)&"MDBname="&chr(34)&JyDownMDBnameNew&chr(34)&chr(37)&">"
Set TS1 = Nothing
fs.DeleteFile Server.MapPath("data\"&JyDownMDBname&".asp"),True
Set fs=nothing
response.write("<script>alert('成功:已经成功数据库文件名("&JyDownMDBname&".asp)改为("&JyDownMDBnameNew&".asp)!');history.go(-1)</script>")
response.end
end if%>
<table border="0" cellspacing="0" style="border-collapse: collapse" width="300" cellpadding="0">
  <tr>
    <td width="100%"><font color="#FF0000">·</font><%=JyDownMsg%> 时间:<%=Now()%></td> 
  </tr>
</table>
<%end if%>
  <table border="0" cellspacing="1" style="border-collapse: collapse" width="300" bgcolor="#E6E6E6">
    <tr>
      <td width="100%" bgcolor="#BBAADD" height="26"><font color="#FFFFFF"><b>&nbsp;修改数据库文件名</b></font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF" height="26">      
      <font color="#FF0000">&nbsp;·</font><font color="#808080">操作前最好先备份数据库</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#F7F7F7" height="22">      
      <font color="#000080"><b>&nbsp;软件数据库</b></font></td>
    </tr>
    <tr>
    <!--#include file="mdb_path_down_name.asp"-->
    <form action="mdb_rename.asp?type=save&mdb=down&JyDownMDBname=<%=MDBname%>" method="post">
      <td width="100%" bgcolor="#FFFFFF" height="24">      
      <p align="center">      
      <input name="JyDownMDBnameNew" value="<%=MDBname%>" size="20" style="border-style: solid; border-width: 1">.asp 
      <input name="b1" type="submit" value="确认修改"></p>
     </td>
     </form>
    </tr>
    <tr>
      <td width="100%" bgcolor="#F7F7F7" height="22">      
      <font color="#000080"><b>&nbsp;文章数据库</b></font></td>
    </tr>
    <tr>
    <!--#include file="mdb_path_info_name.asp"-->
    <form action="mdb_rename.asp?type=save&mdb=info&JyDownMDBname=<%=MDBname%>" method="post">
      <td width="100%" bgcolor="#FFFFFF" height="24">      
      <p align="center">      
      <input name="JyDownMDBnameNew" value="<%=MDBname%>" size="20" style="border-style: solid; border-width: 1">.asp 
      <input name="b1" type="submit" value="确认修改"></p>
     </td>
     </form>
    </tr>
    <tr>
      <td width="100%" bgcolor="#F7F7F7" height="22">      
      <font color="#000080"><b>&nbsp;用户数据库</b></font></td>
    </tr>
    <tr>
    <!--#include file="mdb_path_user_name.asp"-->
    <form action="mdb_rename.asp?type=save&mdb=user&JyDownMDBname=<%=MDBname%>" method="post">
      <td width="100%" bgcolor="#FFFFFF" height="24">      
      <p align="center">      
      <input name="JyDownMDBnameNew" value="<%=MDBname%>" size="20" style="border-style: solid; border-width: 1">.asp 
      <input name="b1" type="submit" value="确认修改"></p>
     </td>
     </form>
    </tr>
    </table></center>
</body>
</html>

⌨️ 快捷键说明

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