?? empmain_data.asp
字號(hào):
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%
if fncheckupart(1)=true or fncheckupart(2)=true then
else
response.Write("沒有權(quán)限訪問該頁!")
response.end
end if
%>
<link rel="stylesheet" href="CSS/SellWellWeb.css" type="text/css">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="52%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
<tr>
<td class="CaptionS" height="25"> 備份數(shù)據(jù)庫
<%
if request("action")="Backup" then
call backupdata()
else
%>
</td>
</tr>
<tr class="Caption">
<form method="post" action="EmpMain_data.asp?action=Backup">
<td><br>
<table width="87%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="25" class="CaptionS">備份數(shù)據(jù)庫文件[需要FSO權(quán)限]</td>
</tr>
<tr>
<td height="22" class="CaptionS"> 當(dāng)前數(shù)據(jù)庫路徑</td>
</tr>
<tr>
<td height="22" class="CaptionS"><input type=text size=20 name=DBpath value="<%=db_crm%>"></td>
</tr>
<tr>
<td height="22"><input type="hidden" size=20 name=bkfolder value=Databackup ></td>
</tr>
<tr>
<td height="22" class="CaptionS">備份數(shù)據(jù)庫名稱[如備份目錄有該文件,將覆蓋,如沒有,將自動(dòng)創(chuàng)建]</td>
</tr>
<tr>
<td height="22" class="CaptionS"><input type=text size=28 name=bkDBname value="<%=date()%>"></td>
</tr>
<tr>
<td height="22" class="CaptionS">
<input type=submit value="確定">
</div></td>
</tr>
</table></td>
</form>
</tr>
</table>
<%end if%>
<%
sub backupdata()
Dbpath=request.form("Dbpath")
Dbpath=server.mappath(Dbpath)
bkfolder=request.form("bkfolder")
bkdbname=request.form("bkdbname")
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(dbpath) then
If CheckDir(bkfolder) = True Then
fso.copyfile dbpath,bkfolder& "\"& bkdbname & ".mdb"
else
MakeNewsDir bkfolder
fso.copyfile dbpath,bkfolder& "\"& bkdbname & ".mdb"
end if
response.write "<center>備份數(shù)據(jù)庫成功,備份的數(shù)據(jù)庫為 " & bkfolder & "\" & bkdbname & ".mdb</center>"
response.write"下載地址:http://www.feleke.com/crm/Databackup/"& bkdbname &".mdb"
Else
response.write "找不到您所需要備份的文件。"
End if
end sub
'------------------檢查某一目錄是否存在-------------------
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
'-------------根據(jù)指定名稱生成目錄---------
Function MakeNewsDir(foldername)
Set fso1 = CreateObject("Scripting.FileSystemObject")
Set f = fso1.CreateFolder(foldername)
MakeNewsDir = True
Set fso1 = nothing
End Function
%>
</td>
</tr>
</table>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -