📄 admin_backup.asp
字号:
<!--#include file="Inc/Level012.asp" -->
<!--#include file="Connections/connY.asp" -->
<!--#include file="Inc/TimeFormat.asp" -->
<!--#include file="Inc/UBBCode.asp" -->
<!--#include file="Inc/SetCss.asp" -->
<html>
<head>
<title><%=Forum_Title%></title>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<!--#include file="Inc/Css.asp" -->
<script language=Javascript src="Js/Menu.Js"></script>
<script language=Javascript src="Js/Button.Js"></script>
<script language=Javascript src="Js/Operate.Js"></script>
</head>
<body leftmargin="0" topmargin="0" bgcolor="<%=Forum_ColorList_BgColor%>" vlink="<%=Forum_Css_A_Link_Color%>" onLoad="MM_preloadImages('<%=Forum_Pic_Write2%>','<%=Forum_Pic_Vote2%>')">
<!--#include file="Inc/Top.asp" -->
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=Forum_ColorList_BorderColor%>">
<tr>
<td height="20" bgcolor="<%=Forum_ColorList_BgColor%>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="font">
<tr>
<td width="361"> 您所在的位置: <a href="../" onfocus="this.blur()">首页</a>
>> <a href="List.asp" onFocus="this.blur()">讨论组</a> >>
<font color="<%=Forum_ColorList_NavFontColor%>">论坛管理系统</font></td>
<td width="17">
<div align="center"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height=1></td>
</tr>
</table>
<table width="<%=Forum_Width%>" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="<%=Forum_ColorList_BorderColor%>" class="font">
<tr>
<td valign="top" width="102" bgcolor="<%=Forum_ColorList_BgColor%>">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<!--#include file="Inc/Menu.asp" -->
</td>
</tr>
</table>
</td>
<td bgcolor="<%=Forum_ColorList_BgColor%>" valign="top"> <br>
<table width="80%" border="0" cellspacing="1" cellpadding="2" align="center" class="font" bgcolor="<%=Forum_ColorList_BorderColor%>">
<tr>
<td bgcolor="<%=Forum_ColorList_TitleColor%>" height="20"> 备份数据库(FSO)</td>
</tr>
<tr>
<td bgcolor="<%=Forum_ColorList_BgColor%>" valign="top"> 1.在上面填写本程序的数据库路径全名,本程序的默认数据库文件为Data\Lz5237.MDB<br>
2.所有路径都是相对与程序空间根目录的<b>相对路径</b> <br>
-------------------------------------------------------------------------------
<%
If Request("Action")="BackupNow" Then
Function CheckDir(FolderPath)
folderpath=Server.MapPath(".")&"\"&FolderPath
Set Fso1 = CreateObject("Scripting.FileSystemObject")
If Fso1.FolderExists(FolderPath) Then
CheckDir = True
Else
CheckDir = False
End If
Set Fso1 = Nothing
End Function
Function MakeNewsDir(FolderName)
Set Fso1 = CreateObject("Scripting.FileSystemObject")
Set F = Fso1.CreateFolder(FolderName)
MakeNewsDir = True
Set Fso1 = Nothing
End Function
DBPathNow=Request.Form("DBPathNow")
DBPathNow=Server.Mappath(DBPathNow)
BKDBF=Request.Form("BKDBF")
BKDBN=Request.Form("BKDBN")
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
If Fso.FileExists(DBPathNow) Then
If CheckDir(BKDBF) = True Then
Fso.CopyFile DBPathNow,BKDBF& "\"& BKDBN
Else
MakeNewsDir BKDBF
Fso.copyfile DBPathNow,BKDBF& "\"& BKDBN
End If
Response.Write "<br> 备份数据库成功,您备份的数据库路径为" &BKDBF& "\"& BKDBN
Else
Response.Write "<br> 找不到您所需要备份的文件."
End If
End If
If Request("Action")="" Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="font">
<form name="form1" method="post" action="Admin_Backup.asp?Action=BackupNow">
<tr>
<td width="22%"> 当前数据库路径:</td>
<td width="78%">
<input type="text" name="DBPathNow" class="Textfiled" size="40" value="<%=DBNow%>">
</td>
</tr>
<tr>
<td width="22%"> 备份数据库目录:</td>
<td width="78%">
<input type="text" name="BKDBF" class="Textfiled" size="20" value="BackupData">
如目录不存在,程序将自动创建,请勿修改!</td>
</tr>
<tr>
<td width="22%"> 备份数据库名称:</td>
<td width="78%">
<input type="text" name="BKDBN" class="Textfiled" size="20" value="<%=Year(Now)&Month(Now)&Day(Now)%>.mdb">
如备份目录有该文件,将覆盖,如没有,将自动创建 </td>
</tr>
<tr>
<td width="22%"> </td>
<td width="78%"> <br>
<input type="submit" name="Submit" value="备份数据" class="button" onFocus="this.blur()">
</td>
</tr>
</form>
</table>
<%
End If
%>
<br>
<br>
</td>
</tr>
</table>
<div align="center"><br>
</div>
<div align="center"></div>
</td>
</tr>
</table>
<!--#include file="Inc/Bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -