📄 admin_itemmodify2.asp
字号:
<td height="22" colspan="2" class="title"> <div align="center"><strong> 项 目 编 辑--采集目标网页 </strong> <Input type="radio" value="0" name="page" onClick="javascript:ShowPage.style.display='none';" checked>不查看
<Input type="radio" value="1" name="page" onClick="javascript:ShowPage.style.display='';javascript:setFileFileds('<%=ListStr%>');" >查看网页
</div></td>
</tr>
<tr class="tdbg" id="ShowPage" style="display:'none'">
<td class='tdbg' colspan='2' align='center' id='objFiles'></td>
</tr>
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong> 项 目 编 辑--采集目标源码 </strong> <Input type="radio" value="0" name="code" onClick="javascript:Content.style.height='1';" >不查看
<Input type="radio" value="1" name="code" onClick="javascript:Content.style.height='300';" checked>查看源码
</div></td>
</tr>
<tr class="tdbg">
<td class="tdbg" colspan='2' align='center'><textarea name="Content" rows="" cols="" style="width:800px;height:300px"><%=ListCode%></textarea></td>
</tr>
<tr class="tdbg">
<td width="20%" class="tdbg" ><strong>列表开始标记:</strong></td>
<td class="tdbg" width="75%">
<textarea name="LsString" cols="49" rows="7"><%=LsString%></textarea> <input TYPE='button' value='测试代码' onCLICK='ceshi(1)' ><br>
</td>
</tr>
<tr class="tdbg">
<td width="20%" class="tdbg" ><strong>列表结束标记:</strong></td>
<td class="tdbg" width="75%">
<textarea name="LoString" cols="49" rows="7"><%=LoString%></textarea> <input TYPE='button' value='测试代码' onCLICK='ceshi(2)' ><br>
</td>
</tr>
<tr>
<td width="150" class="tdbg" align="center"><strong> 列表索引分页: </strong></td>
<td class="tdbg" >
<input type="radio" value="0" name="ListPaingType" <%If ListPaingType=0 Then Response.Write "checked"%> onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='none';ListPaing3.style.display='none'">不作设置
<input type="radio" value="1" name="ListPaingType" <%If ListPaingType=1 Then Response.Write "checked"%> onClick="javascript:ListPaing1.style.display='';ListPaing12.style.display='';ListPaing2.style.display='none';ListPaing3.style.display='none'">设置标签
<input type="radio" value="2" name="ListPaingType" <%If ListPaingType=2 Then Response.Write "checked"%> onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='';ListPaing3.style.display='none'">批量生成
<input type="radio" value="3" name="ListPaingType" <%If ListPaingType=3 Then Response.Write "checked"%> onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='none';ListPaing3.style.display=''">手动添加
</td>
</tr>
<tr class="tdbg" id="ListPaing1" style="display:'<%If ListPaingType<>1 Then Response.Write "none"%>'">
<td width="150" class="tdbg" align="center"><strong>下页开始标记:</strong><br><br><br><br><br><br>
<strong>下页结束标记:</font></strong>
</td>
<td class="tdbg" >
<textarea name="LPsString" style='width:450px;height:100px'><%=LPsString%></textarea> <input TYPE='button' value='测试代码' onCLICK='ceshi(3)' ><br>
<textarea name="LPoString" style='width:450px;height:100px'><%=LoString%></textarea> <input TYPE='button' value='测试代码' onCLICK='ceshi(4)' >
</td>
</tr>
<tr class="tdbg" id="ListPaing12" style="display:'<%If ListPaingType<>1 Then Response.Write "none"%>'">
<td width="150" class="tdbg" align="center"><strong>索引分页重定向: </strong></td>
<td class="tdbg" >
<input name="ListPaingStr1" type="text" size="60" maxlength="200" value=<%=ListPaingStr1%>>
<br><font color=#0099FF>一般不会用到,如果采集分页很纵深,并且下一页代码是相对路径。
<br>在下一步链接设置分析到的下一页列表的URL和实际不符,应用此功能。
<br>在列表设置捕获相对路径,如果是动态页捕获ID。
<br>例:在索引分页中填写实际路径 http://www.xxxxx.com/xxx/xx/xxx/news/{$ID} {$ID}就是列表捕获的相对路径或动态ID。</font>
<br>系统能智能分析网站的相对路径,如果特殊情况分析不对,请按上述步骤使用此功能。
</td>
</tr>
<tr class="tdbg" id="ListPaing2" style="display:'<%If ListPaingType<>2 Then Response.Write "none"%>'">
<td width="150" class="tdbg" align="center"><strong>批量生成: </strong></td>
<td class="tdbg" >原字符串:<br>
<input name="ListPaingStr2" type="text" size="60" maxlength="200" value=<%=ListPaingStr2%>><br>
<font color=#0099FF>例:http://www.xxxxx.com/news/index_{$ID}.html {$ID}代表分页数</font><br>
生成范围:<br>
<input name="ListPaingID1" type="text" size="8" maxlength="200" value=<%=ListPaingID1%>><span lang="en-us"> To </span><input name="ListPaingID2" type="text" size="8" maxlength="200" value=<%=ListPaingID2%>>
<font color=#0099FF>例: 1 ~ 9 或 9 ~ 1 升序或倒序采集</font><br>
</td>
</tr>
<tr class="tdbg" id="ListPaing3" style="display:'<%If ListPaingType<>3 Then Response.Write "none"%>'">
<td width="20%" class="tdbg"><strong><font color=blue>手动添加:</font></strong>
</td>
<td class="tdbg" width="75%">
<textarea name="ListPaingStr3" cols="49" rows="7"><%=ListPaingStr3%></textarea><br>
格式:输入一个网址后按回车,再输入下一个。
</td>
</tr>
<tr class="tdbg">
<td colspan="2" align="center" class="tdbg">
<input type="button" name="button1" value="上 一 步" onClick="window.location.href='javascript:history.go(-1)'" style="cursor: hand;background-color: #cccccc;"><input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
<input name="Action" type="hidden" id="Action" value="SaveEdit">
<input type="submit" name="Submit" value="下 一 步" style="cursor: hand;background-color: #cccccc;"></td>
</tr>
</form>
</table>
<!--#include file="Admin_ItemFoot.asp"-->
</body>
</html>
<%End If%>
<%End Sub%>
<%
Sub SaveEdit
ItemName=Trim(Request.Form("ItemName"))
WebName=Trim(Request.Form("WebName"))
ListStr=Trim(Request.Form("ListStr"))
ChannelID=Request.Form("ChannelID")
infoClassID=Request.Form("infoClassID")
expoClassID=Request.Form("expoClassID")
SpecialID=Trim(Request.Form("SpecialID"))
LoginType=Trim(Request.Form("LoginType"))
LoginUrl=Trim(Request.Form("LoginUrl"))
LoginPostUrl=Trim(Request.Form("LoginPostUrl"))
LoginUser=Trim(Request.Form("LoginUser"))
LoginPass=Trim(Request.Form("LoginPass"))
LoginFalse=Trim(Request.Form("LoginFalse"))
ItemDemo=Request.Form("ItemDemo")
If ItemName="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>项目名称不能为空</li>"
End If
If WebName="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>网站名称不能为空</li>"
End If
If ListStr="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>列表网址不能为空</li>"
else
ListCode=GetHttpPage(ListStr)
If ListCode="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在截取:" & ListStr & "信息列表时发生错误</li>"
End If
End If
If ChannelID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>未指定频道</li>"
Else
ChannelID=Clng(ChannelID)
End If
if ChannelID=1 then
If infoClassID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>未指定商业资讯栏目</li>"
else
ClassID=infoClassID
End if
end if
if ChannelID=2 then
If expoClassID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>未指定展会资讯栏目</li>"
else
ClassID=expoClassID
End if
end if
If ClassID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>未指定栏目</li>"
End if
If SpecialID="" then
SpecialID=0
Else
SpecialID=CLng(SpecialID)
If SpecialID<>0 Then
set tSpecial=conn.execute("select SpecialID From PE_Special Where ChannelID=" & ChannelID)
If tSpecial.bof and tSpecial.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在本频道内找不到指定的专题</li>"
End If
Set tSpecial=Nothing
End If
End if
If LoginType="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请选择网站登录类型</li>"
Else
LoginType=Clng(LoginType)
If LoginType=1 Then
If LoginUrl="" Or LoginPostUrl="" Or LoginUser="" Or LoginPass="" Or LoginFalse="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>网站登录信息不完整</li>"
End If
End If
End If
If FoundErr<>True Then
SqlItem="Select top 1 * from Item Where ItemID=" & ItemID
Set RsItem=server.CreateObject("adodb.recordset")
RsItem.Open SqlItem,ConnItem,2,3
RsItem("ListStr")=ListStr
RsItem("ItemName")=ItemName
RsItem("WebName")=WebName
RsItem("ChannelID")=ChannelID
RsItem("ChannelDir")=strChannelDir
RsItem("ClassID")=ClassID
RsItem("SpecialID")=SpecialID
RsItem("LoginType")=LoginType
If Logintype=1 Then
RsItem("LoginUrl")=LoginUrl
RsItem("LoginPostUrl")=LoginPostUrl
RsItem("LoginUser")=LoginUser
RsItem("LoginPass")=LoginPass
RsItem("LoginFalse")=LoginFalse
End If
RsItem("ItemDemo")=ItemDemo
RsItem.UpDate
RsItem.Close
Set RsItem=Nothing
End If
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -