📄 admin_collection.asp
字号:
frm.action = "Admin_Collection.asp?Action=Delete";
if(confirm("确认要执行选定删除吗?")){
frm.submit();
return;
}
return false;
}
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<form name="myform" action="Admin_Collection.asp" method="post" onSubmit="return Check(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td width="4%" align="center" nowrap class="top_item"><strong>选择</strong></td>
<td width="15%" align="center" nowrap class="top_item"><strong>项目名称</strong></td>
<td width="16%" align="center" nowrap class="top_item"><strong>所属频道</strong></td>
<td width="17%" align="center" nowrap class="top_item"><strong>所属栏目</strong></td>
<td width="6%" align="center" nowrap class="top_item"><strong>运行状态</strong></td>
<td width="22%" align="center" nowrap class="top_item"><strong>最后运行时间</strong></td>
<td width="20%" align="center" nowrap class="top_item"><strong>操作</strong></td>
</tr>
<%
If RowCount = 0 Then
Response.Write "<tr><td colspan=7 class=""td_50"" align=""center"">没有任何采集项目</td></tr>"
Else
rsCollection.Open()
For i = 1 To RowCount
%>
<tr class='td_25' onMouseOut=this.className='td_25' onMouseOver=this.className='MouseOver_25'>
<td align="center"><input name="CheckObject" type="checkbox" id="CheckObject" value="<%=rsCollection("CollectionID")%>"></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(rsCollection("CollectionName"))%></td>
<td align="center"><%=EL_Common.GetFieldValue("ChannelName", "EL_Channel", "ChannelID="& rsCollection("ChannelID"))%></td>
<td align="center"><%=EL_Common.GetFieldValue("ClassName", "EL_Class", "ClassID="& rsCollection("ClassID") &" AND ChannelID="& rsCollection("ChannelID"))%></td>
<td align="center"><%=ArrCollectionStatus(rsCollection("Status"))%></td>
<td align="center"><%=rsCollection("LastDateTime")%></td>
<td align="center" nowrap>
<a href="Admin_Collection.asp?Action=Run&CollectionID=<%=rsCollection("CollectionID")%>&CollectionType=1">开始采集</a> |
<a href="Admin_Collection.asp?Action=Run&CollectionID=<%=rsCollection("CollectionID")%>&CollectionType=0">测试</a> |
<a href="Admin_Collection.asp?Action=Modify&CollectionID=<%=rsCollection("CollectionID")%>">修改</a> |
<a href="Admin_Collection.asp?Action=Delete&CollectionID=<%=rsCollection("CollectionID")%>" onClick="return confirm('确定要删除采集项目吗?')">删除</a>
</td>
</tr>
<%
If i<RowCount Then rsCollection.MoveNext
Next
End If
%>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><span id="myselect">[<a href="javascript:CheckedAll()">全选</a>]</span></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="50" align="center"><input type="button" name="Submit" value="删除选定项目" <%If RowCount = 0 Then Response.Write "disabled"%> onClick="doDelete()"></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>采集方式:“<span class="redText">开始采集</span>”为入库采集,
“<span class="redText">测试</span>”为数据不将录入</td>
</tr>
</table>
<%
Set rsCollection = Nothing
Set CollectionCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub AddCollection()
On Error Resume Next
If EL_Common.ELRequest("CollectionID", 2)>0 Then Response.Redirect "Admin_Collection.asp?Action=Modify&CollectionID="& EL_Common.ELRequest("CollectionID", 2)
If EL_Channel.ChannelID = 0 Then
EL_Channel.ChannelID = EL_Common.GetFieldValue("TOP 1 ChannelID", "EL_Channel", "ChannelType=0 And Disabled=0 And ChannelModule=1 ORDER BY OrderID ASC")
End If
CurrentPath = ShowCollectionStep(1, 0)
%>
<script language="javascript">
function CheckStep1(frm){
if(frm.CollectionName.value.trim()==""){
alert("请输入项目名称");
frm.CollectionName.focus();
return false;
}
if(frm.ListURL.value.trim()==""){
alert("请输入网页URL地址");
frm.ListURL.focus();
return false;
}
if(frm.ChannelID.value.trim()==""){
alert("请选择频道");
frm.ChannelID.focus();
return false;
}
if(frm.ClassID.value.trim()==""){
alert("请选择栏目");
frm.ClassID.focus();
return false;
}
SubmitOnce(frm);
return;
}
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%=CurrentPath%></td>
</tr>
</table>
<form name="myform" action="Admin_Collection.asp" method="post" onSubmit="return CheckStep1(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="2" class="top_25"><strong>采集项目设置</strong></td>
</tr>
<tr>
<td width="18%" class="td_ItemName"><strong>项目名称</strong></td>
<td width="82%" class="td_25"><input name="CollectionName" type="text" id="CollectionName" size="40"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>目标网页编码</strong></td>
<td class="td_25"><input name="Charset" type="radio" class="nomargin" value="0" checked>
GB2312
<input name="Charset" type="radio" class="nomargin" value="1">
UTF-8
<input name="Charset" type="radio" class="nomargin" value="2">
BIG5</td>
</tr>
<tr>
<td class="td_ItemName"><strong>网页URL地址</strong></td>
<td class="td_25"><input name="ListURL" type="text" id="ListURL" size="70"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>所属频道</strong></td>
<td class="td_25">
<select name="ChannelID" id="ChannelID" onChange="location.href='Admin_Collection.asp?Action=Add&ChannelID='+this.value">
<%=EL_Common.Data2Options("EL_Channel", "ChannelID", "ChannelName", EL_Channel.ChannelID, "Disabled=0 And ChannelModule=1 And ChannelType=0")%>
</select> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>所属栏目</strong></td>
<td class="td_25">
<select name="ClassID" id="ClassID">
<%=EL_Common.Data2Options("EL_Class", "ClassID", "ClassName", 0, "ChannelID="& EL_Channel.ChannelID)%>
</select> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>信息属性</strong></td>
<td class="td_25"><input name="OnTop" type="checkbox" class="nomargin" id="OnTop" value="1">
固顶
<input name="Commended" type="checkbox" class="nomargin" id="Commended" value="1">
推荐</td>
</tr>
<tr>
<td class="td_ItemName"><strong>初始点击数</strong></td>
<td class="td_25"><input name="Hits" type="text" id="Hits" value="0" size="5"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>配色风格</strong></td>
<td class="td_25"><select name="SkinID" id="SkinID">
<option value="0">使用系统默认</option>
<%=EL_Common.SkinList(-1)%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>页面模板</strong></td>
<td class="td_25"><select name="TemplateID" id="TemplateID">
<option value="0">使用系统默认</option>
<%=EL_Common.TemplateList(EL_Channel.ChannelID, 3, -1)%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>审核</strong></td>
<td class="td_25"><span style="float:left;">
<input name="Passed" type="radio" class="nomargin" value="1">
是
<input name="Passed" type="radio" class="nomargin" value="0" checked>
否</span></td>
</tr>
<tr>
<td class="td_ItemName"> </td>
<td class="td_50"><input type="submit" name="Submit2" value="下一步">
<input name="Action" type="hidden" id="Action" value="SaveStep1"></td>
</tr>
</table>
</form>
<%
EL_Common.ShowScriptError()
End Sub
Sub Collection2()
On Error Resume Next
Dim CollectionCmd, rsCollection
Dim CollectionID, ListURL, Charset, Source, EL_Collection, ListPIDArea
CollectionID = EL_Common.ELRequest("CollectionID", 2)
Call EL_Common.InitCommonCmd(CollectionCmd, rsCollection,"EL_Collection", "*", "CollectionID="& CollectionID)
rsCollection.Close()
If CollectionCmd(0) <> 1 Then
EL_Common.ShowErrorMsg("未指定项目ID")
Set rsCollection = Nothing
Set CollectionCmd = Nothing
Exit Sub
End If
rsCollection.Open()
ListURL = rsCollection("ListURL")
Charset = rsCollection("Charset")
If ISNULL(rsCollection("ListPIDArea")) Then
ListPIDArea = Split("-", "-")
Else
ListPIDArea = Split(rsCollection("ListPIDArea"), "-")
End If
Set EL_Collection = New ClassCollection
Source = EL_Collection.GetURLSource(ListURL, ArrCharset(Charset))
If Source = "$RequestError" Then
EL_Common.ShowErrorMsg("获取信息源错误")
Exit Sub
End If
Set EL_Collection = Nothing
CurrentPath = ShowCollectionStep(2, CollectionID)
%>
<script language="vbscript">
Sub testCode(n)
Dim source
source = document.myform.source.value
Select Case n
Case 1
huoqv=document.myform.ListBegin.value
Case 2
huoqv=document.myform.ListEnd.value
Case 3
huoqv=document.myform.ListPNPBegin.value
Case 4
huoqv=document.myform.ListPNPEnd.value
Case Else
Exit Sub
End Select
if huoqv="" then
alert("测试无效!代码为空!")
exit Sub
End if
If InStr(source, huoqv) = 0 Then
alert("测试无效!网页没有这些代码")
Else
If InStr(Mid(source,InStr(source,huoqv)+LenB(huoqv),LenB(source)),huoqv) = 0 Then
alert("测试成功!代码在页面是唯一的")
Else
alert("测试失败!代码有重复!")
End if
End if
End Sub
</script>
<script language="javascript">
function ShowSetPage(id){
for(var i=0;i<4;i++){
if(i==id){
getObject("ListPType"+i).style.display = "";
}else{
getObject("ListPType"+i).style.display = "none";
}
}
}
function CheckStep2(frm){
if(frm.ListBegin.value.trim()==""){
alert("请输入列表开始代码");
frm.ListBegin.focus();
return false;
}
if(frm.ListEnd.value.trim()==""){
alert("请输入列表结束代码");
frm.ListEnd.focus();
return false;
}
if(frm.ListABegin.value.trim()==""){
alert("请输入链接开始代码");
frm.ListABegin.focus();
return false;
}
if(frm.ListAEnd.value.trim()==""){
alert("请输入链接结束代码");
frm.ListAEnd.focus();
return false;
}
if(frm.ListPType[1].checked){
if(frm.ListPNPBegin.value.trim()==""){
alert("请输入“下一页”URL开始代码");
frm.ListPNPBegin.focus();
return false;
}
if(frm.ListPNPEnd.value.trim()==""){
alert("请输入“下一页”URL结束代码");
frm.ListPNPEnd.focus();
return false;
}
}
if(frm.ListPType[2].checked){
if(frm.ListPIDString.value.trim()==""){
alert("请输入URL字符串");
frm.ListPIDString.focus();
return false;
}
if(frm.ListPIDBegin.value.trim()==""){
alert("请输入ID开始范围");
frm.ListPIDBegin.focus();
return false;
}
if(frm.ListPIDEnd.value.trim()==""){
alert("请输入ID
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -