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

📄 beifendata.asp

📁 信息管理系统 管理页面:admin/index.asp 用户和密码都是admin
💻 ASP
字号:
<!--#include file=conn.asp-->
<head>
<title>管理页面</title>
<meta NAME=GENERATOR Content="Microsoft FrontPage 5.0" FrontPage 3.0"" CHARSET=GB2312 Microsoft>
<link rel="stylesheet" type="text/css" href="../1.css">
</head>
<BODY>
<table cellpadding=0 cellspacing=0 border=0 align=center>
  <tr>
    <td>
      <table cellpadding=3 cellspacing=0 border=1 width=100% bordercolor="#C0C0C0" style="border-collapse: collapse">
        <tr >
        </tr>
            <tr >
              <td width="100%" valign=top><font>
<%
 dim Dbpath,bkfolder,bkdbname,Fso,fso1,f
	if request("action")="Backup" then
	call backupdata()
	else
%>
		 		<table width=100% cellspacing=0 cellpadding=0 border="0" bordercolor="#C0C0C0" style="border-collapse: collapse" >		  							  				
  				<tr >
  					<td height=25 bgcolor="#FFAF37" >
                    <p align="center">
                    <font style="font-size: 9pt">
  					&nbsp;&nbsp;<B>备份网站数据</B>( 需要FSO支持)</font><span style="font-size: 9pt">
                    </span>    
  					</td>    
  				</tr>    
  				<form method="POST" action="beifendata.asp?action=Backup">    
  				<tr >    
  					<td height=100 >  
  						<p align="center">  
  						<span style="font-size: 9pt">当前数据库路径(相对路径):<input type=text size=21 name=DBpath value="<%=db%>"><br>
                        备份数据库目录(相对路径):<input type=text size=21 name=bkfolder value=../data/buk><br>
                        备份数据库名称(填写名称):<input type=text size=21 name=bkDBname value=ijob.mdb><BR>    
						&nbsp;&nbsp;<br>
                        <input type=submit value="确定"></span></td>    
  				</tr>	    
  				</form>    
  			</table>    
<%end if%></font>    
          </td>    
            </tr>    
        </table>    
        </td>    
    </tr>    
</table>    
    
<%    
    
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    
			else    
			MakeNewsDir bkfolder    
			fso.copyfile dbpath,bkfolder& "\"& bkdbname    
			end if    
			response.write "备份数据库成功"    
		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    
Function MakeNewsDir(foldername)    
    Set fso1 = CreateObject("Scripting.FileSystemObject")    
        Set f = fso1.CreateFolder(foldername)    
        MakeNewsDir = True    
    Set fso1 = nothing    
End Function    
%>

⌨️ 快捷键说明

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