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

📄 restore.asp

📁 视频点播系统
💻 ASP
字号:
<%
if session("admin")="" then
response.redirect "login.asp"
end if
if session("flag")>1 then
response.write "<br><p align=center>你没有操作权限!</p>"
response.end
end if
%>
<!--#include file="articleconn.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>恢复数据库</title>
<style type=text/css>
body  { background:#799AE1; margin:0px; font:9pt 宋体; }
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>
<body text="#000000" link="#000000" vlink="#000000" alink="#000000" bgcolor="#799AE1">
<%
call main()
conn.close
set conn=nothing
sub main()
%>
<p> </p>
<p> </p>
<center>
<%
if request("action")="Restore" then
dim dbpath,backpath,fso
Dbpath=request.form("Dbpath")
backpath=request.form("backpath")
if dbpath="" then
response.write "请输入您要恢复成的数据库完整名称"
else
Dbpath=server.mappath(Dbpath)
end if
backpath=server.mappath(backpath)
'Response.write Backpath
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(dbpath) then  
fso.copyfile Dbpath,Backpath
response.write "数据库恢复完成,请进行其他操作!"
else
response.write "备份目录下没有找到您的备份文件!"
end if
else
%>
<table border="1" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#2B77BD" width="80%">
<tr>
<td width="100%" height="30"  align="center">
<b>恢复数据库</b></td>
</tr>
<tr>
<td width="100%">
<font color="#FF0000">注意:</font>备份数据需要FSO组件支持,FSO组件的相关帮助请看微软网站!<br>   所有路径都是相对与程序空间根目录的相对路径!
</td>
</tr>
<tr><form method="post" action="restore.asp?action=Restore">
<td width="100%">
<br>
   备份数据库路径:<input type=text size=24 name=dbpath value=""> 如果文件不存在,将不能恢复!<BR>
   目标数据库路径:<input type=text size=24 name=backpath value=""> 填写您当前使用的数据库路径!<p>
   如不想覆盖当前文件,可自行命名,然后修改conn.asp文件中相应连接。<br>
   如果目标文件名和当前使用数据库名一致的话,不需修改conn.asp文件。<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#FF0000">&nbsp;注:此功能谨慎使用,可能在有些空间备份后,在本机上不能用ACCESS打开。</font><br><br>
                   <input type=submit value="开始恢复"> <br>
</td></form>
</tr>
</table>
<%
end if
%>
</center>
<%
end sub
%>

⌨️ 快捷键说明

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