<%@language=vbscript codepage=936%>
<%
'|-----------------------------------------------------------------------|
'|---------飞越软件信息采集器v1.0 for 动易网站管理系统2005/2006 ---------|
'|-------------------------- 作者:科技创造自由 --------------------------|
'|------------------ 飞越快乐家园  http://www.fy66.net/ -----------------|
'|--动易版主Top在本插件的编写过程中给予了大力支持,特此表示诚恳的感谢!----|
'|------ 本插件多处代码参考了SNA新闻采集系统for动易4.03,特此声明! -------|
'|----- 转载请保留版权信息,手下留情,留下的是对别人的尊重,谢谢! ----------|
'|-----------------------------------------------------------------------|
Option Explicit
Server.ScriptTimeOut = 9999999
%>
<!--#include file="Admin_ST_Conn.asp"-->
<!--#include file="../Conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="Admin_ST_Function.asp"-->
<html>
<head>
<title>软件采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
</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>
<%
'Dim stChannelID,ClassID,SpecialID,FoundErr,ErrMsg
Dim ItemID,ItemName,WebName,WebUrl,ListStr,ItemDemo,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,SqlItem,RsItem
Dim LsString,LoString,ListPaingType,LPsString,LPoString,ListPaingStr1,ListPaingStr2,ListPaingID1,ListPaingID2,ListPaingStr3
Dim HsString,HoString,HttpUrlType,HttpUrlStr,NewsArrayCode,NewsArray,UrlTest
Dim ListUrl,ListCode
Dim ListPaingNext
dim SqlItemR,rrs
Dim sType,ishothits


sType=Trim(Request("Type"))
If sType="modify" then
	ItemID=Trim(Request("ItemID"))
	Set rrs=server.createobject("adodb.recordset")
	SqlItemR="Select * from Item Where ItemID=" & ItemID
	rrs.open SqlItemR,ConnItem,1,1	
	ItemName=rrs("ItemName")
	WebName=rrs("WebName")
	WebUrl=rrs("WebUrl")
	ListStr=rrs("ListStr")
	stChannelID=rrs("ChannelID")
	ClassID=rrs("ClassID")
	SpecialID=rrs("SpecialID")
	ItemDemo=rrs("ItemDemo")
	LoginType=rrs("LoginType")
	LoginUrl=rrs("LoginUrl")
	LoginPostUrl=rrs("LoginPostUrl")
	LoginUser=rrs("LoginUser")
	LoginPass=rrs("LoginPass")
	LoginFalse=rrs("LoginFalse")
	LsString=rrs("LsString")
	LoString=rrs("LoString")
	ListPaingType=rrs("ListPaingType")
	LPsString=rrs("LPsString")
	LPoString=rrs("LPoString")
	ListPaingStr1=rrs("ListPaingStr1")
	ListPaingStr2=rrs("ListPaingStr2")
	ListPaingID1=rrs("ListPaingID1")
	ListPaingID2=rrs("ListPaingID2")
	ListPaingStr3=rrs("ListPaingStr3")
	HsString=rrs("HsString")
	HoString=rrs("HoString")
	HttpUrlType=rrs("HttpUrlType")
	HttpUrlStr=rrs("HttpUrlStr")
	
	rrs.close
	set rrs=nothing
else
	ItemID=Trim(Request.Form("ItemID"))
	ItemName=Trim(Request.Form("ItemName"))
	WebName=Trim(Request.Form("WebName"))
	WebUrl=Trim(Request.Form("WebUrl"))
	ListStr=Trim(Request.Form("ListStr"))
	stChannelID=Trim(Request.Form("ChannelID"))
	ClassID=Trim(Request.Form("ClassID"))
	SpecialID=Trim(Request.Form("SpecialID"))
	ItemDemo=Request.Form("ItemDemo")
	LoginType=Request.Form("LoginType")
	LoginUrl=Request.Form("LoginUrl")
	LoginPostUrl=Request.Form("LoginPostUrl")
	LoginUser=Request.Form("LoginUser")
	LoginPass=Request.Form("LoginPass")
	LoginFalse=Request.Form("LoginFalse")
	LsString=Request.Form("LsString")
	LoString=Request.Form("LoString")
	ListPaingType=Request.Form("ListPaingType")
	LPsString=Request.Form("LPsString")
	LPoString=Request.Form("LPoString")
	ListPaingStr1=Trim(Request.Form("ListPaingStr1"))
	ListPaingStr2=Trim(Request.Form("ListPaingStr2"))
	ListPaingID1=Trim(Request.Form("ListPaingID1"))
	ListPaingID2=Trim(Request.Form("ListPaingID2"))
	ListPaingStr3=Trim(Request.Form("ListPaingStr3"))
	HsString=Request.Form("HsString")
	HoString=Request.Form("HoString")
	HttpUrlType=Trim(Request.Form("HttpUrlType"))
	HttpUrlStr=Trim(Request.Form("HttpUrlStr"))
End if

Dim tAction
tAction= Trim(request("Action"))
if tAction="" then
	Call Add1
elseif tAction="Add1" then
	Call Add2
elseif tAction="Add2" then
	Call Add3
elseif tAction="Add3" then
	Call Add4
elseif tAction="Add4" then
	Call Add5
elseif tAction="Add5" then
	Call Add6
elseif tAction="Add6" then
	Call Add7
End if
%>
<%
Sub Add1
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航：</strong></td><td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp<% if sType="modify" then Response.Write "?Type=modify&ItemID="&ItemID %>"><font color=red>基本设置</font></a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</a> >> 完成</td> 
  </tr>
</table>
<br>
<table class=border cellSpacing=1 cellPadding=0 width="100%" align=center border=0>
<FORM name=form1 action='Admin_ST_Add.asp' method=post>
  <tr>
    <td class=title colSpan=2 height=22>
      <DIV align=center><STRONG>项 目 编 辑--基 本 设 置</STRONG></DIV></td>
  </tr>
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="right"><strong> 项目名称：&nbsp;</strong></td>
    <td class="tdbg"><input name="ItemName" type="text" id="ItemName" size="30" maxlength="30" value="<%=ItemName%>"> <font color=red> * </font></td>
  </tr>
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="right"><strong> 网站名称：&nbsp;</strong></td>
    <td class="tdbg"><input name="WebName" type="text" id="WebName" size="30" maxlength="30" value="<%=WebName%>"> <font color=red> * </font></td>
  </tr>
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="right"><strong> 网页编码格式：&nbsp;</strong></td>
    <td class="tdbg">
    GB2312：<INPUT TYPE='radio' NAME='WebUrl' value='0'
  	<%if sType="modify" then
  	if weburl=0 or weburl="" then 
		Response.Write "checked" 
	end if
	else
		Response.Write "checked"
	end if
	%>  
 >
    &nbsp;&nbsp;UTF-8：<INPUT TYPE='radio' NAME='WebUrl' value='1'   	<%if sType="modify" then
  	if weburl=1 then 
		Response.Write "checked" 
	end if
	end if
	%> > 
   <!-- &nbsp;&nbsp;Big5：<INPUT TYPE='radio' NAME='WebUrl' value='2'<%if sType="modify" then
  	if weburl=2 then 
		Response.Write "checked" 
	end if
	end if
	%> > -->
    <font color=red> * </font>
     &nbsp;</td>
  </tr>
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="right"><strong> 软件列表网址：&nbsp;</strong></td>
    <td class="tdbg"><input name="ListStr" type="text" id="ListStr" size="49" maxlength="150" value="<%=ListStr%>"> <font color=red> * </font><font color=blue>'注：主要采集网站的列表页</font></td>
  </tr>
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="right"><strong> 网站登录：&nbsp;</strong></td>
    <td class="tdbg">
      <input type="radio" value="0" name="LoginType" checked      onClick="Login.style.display='none'">不需要登录<span lang="en-us">&nbsp;</span>
      <input type="radio" value="1" name="LoginType"       onClick="Login.style.display=''">设置参数</td>
   </tr>
   <tr class="tdbg" id="Login" style='display:none' > 
     <td class="tdbg" colspan=2>
       <table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%' align='center'>
         <tr>
           <td width="150" class="tdbg" align="right"><strong> 登录地址：&nbsp;</strong></td>
           <td class="tdbg"><input name="LoginUrl" type="text" size="40" maxlength="150" value=""> <font color=red> * </font></td>
         </tr>
         <tr>
           <td width="150" class="tdbg" align="right"><strong> 提交地址：&nbsp;</strong></td>
           <td class="tdbg"><input name="LoginPostUrl" type="text" size="40" maxlength="150" value=""> <font color=red> * </font></td>
         </tr>
         <tr>
           <td width="150" class="tdbg" align="right"><strong> 用户参数：&nbsp;</strong></td>
           <td class="tdbg"><input name="LoginUser" type="text" size="30" maxlength="150" value=""> <font color=red> * </font></td>
         </tr>
         <tr>
           <td width="150" class="tdbg" align="right"><strong> 密码参数：&nbsp;</strong></td>
           <td class="tdbg"><input name="LoginPass" type="text" size="30" maxlength="150" value=""> <font color=red> * </font></td>
         </tr>
         <tr>
           <td width="150" class="tdbg" align="right"><strong> 失败信息：&nbsp;</strong></td>
           <td class="tdbg"><input name="LoginFalse" type="text" size="30" maxlength="150" value=""> <font color=red> * </font></td>
         </tr>
       </table>
     </td>
   </tr>
   <tr class="tdbg"> 
     <td width="150" class="tdbg" align="right"><strong> 项目备注：&nbsp;</strong></td>
     <td class="tdbg"><textarea name="ItemDemo" style='width:450px;height:100px' id="ItemDemo"><%=ItemDemo%></textarea></td>
   </tr>
   <tr class="tdbg">
     <td class="tdbg" align="middle" colSpan="2" height="50">
       <INPUT id="ItemID" type="hidden" value="<%=ItemID%>" name="ItemID">
       <INPUT id="CollectionAdd" type="hidden" value="True" name=CollectionAdd>
       <INPUT id="Action" type="hidden" value="Add1" name=Action>
       <INPUT id=Cancel  type=button value=" 取  消 " name=Cancel>&nbsp;&nbsp;
       <INPUT type=submit value=" 下一步 " name="Submit"></td>
   </tr>
   </FORM>
  </table>

<%
End Sub
%>
<%
Sub Add2
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>" 
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
	WriteErrMsg(ErrMsg)
	Response.End
else
   SqlItem="Select top 1 ItemID,ItemName,WebName,WebUrl,ClassID,SpecialID,ItemDemo,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ListPaingStr1,ListPaingStr2,liststr from Item"
   if ItemID<>"" then
   	  SqlItem=SqlItem&" where ItemID="&ItemID&""
   End if
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,1,3
   if ItemID="" then
   	  RsItem.AddNew
   End if
   RsItem("ItemName")=ItemName
   RsItem("WebName")=WebName
   RsItem("WebUrl")=WebUrl
   If ItemDemo<>"" then
      RsItem("ItemDemo")=ItemDemo
   End if
   RsItem("LoginType")=LoginType
   If LoginType=1 Then
      RsItem("LoginUrl")=LoginUrl
      RsItem("LoginPostUrl")=LoginPostUrl
      RsItem("LoginUser")=LoginUser
      RsItem("LoginPass")=LoginPass
      RsItem("LoginFalse")=LoginFalse
   End If
   ItemID=RsItem("ItemID")
   RsItem("liststr")=liststr
   RsItem.UpDate
   RsItem.Close
   Set RsItem=Nothing
End If
Set rrs=server.createobject("adodb.recordset")
	SqlItemR="Select * from Item Where ItemID=" & ItemID
	rrs.open SqlItemR,ConnItem,1,1
%>

<script language="VBScript">
 Private Sub ceshi(Num)
    Dim content
    Content=document.form1.Content.value
    Select Case Num   
    Case 1
        huoqv=document.form1.LsString.value
    Case 2
        huoqv=document.form1.LoString.value
    Case 3
        huoqv=document.form1.LPsString.value
    Case 4
        huoqv=document.form1.LPoString.value
    Case 5
        huoqv=document.form1.TsString.value
    Case 6
        huoqv=document.form1.ToString.value
    Case 7
        huoqv=document.form1.CsString.value
    Case 8
        huoqv=document.form1.CoString.value
    Case 9
        huoqv=document.form1.AsString.value
    Case 10
        huoqv=document.form1.AoString.value
    Case 11
        huoqv=document.form1.FsString.value
    Case 12
        huoqv=document.form1.FoString.value
    Case 13
        huoqv=document.form1.KsString.value
    Case 14
        huoqv=document.form1.KoString.value
    Case 15
        huoqv=document.form1.NPsString.value
    Case 16
        huoqv=document.form1.NPsString.value
    Case 17
        huoqv=document.form1.DsString.value
    Case 18
        huoqv=document.form1.DoString.value
    Case Else
        Exit sub
    End Select
    if huoqv="" then 
       alert("测试无效！代码为空！")
       exit Sub
    End if 
    If InStr(Content,huoqv) = 0 Then
       alert("测试无效！网页没有这些代码。")
    Else
       If InStr(Mid(Content,InStr(Content,huoqv)+LenB(huoqv),LenB(Content)),huoqv) = 0 Then
          alert("测试成功！代码在页面是唯一的。")
       Else
          alert("测试失败！代码有重复,开始或结束至少有一处代码是唯一才有效！")
       End if
    End if
 End Sub
 Private Sub Analyse()
    Dim AnalyseString,AnalyseString2
    Dim content,Analysetemp
    Content=document.form1.Content.value
    AnalyseString=document.form1.AnalyseString.value
    if AnalyseString="" then 
        alert("分析无效！分析代码为空！")
        Exit Sub
    End if
    if isNumeric(document.form1.AnalyseNum.value)=false then 
        alert("分析字符数不是有效数字！")
        Exit Sub
    End if
    AnalyseString2=LenB(AnalyseString)
    If InStr(Content,AnalyseString) = 0 Then
        alert("分析无效！网页没有这些代码。")
    Else
        if InStr(Content,AnalyseString)-document.form1.AnalyseNum.value <= 0 then
            Analysetemp = 1
        Else
            Analysetemp =InStr(Content,AnalyseString)-document.form1.AnalyseNum.value
        End if
        If InStr(Mid(Content,InStr(Content,AnalyseString)+AnalyseString2, LenB(Content)),AnalyseString) = 0 Then
            if document.form1.AnalyseWay(0).checked=true Then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(1).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(2).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,document.form1.AnalyseNum.value)+Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            End if
        Else
            alert("分析失败！分析代码有重复,要确认为一的字符。")
            Exit Sub
        End if
    End if
 End Sub
 </script>
<script language="JavaScript">
 <!--
 function CheckForm(){
    if (document.form1.Content.value.length > 200000){
        document.form1.Content.value="";
    }
 }
 function setFileFileds(weburl){   
    str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='800' height='300' src="+weburl+"></iframe>";
    objFiles.innerHTML=str;
 }
//-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航：</strong></td>
    <td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?Action=Add1&Type=modify&ItemID=<%=ItemID%>"><font color=red>列表设置</font></a> >> <a href="Admin_ST_Add.asp?Action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?Action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?Action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?Action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</a> >> 完成</td> 
  </tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
