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

📄 safe5.asp

📁 这是一个很漂亮的网站购物系统
💻 ASP
字号:
<!--#include file="../include/buyok_shop_30_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("11")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">
<%
action=request("backup")
if action<>"ok" then
%>
<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
  <tr> 
    <td colspan=2 class=td height=18> 
      <div align="center"><b><font color="#FF0000"> <font color="#FFFFFF">抱歉,您使用的是未注册版本,未提供本功能. 
        </font></font></b></div>
    </td>
  </tr>
  <tr> 
    <td width=13% height=25 align=center>&nbsp;</td>
    <td width="87%"><b><font color="#FF0000">客户服务及反馈中心 抱歉,您使用的是未注册版本,未提供本功能.</font></b></td>
  </tr>
  <tr> 
    <td width=13% height=25 align=center valign=top"><font color="#FF0000">联系方式</font></td>
    <td width="87%"><b><font color="#FF0000">Phone:010-88684912 13366690044 MSN:asp3721@msn.com 
      QQ:88353022  </font></b></td>
  </tr>
  <form action='prod0.asp?action=addMidclass' method=post name=addmidclass>
    <tr> 
      <td width=13% height=25 align=center><font color="#FF0000">备 注</font></td>
      <td width="87%"><b><font color="#FF0000">非在线支付购买的用户,汇完款 请QQ或电话联系管理员</font></b></td>
    </tr>
    <tr> 
      <td colspan=2> 
        <div align="center"><b><font color="#FF0000"><a href="http://www.asp3721.cn/"><font color="#990000">asp3721软件中心 
          我们将为你提供优质服务,谢谢!http://www.asp3721.cn/</font></a></font></b> </div>
      </td>
    </tr>
  </form>
</table>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" 
bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=safe5.asp method=post name=backup>
<tr class=backs><td colspan=2 class=td height=18>数据库在线维护</td></tr>
<input type="hidden" name="oldpath" value="<%=db%>">
<input type="hidden" name="DBname" size="20" value="shopbackup.mdb">
<%
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(server.mappath("shopbackup.mdb")) then
set myfile=fso.getfile(server.mappath("shopbackup.mdb"))
response.write "<tr><td heigh=50 width=25% >上次备份日期</td><td>"&myfile.datelastmodified&"</td></tr>"
response.write "<tr><td heigh=50 width=25% >备份文件大小</td><td>"&myfile.size/1024&" KB</td></tr>"
else
response.write "<tr><td colspan=2 heigh=50>从未备份数据库文件</td></tr>"
end if
%>
<tr><td colspan=2>
<input title='备份正在使用的数据库文件' type="submit" name="Submit" value="备份" onclick="{if(confirm('备份正在使用的数据库文件,有道是常“备”无患,出了问题后可用于恢复!\n\n备份文件将保存在后台目录里,只要后台目录不公开,放在这里的文件就非常安全。\n\n单击确定继续,单击取消返回。')){this.document.backup.submit();return true;}return false;}"> 
<input title='对备份的数据库文件进行压缩和修复' type='button' value='压缩' onclick="{if(confirm('对数据库备份文件进行压缩,减少占用空间,还可修复数据库错误。\n\n正在使用的数据库不能压缩,请按“备份”—“压缩”—“恢复”的流程操作。\n\n单击确定继续,单击取消返回。 ')){location.href='safe5.asp?action=yasuo';}}"> 
<input title='用备份文件覆盖正式数据库文件' type='button' value='恢复' onclick="{if(confirm('用数据库备份文件覆盖正式的数据库文件,单击确定继续,单击取消返回。')){location.href='safe5.asp?action=huifu';}}"> 
<input title='删除数据库备份文件' type='button' value='删除' onclick="{if(confirm('删除备份的数据库文件(即后台目录里的备份文件shopbackup.mdb)。\n\n单击确定继续,单击取消返回。')){location.href='safe5.asp?action=del';}}"> 
<input title='将备份的数据库下载到本地保存' type='button' value='下载' onclick="{if(confirm('将数据库备份文件下载到自己的电脑中保存一份,以备不测。\n\n不怕一万,只怕万一 ^_^ 需要时可上传并恢复数据库。\n\n单击确定继续,单击取消返回。 ')){location.href='safe5.asp?action=down';}}"> 
<INPUT title='将本地数据库文件上传到网站' TYPE="button" value="上传" onClick="window.open('upload.asp?fuptype=db&fupname=shopbackup&frmname=db','blank_','scrollbars=yes,resizable=no,width=650,height=450')">
<input type="hidden" name="backup" value="ok">
</td></tr>
</form>
</table>
<br><font color=red>※提示:</font><br><br>
此操作需FSO功能支持。<br>
执行此操作前,请先关闭其它网页窗口,断开FTP连接。<br>
提交后,请耐心等待<font color=red>(请不要重复点击上面的按钮),</font>完成时间视网络状况而定。<br>
请在网络空闲时进行此操作,<b>执行此操作可能导致服务器变慢或不稳定</b>。
<% 
else
oldpath=request("oldpath")
oldpath=server.mappath(oldpath)
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(oldpath) then
fso.copyfile oldpath,server.mappath("./")&"/"&request.form("dbname")
 response.write "<script language='javascript'>"
 response.write "alert('操作成功,数据库备份完成!');"
 response.write "location.href='safe5.asp';"
 response.write "</script>"
 response.end
