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

📄 adminaccess.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
字号:
<!--#include file="MarcosCB.asp"-->
<style>
<%=skinCss%>
</style>
<%
  getConn()
  
  isIn()
  isAdmin()
  
  action=request("action")
  if action="backup" or action="restore" then
     set fso=CreateObject("Scripting.FileSystemObject")
	 dbs1=request("database1")
	 dbs2=request("database2")
 	 if fso.fileexists(dbs1) then 
	    fso.copyfile dbs1,dbs2
		echo "<div align=center>操作成功!</div><br>"
	   else
		echo "<script>alert('请确认源数据库文件存在!');location.href='adminAccess.asp';</script>"
	 end if
  end if
  if action="compress" then
  	 dbs1=request("dbs1")
	 call compressdata(dbs1)   
  end if
  
	sub compressdata(dbs1)
	   if dbs1<>"" then
	  	  echo "<div align=center>"&compactdb(dbs1)&"</div><br>"
	   end if
	end sub

	function compactdb(dbs1)
	   dim fso,engine, strdbs1,jet_3x
	   strdbs1=left(dbs1,inStrRev(dbs1,"\"))
	   set fso=createObject("Scripting.FileSystemObject")
	   if fso.FileExists(dbs1) Then
		  fso.CopyFile dbs1,strdbs1&"temp.mdb"
	  	  Set engine=createObject("JRO.JetEngine")
		  engine.compactdatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&strdbs1&"temp.mdb",_
		  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&strdbs1&"temp1.mdb"
	      fso.CopyFile strdbs1&"temp1.mdb",dbs1
	      fso.DeleteFile(strdbs1&"temp.mdb")
	      fso.DeleteFile(strdbs1&"temp1.mdb")
	      set fso=nothing
	      set Engine=nothing
	      compactdb="你的数据库, "&dbs1&", 已经压缩成功!"
	    else
		  compactdb="数据库名称或路径不正确. 请重试!"
	   end if
	end function
	closeConn()
  %>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <form name="form1" method="post" action="?action=backup" onSubmit="form1.Submit.disabled=true">
  <tr align="center"> 
      <td height="20" colspan="2" class="tr"> 数据备份FSO版 <a href="adminAccessStream.asp">|无FSO版|</a></td>
  </tr>
  <tr> 
    <td width="242" height="20" align="right">源数据库路径:</td>
    <td width="512" height="20"><input name="database1" type="text" id="database1" value="<%=database1%>" size="60"></td>
  </tr>
  <tr> 
    <td height="20" align="right">目的数据库路径:</td>
    <td height="20">
	<input name="database2" type="text" id="database2" value="<%=database2%>\<%=date()%>.%5C" size="60">
    </td>
  </tr>
  <tr align="center"> 
      <td height="20" colspan="2" class="tr">
<input type="submit" name="Submit" value="开始备份">
      </td>
  </tr>
</form>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <form name="form3" method="post" action="?action=compress" onSubmit="javascript:form3.Submit8.disabled=true">
    <tr> 
      <td height="25" colspan="2" align="center" class="tr">系统数据库压缩</td>
    </tr>
    <tr> 
      <td width="239" align="right">压缩数据库:</td>
      <td width="515"> <input name="dbs1" type="text" id="dbs14" value="<%=database2%>\<%=date()%>.%5C" size="60"></td>
    </tr>
    <tr> 
      <td colspan="2" align="center" class="tr"> <input name="Submit8" type="submit" id="Submit8" value="开始压缩"> 
      </td>
    </tr>
  </form>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <form name="form2" method="post" action="?action=restore" onSubmit="form2.Submit2.disabled=true">
  <tr align="center"> 
      <td height="20" colspan="2" class="tr"> 数据恢复(恢复后请重建缓存)</td>
  </tr>
  <tr> 
    <td width="242" height="20" align="right">源数据库路径:</td>
    <td width="512" height="20">
	<input name="database1" type="text" id="database223" value="<%=database2%>\<%=date()%>.%5C" size="60"></td>
  </tr>
  <tr> 
    <td height="20" align="right">目的数据库路径:</td>
    <td height="20"> 
      <input name="database2" type="text" id="database122" value="<%=database1%>" size="60"> 
    </td>
  </tr>
  <tr align="center"> 
      <td height="20" colspan="2" class="tr">
<input type="submit" name="Submit2" value="开始恢复"></td>
  </tr>
</form>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
  <tr> 
    <td height="25" align="center" class="tr"> </td>
  </tr>
  <tr> 
    <td height="60" align="center" bgcolor="#FFFFFF"><font face="Wingdings">v</font> 
      HigroupBBS <font face="Wingdings">v</font><br>
      Powered By <a href="javascript:;" title="QQ 26696782">Marcos</a> 2004.10</td>
  </tr>
</table>

⌨️ 快捷键说明

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