?? adminaccess.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 + -