filebackup.htm

来自「全方面的OA管理程序代码」· HTM 代码 · 共 62 行

HTM
62
字号
<!--#include file="../inc/Secure.htm"-->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/main.css">
</HEAD>
<%
LoginID=Session("LoginID")
if LoginID="" then response.end

if request("cmd1")<>"" then
	CopyOneDir "../FileDir/"&LoginID, "../FileBackup/"& LoginID
	response.write "<font color=red>您的私人目录备份完成!</font>"
	response.write "备份目录位置:"&server.mappath("../FileBackup/"& LoginID)
	response.write "<BR><a href=""javascript:history.back(-1);"">[返回]</a>"
	response.end
end if
if request("cmd2")<>"" then
	CopyOneDir "../FileDir/"&LoginID&"_Share", "../FileBackup/"& LoginID&"_Share"
	response.write "<font color=red>您的私人共享备份完成!</font>"
	response.write "备份目录位置:"&server.mappath("../FileBackup/"& LoginID&"_Share")
	response.write "<BR><a href=""javascript:history.back(-1);"">[返回]</a>"
	response.end
end if
%>
<BODY BGCOLOR="#FFFFFF">
<fieldset title="文件备份">
<legend align=center><font color=red class="pt11"><b>文件备份</b></font></legend> 
<div style="word-break:break-all;font-size:12px;line-height:16px;padding:10px;">

您只需要点以下两个按扭就可以备份你的全部文件。
<form name="SearchForm" method="Post" action="">
<div align=center>
<table width="75%" border=0>
<tr>
	<td><INPUT TYPE="submit" name="cmd1" value="备份私人目录文件" class="font9boldwhite"></td>
	<td><INPUT TYPE="submit" name="cmd2" value="备份私人共享文件" class="font9boldwhite">	</td>
</tr>
</table>
</div>
</form>

</div></fieldset> 

</BODY>
</HTML>
<%
sub CopyOneDir (FilePath1,FilePath2)
	FilePath1=Server.Mappath(trim(FilePath1))
	FilePath2=Server.Mappath(trim(FilePath2))
	dim fs,f
	Set fs = server.CreateObject("Scripting.FileSystemObject")
	if not fs.FolderExists(FilePath2) then
	   fs.CreateFolder FilePath2
	end if
	if trim(FilePath1)<>"" and fs.FolderExists(FilePath1) then
		set f=fs.GetFolder(FilePath1)
		f.Copy FilePath2,true
	end if
	set fs=nothing	
end sub
%>

⌨️ 快捷键说明

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