else
 response.write "<script language='javascript'>"
 response.write "alert('出错了,找不到需要备份的源文件!');"
 response.write "location.href='javascript:history.go(-1)';"
 response.write "</script>"
 response.end
end if
end if
if request("action")="yasuo" then
dbname = server.mappath("shopbackup.mdb")
tempname = server.mappath("./")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(dbname) then
Set Engine = CreateObject("JRO.JetEngine")
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbname, _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & tempname & "/temp.mdb"
 fso.CopyFile tempname & "/temp.mdb",dbname
 fso.DeleteFile(tempname & "/temp.mdb")
Set fso = nothing
Set Engine = nothing
 response.write "<script language='javascript'>"
 response.write "alert('操作成功,数据库备份文件压缩完成!');"
 response.write "location.href='safe5.asp';"
 response.write "</script>"
 response.end
else
 response.write "<script language='javascript'>"
 response.write "alert('出错了,找不到需要压缩的文件,可能是还没有备份,或者备份文件已经被删除!');"
 response.write "location.href='javascript:history.go(-1)';"
 response.write "</script>"
 response.end
end if
end if
if request("action")="del" then
dbname = server.mappath("shopbackup.mdb")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(dbname) then
fso.DeleteFile(dbname)
Set fso = nothing
 response.write "<script language='javascript'>"
 response.write "alert('操作成功,数据库备份文件已被删除!');"
 response.write "location.href='safe5.asp';"
 response.write "</script>"
 response.end
else
 response.write "<script language='javascript'>"
 response.write "alert('出错了,找不到需要删除的文件,可能是还没有备份,或者备份文件已经被删除!');"
 response.write "location.href='javascript:history.go(-1)';"
 response.write "</script>"
 response.end
end if
end if
if request("action")="down" then
dbname = server.mappath("shopbackup.mdb")
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(dbname) then
 response.write "<script language='javascript'>"
 response.write "location.href='shopbackup.mdb';"
 response.write "</script>"
 response.end
else
 response.write "<script language='javascript'>"
 response.write "alert('出错了,找不到要下载的文件,可能是还没有备份,或者备份文件已经被删除!');"
 response.write "location.href='javascript:history.go(-1)';"
 response.write "</script>"
 response.end
end if
Set fso = nothing
end if
if request("action")="huifu" then
dbname = server.mappath("shopbackup.mdb")
oldname = server.mappath(db)
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileexists(dbname) then
fso.CopyFile dbname,oldname
Set fso = nothing
 response.write "<script language='javascript'>"
 response.write "alert('操作成功,已用备份的数据库文件覆盖网站数据库文件!');"
 response.write "location.href='safe5.asp';"
 response.write "</script>"
 response.end
else
 response.write "<script language='javascript'>"
 response.write "alert('出错了,找不到用来恢复的文件,可能是还没有备份,或者备份文件已经被删除!');"
 response.write "location.href='javascript:history.go(-1)';"
 response.write "</script>"
 response.end
end if
end if
%>

⌨️ 快捷键说明

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