<form method="post" action="Admin_ST_Add.asp" name="form1">
  <tr> 
    <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" class='tdbg' colspan='2' align='center'>      <TEXTAREA NAME='Content' ROWS='' COLS='' style='width:800px;height:300px'><%=dvHtmlEnCode1(GetHttpPage(Liststr))%></TEXTAREA></td>
  </tr>
  <tr> 
    <td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑--列 表 设 置</strong></div></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align="center"><strong> 列表开始代码：&nbsp;</strong></td>
    <td class="tdbg">      <textarea name="LsString" style='width:450px;height:100px' id="LsString"><%=dvHtmlEnCode1(rrs("LsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(1)' ></td>
  </tr>
  <tr class="tdbg"> 
     <td width="150" class="tdbg" align="center"><strong> 列表结束代码：&nbsp;</strong></td>
     <td class="tdbg">      <textarea name="LoString" style='width:450px;height:100px' id="LoString"><%=dvHtmlEnCode1(rrs("LoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(2)' ></td>
  </tr>
  <tr>
   <td width="150" class="tdbg" align="center"><strong> 列表索引分页：&nbsp;</strong></td>
   <td class="tdbg" >
    <input type="radio" value="0" name="ListPaingType" <%if rrs("ListPaingType")=0 or rrs("ListPaingType")="" then Response.Write "checked"%>  onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='none';ListPaing3.style.display='none'">不作设置&nbsp;
    <input type="radio" value="1" name="ListPaingType" <%if rrs("ListPaingType")=1 then Response.Write "checked" %>  onClick="javascript:ListPaing1.style.display='';ListPaing12.style.display='';ListPaing2.style.display='none';ListPaing3.style.display='none'">设置标签&nbsp;
    <input type="radio" value="2" name="ListPaingType" <%if rrs("ListPaingType")=2 then Response.Write "checked" %>  onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='';ListPaing3.style.display='none'">批量生成&nbsp;
    <input type="radio" value="3" name="ListPaingType" <%if rrs("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 rrs("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'><%=dvHtmlEnCode1(rrs("LPsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(3)' ><br>
    <textarea name="LPoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("LPoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(4)' >
   </td>
  </tr>
  <tr class="tdbg" id="ListPaing12" style="display:'<%if rrs("ListPaingType")<>1 then Response.Write "none" %>'">
   <td width="150" class="tdbg" align="center"><strong>索引分页重定向：&nbsp;</strong></td>
   <td class="tdbg" >
    <input name="ListPaingStr1" type="text" size="60" maxlength="200" value="<%=rrs("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 rrs("ListPaingType")<>2 then Response.Write "none" %>'">
   <td width="150" class="tdbg" align="center"><strong>批量生成：&nbsp;</strong></td>
   <td class="tdbg" >原字符串：<br>
    <input name="ListPaingStr2" type="text" size="60" maxlength="200" value="<%=rrs("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="<%=rrs("ListPaingID1")%>"><span lang="en-us"> To </span><input name="ListPaingID2" type="text" size="8" maxlength="200" value="<%=rrs("ListPaingID2")%>">
    <font color=#0099FF>例： 1 ~ 9 或 9 ~ 1 升序或倒序采集</font><br>
   </td>
  </tr>
  <tr class="tdbg" id="ListPaing3" style="display:'<%if rrs("ListPaingType")<>3 then Response.Write "none" %>'">
   <td width="150" class="tdbg" align="center"><strong>手动添加：&nbsp;</strong></td>
   <td class="tdbg" >
     <textarea name="ListPaingStr3" style='width:450px;height:100px'><%
     if rrs("ListPaingStr3")<>"" then Response.write replace(rrs("ListPaingStr3"),"|","")
     %></textarea>
<br><font color=#0099FF>注：一行写一个网页地址</font>
   </td>
  </tr>
  <tr class="tdbg">
    <td width="150" class="tdbg" align="center"><strong> 分析代码： </strong></td>
    <td class="tdbg">
     <Input type="radio" value="0" name="analyseType" checked onClick="javascript:analyse.style.display='none';">不作分析&nbsp;
     <Input type="radio" value="1" name="analyseType" onClick="javascript:analyse.style.display='';">启用分析 
    <font color='#0099FF'>注：此功能为辅助功能与采集配置无关</font>    </td>
  </tr>
  <tr class="tdbg" id="analyse" style="display:none">
    <td width="150" class="tdbg" align="right"></strong></td>
    <td class="tdbg">     分析网页字符：
     <Input TYPE='text' NAME='AnalyseString' value='' id='AnalyseString' size='40' maxlength='200'>
     <Input TYPE='button' value=' 分 析 ' NAME='AnalyseStart' onCLICK='Analyse()' ><br>
     <Input TYPE='radio' NAME='AnalyseWay' value='0' checked>向前代码&nbsp;
     <Input TYPE='radio' NAME='AnalyseWay' value='1'>向后代码&nbsp;
     <Input TYPE='radio' NAME='AnalyseWay' value='2'>前后代码&nbsp;
    字符数：
     <Input TYPE='text' NAME='AnalyseNum' value='300' size='5' maxlength='4'>
    <br>
    <TEXTAREA NAME='AnalyseContent' style='width:550px;height:100px'></TEXTAREA>
    </td>
  </tr>
  <tr class="tdbg"> 
   <td colspan="2" align="center" class="tdbg" height='50'>
    <input name="ListStr" type="hidden" id="ListStr" value="<%=ListStr%>">
    <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
    <input name="Action" type="hidden" id="Action" value="Add2">
    <input TYPE='button' value='返回上一步'  onCLICK='history.back(-1)'>  &nbsp;&nbsp;
    <input  type="submit" name="Submit" value="下 一 步"  onClick='CheckForm()'>
  </tr>
</form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="border" >
  <tr>
   <td colspan='2' height="20" align="center"><font color=#0099FF>注：截取的Html代码的开始部分和结束部分，至少有一处代码是网页的唯一才能截取的成功。<br>但是这个页面的唯一并不代表下一页面就是唯一，就是必须截取要采集页面的相同代码，并且要求代码在采集页面是唯一的才能准确采集。</font></td>
  </tr>
</table>
</body></html>
<%
	rrs.close
	set rrs=nothing
End Sub
%>
<%
Sub Add3
FoundErr=False
If ItemID=""  Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>"
Else
   ItemID=Clng(ItemID)
End If
If LsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>列表开始标记不能为空</li>"
End If
If LoString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>列表结束标记不能为空</li>" 
End If
If ListPaingType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请选择列表索引分页类型</li>" 
Else
   ListPaingType=Clng(ListPaingType)
   Select Case ListPaingType
   Case 0,1
            If ListStr="" Then
               FoundErr=True
               ErrMsg=ErrMsg & "<br><li>列表索引页不能为空</li>"
            Else
               ListStr=Trim(ListStr)
            End If
      If  ListPaingType=1  Then
            If LPsString="" or LPoString="" Then
               FoundErr=True
               ErrMsg=ErrMsg & "<br><li>索引分页开始/结束标记不能为空</li>" 
            End If
            If ListPaingStr1<>"" and Len(ListPaingStr1)<15 Then
               FoundErr=True
               ErrMsg=ErrMsg & "<br><li>索引分页重定向设置不正确(至少15个字符)</li>" 
            End If
      End  If
   Case 2
      If ListPaingStr2="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>批量生成字符不能为空</li>"
      End If
      If isNumeric(ListPaingID1)=False or isNumeric(ListPaingID2)=False Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>批量生成的范围只能是数字</li>"
      Else
         ListPaingID1=Clng(ListPaingID1)
         ListPaingID2=Clng(ListPaingID2)
         If ListPaingID1 > ListPaingID2 Then
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>批量生成范围设置不正确</li>"
         End If
      End If
   Case 3
      If ListPaingStr3="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>列表索引分页不能为空，请手动添加</li>"
      Else
         ListPaingStr3=Replace(ListPaingStr3,CHR(13),"|") 
      End If
   Case Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>请选择列表索引分页类型</li>" 
   End Select
End if


If FoundErr<>True Then
   SqlItem="Select * from Item Where ItemID=" & ItemID
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,2,3

   RsItem("LsString")=LsString
   RsItem("LoString")=LoString
   RsItem("ListPaingType")=ListPaingType
   Select Case ListPaingType
   Case 0,1
         RsItem("ListStr")=ListStr
      If ListPaingType=1  Then
            RsItem("LPsString")=LPsString
            RsItem("LPoString")=LPoString
            If ListPaingStr1<>"" Then
               RsItem("ListPaingStr1")=ListPaingStr1
            End If
      End  If
      ListUrl=ListStr
   Case 2
      RsItem("ListPaingStr2")=ListPaingStr2
      RsItem("ListPaingID1")=ListPaingID1
      RsItem("ListPaingID2")=ListPaingID2
      ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
   Case 3
      RsItem("ListPaingStr3")=ListPaingStr3
      If  Instr(ListPaingStr3,"|")>0  Then
            ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
      Else
            ListUrl=ListPaingStr3
      End  If
   End Select
   LoginType=RsItem("LoginType")
   LoginUrl=RsItem("LoginUrl")
   LoginPostUrl=RsItem("LoginPostUrl")
   LoginUser=RsItem("LoginUser")
   LoginPass=RsItem("LoginPass")
   LoginFalse=RsItem("LoginFalse")
   RsItem.UpDate
   RsItem.Close
   Set RsItem=Nothing
   
   If LoginType=1 then
      LoginData=UrlEncoding(LoginUser & "&" & LoginPass)
      LoginResult=PostHttpPage(LoginUrl,LoginPostUrl,LoginData)
      If Instr(LoginResult,LoginFalse)>0 Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>网站登录失败，请检查登录参数！</li>"
      End If
   End If
   If FoundErr<>True Then
      ListCode=GetHttpPage(ListUrl)
      If ListCode<>"$False$" Then
         If ListPaingType=1  Then
            ListPaingNext=GetPaing(ListCode,LPsString,LPoString,False,False)
            If ListPaingNext<>"$False$"  Then
               If ListPaingStr1<>""  Then  
                        ListPaingNext=Replace(ListPaingStr1,"{$ID}",ListPaingNext)
               Else
                        ListPaingNext=DefiniteUrl(ListPaingNext,ListUrl)
               End  If
            End  If
         End If
         ListCode=GetBody(ListCode,LsString,Lostring,False,False)
         If ListCode="$False$" Then
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>在截取:" & ListUrl & "新闻列表时发生错误</li>"
         End If
      Else
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误</li>"
      End If
   End If
End if
If FoundErr=True Then
	Call WriteErrMsg(ErrMsg)
	Response.End
End If  
	Set rrs=server.createobject("adodb.recordset")
	SqlItemR="Select * from Item Where ItemID=" & ItemID
	rrs.open SqlItemR,ConnItem,1,1
%>
<script language="VBScript">
 Private Sub ceshi(Num)
    Dim content
    Content=document.form1.Content.value
    Select Case Num   
    Case 1
        huoqv=document.form1.LsString.value
    Case 2
        huoqv=document.form1.LoString.value
    Case 3
        huoqv=document.form1.LPsString.value
    Case 4
        huoqv=document.form1.LPoString.value
    Case 5
        huoqv=document.form1.TsString.value
    Case 6
        huoqv=document.form1.ToString.value
    Case 7
        huoqv=document.form1.CsString.value
    Case 8
        huoqv=document.form1.CoString.value
    Case 9
        huoqv=document.form1.AsString.value
    Case 10
        huoqv=document.form1.AoString.value
    Case 11
        huoqv=document.form1.FsString.value
    Case 12
        huoqv=document.form1.FoString.value
    Case 13
        huoqv=document.form1.KsString.value
    Case 14
        huoqv=document.form1.KoString.value
    Case 15
        huoqv=document.form1.NPsString.value
    Case 16
        huoqv=document.form1.NPsString.value
    Case 17
        huoqv=document.form1.DsString.value
    Case 18
        huoqv=document.form1.DoString.value
    Case Else
        Exit sub
    End Select
    if huoqv="" then 
       alert("测试无效！代码为空！")
       exit Sub
    End if 
    If InStr(Content,huoqv) = 0 Then
       alert("测试无效！网页没有这些代码。")
    Else
       If InStr(Mid(Content,InStr(Content,huoqv)+LenB(huoqv),LenB(Content)),huoqv) = 0 Then
          alert("测试成功！代码在页面是唯一的。")
       Else
          alert("测试失败！代码有重复,开始或结束至少有一处代码是唯一才有效！")
       End if
    End if
 End Sub
 Private Sub Analyse()
    Dim AnalyseString,AnalyseString2
    Dim content,Analysetemp
    Content=document.form1.Content.value
    AnalyseString=document.form1.AnalyseString.value
    if AnalyseString="" then 
        alert("分析无效！分析代码为空！")
        Exit Sub
    End if
    if isNumeric(document.form1.AnalyseNum.value)=false then 
        alert("分析字符数不是有效数字！")
        Exit Sub
    End if
    AnalyseString2=LenB(AnalyseString)
    If InStr(Content,AnalyseString) = 0 Then
        alert("分析无效！网页没有这些代码。")
    Else
        if InStr(Content,AnalyseString)-document.form1.AnalyseNum.value <= 0 then
            Analysetemp = 1
        Else
            Analysetemp =InStr(Content,AnalyseString)-document.form1.AnalyseNum.value
        End if
        If InStr(Mid(Content,InStr(Content,AnalyseString)+AnalyseString2, LenB(Content)),AnalyseString) = 0 Then
            if document.form1.AnalyseWay(0).checked=true Then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(1).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(2).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,document.form1.AnalyseNum.value)+Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            End if
        Else
            alert("分析失败！分析代码有重复,要确认为一的字符。")
            Exit Sub
        End if
    End if
 End Sub
 </script>
<script language="JavaScript">
 <!--
 function CheckForm(){
    if (document.form1.Content.value.length > 200000){
        document.form1.Content.value="";
    }
 }
 function setFileFileds(weburl){   
    str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='800' height='300' src="+weburl+"></iframe>";
    objFiles.innerHTML=str;
 }
//-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航：</strong></td>
    <td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>"><font color=red>链接设置</font></a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</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"><strong> 项 目 编 辑-- 采 集 列 表 </strong></div></td>
  </tr>
  <tr> 
    <td height="22" colspan="2" class="tdbg"><%=ListCode%></td>
  </tr>
    <%If ListPaingNext<>"" And ListPaingNext<>"$False$" Then%>
    <tr> 
      <td height="22" colspan="2" class="tdbg" >
      <%Response.Write "<br>下一页列表：<a  href='" & ListPaingNext  &  "' target=_blank><font  color=red>"  &  ListPaingNext  &  "</font></a>"%>
      </td>
    </tr>
    <%End If%>
  <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" class='tdbg' colspan='2' align='center'><TEXTAREA NAME='Content' ROWS='' COLS='' style='width:800px;height:300px'><%=dvHtmlEnCode1(ListCode)%></TEXTAREA></td>
  </tr>
  <tr> 
  <td height="22" colspan="2" class="tdbg" align="center">
   </td>
  </tr>
</table>
<form method="post" action="Admin_ST_Add.asp" name="form1">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
  <tr> 
    <td height="22" colspan="2" class="title"><div align="center"><strong> 项 目 编 辑--链 接 设 置</strong></div></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
  <tr class="tdbg"> 
    <td width="150" class="tdbg" align='center'><strong> 链接开始代码：</strong></td>
    <td class="tdbg"><textarea name="HsString" style='width:450px;height:100px' id="HsString"><%=dvHtmlEnCode1(rrs("HsString"))%></textarea></td>
  </tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><strong> 链接结束代码：</strong></td>
		<td class="tdbg"><textarea name="HoString" style='width:450px;height:100px' id="HoString"><%=dvHtmlEnCode1(rrs("HoString"))%></textarea></td>
	</tr>
<tr>
  <td width="150" class="tdbg" align='center'><strong> 链接特殊处理：</strong></td>
  <td class="tdbg" >
    <input type="radio" value="0" name="HttpUrlType" <% if rrs("HttpUrlType")=0 then Response.Write "checked"%> onClick="javascript:HttpUrl1.style.display='none'">不作处理&nbsp;
    <input type="radio" value="1" name="HttpUrlType" <% if rrs("HttpUrlType")=1 then Response.Write "checked"%> onClick="javascript:HttpUrl1.style.display=''"> 重新定位
  </td>
</tr>
<tr class="tdbg" id="HttpUrl1" style="display:'<% if rrs("HttpUrlType")<>1 then Response.Write "none"%>'">
  <td width="150" class="tdbg" align='center'><strong>绝对链接字符：</strong></td>
  <td class="tdbg" >
    <input name="HttpUrlStr" type="text" size="49" maxlength="200" value="<%=dvHtmlEnCode1(rrs("HttpUrlStr"))%>">
    <br><font color=#0099FF>如果是动态js链接，用此功能。
    <br>用链接设置捕获js的传值 例： onClick="nameid('xx')" 截取 onClick="nameid(' 和 ") 得到里面的ID
    <br>再在绝对链接中填写实际路径 http://www.xxxxx.com/xxx/news.asp?id={$ID}  {$ID}就是链接捕获的动态ID。</font>
</td>
</tr>
  <tr class="tdbg">
    <td width="150" class="tdbg" align="center"><strong> 分析代码： </strong></td>
    <td class="tdbg">
     <Input type="radio" value="0" name="analyseType" checked onClick="javascript:analyse.style.display='none';">不作分析&nbsp;
     <Input type="radio" value="1" name="analyseType" onClick="javascript:analyse.style.display='';">启用分析 
    <font color='#0099FF'>注：此功能为辅助功能与采集配置无关</font>    </td>
  </tr>
  <tr class="tdbg" id="analyse" style="display:none">
    <td width="150" class="tdbg" align="right"></strong></td>
    <td class="tdbg">     分析网页字符：
     <Input TYPE='text' NAME='AnalyseString' value='' id='AnalyseString' size='40' maxlength='200'>
     <Input TYPE='button' value=' 分 析 ' NAME='AnalyseStart' onCLICK='Analyse()' ><br>
     <Input TYPE='radio' NAME='AnalyseWay' value='0' checked>向前代码&nbsp;
     <Input TYPE='radio' NAME='AnalyseWay' value='1'>向后代码&nbsp;
     <Input TYPE='radio' NAME='AnalyseWay' value='2'>前后代码&nbsp;
    字符数：
     <Input TYPE='text' NAME='AnalyseNum' value='300' size='5' maxlength='4'>
    <br>
    <TEXTAREA NAME='AnalyseContent' style='width:550px;height:100px'></TEXTAREA>
    </td>
  </tr>
    <tr class="tdbg"> 
     <td colspan="2" align="center" height="50" class="tdbg">
     <input name="ItemID" type="hidden" id="ItemID" value=<%=ItemID%>>
     <input name="Action" type="hidden" id="Action" value="Add3">
     <input  type="button" name="Cancel" id="Cancel" value="返回上一步" onClick="window.location.href='javascript:history.go(-1)'" >&nbsp;&nbsp;
     <input name="Submit" type="submit"  value=" 下一步 " ></td>
    </tr>
</form>
</table>
<%
	rrs.close
	set rrs=nothing
End Sub
%>
<%Sub Add4
Dim ListArrb,ListArrbt,Listarri,UrlTest,TestUrl
TestUrl=Trim(Request("TestUrl"))
if TestUrl="" then
	TestUrl=0
End if
If ItemID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>"
Else
   ItemID=Clng(ItemID)
End If
If HsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>链接开始标记不能为空</li>"
End If
If HoString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>链接结束标记不能为空</li>" 
End If
If HttpUrlType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请选择链接处理类型</li>"
Else
   HttpUrlType=Clng(HttpUrlType)
   If HttpUrlType=1 Then
      If HttpUrlStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>绝对链接字符设置不能为空</li>"
      Else
            If  Len(HttpUrlStr)<15  Then
               FoundErr=True
               ErrMsg=ErrMsg & "<br><li>绝对链接字符设置不正确(15个字符以上)</li>"
            End  If      
      End If
   End If
End If
If FoundErr<>True Then
   SqlItem="Select ListStr,LsString,LoString,ListPaingType,LPsString,LPoString,ListPaingStr1,ListPaingStr2,ListPaingID1,ListPaingID2,ListPaingStr3,HsString,HoString,HttpUrlType,HttpUrlStr from Item Where ItemID=" & ItemID
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,2,3

   RsItem("HsString")=HsString
   RsItem("HoString")=HoString
   RsItem("HttpUrlType")=HttpUrlType
   If HttpUrlType=1 Then
      RsItem("HttpUrlStr")=HttpUrlStr
   End If
   ListStr=RsItem("ListStr")
   LsString=RsItem("LsString")
   LoString=RsItem("LoString")
   ListPaingType=RsItem("ListPaingType")
   LPsString=RsItem("LPsString")
   ListPaingStr1=RsItem("ListPaingStr1")
   ListPaingStr2=RsItem("ListPaingStr2")
   ListPaingID1=RsItem("ListPaingID1")
   ListPaingID2=RsItem("ListPaingID2")
   ListPaingStr3=RsItem("ListPaingStr3")

   RsItem.UpDate
   RsItem.Close
   Set RsItem=Nothing
   
   Select  Case  ListPaingType
   Case  0,1
         ListUrl=ListStr
   Case  2
         ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
   Case  3
         If  Instr(ListPaingStr3,"|")>0  Then
         ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
      Else
         ListUrl=ListPaingStr3
      End  If
   End  Select

   ListCode=GetHttpPage(ListUrl)
   If ListCode<>"$False$" Then
      ListCode=GetBody(ListCode,LsString,LoString,False,False)
      If ListCode<>"$False$" Then 
         NewsArrayCode=GetArray(ListCode,HsString,HoString,False,False)
         If NewsArrayCode<>"$False$" Then
               NewsArray=Split(NewsArrayCode,"$Array$")
               ListArrb="<option value=''>请选择要测试的正文页</option>"
               For Listarri=0 to Ubound(NewsArray)
               	ListArrbt=Trim(NewsArray(Listarri))
           	    If HttpUrlType=1 Then
           	       ListArrb=ListArrb&"<option value='1'>"&ListArrbt&"</option>"
           	    Else
           	       ListArrb=ListArrb&"<option value='"&Listarri&"'>"&ListArrbt&"</option>"
           	    End If
               Next
               If HttpUrlType=1 Then
           	      UrlTest=Trim(Replace(HttpUrlStr,"{$ID}",NewsArray(TestUrl)))
           	   Else
           	      UrlTest=Trim(DefiniteUrl(NewsArray(TestUrl),ListUrl))
           	   End If
               'Response.write ListArrb
         Else
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>在获取链接列表时出错。</li>"
         End If   
      Else
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>在截取列表时发生错误。</li>"
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误。</li>"
   End If
End If
If FoundErr=True Then
	Call WriteErrMsg(ErrMsg)
	Response.End
End If 
	Set rrs=server.createobject("adodb.recordset")
	SqlItemR="Select * from Item Where ItemID=" & ItemID
	rrs.open SqlItemR,ConnItem,1,1
%>
<script language="VBScript">
 Private Sub ceshi(Num)
    Dim content
    Content=document.form1.Content.value
    Select Case Num   
    Case 1
        huoqv=document.form1.LsString.value
    Case 2
        huoqv=document.form1.LoString.value
    Case 3
        huoqv=document.form1.LPsString.value
    Case 4
        huoqv=document.form1.LPoString.value
    Case 5
        huoqv=document.form1.TsString.value
    Case 6
        huoqv=document.form1.ToString.value
    Case 7
        huoqv=document.form1.CsString.value
    Case 8
        huoqv=document.form1.CoString.value
    Case 9
        huoqv=document.form1.AsString.value
    Case 10
        huoqv=document.form1.AoString.value
    Case 11
        huoqv=document.form1.FsString.value
    Case 12
        huoqv=document.form1.FoString.value
    Case 13
        huoqv=document.form1.KsString.value
    Case 14
        huoqv=document.form1.KoString.value
    Case 15
        huoqv=document.form1.NPsString.value
    Case 16
        huoqv=document.form1.NPsString.value
    Case 17
        huoqv=document.form1.DsString.value
    Case 18
        huoqv=document.form1.DoString.value
    Case 19
        huoqv=document.form1.BsStringb.value
    Case 20
        huoqv=document.form1.BoStringb.value
    Case 21
        huoqv=document.form1.YsStringb.value
    Case 22
        huoqv=document.form1.YoStringb.value
    Case 23
        huoqv=document.form1.PsStringb.value
    Case 24
        huoqv=document.form1.PoStringb.value
    Case 25
        huoqv=document.form1.HsStringb.value
    Case 26
        huoqv=document.form1.HoStringb.value
    Case 27
        huoqv=document.form1.JsStringb.value
    Case 28
        huoqv=document.form1.JoStringb.value
    Case 29
        huoqv=document.form1.SsStringb.value
    Case 30
        huoqv=document.form1.SoStringb.value
    Case 31
        huoqv=document.form1.ZsStringb.value
    Case 32
        huoqv=document.form1.ZoStringb.value
    Case 33
        huoqv=document.form1.DsStringb.value
    Case 34
        huoqv=document.form1.DoStringb.value
    Case 35
        huoqv=document.form1.LsStringb.value
    Case 36
        huoqv=document.form1.LoStringb.value
    Case 37
        huoqv=document.form1.MsStringb.value
    Case 38
        huoqv=document.form1.MoStringb.value
    Case 39
        huoqv=document.form1.DsStringbb.value
    Case 40
        huoqv=document.form1.DoStringbb.value
    Case 41
        huoqv=document.form1.QsStringb.value
    Case 42
        huoqv=document.form1.QoStringb.value
    Case Else
        Exit sub
    End Select
    if huoqv="" then 
       alert("测试无效！代码为空！")
       exit Sub
    End if 
    If InStr(Content,huoqv) = 0 Then
       alert("测试无效！网页没有这些代码。")
    Else
       If InStr(Mid(Content,InStr(Content,huoqv)+LenB(huoqv),LenB(Content)),huoqv) = 0 Then
          alert("测试成功！代码在页面是唯一的。")
       Else
          alert("测试失败！代码有重复,开始或结束至少有一处代码是唯一才有效！")
       End if
    End if
 End Sub
 Private Sub Analyse()
    Dim AnalyseString,AnalyseString2
    Dim content,Analysetemp
    Content=document.form1.Content.value
    AnalyseString=document.form1.AnalyseString.value
    if AnalyseString="" then 
        alert("分析无效！分析代码为空！")
        Exit Sub
    End if
    if isNumeric(document.form1.AnalyseNum.value)=false then 
        alert("分析字符数不是有效数字！")
        Exit Sub
    End if
    AnalyseString2=LenB(AnalyseString)
    If InStr(Content,AnalyseString) = 0 Then
        alert("分析无效！网页没有这些代码。")
    Else
        if InStr(Content,AnalyseString)-document.form1.AnalyseNum.value <= 0 then
            Analysetemp = 1
        Else
            Analysetemp =InStr(Content,AnalyseString)-document.form1.AnalyseNum.value
        End if
        If InStr(Mid(Content,InStr(Content,AnalyseString)+AnalyseString2, LenB(Content)),AnalyseString) = 0 Then
            if document.form1.AnalyseWay(0).checked=true Then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(1).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            elseif document.form1.AnalyseWay(2).checked=true then
                document.form1.AnalyseContent.value=Mid(Content,Analysetemp,document.form1.AnalyseNum.value)+Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
            End if
        Else
            alert("分析失败！分析代码有重复,要确认为一的字符。")
            Exit Sub
        End if
    End if
 End Sub
 </script>
<script language="JavaScript">
 <!--
 function CheckForm(){
    if (document.form1.Content.value.length > 200000){
        document.form1.Content.value="";
    }
 }
 function setFileFileds(weburl){   
    str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='800' height='300' src="+weburl+"></iframe>";
    objFiles.innerHTML=str;
 }
//-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
	<tr class="tdbg"> 
		<td width="70" height="30"><strong>管理导航：</strong></td>
		<td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>"><font color=red>正文设置</font></a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</a> >> 完成</td>
	</tr>
</table>
<br>
<table  cellSpacing=1 cellPadding=0 width="100%" align=center border=0>
<tr >
  <td align='right'>
<select name="testUrl" onchange="javascript:window.location='Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>&testUrl='+this.options[this.selectedIndex].value;">
<%=ListArrb%>                                                
</select>
  </td>
</tr>
</table>
<br>
<form method="post" action="Admin_ST_Add.asp" name="form1">
<table class=border cellSpacing=1 cellPadding=0 width="100%" align=center border=0>
	<tr> 
		<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('<%=UrlTest%>');" >查看网页</div></td>
	</tr>
	<tr class="tdbg" id="ShowPage" style="display:'none'"> 
		<td class="tdbg" 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" class='tdbg' colspan='2' align='center'>     <TEXTAREA NAME='Content' ROWS='' COLS='' style='width:800px;height:300px'><%=dvHtmlEnCode1(GetHttpPage(UrlTest))%></TEXTAREA></td>
	</tr>
</table>
<table class=border cellSpacing=1 cellPadding=0 width="100%" height='30' align=center border=0>
	<tr>
		<td class=tdbg colSpan=2 height=22>&nbsp;&nbsp;这是分析后所得到的新闻绝对链接地址：<A href=<%=UrlTest%> target=_blank><FONT color=red><%=UrlTest%></FONT></A>&nbsp;&nbsp;请查看是否正确。</td><input type='hidden' name='Testi' value='0'>
	</tr>
</table>




<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
	<tr>
		<td class=title colSpan=2 height=22><DIV align=center><STRONG> 项 目 编 辑--正 文 设 置</STRONG></DIV></td>
	</tr>
	<tr class="tdbg"> 
 		<td width="150" class="tdbg" align='center'><strong>标题开始标记：</strong><br><br><br><br><br><br><strong>标题结束标记：</strong></td>
 		<td class="tdbg" >
			<textarea name="TsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("TsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(5)' ><br>
			<textarea name="ToString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("ToString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(6)' >
		</td>
	</tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><strong>简介开始标记：</strong><br><br><br><br><br><br><strong>简介结束标记：</strong></td>
		<td class="tdbg" >
			<textarea name="CsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("CsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(7)' ><br>
			<textarea name="CoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("CoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(8)' >
		</td>
	</tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>下载地址设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="1" name="DsStringbType" <% if rrs("DsStringbType")<>0 then Response.Write "checked"%> onClick="javascript:DsStringb1.style.display='';document.form1.XsStringbType[1].disabled='';">设置标签&nbsp;
			<input type="radio" value="0" name="DsStringbType" <% if rrs("DsStringbType")=0 then Response.Write "checked"%> onClick="javascript:DsStringb1.style.display='none';document.form1.XsStringbType[1].disabled='True';XsStringb1.style.display='none';">将页面链接为下载地址(特殊用途)&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="DsStringb1" style="display:'<% if rrs("DsStringbType")=0 then Response.Write"none"%>'"> 
		<td width="150" class="tdbg" align='center'><strong>下载列表开始标记：</font></strong><br><br><br><br><br><br><strong>下载列表结束标记：</font></strong><br><br><br><br><br><br><strong>下载地址开始标记：</font></strong><br><br><br><br><br><br><strong>下载地址结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="DsStringb"  style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("DsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(33)' ><br>
				<textarea name="DoStringb"  style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("DoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(34)' ><br>
				<textarea name="DsStringbb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("DsStringbb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(39)' ><br>
				<textarea name="DoStringbb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("DoStringbb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(40)' >
		</td>
	</tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>新页面下载地址设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="XsStringbType" <% if rrs("XsStringbType")=0 then Response.Write "checked"%> onClick="javascript:XsStringb1.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="XsStringbType" <% if rrs("XsStringbType")=1 then Response.Write "checked"%><% if rrs("DsStringbType")=0 then Response.Write " disabled"%> onClick="javascript:XsStringb1.style.display=''">设置标签&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="XsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>新页面下载列表开始：</font></strong><br><br><br><br><br><br><strong>新页面下载列表结束：</font></strong><br><br><br><br><br><br><strong>新页面下载地址开始：</font></strong><br><br><br><br><br><br><strong>新页面下载地址结束：</font></strong></td>
		<td class="tdbg" >
				<textarea name="XsStringb"  style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("XsStringb"))%></textarea>&nbsp;<br>
				<textarea name="XoStringb"  style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("XoStringb"))%></textarea>&nbsp;<br>
				<textarea name="XsStringbb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("XsStringbb"))%></textarea>&nbsp;<br>
				<textarea name="XoStringbb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("XoStringbb"))%></textarea>&nbsp;
		</td>
	</tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件版本设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="BsStringbType" <% if rrs("BsStringbType")=0 then Response.Write "checked"%> onClick="javascript:BsStringb1.style.display='none';BsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="BsStringbType" <% if rrs("BsStringbType")=1 then Response.Write "checked"%> onClick="javascript:BsStringb1.style.display='';BsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="BsStringbType" <% if rrs("BsStringbType")=2 then Response.Write "checked"%> onClick="javascript:BsStringb1.style.display='none';BsStringb2.style.display=''">指定版本&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="BsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>版本开始标记：</font></strong><br><br><br><br><br><br><strong>版本结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="BsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("BsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(19)'><br>
				<textarea name="BoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("BoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(20)'>
		</td>
	</tr>
	<tr class="tdbg" id="BsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定版本：</font></strong></td>
  		<td class="tdbg" ><input name="BoStringbstr" type="text" id="BoStringbstr" value="<%=dvHtmlEnCode1(rrs("BoStringbstr"))%>"></td>
  	</tr>
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件语言设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="YsStringbType" <% if rrs("YsStringbType")=0 then Response.Write "checked"%> onClick="javascript:YsStringb1.style.display='none';YsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="YsStringbType" <% if rrs("YsStringbType")=1 then Response.Write "checked"%> onClick="javascript:YsStringb1.style.display='';YsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="YsStringbType" <% if rrs("YsStringbType")=2 then Response.Write "checked"%> onClick="javascript:YsStringb1.style.display='none';YsStringb2.style.display=''">指定语言&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="YsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>语言开始标记：</font></strong><br><br><br><br><br><br><strong>语言结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="YsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("YsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(21)'><br>
				<textarea name="YoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("YoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(22)'>
		</td>
	</tr>
	<tr class="tdbg" id="YsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定语言：</font></strong></td>
  		<td class="tdbg" ><input name="YoStringbStr" type="text" id="YoStringbStr" value="<%=dvHtmlEnCode1(rrs("YoStringbstr"))%>"></td>
  	</tr>	
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件图片设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="PsStringbType" <% if rrs("PsStringbType")=0 then Response.Write "checked"%> onClick="javascript:PsStringb1.style.display='none';PsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="PsStringbType" <% if rrs("PsStringbType")=1 then Response.Write "checked"%> onClick="javascript:PsStringb1.style.display='';PsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="PsStringbType" <% if rrs("PsStringbType")=2 then Response.Write "checked"%> onClick="javascript:PsStringb1.style.display='none';PsStringb2.style.display=''">指定图片&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="PsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>图片开始标记：</font></strong><br><br><br><br><br><br><strong>图片结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="PsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("PsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(23)'><br>
				<textarea name="PoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("PoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(24)'>
		</td>
	</tr>
	<tr class="tdbg" id="PsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定图片地址：</font></strong></td>
  		<td class="tdbg" ><input name="PoStringbStr" type="text" id="PoStringbStr" value="<%=dvHtmlEnCode1(rrs("PoStringbstr"))%>"></td>
  	</tr>  
  	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件平台设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="HsStringbType" <% if rrs("HsStringbType")=0 then Response.Write "checked"%> onClick="javascript:HsStringb1.style.display='none';HsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="HsStringbType" <% if rrs("HsStringbType")=1 then Response.Write "checked"%> onClick="javascript:HsStringb1.style.display='';HsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="HsStringbType" <% if rrs("HsStringbType")=2 then Response.Write "checked"%> onClick="javascript:HsStringb1.style.display='none';HsStringb2.style.display=''">指定平台&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="HsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>平台开始标记：</font></strong><br><br><br><br><br><br><strong>平台结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="HsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("HsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(25)'><br>
				<textarea name="HoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("HoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(26)'>
		</td>
	</tr>
	<tr class="tdbg" id="HsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定软件平台：</font></strong></td>
  		<td class="tdbg" ><input name="HoStringbStr" type="text" id="HoStringbStr" value="<%=dvHtmlEnCode1(rrs("HoStringbstr"))%>"></td>
  	</tr>
   	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>解压密码设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="JsStringbType" <% if rrs("JsStringbType")=0 then Response.Write "checked"%> onClick="javascript:JsStringb1.style.display='none';JsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="JsStringbType" <% if rrs("JsStringbType")=1 then Response.Write "checked"%> onClick="javascript:JsStringb1.style.display='';JsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="JsStringbType" <% if rrs("JsStringbType")=2 then Response.Write "checked"%> onClick="javascript:JsStringb1.style.display='none';JsStringb2.style.display=''">指定密码&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="JsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>密码开始标记：</font></strong><br><br><br><br><br><br><strong>密码结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="JsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("JsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(27)'><br>
				<textarea name="JoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("JoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(28)'>
		</td>
	</tr>
	<tr class="tdbg" id="JsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定解压密码：</font></strong></td>
  		<td class="tdbg" ><input name="JoStringbStr" type="text" id="JoStringbStr" value="<%=dvHtmlEnCode1(rrs("JoStringbstr"))%>"></td>
  	</tr>    
  	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>演示地址设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="SsStringbType" <% if rrs("SsStringbType")=0 then Response.Write "checked"%> onClick="javascript:SsStringb1.style.display='none';SsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="SsStringbType" <% if rrs("SsStringbType")=1 then Response.Write "checked"%> onClick="javascript:SsStringb1.style.display='';SsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="SsStringbType" <% if rrs("SsStringbType")=2 then Response.Write "checked"%> onClick="javascript:SsStringb1.style.display='none';SsStringb2.style.display=''">指定演示地址&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="SsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>演示开始标记：</font></strong><br><br><br><br><br><br><strong>演示结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="SsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("SsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(29)'><br>
				<textarea name="SoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("SoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(30)'>
		</td>
	</tr>
	<tr class="tdbg" id="SsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定演示地址：</font></strong></td>
  		<td class="tdbg" ><input name="SoStringbStr" type="text" id="SoStringbStr" value="<%=dvHtmlEnCode1(rrs("SoStringbstr"))%>"></td>
  	</tr>  
   	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>注册地址设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="ZsStringbType" <% if rrs("ZsStringbType")=0 then Response.Write "checked"%> onClick="javascript:ZsStringb1.style.display='none';ZsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="ZsStringbType" <% if rrs("ZsStringbType")=1 then Response.Write "checked"%> onClick="javascript:ZsStringb1.style.display='';ZsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="ZsStringbType" <% if rrs("ZsStringbType")=2 then Response.Write "checked"%> onClick="javascript:ZsStringb1.style.display='none';ZsStringb2.style.display=''">指定注册地址&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="ZsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>地址开始标记：</font></strong><br><br><br><br><br><br><strong>地址结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="ZsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("ZsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(31)'><br>
				<textarea name="ZoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("ZoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(32)'>
		</td>
	</tr>
	<tr class="tdbg" id="ZsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定注册地址：</font></strong></td>
  		<td class="tdbg" ><input name="ZoStringbStr" type="text" id="ZoStringbStr" value="<%=dvHtmlEnCode1(rrs("ZoStringbstr"))%>"></td>
  	</tr>    
   	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件类别设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="LsStringbType" <% if rrs("LsStringbType")=0 then Response.Write "checked"%> onClick="javascript:LsStringb1.style.display='none';LsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="LsStringbType" <% if rrs("LsStringbType")=1 then Response.Write "checked"%> onClick="javascript:LsStringb1.style.display='';LsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="LsStringbType" <% if rrs("LsStringbType")=2 then Response.Write "checked"%> onClick="javascript:LsStringb1.style.display='none';LsStringb2.style.display=''">指定类别&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="LsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>类别开始标记：</font></strong><br><br><br><br><br><br><strong>类别结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="LsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("LsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(35)'><br>
				<textarea name="LoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("LoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(36)'>
		</td>
	</tr>
	<tr class="tdbg" id="LsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定软件类别：</font></strong></td>
  		<td class="tdbg" ><input name="LoStringbStr" type="text" id="LoStringbStr" value="<%=dvHtmlEnCode1(rrs("LoStringbstr"))%>"></td>
  	</tr>
   	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件大小设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="MsStringbType" <% if rrs("MsStringbType")=0 then Response.Write "checked"%> onClick="javascript:MsStringb1.style.display='none';MsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="MsStringbType" <% if rrs("MsStringbType")=1 then Response.Write "checked"%> onClick="javascript:MsStringb1.style.display='';MsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="MsStringbType" <% if rrs("MsStringbType")=2 then Response.Write "checked"%> onClick="javascript:MsStringb1.style.display='none';MsStringb2.style.display=''">指定大小&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="MsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>大小开始标记：</font></strong><br><br><br><br><br><br><strong>大小结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="MsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("MsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(37)'><br>
				<textarea name="MoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("MoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(38)'>
		</td>
	</tr>
	<tr class="tdbg" id="MsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定软件大小：</font></strong></td>
  		<td class="tdbg" ><input name="MoStringbStr" type="text" id="MoStringbStr" value="<%=dvHtmlEnCode1(rrs("MoStringbstr"))%>"></td>
  	</tr>    
    
    	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>授权形式设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="QsStringbType" <% if rrs("QsStringbType")=0 then Response.Write "checked"%> onClick="javascript:QsStringb1.style.display='none';QsStringb2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="QsStringbType" <% if rrs("QsStringbType")=1 then Response.Write "checked"%> onClick="javascript:QsStringb1.style.display='';QsStringb2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="QsStringbType" <% if rrs("QsStringbType")=2 then Response.Write "checked"%> onClick="javascript:QsStringb1.style.display='none';QsStringb2.style.display=''">指定授权形式&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="QsStringb1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>授权形式开始标记：</font></strong><br><br><br><br><br><br><strong>授权形式结束标记：</font></strong></td>
		<td class="tdbg" >
				<textarea name="QsStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("QsStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(41)'><br>
				<textarea name="QoStringb" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("QoStringb"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(42)'>
		</td>
	</tr>
	<tr class="tdbg" id="QsStringb2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定授权形式：</font></strong></td>
  		<td class="tdbg" ><input name="QoStringbStr" type="text" id="QoStringbStr" value="<%=dvHtmlEnCode1(rrs("QoStringbstr"))%>"></td>
  	</tr>
    
    
    
  
  
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件时间设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="UpdateTimeType" <% if rrs("UpdateTimeType")=0 then Response.Write "checked"%> onClick="javascript:Date1.style.display='none';Date2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="UpdateTimeType" <% if rrs("UpdateTimeType")=1 then Response.Write "checked"%> onClick="javascript:Date1.style.display='';Date2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="UpdateTimeType" <% if rrs("UpdateTimeType")=2 then Response.Write "checked"%> onClick="javascript:Date1.style.display='none';Date2.style.display=''">指定时间&nbsp;
		</td>
	</tr>
	<tr class="tdbg" id="Date1" style="display:'none'"> 
		<td width="150" class="tdbg" align='center'><strong>时间开始标记：</font></strong><br><br><br><br><br><br><strong>时间结束标记：</font></strong></td>
		<td class="tdbg" >
			<textarea name="DsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("UsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(17)' ><br>
			<textarea name="DoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("UoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(18)' ></td>
	</tr> 
	<tr class="tdbg" id="Date2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定时间：</font></strong></td>
  		<td class="tdbg" ><input name="DoString1" type="text" id="DoString1" value="<%=dvHtmlEnCode1(rrs("UpdateTimeStr"))%>"></td>
  	</tr>

    
	<tr class="tdbg"> 
		<td width="150" class="tdbg" align='center'><b>软件作者设置：</b></td>
		<td class="tdbg" >
			<input type="radio" value="0" name="AuthorType" <% if rrs("AuthorType")=0 then Response.Write "checked"%> onClick="javascript:Author1.style.display='none';Author2.style.display='none'">不作设置&nbsp;
			<input type="radio" value="1" name="AuthorType" <% if rrs("AuthorType")=1 then Response.Write "checked"%> onClick="javascript:Author1.style.display='';Author2.style.display='none'">设置标签&nbsp;
			<input type="radio" value="2" name="AuthorType" <% if rrs("AuthorType")=2 then Response.Write "checked"%> onClick="javascript:Author1.style.display='none';Author2.style.display=''">指定作者
		</td>
	</tr>
	<tr class="tdbg" id="Author1" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>作者开始标记：</font></strong><br><br><br><br><br><br><strong>作者结束标记：</font></strong></td>
  		<td class="tdbg" >
 			<textarea name="AsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("AsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(9)' ><br>
 			<textarea name="AoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("AoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(10)' >
 		</td>
	</tr>
	<tr class="tdbg" id="Author2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定作者：</font></strong></td>
  		<td class="tdbg" ><input name="AuthorStr" type="text" id="AuthorStr" value="<%=dvHtmlEnCode1(rrs("AuthorStr"))%>"></td>
	</tr>
  	<tr class="tdbg"> 
  		<td width="150" class="tdbg" align='center'><b>软件来源设置：</b></td>
  		<td class="tdbg" >
        	<input type="radio" value="0" name="CopyFromType" <% if rrs("CopyFromType")=0 then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='none';CopyFrom2.style.display='none'">不作设置&nbsp;
        	<input type="radio" value="1" name="CopyFromType" <% if rrs("CopyFromType")=1 then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='';CopyFrom2.style.display='none'">设置标签&nbsp;
        	<input type="radio" value="2" name="CopyFromType" <% if rrs("CopyFromType")=2 then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='none';CopyFrom2.style.display=''">指定来源
        </td>
  	</tr>
    <tr class="tdbg" id="CopyFrom1" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>来源开始标记：</font></strong><br><br><br><br><br><br><strong>来源结束标记：</font></strong></td>
  		<td class="tdbg" >
 			<textarea name="FsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("FsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(11)' ><br>
 			<textarea name="FoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("FoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(12)' >
 		</td>
  	</tr>
    <tr class="tdbg" id="CopyFrom2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定来源：</font></strong></td>
  		<td class="tdbg" ><input name="CopyFromStr" type="text" id="CopyFromStr" value="<%=dvHtmlEnCode1(rrs("CopyFromStr"))%>"></td>
  	</tr>
  	<tr class="tdbg"> 
  		<td width="150" class="tdbg" align='center'><b>关键字词设置：</b></td>
  		<td class="tdbg" >
        	<input type="radio" value="0" name="KeyType" <% if rrs("KeyType")=0 then Response.Write "checked"%> onClick="javascript:Key1.style.display='none';Key2.style.display='none'">不作设置&nbsp;
        	<input type="radio" value="1" name="KeyType" <% if rrs("KeyType")=1 then Response.Write "checked"%> onClick="javascript:Key1.style.display='';Key2.style.display='none'">设置标签&nbsp;
        	<input type="radio" value="2" name="KeyType" <% if rrs("KeyType")=2 then Response.Write "checked"%> onClick="javascript:Key1.style.display='none';Key2.style.display=''">指定关键字
        </td>
  	</tr>
    <tr class="tdbg" id="Key1" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>关键词开始标记：</font></strong><br><br><br><br><br><br><strong>关键词结束标记：</font></strong></td>
  		<td class="tdbg" >
			<textarea name="KsString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("KsString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(13)' ><br>
			<textarea name="KoString" style='width:450px;height:100px'><%=dvHtmlEnCode1(rrs("KoString"))%></textarea>&nbsp;<input TYPE='button' value='测试代码' onCLICK='ceshi(14)' >
		</td>
  	</tr>
    <tr class="tdbg" id="Key2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>请指定关键：</font></strong></td>
  		<td class="tdbg" ><input name="KeyStr" size=35 type="text" id="KeyStr" value="<%=dvHtmlEnCode1(rrs("KeyStr"))%>"> <br>支持标签,软件名：{$SoftName$} 软件名打散：{$tKeyword$}</td>
  	</tr>

    <tr class="tdbg" class="tdbg" id="NewsPaing2" style="display:'none'"> 
  		<td width="150" class="tdbg" align='center'><strong>手动设置：</font></strong></td>
  		<td class="tdbg" ><input name="NewsPaingStr2" type="text" value="预留功能" size="51"></td>
  	</tr>
	<tr class="tdbg">
		<td width="150" class="tdbg" align="center"><strong> 分析代码： </strong></td>
		<td class="tdbg">
			<Input type="radio" value="0" name="analyseType" checked onClick="javascript:analyse.style.display='none';">不作分析&nbsp;
			<Input type="radio" value="1" name="analyseType" onClick="javascript:analyse.style.display='';">启用分析 <font color='#0099FF'>注：此功能为辅助功能与采集配置无关</font>    
		</td>
	</tr>
	<tr class="tdbg" id="analyse" style="display:none">
		<td width="150" class="tdbg" align="right"></strong></td>
		<td class="tdbg">     分析网页字符：
			<Input TYPE='text' NAME='AnalyseString' value='' id='AnalyseString' size='40' maxlength='200'>
			<Input TYPE='button'NAME='AnalyseStart' value=' 分 析 ' onCLICK='Analyse()' ><br>
			<Input TYPE='radio' NAME='AnalyseWay' value='0' checked>向前代码&nbsp;
			<Input TYPE='radio' NAME='AnalyseWay' value='1'>向后代码&nbsp;
			<Input TYPE='radio' NAME='AnalyseWay' value='2'>前后代码&nbsp;字符数：
			<Input TYPE='text'  NAME='AnalyseNum' value='300' size='5' maxlength='4'><br>
			<TEXTAREA NAME='AnalyseContent' style='width:550px;height:100px'></TEXTAREA>
		</td>
	</tr>
	<tr class=tdbg>
		<td class=tdbg align=middle colSpan=2 height='50'>
			<input type="hidden" value="0" name="NewsPaingType">
			<input name="Action" type="hidden" id="Action" value="Add4">
			<INPUT id=ItemID type=hidden value=<%=ItemID%> name=ItemID>
			<INPUT id=Cancel  onclick="window.location.href='javascript:history.go(-1)'" type=button value="返回上一步" name=Cancel>&nbsp;&nbsp;
			<INPUT type=submit value=" 下一步 " name=Submit onClick='CheckForm()'>
			<input type="hidden" name="UrlTest" id="UrlTest" value=<%=UrlTest%>>
		</td>
	</tr>
</table>
</td></tr></table></FORM>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="border" >
	<tr>
		<td colspan='2' height="20" align="center"><font color=#0099FF>注：截取的Html代码的开始部分和结束部分，至少有一处代码是网页的唯一才能截取的成功。<br>但是这个页面的唯一并不代表下一页面就是唯一，就是必须截取要采集页面的相同代码，并且要求代码在采集页面是唯一的才能准确采集。</font></td>
	</tr>
</table>
<%
	rrs.close
	Set rrs=nothing
End Sub%>
<%Sub Add5
Dim RsItem,SqlItem,FoundErr,ErrMsg
Dim UrlTest,TsString,ToString,CsString,CoString
Dim AuthorType,AsString,AoString,AuthorStr
Dim UpdateTimeType,UsString,UoString,UpdateTimeStr
Dim CopyFromType,FsString,FoString,CopyFromStr
Dim KeyType,KsString,KoString,KeyStr
Dim NewsPaingType,NPsString,NPoString,NewsPaingStr1,NewsPaingStr2
Dim NewsUrl,NewsCode
Dim Title,ConTent,Author,UpdateTime,CopyFrom,Key,keytempstr
Dim FilesStartStr,FilesOverStr,FilesPath
Dim UploadFiles
Dim DsStringbType,DsStringb,DoStringb,DsStringbtxt,DsStringbb,DoStringbb
Dim XsStringbType,XsStringb,XoStringb,XsStringbtxt,XsStringbb,XoStringbb,sXsStringbtxt
Dim BsStringbType,BsStringb,BoStringb,BsStringbtxt,BoStringbstr
Dim YsStringbType,YsStringb,YoStringb,YsStringbtxt,YoStringbstr
Dim PsStringbType,PsStringb,PoStringb,PsStringbtxt,PoStringbstr
Dim HsStringbType,HsStringb,HoStringb,HsStringbtxt,HoStringbstr
Dim JsStringbType,JsStringb,JoStringb,JsStringbtxt,JoStringbstr
Dim SsStringbType,SsStringb,SoStringb,SsStringbtxt,SoStringbstr
Dim ZsStringbType,ZsStringb,ZoStringb,ZsStringbtxt,ZoStringbstr
Dim LsStringbType,LsStringb,LoStringb,LsStringbtxt,LoStringbstr
Dim MsStringbType,MsStringb,MoStringb,MsStringbtxt,MoStringbstr
Dim QsStringbType,QsStringb,QoStringb,QsStringbtxt,QoStringbstr

FilesStartStr="src="
FilesOverStr="gif|jpg|bmp"
FilesPath="UploadFiles"






If sType="modify" then
	ItemID=Trim(Request("ItemID"))
	Set rrs=server.createobject("adodb.recordset")
	SqlItemR="Select * from Item Where ItemID=" & ItemID
	rrs.open SqlItemR,ConnItem,1,1
	ListUrl=rrs("ListStr")
	TsString=rrs("TsString")
	ToString=rrs("ToString")
	CsString=rrs("CsString")
	CoString=rrs("CoString")

	DsStringbType=rrs("DsStringbType")
	DsStringb=rrs("DsStringb")
	DoStringb=rrs("DoStringb")
	DsStringbb=rrs("DsStringbb")
	DoStringbb=rrs("DoStringbb")

	XsStringbType=rrs("XsStringbType")
	XsStringb=rrs("XsStringb")
	XoStringb=rrs("XoStringb")
	XsStringbb=rrs("XsStringbb")
	XoStringbb=rrs("XoStringbb")
	
	BsStringbType=rrs("BsStringbType")
	BsStringb=rrs("BsStringb")
	BoStringb=rrs("BoStringb")
	BoStringbStr=rrs("BoStringbStr")
	
	YsStringbType=rrs("YsStringbType")
	YsStringb=rrs("YsStringb")
	YoStringb=rrs("YoStringb")
	YoStringbStr=rrs("YoStringbStr")
	
	PsStringbType=rrs("PsStringbType")
	PsStringb=rrs("PsStringb")
	PoStringb=rrs("PoStringb")
	PoStringbStr=rrs("PoStringbStr")
	
	HsStringbType=rrs("HsStringbType")
	HsStringb=rrs("HsStringb")
	HoStringb=rrs("HoStringb")
	HoStringbStr=rrs("HoStringbStr")
	
	JsStringbType=rrs("JsStringbType")
	JsStringb=rrs("JsStringb")
	JoStringb=rrs("JoStringb")
	JoStringbStr=rrs("JoStringbStr")
	
	SsStringbType=rrs("SsStringbType")
	SsStringb=rrs("SsStringb")
	SoStringb=rrs("SoStringb")
	SoStringbStr=rrs("SoStringbStr")
	
	ZsStringbType=rrs("ZsStringbType")
	ZsStringb=rrs("ZsStringb")
	ZoStringb=rrs("ZoStringb")
	ZoStringbStr=rrs("ZoStringbStr")
	
	LsStringbType=rrs("LsStringbType")
	LsStringb=rrs("LsStringb")
	LoStringb=rrs("LoStringb")
	LoStringbStr=rrs("LoStringbStr")
	
	MsStringbType=rrs("MsStringbType")
	MsStringb=rrs("MsStringb")
	MoStringb=rrs("MoStringb")
	MoStringbStr=rrs("MoStringbStr")
	
	QsStringbType=rrs("QsStringbType")
	QsStringb=rrs("QsStringb")
	QoStringb=rrs("QoStringb")
	QoStringbStr=rrs("QoStringbStr")
	

	AuthorType=rrs("AuthorType")
	AsString=rrs("AsString")
	AoString=rrs("AoString")
	AuthorStr=rrs("AuthorStr")
	
	UpdateTimeType=rrs("UpdateTimeType")
	UsString=rrs("UsString")
	UoString=rrs("UoString")
	UpdateTimeStr=rrs("UpdateTimeStr")
	
	CopyFromType=rrs("CopyFromType")
	FsString=rrs("FsString")
	FoString=rrs("FoString")
	CopyFromStr=rrs("CopyFromStr")
	
	KeyType=rrs("KeyType")
	KsString=rrs("KsString")
	KoString=rrs("KoString")
	KeyStr=rrs("KeyStr")
	
	NewsPaingType=rrs("NewsPaingType")
	NPsString=rrs("NPsString")
	NPoString=rrs("NPoString")
	NewsPaingStr1=rrs("NewsPaingStr1")
	NewsPaingStr2=rrs("NewsPaingStr2")

	rrs.close
	set rrs=nothing
	
	ListCode=GetHttpPage(ListUrl)
	If ListCode<>"$False$" Then
		ListCode=GetBody(ListCode,LsString,LoString,False,False)
		If ListCode<>"$False$" Then 
			NewsArrayCode=GetArray(ListCode,HsString,HoString,False,False)
			If NewsArrayCode<>"$False$" Then
				NewsArray=Split(NewsArrayCode,"$Array$")
				If HttpUrlType=1 Then
					UrlTest=Trim(Replace(HttpUrlStr,"{$ID}",NewsArray(0)))
				Else
					UrlTest=Trim(DefiniteUrl(NewsArray(0),ListUrl))
				End If
			Else
				FoundErr=True
				ErrMsg=ErrMsg & "<br><li>在获取链接列表时出错。</li>"
			End If   
		Else
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>在截取列表时发生错误。</li>"
		End If
	Else
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误。</li>"
	End If
Else
	ItemID=Trim(Request.Form("ItemID"))
	UrlTest=Trim(Request.Form("UrlTest"))
	TsString=Request.Form("TsString")
	ToString=Request.Form("ToString")
	CsString=Request.Form("CsString")
	CoString=Request.Form("CoString")
	
	
	
	DsStringbType=Request.Form("DsStringbType")
	DsStringb=Request.Form("DsStringb")
	DoStringb=Request.Form("DoStringb")
	DsStringbb=Request.Form("DsStringbb")
	DoStringbb=Request.Form("DoStringbb")
	
	XsStringbType=Request.Form("XsStringbType")
	XsStringb=Request.Form("XsStringb")
	XoStringb=Request.Form("XoStringb")
	XsStringbb=Request.Form("XsStringbb")
	XoStringbb=Request.Form("XoStringbb")
	
	BsStringbType=Request.Form("BsStringbType")
	BsStringb=Request.Form("BsStringb")
	BoStringb=Request.Form("BoStringb")
	BoStringbStr=Request.Form("BoStringbStr")
	
	YsStringbType=Request.Form("YsStringbType")
	YsStringb=Request.Form("YsStringb")
	YoStringb=Request.Form("YoStringb")
	YoStringbStr=Request.Form("YoStringbStr")
	
	PsStringbType=Request.Form("PsStringbType")
	PsStringb=Request.Form("PsStringb")
	PoStringb=Request.Form("PoStringb")
	PoStringbStr=Request.Form("PoStringbStr")
	
	HsStringbType=Request.Form("HsStringbType")
	HsStringb=Request.Form("HsStringb")
	HoStringb=Request.Form("HoStringb")
	HoStringbStr=Request.Form("HoStringbStr")
	
	JsStringbType=Request.Form("JsStringbType")
	JsStringb=Request.Form("JsStringb")
	JoStringb=Request.Form("JoStringb")
	JoStringbStr=Request.Form("JoStringbStr")
	
	SsStringbType=Request.Form("SsStringbType")
	SsStringb=Request.Form("SsStringb")
	SoStringb=Request.Form("SoStringb")
	SoStringbStr=Request.Form("SoStringbStr")
	
	ZsStringbType=Request.Form("ZsStringbType")
	ZsStringb=Request.Form("ZsStringb")
	ZoStringb=Request.Form("ZoStringb")
	ZoStringbStr=Request.Form("ZoStringbStr")
	
	LsStringbType=Request.Form("LsStringbType")
	LsStringb=Request.Form("LsStringb")
	LoStringb=Request.Form("LoStringb")
	LoStringbStr=Request.Form("LoStringbStr")
	
	MsStringbType=Request.Form("MsStringbType")
	MsStringb=Request.Form("MsStringb")
	MoStringb=Request.Form("MoStringb")
	MoStringbStr=Request.Form("MoStringbStr")
	
	QsStringbType=Request.Form("QsStringbType")
	QsStringb=Request.Form("QsStringb")
	QoStringb=Request.Form("QoStringb")
	QoStringbStr=Request.Form("QoStringbStr")


	AuthorType=Trim(Request.Form("AuthorType"))
	AsString=Request.Form("AsString")
	AoString=Request.Form("AoString")
	AuthorStr=Trim(Request.Form("AuthorStr"))
	
	UpdateTimeType=Trim(Request.Form("UpdateTimeType"))
	UsString=Request.Form("DsString")
	UoString=Request.Form("DoString")
	UpdateTimeStr=Trim(Request.Form("DoString1"))
	
	CopyFromType=Request.Form("CopyFromType")
	FsString=Request.Form("FsString")
	FoString=Request.Form("FoString")
	CopyFromStr=Trim(Request.Form("CopyFromStr"))
	
	KeyType=Trim(Request.Form("KeyType"))
	KsString=Request.Form("KsString")
	KoString=Request.Form("KoString")
	KeyStr=Trim(Request.Form("KeyStr"))
	
	NewsPaingType=Trim(Request.Form("NewsPaingType"))
	NPsString=Trim(Request.Form("NPsString"))
	NPoString=Trim(Request.Form("NPoString"))
	NewsPaingStr1=Trim(Request.Form("NewsPaingStr1"))
	NewsPaingStr2=Trim(Request.Form("NewsPaingStr2"))
End If

If ItemID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>"
Else
   ItemID=Clng(ItemID)
End If
If UrlTest="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误，数据传递时发生错误</li>"
End If
If TsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>标题开始标记不能为空</li>"
End If
If ToString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>标题结束标记不能为空</li>" 
End If
If CsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>正文开始标记不能为空</li>"
End If
If CoString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>正文结束标记不能为空</li>" 
End If

If AuthorType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置作者类型</li>" 
Else
   AuthorType=Clng(AuthorType)
   If AuthorType=0 Then
   ElseIf AuthorType=1 Then
      If AsString="" or AoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将作者的开始/结束标记填写完整</li>" 
      End If
   ElseIf AuthorType=2 Then
      If AuthorStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定作者</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If

If UpdateTimeType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置日期类型</li>" 
Else
   UpdateTimeType=Clng(UpdateTimeType)
   If UpdateTimeType=0 Then
   ElseIf UpdateTimeType=1 Then
      If UsString="" or UoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将日期的开始/结束标记填写完整</li>" 
      End If
   ElseIf UpdateTimeType=2 Then
      If UpdateTimeStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定日期</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If


If DsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置下载标签类型</li>" 
Else
	DsStringbType=Clng(DsStringbType)
	If DsStringbType=0 Then   
	ElseIf DsStringbType=1 Then   	
		If DsStringb="" or DoStringb="" or DsStringbb="" or DoStringbb="" Then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>请将下载地址的开始/结束标记填写完整</li>" 
		End If
		If XsStringbType="" Then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>请设置新页面下载标签类型</li>" 
		Else
			XsStringbType=Clng(XsStringbType)
		If XsStringbType=0 Then   
		ElseIf XsStringbType=1 Then
			If XsStringb="" or XoStringb="" or XsStringbb="" or XoStringbb="" Then
				FoundErr=True
				ErrMsg=ErrMsg & "<br><li>请将新页面下载地址的开始/结束标记填写完整</li>" 
			End If
		Else
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
		End If 
	End If
	Else
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
	End If 
End If
If BsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件版本类型</li>" 
Else
   BsStringbType=Clng(BsStringbType)
   If BsStringbType=0 Then
   ElseIf BsStringbType=1 Then
      If BsStringb="" or BoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件版本的开始/结束标记填写完整！</li>" 
      End If
   ElseIf BsStringbType=2 Then
      If BoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件版本</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If

If YsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件语言类型</li>" 
Else
   YsStringbType=Clng(YsStringbType)
   If YsStringbType=0 Then
   ElseIf YsStringbType=1 Then
      If YsStringb="" or YoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件语言的开始/结束标记填写完整！</li>" 
      End If
   ElseIf YsStringbType=2 Then
      If YoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件语言</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If
If PsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件图片类型</li>" 
Else
   PsStringbType=Clng(PsStringbType)
   If PsStringbType=0 Then
   ElseIf PsStringbType=1 Then
      If PsStringb="" or PoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件图片的开始/结束标记填写完整！</li>" 
      End If
   ElseIf PsStringbType=2 Then
      If PoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件图片</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If
If HsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件平台类型</li>" 
Else
   HsStringbType=Clng(HsStringbType)
   If HsStringbType=0 Then
   ElseIf HsStringbType=1 Then
      If HsStringb="" or HoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件平台的开始/结束标记填写完整！</li>" 
      End If
   ElseIf HsStringbType=2 Then
      If HoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件平台</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If
If JsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件解压密码类型</li>" 
Else
   JsStringbType=Clng(JsStringbType)
   If JsStringbType=0 Then
   ElseIf JsStringbType=1 Then
      If JsStringb="" or JoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件解压密码的开始/结束标记填写完整！</li>" 
      End If
   ElseIf JsStringbType=2 Then
      If JoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件解压密码</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If
If SsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件演示地址类型</li>" 
Else
   SsStringbType=Clng(SsStringbType)
   If SsStringbType=0 Then
   ElseIf SsStringbType=1 Then
      If SsStringb="" or SoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件演示地址的开始/结束标记填写完整！</li>" 
      End If
   ElseIf SsStringbType=2 Then
      If SoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件演示地址</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If


If ZsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件注册地址类型</li>" 
Else
   ZsStringbType=Clng(ZsStringbType)
   If ZsStringbType=0 Then
   ElseIf ZsStringbType=1 Then
      If ZsStringb="" or ZoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件注册地址的开始/结束标记填写完整！</li>" 
      End If
   ElseIf ZsStringbType=2 Then
      If ZoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件注册地址</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If


If LsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件类别类型</li>" 
Else
   LsStringbType=Clng(LsStringbType)
   If LsStringbType=0 Then
   ElseIf LsStringbType=1 Then
      If LsStringb="" or LoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件类别的开始/结束标记填写完整！</li>" 
      End If
   ElseIf LsStringbType=2 Then
      If LoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定类别地址</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If


If MsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件大小类型</li>" 
Else
   MsStringbType=Clng(MsStringbType)
   If MsStringbType=0 Then
   ElseIf MsStringbType=1 Then
      If MsStringb="" or MoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件大小的开始/结束标记填写完整！</li>" 
      End If
   ElseIf MsStringbType=2 Then
      If MoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件大小</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If


If QsStringbType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置软件授权类型</li>" 
Else

   QsStringbType=Clng(QsStringbType)
   If QsStringbType=0 Then
   ElseIf QsStringbType=1 Then
      If QsStringb="" or QoStringb="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将软件授权形式的开始/结束标记填写完整！</li>" 
      End If
   ElseIf QsStringbType=2 Then
      If QoStringbStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定软件授权形式</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If







If CopyFromType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置来源类型</li>" 
Else
   CopyFromType=Clng(CopyFromType)
   If CopyFromType=0 Then
   ElseIf CopyFromType=1 Then
      If FsString="" or FoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将来源的开始/结束标记填写完整！</li>" 
      End If
   ElseIf CopyFromType=2 Then
      If CopyFromStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定来源</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If 
End If

If KeyType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置关键字类型</li>" 
Else
   KeyType=Clng(KeyType)
   If KeyType=0 Then
   ElseIf KeyType=1 Then
      If KsString="" or KoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>关键字的开始/结束标记不能为空</li>" 
      End If
   ElseIf KeyType=2 Then
      If KeyStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定关键字</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，请从有效链接进入</li>" 
   End If
End If


If NewsPaingType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置新闻分页类型</li>"
Else
   NewsPaingType=Clng(NewsPaingType)
End If
If FoundErr<>True Then
   SqlItem="Select * from Item Where ItemID=" & ItemID
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,2,3

   RsItem("TsString")=TsString
   RsItem("ToString")=ToString
   RsItem("CsString")=CsString
   RsItem("CoString")=CoString

   RsItem("AuthorType")=AuthorType
   If AuthorType=1 Then
      RsItem("AsString")=AsString
      RsItem("AoString")=AoString
   ElseIf AuthorType=2 Then
      RsItem("AuthorStr")=AuthorStr
   End If
   
   RsItem("UpdateTimeType")=UpdateTimeType
   If UpdateTimeType=1 Then
      RsItem("UsString")=UsString
      RsItem("UoString")=UoString
   ElseIf UpdateTimeType=2 Then
      RsItem("UpdateTimeStr")=UpdateTimeStr
   End If
   
   

 
   RsItem("DsStringbType")=DsStringbType
   RsItem("XsStringbType")=XsStringbType
   If DsStringbType=1 Then
      RsItem("DsStringb")=DsStringb
      RsItem("DoStringb")=DoStringb
      RsItem("DsStringbb")=DsStringbb
      RsItem("DoStringbb")=DoStringbb   
      If XsStringbType=1 Then
         RsItem("XsStringb")=XsStringb
         RsItem("XoStringb")=XoStringb
         RsItem("XsStringbb")=XsStringbb
         RsItem("XoStringbb")=XoStringbb
      End If
   End If
   
   RsItem("BsStringbType")=BsStringbType
   If BsStringbType=1 Then
      RsItem("BsStringb")=BsStringb
      RsItem("BoStringb")=BoStringb
   ElseIf BsStringbType=2 Then
      RsItem("BoStringbstr")=BoStringbstr
   End If
   
   RsItem("YsStringbType")=YsStringbType
   If YsStringbType=1 Then
      RsItem("YsStringb")=YsStringb
      RsItem("YoStringb")=YoStringb
   ElseIf YsStringbType=2 Then
      RsItem("YoStringbstr")=YoStringbstr
   End If
   
   RsItem("PsStringbType")=PsStringbType
   If PsStringbType=1 Then
      RsItem("PsStringb")=PsStringb
      RsItem("PoStringb")=PoStringb
   ElseIf PsStringbType=2 Then
      RsItem("PoStringbstr")=PoStringbstr
   End If
   
   RsItem("HsStringbType")=HsStringbType
   If HsStringbType=1 Then
      RsItem("HsStringb")=HsStringb
      RsItem("HoStringb")=HoStringb
   ElseIf HsStringbType=2 Then
      RsItem("HoStringbstr")=HoStringbstr
   End If
   
   RsItem("JsStringbType")=JsStringbType
   If JsStringbType=1 Then
      RsItem("JsStringb")=JsStringb
      RsItem("JoStringb")=JoStringb
   ElseIf JsStringbType=2 Then
      RsItem("JoStringbstr")=JoStringbstr
   End If
   
   RsItem("SsStringbType")=SsStringbType
   If SsStringbType=1 Then
      RsItem("SsStringb")=SsStringb
      RsItem("SoStringb")=SoStringb
   ElseIf SsStringbType=2 Then
      RsItem("SoStringbstr")=SoStringbstr
   End If
   
   RsItem("ZsStringbType")=ZsStringbType
   If ZsStringbType=1 Then
      RsItem("ZsStringb")=ZsStringb
      RsItem("ZoStringb")=ZoStringb
   ElseIf ZsStringbType=2 Then
      RsItem("ZoStringbstr")=ZoStringbstr
   End If
   
   RsItem("LsStringbType")=LsStringbType
   If LsStringbType=1 Then
      RsItem("LsStringb")=LsStringb
      RsItem("LoStringb")=LoStringb
   ElseIf LsStringbType=2 Then
      RsItem("LoStringbstr")=LoStringbstr
   End If
   
   RsItem("MsStringbType")=MsStringbType
   If MsStringbType=1 Then
      RsItem("MsStringb")=MsStringb
      RsItem("MoStringb")=MoStringb
   ElseIf MsStringbType=2 Then
      RsItem("MoStringbstr")=MoStringbstr
   End If  
   
   RsItem("QsStringbType")=QsStringbType
   If QsStringbType=1 Then
      RsItem("QsStringb")=QsStringb
      RsItem("QoStringb")=QoStringb
   ElseIf QsStringbType=2 Then
      RsItem("QoStringbstr")=QoStringbstr
   End If     
   

   RsItem("CopyFromType")=CopyFromType
   If CopyFromType=1 Then
      RsItem("FsString")=FsString
      RsItem("FoString")=FoString
   ElseIf CopyFromType=2 Then
      RsItem("CopyFromStr")=CopyFromStr
   End If

   RsItem("KeyType")=KeyType
   If KeyType=1 Then
      RsItem("KsString")=KsString
      RsItem("KoString")=KoString
   ElseIf KeyType=2 Then
      RsItem("KeyStr")=KeyStr
   End If

   RsItem("NewsPaingType")=NewsPaingType
   If NewsPaingType=1 Then
      RsItem("NPsString")=NPsString
      RsItem("NPoString")=NPoString
   ElseIf NewsPaingType=2 Then
      RsItem("NewsPaingStr1")=NewsPaingStr1
   ElseIf NewsPaingType=3 Then
      RsItem("NewsPaingStr2")=NewsPaingStr2 
   End If

   RsItem.UpDate
   RsItem.Close
   Set RsItem=Nothing
End If






NewsUrl=UrlTest
If FoundErr<>True Then
   NewsCode=GetHttpPage(NewsUrl)
   If NewsCode<>"$False$" Then
      Title=GetBody(NewsCode,TsString,ToString,False,False)
      Content=GetBody(NewsCode,CsString,CoString,False,False)
      If Title="$False$" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>在截取标题的时候发生错误：" & NewsUrl & "</li>"
      Else
         Title=FpHtmlEnCode(Title)'处理回车符等
         'Title=dvhtmlencode(Title)
      End If

      If Content="$False$" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>在截取正文的时候发生错误：" & NewsUrl & "</li>"
      End If

      If AuthorType=1 Then
         Author=GetBody(NewsCode,AsString,AoString,False,False)
      ElseIf AuthorType=2 Then
         Author=AuthorStr
      Else
         Author="不详"
      End If
      If Author="$False$" Then
         Author="佚名"
      Else
         Author=FpHtmlEnCode(Trim(Author))
      End If
	  
	  If UpdateTimeType=1 Then
         UpdateTime=GetBody(NewsCode,UsString,UoString,False,False)
      ElseIf UpdateTimeType=2 Then
         UpdateTime=UpdateTimeStr
      Else
         UpdateTime=Now()
      End If
      If UpdateTime="$False$" Then
         UpdateTime=Now()
      Else
         UpdateTime=FpHtmlEnCode(Trim(UpdateTime))
      End If
      
      If BsStringbType=1 Then
         BsStringbtxt=GetBody(NewsCode,BsStringb,BoStringb,False,False)
      ElseIf BsStringbType=2 Then
         BsStringbtxt=BoStringbstr
      End If
      If BsStringbtxt="$False$" Then
         BsStringbtxt=""
      Else
         BsStringbtxt=FpHtmlEnCode(Trim(BsStringbtxt))
      End If
      
      If YsStringbType=1 Then
         YsStringbtxt=GetBody(NewsCode,YsStringb,YoStringb,False,False)
      ElseIf YsStringbType=2 Then
         YsStringbtxt=YoStringbstr
      else
      	 YsStringbtxt="中文"
      End If
      If YsStringbtxt="$False$" Then
         YsStringbtxt="中文"
      Else
         YsStringbtxt=FpHtmlEnCode(Trim(YsStringbtxt))
      End If
      
      If PsStringbType=1 Then
         PsStringbtxt=GetBody(NewsCode,PsStringb,PoStringb,False,False)
      ElseIf PsStringbType=2 Then
         PsStringbtxt=PoStringbstr
      End If
      If PsStringbtxt="$False$" Then
         PsStringbtxt=""
      Else
         PsStringbtxt=FpHtmlEnCode(Trim(PsStringbtxt))
      End If
      
      If HsStringbType=1 Then
         HsStringbtxt=GetBody(NewsCode,HsStringb,HoStringb,False,False)
      ElseIf HsStringbType=2 Then
         HsStringbtxt=HoStringbstr
      Else
      	 HsStringbtxt="Win9x/NT/2000/XP/2003"
      End If
      If HsStringbtxt="$False$" Then
         HsStringbtxt="Win9x/NT/2000/XP/2003"
      Else
         HsStringbtxt=FpHtmlEnCode(Trim(HsStringbtxt))
      End If
      
      If JsStringbType=1 Then
         JsStringbtxt=GetBody(NewsCode,JsStringb,JoStringb,False,False)
      ElseIf JsStringbType=2 Then
         JsStringbtxt=JoStringbstr
      End If
      If JsStringbtxt="$False$" Then
         JsStringbtxt=""
      Else
         JsStringbtxt=FpHtmlEnCode(Trim(JsStringbtxt))
      End If
      
      If SsStringbType=1 Then
         SsStringbtxt=GetBody(NewsCode,SsStringb,SoStringb,False,False)
      ElseIf SsStringbType=2 Then
         SsStringbtxt=SoStringbstr
      Else
      	 SsStringbtxt="http://"
      End If
      If SsStringbtxt="$False$" Then
         SsStringbtxt="http://"
      Else
         SsStringbtxt=FpHtmlEnCode(Trim(SsStringbtxt))
      End If
      
      If ZsStringbType=1 Then
         ZsStringbtxt=GetBody(NewsCode,ZsStringb,ZoStringb,False,False)
      ElseIf ZsStringbType=2 Then
         ZsStringbtxt=ZoStringbstr
      Else
      	 ZsStringbtxt="http://"
      End If
      If ZsStringbtxt="$False$" Then
         ZsStringbtxt="http://"
      Else
         ZsStringbtxt=FpHtmlEnCode(Trim(ZsStringbtxt))
      End If
      
      If LsStringbType=1 Then
         LsStringbtxt=GetBody(NewsCode,LsStringb,LoStringb,False,False)
      ElseIf LsStringbType=2 Then
         LsStringbtxt=LoStringbstr
      Else
      	 LsStringbtxt="通用"
      End If
      If LsStringbtxt="$False$" Then
         LsStringbtxt="通用"
      Else
         LsStringbtxt=FpHtmlEnCode(Trim(LsStringbtxt))
      End If
      
      If QsStringbType=1 Then
         QsStringbtxt=GetBody(NewsCode,QsStringb,QoStringb,False,False)
      ElseIf QsStringbType=2 Then
         QsStringbtxt=QoStringbstr
      Else
      	 QsStringbtxt="免费"
      End If
      If QsStringbtxt="$False$" Then
         QsStringbtxt="免费"
      Else
         QsStringbtxt=FpHtmlEnCode(Trim(QsStringbtxt))
      End If  
    
      If MsStringbType=1 Then
         MsStringbtxt=GetBody(NewsCode,MsStringb,MoStringb,False,False)
      ElseIf MsStringbType=2 Then
         MsStringbtxt=MoStringbstr
      Else
      	 MsStringbtxt="0"
      End If
      If MsStringbtxt="$False$" Then
         MsStringbtxt="0"
      Else
         MsStringbtxt=FpHtmlEnCode(Trim(MsStringbtxt))
      End If      


	  If DsStringbType=1 Then
         DsStringbtxt=GetBody(NewsCode,DsStringb,DoStringb,False,False)
         DsStringbtxt=GetBody(DsStringbtxt,DsStringbb,DoStringbb,False,False)
         if XsStringbType=1 Then
         	sXsStringbtxt=Trim(DefiniteUrl(DsStringbtxt,Urltest))
         	XsStringbtxt=GetHttpPage(sXsStringbtxt)
         	DsStringbtxt=GetBody(XsStringbtxt,XsStringb,XoStringb,False,False)
         	DsStringbtxt=GetBody(DsStringbtxt,XsStringbb,XoStringbb,False,False)
         	DsStringbtxt=Trim(DefiniteUrl(DsStringbtxt,sXsStringbtxt))
         End If
         DsStringbtxt=Trim(DefiniteUrl(DsStringbtxt,Trim(DefiniteUrl(DsStringbtxt,Urltest))))
      Else
         DsStringbtxt=NewsUrl
      End If
      If DsStringbtxt="$False$" Then
      	 FoundErr=True
		 ErrMsg=ErrMsg & "<br><li>在截取下载地址的时候发生错误：" & NewsUrl & "</li>"
      End If

      If CopyFromType=1 Then
         CopyFrom=GetBody(NewsCode,FsString,FoString,False,False)
      ElseIf CopyFromType=2 Then
         CopyFrom=CopyFromStr
      Else
         CopyFrom="不详"
      End If
      If CopyFrom="$False$" Then
         CopyFrom="不详"
      Else
         CopyFrom=FpHtmlEnCode(Trim(CopyFrom))
      End If
      
      dim dd
      If KeyType=1 Then
         Key=GetBody(NewsCode,KsString,KoString,False,False)
      ElseIf KeyType=2 Then
         Key=KeyStr
      Else
      	keytempstr=ReplaceKeyChar(title)
      	for dd=1 to len(keytempstr)-1
      		Key=Key&"|"&mid(keytempstr,dd,2)
      	Next
      	Key=Key&"|"         
      End If
      If Key="$False$" Then
      	keytempstr=ReplaceKeyChar(title)
      	for dd=1 to len(keytempstr)-1
      		Key=Key&"|"&mid(keytempstr,dd,2)
      	Next
      	Key=Key&"|"
      Else
         Key=FpHtmlEnCode(Trim(Key))
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>在获取源码时发生错误："& NewsUrl &"</li>"
   End If 
End If

If FoundErr<>True Then
   'Content=ReplaceSaveRemoteFile(Content,FilesStartStr,FilesOverStr,False,True,False,FilesPath,NewsUrl)
End If

If FoundErr=True Then
   Call WriteErrMsg(ErrMsg)
   Response.End
End if

%>
<SCRIPT language='javascript'>
function resizepic(thispic){
  if(thispic.width>600) thispic.width=600;
}
function bbimg(o){
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}
</SCRIPT>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="tdbg"> 
		<td width="70" height="30"><strong>管理导航：</strong></td>
		<td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>"><font color=red>采样测试</font></a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</a> >> 完成</td>
  </tr>
</table>
<br>
<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
	<tr class='title'>  <td height='22' colspan='4'> <div align="center"><strong>项 目 编 辑--采 样 测 试</strong></div></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件名称：</td>  <td colspan='3'><strong><%=Title%></strong></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件版本：</td>  <td width='300'><%=BsStringbtxt%></td>  <td colspan='2' rowspan='7' align=center valign='middle'><%=PsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>文件大小：</td>  <td width='300'><%=FormatNum(MsStringbtxt)%> K</td>
	<tr class='tdbg'>  <td width='100' align='right'>开 发 商：</td>  <td width='300'><%=Author%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件来源：</td>  <td width='300'><%=CopyFrom%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件平台：</td>  <td width='300'><%=HsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>关 键 字：</td>  <td width='300'><%=Key%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件类别：</td>  <td width='300'><%=LsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件语言：</td>  <td colspan='3'><%=YsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>授权形式：</td>  <td colspan='3'><%=QsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>相关链接：</td>  <td colspan='3'><a href='<%=SsStringbtxt%>' target='_blank'>软件演示地址</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='<%=ZsStringbtxt%>' target='_blank'>软件注册地址</a></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>解压密码：</td>  <td colspan='3'><%=JsStringbtxt%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>添加时间：</td>  <td colspan='3'><%=UpdateTime%></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>下载地址：</td>  <td colspan='3'>下载地址一：<a href='<%=DsStringbtxt%>'><%=DsStringbtxt%></a></td></tr>
	<tr class='tdbg'>  <td width='100' align='right'>软件简介：</td>  <td height='100' colspan='3'><%=Content%></td></tr>
</table>

<form method="post" action="Admin_ST_Add.asp" name="form1">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
  <tr class="tdbg"> 
    <td colspan="2" align="center" class="tdbg" height="50">
      <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
      <input name="Action" type="hidden" id="Action" value="Add5">
      <input name="Flag" type="hidden" id="Flag" value="True">
      <input name="Cancel" type="button" id="Cancel" value="返回上一步" onClick="window.location.href='javascript:history.go(-1)'" >&nbsp;&nbsp;
      <input  type="submit" name="Submit" value=" 下一步 "  >
    </td>
   </tr>
</table>
</form>
<%End Sub%>
<%Sub Add6
dim ChannelID,ClassID,SpecialID,Flag
ChannelID=Trim(Request("ChannelID"))
ClassID=0
Flag=Trim(Request("Flag"))
ItemID=Trim(Request("ItemID"))
Set rrs=server.createobject("adodb.recordset")
SqlItemR="Select * from Item Where ItemID=" & ItemID
rrs.open SqlItemR,ConnItem,1,1
if ChannelID ="" then
	ChannelID=rrs("ChannelID")
	ClassID=rrs("ClassID")
	SpecialID=rrs("SpecialID")
End if

%>



<script language="JavaScript">
<!--
// 只允许输入数字
function IsDigit(){
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
//-->
function CheckForm(){
    if (document.form1.ClassID.value==''){
        alert('文章所属栏目不能为空，或制定为外部栏目！');
        document.form1.ClassID.focus();
        return false;
    }
    if (document.form1.ClassID.value=='0'){
        alert('指定的栏目不允许添加文章！只允许在其子栏目中添加文章。');
        document.form1.ClassID.focus();
        return false;
    }
  return true;  
}
</script>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
	<tr class="tdbg">
		<td width="70" height="30"><strong>管理导航：</strong></td>
		<td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>"><font color=red>属性设置</font></a> >> 完成</td>
	</tr>
</table>
<br>
<form method="post" action="Admin_ST_Add.asp" name="form1" onSubmit="return CheckForm();">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
  <tr> 
    <td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑--文 章 属 性</strong></div></td>
  </tr>
    <tr class="tdbg"> 
      <td width="150" class="tdbg" align="right"><strong> 项目名称：&nbsp;</strong></td>
      <td class="tdbg">
        <input name="ItemName" type="text" id="ItemName" size="30" maxlength="30" value='<%=rrs("ItemName")%>'>        &nbsp;</td>
    </tr>
    <tr class="tdbg"> 
      <td width="150" class="tdbg" align="right"><strong> 所属频道：&nbsp;</strong></td>
      <td class="tdbg">
        <select name='ChannelID' onChange="javascript:location.href='Admin_ST_Add.asp?Action=Add5&ItemID=<%=ItemID%>&ChannelID=' + (this.options[this.selectedIndex].value)">
<%Call Admin_ShowChannel_Option(ChannelID)%> </select> 
        &nbsp;</td>
    </tr>
    <tr class="tdbg"> 
      <td width="150" class="tdbg" align="right"><strong> 所属栏目：&nbsp;</strong></td>
      <td class="tdbg">
        <select name='ClassID'>
<option value=''>请选择栏目</option>
<%Call Admin_ShowClass_Option(ClassID,ChannelID)%>

</select> 
        &nbsp;</td>
    </tr>
    <tr class="tdbg"> 
      <td width="150" class="tdbg" align="right"><strong> 所属专题：&nbsp;</strong></td>
      <td class="tdbg">
      <select name='SpecialID'>
<option value='0'>不属于任何专题</option><%Call Admin_ShowSpecial_Option(SpecialID,ChannelID)%></select> 
        &nbsp;</td>
    </tr>
     <input name='ReadPoint' TYPE='hidden'  value='0'>  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>软件属性：&nbsp;</strong></td>    <td> 

     <input name='OnTop' type='checkbox' id='OnTop' value='yes'<%=ftpp(rrs("OnTop"))%>> 固顶软件&nbsp;&nbsp;&nbsp;&nbsp;     <input name='Hot' type='checkbox' id='Hot' value='yes' ONKEYPRESS="event.returnValue=IsDigit();" onclick="javascript:document.form1.Hits.value='<%=ishothits%>'"<%=ftpp(rrs("Hot"))%>> 热门软件&nbsp;&nbsp;&nbsp;&nbsp;     <input name='Elite' type='checkbox' id='Elite' value='yes'<%=ftpp(rrs("Elite"))%>> 推荐软件&nbsp;&nbsp;&nbsp;&nbsp;     软件评分等级： 
 
    
     <select name='Stars' id='Stars'>
     <option value='5'<%if rrs("Stars")=5 then Response.Write "selected"%>>★★★★★</option>
     <option value='4'<%if rrs("Stars")=4 then Response.Write "selected"%>>★★★★</option>
     <option value='3'<%if rrs("Stars")=3 then Response.Write "selected"%>>★★★</option>
     <option value='2'<%if rrs("Stars")=2 then Response.Write "selected"%>>★★</option>
     <option value='1'<%if rrs("Stars")=1 then Response.Write "selected"%>>★</option>
     <option value='0'<%if rrs("Stars")=0 then Response.Write "selected"%>>无</option>
     </select>
     


    </td>  </tr> 
     <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>点击数初始值：&nbsp;</strong></td>    <td>      <input name='Hits' type='text' id='Hits' value='<%=rrs("Hits")%>' size='10' maxlength='10' ONKEYPRESS="event.returnValue=IsDigit();">&nbsp;&nbsp; <font color='#0000FF'>这功能是提供给管理员作弊用的。不过尽量不要用呀！^_^</font>    </td>  </tr> 
    <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>软件阅读点数：&nbsp;</strong></td>    <td>      <input name='SoftPoint' type='text' id='SoftPoint' value='<%=rrs("SoftPoint")%>' size='10' maxlength='10' ONKEYPRESS="event.returnValue=IsDigit();">&nbsp;&nbsp; <font color='#0000FF'>软件下载点数设定,免费版用户设定无效</font>    </td>  </tr> 
  <!--<tr class="tdbg">
    <td height="30" width="150" align="right"><b>评论链接：</b>&nbsp;</td>
    <td>
     <Input name="ShowCommentLink" type="radio" id="ShowCommentLink" value="yes" <%if rrs("ShowCommentLink")=True then Response.Write "Checked"%> >显示评论链接  
     <Input name="ShowCommentLink" type="radio" id="ShowCommentLink" value="no" <%if rrs("ShowCommentLink")<>True then Response.Write "Checked"%> >不显示评论链接
    </td>
  </tr>-->
  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>配色风格：&nbsp;</strong></td>    <td><select Name='SkinID'><option value='0' selected>系统默认风格</option></select>&nbsp;相关模板中包含CSS、颜色、图片等信息</td>  </tr>  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>版面设计模板：&nbsp;</strong></td>    <td><select Name='TemplateID'><option value='0' selected>系统默认</option></select>&nbsp;相关模板中包含了版面设计的版式等信息</td>  </tr>  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>过 滤 选 项：&nbsp;</strong></td>    <td height="22">      &nbsp;&nbsp;<input name="Script_Iframe" type="checkbox" id="Script_Iframe"  value="yes"  <%=ftpp(rrs("Script_Iframe"))%>>Iframe
      <input name="Script_Object" type="checkbox" id="Script_Object"  value="yes" <%=ftpp(rrs("Script_Object"))%>>Object
      <input name="Script_Script" type="checkbox" id="Script_Script"  value="yes"  <%=ftpp(rrs("Script_Script"))%>>Script
      <input name="Script_Class" type="checkbox" id="Script_Class"  value="yes"  <%=ftpp(rrs("Script_Class"))%>>Style
      <input name="Script_Div" type="checkbox" id="Script_Div"  value="yes" <%=ftpp(rrs("Script_Div"))%>>Div
      <input name="Script_Table" type="checkbox" id="Script_Table"  value="yes"  <%=ftpp(rrs("Script_Table"))%>>Table
      <input name="Script_Tr" type="checkbox" id="Script_tr"  value="yes"  <%=ftpp(rrs("Script_tr"))%>>Tr
      <input name="Script_td" type="checkbox" id="Script_td"  value="yes"  <%=ftpp(rrs("Script_td"))%>>Td
      <br>
      &nbsp;&nbsp;<input name="Script_Span" type="checkbox" id="Script_Span"  value="yes"  <%=ftpp(rrs("Script_Span"))%>>Span
      &nbsp;&nbsp;<input name="Script_Img" type="checkbox" id="Script_Img"  value="yes" <%=ftpp(rrs("Script_Img"))%>>Img&nbsp;&nbsp;&nbsp;
      <input name="Script_Font" type="checkbox" id="Script_Font"  value="yes"  <%=ftpp(rrs("Script_Font"))%>>FONT&nbsp;&nbsp;
      <input name="Script_A" type="checkbox" id="Script_A"  value="yes" <%=ftpp(rrs("Script_A"))%>>A&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="Script_Html" type="checkbox" id="Script_Html"  value="yes" <%=ftpp(rrs("Script_Html"))%>>Html
    </td>
  </tr>
  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>采 集 数 量：&nbsp;</strong></td>    <td  height="30" class="tdbg">&nbsp;
      <input name="CollectionNum" type="text" size='5' maxlength='4' id="CollectionNum" ONKEYPRESS="event.returnValue=IsDigit();"  value="<%=rrs("CollectionNum")%>">
        <select name="CollectionType" id="CollectionType">
           <option value=0 <%if rrs("CollectionType")<>1 then Response.Write "selected"%>>采集指定软件数</option>
           <option value=1 <%if rrs("CollectionType")=1 then Response.Write "selected"%>>采集列表页数</option>
        </select><font color=blue>注意 如果为空代表所有。</font>
    </td>
  </tr>
    <tr class='tdbg'><td width="150" class="tdbg" align="right"><strong>文件保存选项：&nbsp;</strong></td><td  height="30" class="tdbg">
     <Input name="FileSavebType" type="radio" id="FileSavebType" value="0" <%if rrs("FileSavebType")=0 then Response.Write "Checked"%> >不保存文件,直接使用采集到的下载地址,速度最快<br> 
     <!--<Input name="FileSavebType" type="radio" id="FileSavebType" value="1" <%if rrs("FileSavebType")=1 then Response.Write "Checked"%> >保存文件名,生成文件下载列表手动下载（预留功能）<br>-->
     <Input name="FileSavebType" type="radio" id="FileSavebType" value="2" <%if rrs("FileSavebType")=2 then Response.Write "Checked"%> >全自动保存文件,速度较慢<br>
     <Input name="SaveNameTypeb" type="radio" id="SaveNameTypeb" value="0" <%if rrs("SaveNameTypeb")=0 then Response.Write "Checked"%> >文件不重命名<br>
     <Input name="SaveNameTypeb" type="radio" id="SaveNameTypeb" value="1" <%if rrs("SaveNameTypeb")=1 then Response.Write "Checked"%> >文件随机命名<br>
     <input name="SaveFiles" type="radio" id="SaveFiles" value="0" <%if rrs("SaveFiles")=0 then Response.write "Checked"%>>不保存软件缩略图<br>
     <input name="SaveFiles" type="radio" id="SaveFiles" value="1" <%if rrs("SaveFiles")=1 then Response.write "Checked"%>>保存软件缩略图<br>
     <input name="SaveFiles" type="radio" id="SaveFiles" value="2" <%if rrs("SaveFiles")=2 then Response.write "Checked"%>>保存软件缩略图并随机重命名<br>
     <input name="SaveDir" type="text" size='20' maxlength='200' id="SaveDir" value="<%=rrs("SaveDir")%>">软件图片和文件保存目录<br>(相对于频道上传目录例如UploadSoft,UploadSoftPic),标签:年{$Year$} 月{$Month$} 日{$Day$}

    </td>
  </tr>
      <tr class='tdbg'><td width="150" class="tdbg" align="right"><strong>文件保存限制：&nbsp;</strong></td><td  height="30" class="tdbg">
<input name="FileSavebNum" type="text" size='3' maxlength='3' id="FileSavebNum" ONKEYPRESS="event.returnValue=IsDigit();"  value="<%=rrs("FileSavebNum")%>">最多采集几个下载地址,0或留空为不限
<!--<br><input name="FileSavebstr" type="text" size='50' maxlength='1000' id="FileSavebstr"   value="<%=rrs("FileSavebstr")%>"> 禁止保存的文件类型(预留功能)-->
    </td>
  </tr>
  <tr class='tdbg'>    <td width="150" class="tdbg" align="right"><strong>采 集 属 性：&nbsp;</strong></td>    <td  height="30" class="tdbg">

      <!--<input name="AddWatermark" type="checkbox" value="yes" >是否对图片增加水印-->
      <input name="CollecOrder" type="checkbox" value="yes" <%=ftpp(rrs("CollecOrder"))%>>倒序采集
      <input name="Passed" type="checkbox" id="Passed" value="yes" <%=ftpp(rrs("Passed"))%>>立即发布 <font color=blue>注意 如果您要启用立即发布，发布后要记得生成相应的JS文件和静态页面</font>
    </td>
  </tr>
  <tr class="tdbg"> 
    <td colspan="2" align="center" class="tdbg" height="50">
      <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
      <input name="Action" type="hidden" id="Action" value="Add6">
      <input name="Flag" type="hidden" id="Flag" value="<%=Flag%>">
      <input name="Cancel" type="button" id="Cancel" value="返回上一步" onClick="window.location.href='javascript:history.go(-1)'" >&nbsp;&nbsp;
      <input  type="submit" name="Submit" value=" 完  成 " >
    </td>
   </tr>
</table>
</form>
</body></html>
<%
rrs.close
set rrs=nothing
End Sub%>
<%Sub Add7
Dim ChannelID,ClassID,SpecialID,OnTop,Elite,Stars,ShowCommentlink,Script_Iframe,Script_Object,Script_Script,Script_Class,Script_Div,Script_Table,Script_Tr,Script_td,Script_Span,Script_Img,Script_Font,Script_A,Script_Html
Dim CollectionNum,CollectionType,SaveFiles,CollecOrder,Passed,Flag,Hot,Hits,FileSavebType,FileSavebNum,FileSavebStr,SaveNameTypeb,SaveDir,SoftPoint

ChannelID=Request.Form("ChannelID")
ClassID=Request.Form("ClassID")
SpecialID=Request.Form("SpecialID")
Hot=Request.Form("Hot")
Hits=Request.Form("Hits")
OnTop=Request.Form("OnTop")
Elite=Request.Form("Elite")
Stars=Request.Form("Stars")

Script_Iframe=Request.Form("Script_Iframe")
Script_Object=Request.Form("Script_Object")
Script_Script=Request.Form("Script_Script")
Script_Class=Request.Form("Script_Class")
Script_Div=Request.Form("Script_Div")
Script_Table=Request.Form("Script_Table")
Script_Tr=Request.Form("Script_Tr")
Script_td=Request.Form("Script_td")
Script_Span=Request.Form("Script_Span")
Script_Img=Request.Form("Script_Img")
Script_Font=Request.Form("Script_Font")
Script_A=Request.Form("Script_A")
Script_Html=Request.Form("Script_Html")
CollectionNum=Request.Form("CollectionNum")
CollectionType=Request.Form("CollectionType")
SaveFiles=Request.Form("SaveFiles")
CollecOrder=Request.Form("CollecOrder")
Passed=Request.Form("Passed")
Flag=Request.Form("Flag")
FileSavebType=Request.Form("FileSavebType")
FileSavebNum=Request.Form("FileSavebNum")
FileSavebStr=Request.Form("FileSavebStr")
SaveNameTypeb=Request.Form("SaveNameTypeb")
SoftPoint=Request.Form("SoftPoint")
SaveDir=Replace(Request.Form("SaveDir"),"/","")
SaveDir=Replace(SaveDir,"\","")
If ItemName="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请输入项目名称</li>" 
End if
If ChannelID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置所属频道</li>" 
End if
If ClassID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置所属频道</li>" 
End if
If SaveDir="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置保存目录</li>" 
End if

If FoundErr<>True Then
   SqlItem="Select * from Item Where ItemID=" & ItemID
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,2,3

	RsItem("ChannelID")=ChannelID
	RsItem("ClassID")=ClassID
	RsItem("SpecialID")=SpecialID
	RsItem("Hot")=PPTF(Hot)
	RsItem("Hits")=Hits
	RsItem("OnTop")=PPTF(OnTop)
	RsItem("Elite")=PPTF(Elite)
	RsItem("Stars")=Stars
	RsItem("ShowCommentlink")=PPTF(ShowCommentlink)
	RsItem("Script_Iframe")=PPTF(Script_Iframe)
	RsItem("Script_Object")=PPTF(Script_Object)
	RsItem("Script_Script")=PPTF(Script_Script)
	RsItem("Script_Class")=PPTF(Script_Class)
	RsItem("Script_Div")=PPTF(Script_Div)
	RsItem("Script_Table")=PPTF(Script_Table)
	RsItem("Script_Tr")=PPTF(Script_Tr)
	RsItem("Script_td")=PPTF(Script_td)
	RsItem("Script_Span")=PPTF(Script_Span)
	RsItem("Script_Img")=PPTF(Script_Img)
	RsItem("Script_Font")=PPTF(Script_Font)
	RsItem("Script_A")=PPTF(Script_A)
	RsItem("Script_Html")=PPTF(Script_Html)
	RsItem("CollectionNum")=CollectionNum
	RsItem("CollectionType")=CollectionType
	RsItem("SaveFiles")=SaveFiles
	RsItem("CollecOrder")=PPTF(CollecOrder)
	RsItem("Passed")=PPTF(Passed)
	RsItem("FileSavebType")=FileSavebType
	RsItem("FileSavebNum")=FileSavebNum
	RsItem("FileSavebStr")=FileSavebStr
	RsItem("SaveNameTypeb")=SaveNameTypeb
	RsItem("SaveDir")=SaveDir
	RsItem("SoftPoint")=SoftPoint
	
	
	
	if Flag="True" then		
		RsItem("Flag")=True
	End if
	
	RsItem.UpDate
	RsItem.Close
	Set RsItem=Nothing
End If




If FoundErr=True Then
   Call WriteErrMsg(ErrMsg)
   Response.End
End if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
	<tr class="tdbg">
		<td width="70" height="30"><strong>管理导航：</strong></td>
		<td height="30"><a href="Admin_ST_Manage.asp">管理首页</a> >> <a href="Admin_ST_Add.asp?Type=modify&ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ST_Add.asp?action=Add1&Type=modify&ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ST_Add.asp?action=Add2&Type=modify&ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ST_Add.asp?action=Add3&Type=modify&ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ST_Add.asp?action=Add4&Type=modify&ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ST_Add.asp?action=Add5&Type=modify&ItemID=<%=ItemID%>">属性设置</a> >> <font color=red>完成</font></td>
	</tr>
</table><br>
<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>
  <tr align='center' class='title'><td height='22'><strong>恭喜您！</strong></td></tr>
  <tr class='tdbg'><td height='100' valign='top' align='center'><br><font color=red><%=ItemName%></font>  采集项目已成功建立 ！</td></tr>
  <tr align='center' class='tdbg'><td></td></tr>
</table>
<!--<meta http-equiv="refresh" content=3;url="Admin_ST_Manage.asp" >-->
<%End Sub%>

</body></html><%
'**************************************************
'过程名：WriteErrMsg
'作  用：显示错误提示信息
'参  数：无
'**************************************************
Sub WriteErrMsg(ErrMsg)
    Dim strErr
    strErr = strErr & "<html><head><title>错误信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
    strErr = strErr & "<link href='Admin_Style.css' rel='stylesheet' type='text/css'></head><body><br><br>" & vbCrLf
    strErr = strErr & "<table cellpadding=2 cellspacing=1 border=0 width=400 class='border' align=center>" & vbCrLf
    strErr = strErr & "  <tr align='center' class='title'><td height='22'><strong>错误信息</strong></td></tr>" & vbCrLf
    strErr = strErr & "  <tr class='tdbg'><td height='100' valign='top'><b>产生错误的可能原因：</b>" & ErrMsg & "</td></tr>" & vbCrLf
    strErr = strErr & "  <tr align='center' class='tdbg'><td>"
    strErr = strErr & "<a href='javascript:history.go(-1)'>&lt;&lt; 返回上一页</a>"
    strErr = strErr & "</td></tr>" & vbCrLf
    strErr = strErr & "</table>" & vbCrLf
    strErr = strErr & "</body></html>" & vbCrLf
    Response.Write strErr
End Sub





sub Admin_ShowClass_Option(CurrentID,ChannelID)

	dim rsClass,sqlClass,strTemp,tmpDepth,i
	dim arrShowLine(20)
	for i=0 to ubound(arrShowLine)
		arrShowLine(i)=False
	next
	sqlClass="Select * From PE_Class where channelid="&ChannelID&" order by RootID,OrderID"
	set rsClass=server.CreateObject("adodb.recordset")
	rsClass.open sqlClass,conn,1,1
	if rsClass.bof and rsClass.bof then
		response.write "<option value=''>请先添加栏目</option>"
	else
		do while not rsClass.eof
			tmpDepth=rsClass("Depth")			
			if rsClass("NextID")>0 then
				arrShowLine(tmpDepth)=True
			else
				arrShowLine(tmpDepth)=False
			end if

				if rsClass("Child")>0 and rsClass("EnableAdd")<>-1 then
					strTemp="<option value='0'"
				elseif rsClass("LinkUrl")<>"" then
					strTemp="<option value=''"
				else
					strTemp="<option style='background-color:green' value='" & rsClass("ClassID") & "'"
				end if
				

				
				


			if rsClass("ClassID")=Clng(CurrentID) then
				 strTemp=strTemp & " selected"
				' SkinID=rsClass("SkinID")
				' LayoutID=rsClass("LayoutID")
				 'BrowsePurview=rsClass("BrowsePurview")
				' AddPurview=rsClass("AddPurview")
			end if
			strTemp=strTemp & ">"
			
			if tmpDepth>0 then
				for i=1 to tmpDepth
					strTemp=strTemp & "&nbsp;&nbsp;"
					if i=tmpDepth then
						if rsClass("NextID")>0 then
							strTemp=strTemp & "├&nbsp;"
						else
							strTemp=strTemp & "└&nbsp;"
						end if
					else
						if arrShowLine(i)=True then
							strTemp=strTemp & "│"
						else
							strTemp=strTemp & "&nbsp;"
						end if
					end if
				next
			end if
			strTemp=strTemp & rsClass("ClassName")
			if rsClass("LinkUrl")<>"" then
				strTemp=strTemp & "(外)"
			end if
			strTemp=strTemp & "</option>"
			response.write strTemp
			rsClass.movenext
		loop
	end if
	rsClass.close
	set rsClass=nothing
end sub

sub Admin_ShowSpecial_Option(SpecialID,ChannelID)
	if ChannelID="" then		
	else                
		dim sqlSpecial,rsSpecial
		sqlSpecial="select * from PE_Special where ChannelID="&ChannelID&""
		set rsSpecial=server.CreateObject("adodb.recordset")
		rsSpecial.open sqlSpecial,conn,1,1
		do while not rsSpecial.eof
			if rsSpecial("SpecialID")=Clng(SpecialID) then
				response.write "<option value='" & rsSpecial("SpecialID") & "' selected>" & rsSpecial("SpecialName") & "</option>"
			else
				response.write "<option value='" & rsSpecial("SpecialID") & "'>" & rsSpecial("SpecialName") & "</option>"
			end if
			rsSpecial.movenext
		loop
		rsSpecial.close
    	set rsSpecial = nothing
    End if
end sub

sub Admin_ShowChannel_Option(ChannelID)	                
	dim sqlChannel,rsChannel
	sqlChannel="select * from PE_Channel where ModuleType=2 and Disabled=0"
	set rsChannel=server.CreateObject("adodb.recordset")
	rsChannel.open sqlChannel,conn,1,1
	if ChannelID="" then
		Response.Write "<option value='' selected>请选择频道</option>"
	else
		Response.Write "<option value='' >请选择频道</option>"
	ENd if
	do while not rsChannel.eof
		if rsChannel("ChannelID")=Clng(ChannelID) then
			response.write "<option value='" & rsChannel("ChannelID") & "' selected>" & rsChannel("ChannelName") & "</option>"
			ishothits=rsChannel("HitsOfHot")
		else
			response.write "<option value='" & rsChannel("ChannelID") & "'>" & rsChannel("ChannelName") & "</option>"
		end if
		rsChannel.movenext
	loop
	rsChannel.close
    set rsChannel = nothing
end sub









Function PPTF(ppstr)
	if ppstr="yes" then
		pptf=True
	Else
		pptf=False
	End if
End Function

Function ftpp(ppstr)
	if ppstr=True then
		ftpp="checked"
	Else
		ftpp=""
	End if
End Function






















%>