admin_redata.asp

来自「完整的网址站」· ASP 代码 · 共 73 行

ASP
73
字号
<!--#include file="config.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='index.asp'>重新登录</a>!"
  call diserror()
  response.end
end if
  if session("flag")>1 then
  errmsg=errmsg+"<br>"+"<li>你的管理权限不够!!</a>!"
  call diserror()
  response.end
  end if
%>
<html>
<head>
<title>管理中心</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" MARGINHEIGHT="0"><script>if(top==self)top.location="index.asp" </script>
<br>
<%
if Request("action")="Restore" then
	backpath=request.form("backpath")
	Dbpath=request.form("Dbpath")
	if dbpath="" then
		errmsg="<li>请输入您要恢复成的数据库全名。"
		call diserror()
	else
	Dbpath=server.mappath(Dbpath)
	end if
	backpath=server.mappath(backpath)
	'Response.write Backpath
	Set Fso=server.createobject(""&fsoset&"")
	if fso.fileexists(dbpath) then  					
		fso.copyfile Backpath,Dbpath
		errmsg="<li>成功恢复数据!"
		call disok()
	else
		errmsg="<li>备份目录下并无您的备份文件!"
		call diserror()
	end if
else
%>
<table align="center" width="96%" border="1" cellspacing="0" cellpadding="1" bordercolor="#0099CF" style="border-collapse: collapse">
  <form action="" name="form1" method="post">
    <tr> 
      <td height="25" colspan="2" align="center" bgcolor="#0099CF"><b>恢 复 数 据 库</b> </td>
    </tr>
    <tr valign="middle"> 
      <td bgcolor="#ffffff"><br>
	  &nbsp;&nbsp;<B>恢复数据</B>( 需要FSO支持,FSO相关帮助请看微软网站 )<br>
	  &nbsp;&nbsp;备份数据库路径(相对):
              <input type=text size=30 name=backpath value="../DataBackup/data.mdb" class="smallInput">
              &nbsp;&nbsp;<BR>
  						&nbsp;&nbsp;目标数据库路径(相对):
              <input type=text size=30 name=DBpath value="<%=mdb%>" class="smallInput">
              <BR>&nbsp;&nbsp;填写您当前使用的数据库路径,如不想覆盖当前文件,可自行命名(注意路径是否正确),然后修改conn.asp文件,如果目标文件名和当前使用数据库名一致的话,不需修改conn.asp文件<BR>
						&nbsp;&nbsp;
              <input type=submit value="恢复数据" class="button">
               <br>
  						-----------------------------------------------------------------------------------------<br>
              &nbsp;&nbsp;在上面填写本程序的数据库路径全名,本程序的默认备份数据库文件为../DataBackup/data.mdb,请按照您的备份文件自行修改。<br>
  			  &nbsp;&nbsp;您可以用这个功能来恢复您的法规数据,以保证您的数据安全!<br>
	  &nbsp;&nbsp;注意:所有路径都是相对与程序空间Data目录的相对路径	  </td>
	</tr>
	<input type="hidden" name="action" value="Restore">
  </form>
</table>
<%end if%>

⌨️ 快捷键说明

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