📄 admin_itemstart.asp
字号:
<%
option explicit
response.buffer=true
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<%
Dim SqlItem,RsItem,Rs,Sql
Dim Action,FoundErr,ErrMsg
Dim ItemID,ItemName,WebName,ChannelID,ClassID,SpecialID,ListStr,ListPaingType,ListPaingStr2,ListPaingID1,ListPaingID2,ListPaingStr3,Flag,ItemCollecDate
Dim ListUrl
Dim CurrentPage,AllPage,iItem,ItemNum
Const MaxPerPage=10
Call Main()
'关闭数据库链接
Call CloseConn()
Call CloseConnItem()
%>
<%Sub Main%>
<html>
<head>
<title>采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="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-6;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="border">
<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="border">
<tr class="tdbg">
<td width="65" height="30"><strong>管理导航:</strong></td>
<td height="30"><a href=Admin_ItemStart.asp>管理首页</a> | <a href="Admin_ItemAddNew.asp">添加新项目</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><b>新 闻 采 集</b></div></td>
</tr>
</table>
<table class="border" border="0" cellspacing="1" width="100%" cellpadding="0">
<form name="myform" method="POST" action="Admin_ItemCollection.asp">
<TR>
<TD class=ButtonList width="5%" height=22 align=center>
选择</DIV></TD>
<TD class=ButtonList width="17%" height=22 align=center>
项目名称</DIV></TD>
<TD class=ButtonList width="15%" height=22 align=center>
采集来源</DIV></TD>
<TD class=ButtonList width="15%" height=22 align=center>
所属频道</TD>
<TD class=ButtonList width="15%" height=22 align=center>
所属栏目</TD>
<TD class=ButtonList width="15%" height=22 align=center>
所属专题</TD>
<TD class=ButtonList height=22 align=center>
上次采集</TD>
</TR>
<%
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
set RsItem=server.createobject("adodb.recordset")
SqlItem="select * from Item where Flag=True And ChannelDir<>'' And IsNull(ChannelDir)<>True order by ItemID DESC"
RsItem.open SqlItem,ConnItem,1,1
If (Not RsItem.Eof) and (Not RsItem.Bof) Then
RsItem.PageSize=MaxPerPage
Allpage=RsItem.PageCount
If Currentpage>Allpage Then Currentpage=1
ItemNum=RsItem.RecordCount
RsItem.MoveFirst
RsItem.AbsolutePage=CurrentPage
iItem=0
Do while Not RsItem.Eof
ChannelID=RsItem("ChannelID")
If ChannelID="" Then
ChannelID=1
End If
ClassID=RsItem("ClassID")
SpecialID=RsItem("SpecialID")
If ClassID="" Then
ClassID=0
End If
If SpecialID="" Then
SpecialID=0
End If
ItemID=RsItem("ItemID")
ItemName=RsItem("ItemName")
WebName=RsItem("WebName")
ListPaingType=RsItem("ListPaingType")
If ListPaingType=0 Or ListPaingType=1 Then
ListUrl=RsItem("ListStr")
ElseIf ListPaingType=2 Then
ListUrl=Replace(RsItem("ListPaingStr2"),"{$ID}",CStr(RsItem("ListPaingID1")))
ElseIf ListPaingType=3 Then
If Instr(RsItem("ListPaingStr3"),"|")>0 Then
ListUrl=Left(RsItem("ListPaingStr3"),Instr(RsItem("ListPaingStr3"),"|")-1)
Else
ListUrl=RsItem("ListPaingStr3")
End If
Else
ListUrl="异常"
End If
%>
<TR class="tdbg">
<TD class="tdbg" style="WIDTH: 6%" align=center>
<input type="checkbox" name="ItemID" value="<%=ItemID%>" onclick="unselectall(this.form)">
</TD>
<TD class="tdbg" align="center"><%=ItemName%>
</TD>
<TD class="tdbg" align="center"><a href="<%=ListUrl%>" title="点击访问" target=_blank><%=WebName%></a>
</TD>
<TD class="tdbg" align="center"><%Call Admin_ShowChannel_Name(ChannelID)%>
</TD>
<TD class="tdbg" align="center"><%Call Admin_ShowClass_Name(ChannelID,ClassID)%>
</TD>
<TD class="tdbg" align="center"><%Call Admin_ShowSpecial_Name(ChannelID,SpecialID)%>
</TD>
<TD class="tdbg" align="center">
<%
set rs=connItem.execute("select Top 1 CollecDate From Histroly Where ItemID=" & ItemID & " Order by HistrolyID Desc")
If not rs.eof Then
ItemCollecDate=rs("CollecDate")
else
ItemCollecDate=""
end if
Set rs=nothing
if ItemCollecDate<>"" then
Response.Write ItemCollecDate
Else
Response.Write "尚无记录"
End If
%>
</TD>
</TR>
<% iItem=iItem+1
If iItem>=MaxPerPage Then Exit Do
RsItem.MoveNext
Loop
%>
<tr class="tdbg">
<td colspan=9 height="30">
<input name="Action" type="hidden" value="Start">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" >全选
</td>
</tr>
<tr class="tdbg">
<td colspan=9 height="30">
采集模式:<input name="CollecType" type="radio" id="CollecType" value="1" checked onclick="javascript:document.myform.Content_View.checked=false">快速模式
<input name="CollecType" type="radio" id="CollecType" value="0" onclick="javascript:document.myform.Content_View.checked=true">稳定模式
<input name="CollecType" type="radio" id="CollecType" value="2" disabled>筛选模式
<input name="CollecTest" type="checkbox" id="CollecTest" value="yes" onclick="javascript:document.myform.Content_View.checked=true">采集测试 <input name="Content_View" type="checkbox" id="Content_View" value="yes">正文预览 <input type="submit" value="开始采集" name="StartMe" 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>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
<tr>
<td height="22" colspan="2" class="tdbg">
<%
Response.Write ShowPage("Admin_ItemStart.asp",ItemNum,MaxPerPage,True,True," 个项目")
%>
</td>
</tr>
</table>
<!--#include file="Admin_ItemFoot.asp"-->
</body>
</html>
<%end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -