?? sk_itemdatabase.asp
字號:
<%
'================================================================================================
' 軟件名稱:清風信息自動采集生成系統
' 當前版本:CJ 1.0
' 更新日期:2008-7-18
' 程序版權:龍心數據
' 程序開發:龍心數據開發組
' 演示站點:http://cj.iising.com
' 官方網站:http://www.iising.com QQ:24387481 電話:13719316070
' 鄭重聲明:
' ①、沒有版權,你愛抄抄,愛搬搬,偶看不見!
' ②、不要用黑與白來衡量你我之間的距離,更不要讓生活磨滅我們的個性!
' ③、歡迎定做各種信息采集功能系統。
'================================================================================================
option explicit
response.buffer=true
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="SK_Session.asp"-->
<%
dim Action,Rs,Sql,RsItem,SqlItem,ItemID,ItemName,ClassID,SpecialID,Flag,FoundErr
Dim ObjInstalled,tClass,tSpecial,copyitem(149),i
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
Action=trim(request("Action"))
%>
<html>
<head>
<title>清風信息自動采集生成系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/Admin_Style.css">
<style type="text/css">
.ButtonList {
BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #ffffff 2px solid; BORDER-LEFT: #ffffff 2px solid; CURSOR: default; BORDER-BOTTOM: #999999 2px solid; BACKGROUND-COLOR: #e6e6e6
}
</style>
<SCRIPT language=javascript>
function unselectall(thisform){
if(thisform.chkAll.checked){
thisform.chkAll.checked = thisform.chkAll.checked&0;
}
}
function CheckAll(thisform){
for (var i=0;i<thisform.elements.length;i++){
var e = thisform.elements[i];
if (e.Name !="chkAll"&&e.disabled!=true)
e.checked = thisform.chkAll.checked;
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr class='topbg'>
<td height="22" colspan="2" align="center" ><strong>采 集 系 統 數 據 庫 管 理</strong></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr class="tdbg">
<td width="65" height="30"><strong>管理導航:</strong></td>
<td height="30"><a href="Sk_ItemDatabase.asp">管理首頁</a> | <a href="Sk_ItemDatabase.asp?Action=Compact">數據庫壓縮</a> | <a href="Sk_ItemDatabase.asp?Action=Backup">數據庫備份</a> | <a href="Sk_ItemDatabase.asp?Action=Restore">數據庫恢復</a> | <a href="Sk_ItemDatabase.asp?Action=LeadOut">項目導出</a></td>
</tr>
</table>
<%
if Action="Compact" or Action="CompactData" then
call ShowCompact()
elseif Action="Backup" or Action="BackupData" then
call ShowBackup()
elseif Action="Restore" or Action="RestoreData" then
call ShowRestore()
elseif Action="LeadOut" or Action="LeadOutData" then
call ShowLeadOut()
elseif Action="LeadIn" or Action="ShowLeadInData" or Action="LeadInData" Then
call ShowLeadIn()
elseif Action="ShowUpData" or Action="UpData" Then
call ShowUpData()
Else
call main()
End If
call closeconnitem()
%>
<!--#include file="Admin_ItemFoot.asp"-->
</body>
</html>
<%Sub Main%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td colspan="2" align="center" class="title" height=22><b>數據庫管理說明</b></td>
</tr>
<tr>
<td colspan="2" align="left" class="tdbg" height="100">
<br>
<p align="center">歡迎使用清風信息自動采集生成系統,使用數據庫管理功能之前請閱讀此說明。</p>
<p>
1<span lang="zh-cn">、數據庫壓縮:</span><p>
<span lang="zh-cn">由于使用了歷史記錄,數據庫的記錄數會越來越多,使用壓縮功能將會使數據庫體積減少不少。</span><p>
2<span lang="zh-cn">、數據庫備份:</span><p>
<span lang="zh-cn">備份數據以防意外。</span><p>
3<span lang="zh-cn">、數據庫恢復:</span><p>
<span lang="en-us"> </span>使用本功能可以恢復數據庫,前提是有數據庫備份。<p>
4<span lang="zh-cn">、項目導出:</span><p>
是不是經常有朋友問這個怎么操作、那個怎么操作?雖然你很熱情,但是久了也不能保證還有那份熱情,別急,使用項目導出功能將項目數據導出到一個干凈的數據庫中,讓你的朋友下載,然后使用項目導入功能,是不是什么事情都解決了。<p>
<span lang="en-us">5</span>、項目導入:<p>
<span lang="en-us"> </span>和朋友交流本系統項目的設置心得,這可是少不了的哦。<p>
<span lang="en-us">6</span>、檢查更新數據:<p>
<span lang="en-us"> </span>在使用項目導入功能后必須使用本功能更新數據,否則不能正常采集。<p>
</td>
</tr>
</table>
<%End Sub%>
<%Sub ShowCompact
If Action="Compact" Then
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<form method="post" action="Sk_ItemDatabase.asp?Action=CompactData">
<tr>
<td colspan="2" align="center" class="title" height=22><b>數據庫壓縮</b></td>
</tr>
<tr class="tdbg">
<td align="center" valign="middle" height="100">
<br>
<font color="#FF6600"><b>注:</b></font>壓縮前,建議先備份數據庫,以免發生意外錯誤。 <br>
</td>
</tr>
<tr class="tdbg">
<td align="center">
<br>
<input name="submit" type=submit value=" 壓縮數據庫 " <%If ObjInstalled=False Then response.Write "disabled"%> style="cursor: hand;background-color: #cccccc;">
<%
If ObjInstalled=False Then
Response.Write "<br><b><font color=red>您的服務器不支持 FSO(Scripting.FileSystemObject)組件! 不能使用本功能</font></b>"
End if
%>
</td>
</tr>
</form>
</table>
<%
Else
Call CompactData()
end if
%>
<%End Sub%>
<%Sub ShowBackup
If Action="Backup" Then
%>
<br>
<form method="post" action="Sk_ItemDatabase.asp?Action=BackupData">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td colspan="2" align="center" class="title" height=22><b>數據庫備份</b></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td width='200' height='33' align='right' class="tdbg">備份目錄:</td>
<td class="tdbg"><input type=text size=20 name="BackPath" value="Databackup"></td>
<td class="tdbg">相對路徑目錄,如目錄不存在,將自動創建</td>
</tr>
<tr>
<td width='200' height='34' align='right' class="tdbg">備份名稱:</td>
<td height='34' class="tdbg"><input type=text size=20 name="BackMdb" value="<%=Date()%>"></td>
<td height='34' class="tdbg">不用輸入文件名后綴(默認為“.asa”)。如有同名文件,將覆蓋</td>
</tr>
<tr align='center'>
<td height='40' colspan='3' class="tdbg"><input name='submit' type=submit value=' 開始備份 ' <%If ObjInstalled=false Then response.Write "disabled"%>></td>
</tr>
<%If ObjInstalled=false Then
Response.Write "<b><font color=red>你的服務器不支持 FSO(Scripting.FileSystemObject)組件! 不能使用本功能</font></b>"
end if
%>
</table>
</form>
<%Else
Call BackUpData()
End If
End Sub%>
<%Sub ShowRestore
If Action="Restore" Then
%>
<br>
<form method="post" action="Sk_ItemDatabase.asp?Action=RestoreData">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td colspan="2" align="center" class="title" height=22><b>數據庫恢復</b></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height='100' align='center' class="tdbg">備份數據庫路徑(相對):<input name="RestorePath" type=text id="RestorePath" value="Databackup\<%=Date()%>.asa" size=50 maxlength="200">
</td>
</tr>
<tr>
<td align='center' class="tdbg">
<input name='submit' type=submit value=' 開始恢復 ' <%If ObjInstalled=false Then response.Write "disabled"%>>
<%If ObjInstalled=false Then
Response.Write "<b><font color=red>你的服務器不支持 FSO(Scripting.FileSystemObject)組件! 不能使用本功能</font></b>"
end if
%>
</td>
</tr>
</table>
</form>
<%Else
Call RestoreData()
End If
End Sub%>
<%Sub ShowLeadOut
If Action="LeadOut" Then
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td colspan="2" align="center" class="title" height=22><b>項目導出</b></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<form method="post" name="myform" action="Sk_ItemDatabase.asp?Action=LeadOutData">
<tr class="tdbg">
<td width="5%" height="22" align="center" class=ButtonList>選擇</td>
<td width="10%" align="center" class=ButtonList>項目名稱</td>
<td width="10%" align="center" class=ButtonList>所屬頻道</td>
<td width="10%" align="center" class=ButtonList>所屬欄目</td>
<td width="10%" align="center" class=ButtonList>所屬專題</td>
<td width="5%" align="center" class=ButtonList>狀態</td>
</tr>
<%
Set RsItem=server.createobject("adodb.recordset")
SqlItem="select ItemID,ItemName,ChannelID,ClassID,SpecialID,Flag from Item order by ItemID ASC"
RsItem.open SqlItem,ConnItem,1,1
If (Not RsItem.Eof) And (Not RsItem.Bof) then
%>
<%
Do While Not RsItem.Eof
%>
<tr class="tdbg">
<td width="5%" height="22" align="center"><input type="checkbox" value=<%=RsItem("ItemID")%> name="ItemID" onClick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;"></td>
<td width="10%" align="left"><%=RsItem("ItemName")%></td>
<td width="10%" height="22" align="center"><%Call Admin_ShowChannel_Name(RsItem("ChannelID"))%></td>
<td width="10%" align="center"><%Call Admin_ShowClass_Name(RsItem("ChannelID"),RsItem("ClassID"))%></td>
<td width="10%" align="center"><%Call Admin_ShowSpecial_Name(RsItem("ChannelID"),RsItem("SpecialID"))%></td>
<td width="5%" align="center">
<%
If RsItem("Flag")=True Then
Response.write "√"
Else
Response.write "<font color=red>×</font>"
End If
%>
</td>
</tr>
<%
RsItem.MoveNext
Loop
%>
<tr class="tdbg">
<td colspan=7 height="52" align="center">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" >全選
導出到數據庫:<input type="text" name="LeadOutMdb" size="30" value="Database/sk_LeadOut.mdb">
<input type="submit" name="submit" value="導出" style="cursor: hand;background-color: #cccccc;">
</td>
</tr>
<%
Else
%>
<tr class="tdbg">
<td colspan='9' class="tdbg" align="center"><br>系統中暫無采集項目!</td>
</tr>
<%
End If
RsItem.Close
Set RsItem=Nothing
%>
</form>
</table>
<%
Else
Call LeadOutData()
End If
%>
<%End Sub%>
<%Sub ShowLeadIn
If Action="LeadIn" Then
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td colspan="2" align="center" class="title" height=22><b>項目導入</b></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<form method="post" action="Sk_ItemDatabase.asp?Action=ShowLeadInData">
<tr class="tdbg">
<td align="center" valign="middle" height="100">
<br>
數據庫位置:
<input name="LeadInMdb" type="text" id="LeadInMdb" size="23" value="Databackup/LeadIn.mdb">
</td>
</tr>
<tr class="tdbg">
<td align="center">
<input name="submit" type=submit value=" 下 一 步 " style="cursor: hand;background-color: #cccccc;">
</td>
</tr>
</form>
</table>
<%
ElseIf Action="ShowLeadInData" Then
Call ShowLeadInData()
Else
Call LeadInData()
End if
End Sub%>
<%Sub ShowUpData
If Action="ShowUpData" Then
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -