BVB Source Codes

Jie Yang v0.6.3 article system Show Admin_ItemModify4.asp Source code

Return Download Jie Yang v0.6.3 article system: download Admin_ItemModify4.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <!--#include file="inc/conn.asp"-->
  2. <!--#include file="inc/function.asp"-->
  3. <!--#include file="inc/ubbcode.asp"-->
  4. <!--#include file="../admin_check.asp"-->
  5. <link rel="stylesheet" type="text/css" href="../style/Style.css">
  6. <%
  7. Dim RsItem,SqlItem,Action,ItemID
  8. Dim LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,LoginResult,LoginData
  9. Dim ListStr,LsString,LoString,ListPaingType,LPsString,LPoString,ListPaingStr1,ListPaingStr2,ListPaingID1,ListPaingID2,ListPaingStr3,HsString,HoString,HttpUrlType,HttpUrlStr,ErrMsg
  10. Dim TsString,ToString,CsString,CoString,DateType,DsString,DoString,AuthorType,AsString,AoString,AuthorStr,CopyFromType,FsString,FoString,CopyFromStr,KeyType,KsString,KoString,KeyStr,newsPaingType,NPsString,NPoString,newsPaingStr,newsPaingHtml
  11. Dim ListUrl,ListCode,newsArrayCode,newsArray,UrlTest,newsCode
  12. Dim Testi
  13. Action=Trim(Request("Action"))
  14. ItemID=Trim(Request("ItemID"))
  15. FoundErr=False
  16.  
  17. If ItemID="" Then
  18.    FoundErr=True
  19.    ErrMsg=ErrMsg & "<br><br><li>参数错误,项目ID不能为空</li>"
  20. Else
  21.    ItemID=Clng(ItemID)
  22. End If
  23.  
  24. If Action="SaveEdit" And FoundErr<>True Then
  25.    Call SaveEdit()
  26. End If
  27.  
  28. If FoundErr<>True Then
  29.    Call GetTest()
  30. End If
  31.  
  32. If FoundErr=True Then
  33.    Call WriteErrMsg(ErrMsg)
  34. Else
  35.    Call Main()
  36. End If
  37. '关闭数据库链接
  38. Call CloseConn()
  39. Call CloseConnItem()
  40. %>
  41. <%Sub Main()%>
  42. <html><head>
  43. <title>采集系统</title>
  44. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  45. <script language="VBScript">
  46.  Private Sub ceshi(Num)
  47.     Dim content
  48.     Content=document.form1.Content.value
  49.     Select Case Num  
  50.     Case 1
  51.         huoqv=document.form1.LsString.value
  52.     Case 2
  53.         huoqv=document.form1.LoString.value
  54.     Case 3
  55.         huoqv=document.form1.LPsString.value
  56.     Case 4
  57.         huoqv=document.form1.LPoString.value
  58.     Case 5
  59.         huoqv=document.form1.TsString.value
  60.     Case 6
  61.         huoqv=document.form1.ToString.value
  62.     Case 7
  63.         huoqv=document.form1.CsString.value
  64.     Case 8
  65.         huoqv=document.form1.CoString.value
  66.     Case 9
  67.         huoqv=document.form1.AsString.value
  68.     Case 10
  69.         huoqv=document.form1.AoString.value
  70.     Case 11
  71.         huoqv=document.form1.FsString.value
  72.     Case 12
  73.         huoqv=document.form1.FoString.value
  74.     Case 13
  75.         huoqv=document.form1.KsString.value
  76.     Case 14
  77.         huoqv=document.form1.KoString.value
  78.     Case 15
  79.         huoqv=document.form1.NPsString.value
  80.     Case 16
  81.         huoqv=document.form1.NPsString.value
  82.     Case 17
  83.         huoqv=document.form1.DsString.value
  84.     Case 18
  85.         huoqv=document.form1.DoString.value
  86.     Case Else
  87.         Exit sub
  88.     End Select
  89.     if huoqv="" then
  90.        alert("测试无效!代码为空!")
  91.        exit Sub
  92.     End if
  93.     If InStr(Content,huoqv) = 0 Then
  94.        alert("测试无效!网页没有这些代码。")
  95.     Else
  96.        If InStr(Mid(Content,InStr(Content,huoqv)+LenB(huoqv),LenB(Content)),huoqv) = 0 Then
  97.           alert("测试成功!代码在页面是唯一的。")
  98.        Else
  99.           alert("测试失败!代码有重复,开始或结束至少有一处代码是唯一才有效!")
  100.        End if
  101.     End if
  102.  End Sub
  103.  Private Sub Analyse()
  104.     Dim AnalyseString,AnalyseString2
  105.     Dim content,Analysetemp
  106.     Content=document.form1.Content.value
  107.     AnalyseString=document.form1.AnalyseString.value
  108.     if AnalyseString="" then
  109.         alert("分析无效!分析代码为空!")
  110.         Exit Sub
  111.     End if
  112.     if isNumeric(document.form1.AnalyseNum.value)=false then
  113.         alert("分析字符数不是有效数字!")
  114.         Exit Sub
  115.     End if
  116.     AnalyseString2=LenB(AnalyseString)
  117.     If InStr(Content,AnalyseString) = 0 Then
  118.         alert("分析无效!网页没有这些代码。")
  119.     Else
  120.         if InStr(Content,AnalyseString)-document.form1.AnalyseNum.value <= 0 then
  121.             Analysetemp = 1
  122.         Else
  123.             Analysetemp =InStr(Content,AnalyseString)-document.form1.AnalyseNum.value
  124.         End if
  125.         If InStr(Mid(Content,InStr(Content,AnalyseString)+AnalyseString2, LenB(Content)),AnalyseString) = 0 Then
  126.             if document.form1.AnalyseWay(0).checked=true Then
  127.                 document.form1.AnalyseContent.value=Mid(Content,Analysetemp,Len(AnalyseString)+document.form1.AnalyseNum.value)
  128.             elseif document.form1.AnalyseWay(1).checked=true then
  129.                 document.form1.AnalyseContent.value=Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
  130.             elseif document.form1.AnalyseWay(2).checked=true then
  131.                 document.form1.AnalyseContent.value=Mid(Content,Analysetemp,document.form1.AnalyseNum.value)+Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
  132.             End if
  133.         Else
  134.             alert("分析失败!分析代码有重复,要确认为一的字符。")
  135.             Exit Sub
  136.         End if
  137.     End if
  138.  End Sub
  139.  </script>
  140. <script language="JavaScript">
  141. <!--
  142. function CheckForm()
  143. {
  144.         if (document.form1.Content.value.length > 200000)
  145.         {
  146.         document.form1.Content.value="";
  147.         }
  148. }
  149. function setFileFileds(weburl)
  150. {  
  151.         str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='99%' height='300' src="+weburl+"></iframe>";
  152.         objFiles.innerHTML=str;
  153. }
  154. //-->
  155. </script>
  156. </head>
  157. <body>
  158. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  159.   <tr>
  160.     <td class="td28">采集系统项目管理</td>
  161.   </tr>
  162.   <tr bgcolor="#FFFFFF" class="td26">
  163.     <td><b>管理导航:</b><a href=Admin_ItemStart.asp>管理首页</a> | <a href="Admin_ItemAddNew.asp">添加新项目</a> | <a href="Admin_ItemManage.asp">采集项目管理</a> | <a href="Admin_ItemFilters.asp">采集过滤设置</a> | <a href="Admin_ItemHistroly.asp">历史采集记录</a> | <a href="Admin_ItemDatabase.asp?Action=LeadOut">采集项目导出</a> <a href="Admin_ItemDatabase.asp?Action=LeadIn">导入</a></td>
  164.   </tr>
  165.   <tr bgcolor="#FFFFFF">
  166.     <td style="padding-left:10px;">项目编辑 >> <a href="Admin_ItemModify.asp?ItemID=<%=ItemID%>">基本设置</a> >> >> <a href="Admin_ItemModify2.asp?ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ItemModify3.asp?ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ItemModify4.asp?ItemID=<%=ItemID%>"><font color=red>正文设置</font></a> >>  
  167.         <a href="Admin_ItemModify5.asp?ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ItemAttribute.asp?ItemID=<%=ItemID%>">属性设置</a> >> 完成</td>        
  168.   </tr>        
  169. </table>
  170. <form method="post" action="Admin_ItemModify5.asp" name="form1" style="padding:0; margin:0;">
  171. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  172.   <tr>
  173.     <td colspan="2" class="td28">项目编辑--采集目标网页 <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('<%=newsArray(0)%>');" >查看网页</td>
  174.   </tr>
  175.   <tr id="ShowPage" style="display:'none'">
  176.     <td colspan='2' align='center' bgcolor="#FFFFFF" id='objFiles'></td>
  177.   </tr>
  178.   <tr>
  179.     <td colspan="2" class="td28">项目编辑--采集目标源码<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>查看源码</td>
  180.   </tr>
  181.   <tr>
  182.     <td colspan='2' align='center' bgcolor="#FFFFFF"><TEXTAREA NAME='Content' ROWS='' COLS='' style='width:99%;height:300px;word-break:break-all;'><%=newsCode%></TEXTAREA></td>
  183.   </tr>
  184. </table>
  185. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  186.   <tr>
  187.     <td bgcolor="#FFFFFF">&nbsp;&nbsp;这是分析后所得到的新闻绝对链接地址:<A href=<%=newsArray(0)%> target="_blank"><FONT color=red><%=newsArray(0)%></FONT></A>&nbsp;&nbsp;请查看是否正确。</td>
  188.     <input type='hidden' name='Testi' value='0'>
  189.   </tr>
  190. </table>
  191. <table width="98%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  192.     <tr>
  193.       <td colspan="2" class="td28">编辑项目--正文设置</td>
  194.     </tr>
  195.     <tr>
  196.       <td align='right' bgcolor="#FFFFFF">标题开始标记:<br>
  197.         <br>
  198.         <br>
  199.         <br>
  200.         <br>
  201.         <br>
  202.       标题结束标记:</td>
  203.      <td bgcolor="#FFFFFF" >
  204.        <textarea name="TsString" style='width:450px;height:100px'><%=TsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(5)' value='测试代码' >
  205.        <br>
  206.       <textarea name="ToString" style='width:450px;height:100px'><%=ToString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(6)' value='测试代码' ></td>
  207.   </tr>
  208.   <tr>
  209.     <td align='right' bgcolor="#FFFFFF">正文开始标记:
  210.      
  211.       <p> </p><p> </p>
  212.       正文结束标记:</td>
  213.     <td bgcolor="#FFFFFF" >
  214.       <textarea name="CsString" style='width:450px;height:100px'><%=CsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(7)' value='测试代码' >
  215.       <br>
  216.       <textarea name="CoString" style='width:450px;height:100px'><%=CoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(8)' value='测试代码' ></td>
  217.   </tr>
  218.   <tr>
  219.     <td align='right' bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;时间设置:</td>
  220.     <td bgcolor="#FFFFFF" >
  221.       <input type="radio" value="0" name="DateType" <%If DateType=0 Then Response.Write "checked"%> onClick="javascript:Date1.style.display='none'">不作设置&nbsp;
  222.       <input type="radio" value="1" name="DateType" <%If DateType=1 Then Response.Write "checked"%> onClick="javascript:Date1.style.display=''">设置标签&nbsp;</td>
  223.     </tr>
  224.     <tr id="Date1" style="display:'<%If DateType<>1 Then Response.Write "none"%>'">
  225.       <td align='right' bgcolor="#FFFFFF">时间开始标记:</font><br>
  226.         <br>
  227.         <br>
  228.         <br>
  229.         <br>
  230.         <br>
  231.       时间结束标记:</font></td>
  232.       <td bgcolor="#FFFFFF" >
  233.         <textarea name="DsString" style='width:450px;height:100px'><%=DsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(17)' value='测试代码' >
  234.         <br>
  235.       <textarea name="DoString" style='width:450px;height:100px'><%=DoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(18)' value='测试代码' ></td>
  236.     </tr>
  237.   <tr>
  238.     <td align='right' bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;作者设置:</td>
  239.     <td bgcolor="#FFFFFF" >
  240.       <input type="radio" value="0" name="AuthorType" <%If AuthorType=0 Then Response.Write "checked"%> onClick="javascript:Author1.style.display='none';Author2.style.display='none'">不作设置&nbsp;
  241.       <input type="radio" value="1" name="AuthorType" <%If AuthorType=1 Then Response.Write "checked"%> onClick="javascript:Author1.style.display='';Author2.style.display='none'">设置标签&nbsp;
  242.       <input type="radio" value="2" name="AuthorType" <%If AuthorType=2 Then Response.Write "checked"%> onClick="javascript:Author1.style.display='none';Author2.style.display=''">指定作者</td>
  243.     </tr>
  244.     <tr id="Author1" style="display:'none'">
  245.       <td align='right' bgcolor="#FFFFFF">作者开始标记:</font><br>
  246.         <br>
  247.         <br>
  248.         <br>
  249.         <br>
  250.         <br>
  251.       作者结束标记:</font></td>
  252.       <td bgcolor="#FFFFFF" >
  253.         <textarea name="AsString" style='width:450px;height:100px'><%=AsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(9)' value='测试代码' >
  254.         <br>
  255.       <textarea name="AoString" style='width:450px;height:100px'><%=AoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(10)' value='测试代码' ></td>
  256.     </tr>
  257.     <tr id="Author2" style="display:'<%If AuthorType<>2 Then Response.Write "none"%>'">
  258.       <td align='right' bgcolor="#FFFFFF">请指定作者:</font></td>
  259.       <td bgcolor="#FFFFFF" >
  260.         <input name="AuthorStr" type="text" id="AuthorStr" value="<%=AuthorStr%>">      </td>
  261.     </tr>
  262.     <tr>
  263.       <td align='right' bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;来源设置:</td>
  264.       <td bgcolor="#FFFFFF" >
  265.         <input type="radio" value="0" name="CopyFromType" <%If CopyFromType=0 Then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='none';CopyFrom2.style.display='none'">不作设置&nbsp;
  266.         <input type="radio" value="1" name="CopyFromType" <%If CopyFromType=1 Then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='';CopyFrom2.style.display='none'">设置标签&nbsp;
  267.       <input type="radio" value="2" name="CopyFromType" <%If CopyFromType=2 Then Response.Write "checked"%> onClick="javascript:CopyFrom1.style.display='none';CopyFrom2.style.display=''">指定来源</td>
  268.     </tr>
  269.     <tr id="CopyFrom1" style="display:'<%If CopyFromType<>1 Then Response.Write "none"%>'">
  270.       <td align='right' bgcolor="#FFFFFF">来源开始标记:</font><br>
  271.         <br>
  272.         <br>
  273.         <br>
  274.         <br>
  275.         <br>
  276.       来源结束标记:</font></td>
  277.       <td bgcolor="#FFFFFF" >
  278.         <textarea name="FsString" style='width:450px;height:100px'><%=FsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(11)' value='测试代码' >
  279.         <br>
  280.       <textarea name="FoString" style='width:450px;height:100px'><%=FoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(12)' value='测试代码' ></td>
  281.     </tr>
  282.     <tr id="CopyFrom2" style="display:'<%If CopyFromType<>2 Then Response.Write "none"%>'">
  283.       <td align='right' bgcolor="#FFFFFF">请指定来源:</font></td>
  284.       <td bgcolor="#FFFFFF" >
  285.         <input name="CopyFromStr" type="text" id="CopyFromStr" value="<%=CopyFromStr%>">      </td>
  286.     </tr>
  287.     <tr>
  288.       <td align='right' bgcolor="#FFFFFF">关键字词设置:</td>
  289.       <td bgcolor="#FFFFFF" >
  290.         <input type="radio" value="0" name="KeyType" <%If KeyType=0 Then Response.Write "checked"%> onClick="javascript:Key1.style.display='none';Key2.style.display='none'">不作设置&nbsp;
  291.         <input type="radio" value="1" name="KeyType" <%If KeyType=1 Then Response.Write "checked"%> onClick="javascript:Key1.style.display='';Key2.style.display='none'">设置标签&nbsp;
  292.       <input type="radio" value="2" name="KeyType" <%If KeyType=2 Then Response.Write "checked"%> onClick="javascript:Key1.style.display='none';Key2.style.display=''">指定关键字</td>
  293.     </tr>
  294.     <tr id="Key1" style="display:'<%If KeyType<>1 Then Response.Write "none"%>'">
  295.       <td align='right' bgcolor="#FFFFFF">关键词开始标记:</font><br>
  296.         <br>
  297.         <br>
  298.         <br>
  299.         <br>
  300.         <br>
  301.       关键词结束标记:</font></td>
  302.       <td bgcolor="#FFFFFF" >
  303.       <textarea name="KsString" style='width:450px;height:100px'><%=KsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(13)' value='测试代码' >
  304.       <br>
  305.       <textarea name="KoString" style='width:450px;height:100px'><%=KoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(14)' value='测试代码' ></td>
  306.     </tr>
  307.     <tr id="Key2" style="display:'<%If KeyType<>2 Then Response.Write "none"%>'">
  308.       <td align='right' bgcolor="#FFFFFF">请指定关键:</font></td>
  309.       <td bgcolor="#FFFFFF" >
  310.         <input name="KeyStr" type="text" id="KeyStr" value="<%=KeyStr%>">      </td>
  311.     </tr>
  312.     <tr>
  313.       <td align='right' bgcolor="#FFFFFF">正文分页设置:</td>
  314.       <td bgcolor="#FFFFFF" >
  315.         <input type="radio" value="0" name="newsPaingType" <%If newsPaingType=0 Then Response.Write "checked"%> onClick="javascript:newsPaing1.style.display='none';newsPaing2.style.display='none'">不作设置&nbsp;
  316.         <input type="radio" value="1" name="newsPaingType" <%If newsPaingType=1 Then Response.Write "checked"%> onClick="javascript:newsPaing1.style.display='';newsPaing2.style.display='none'">设置标签&nbsp;      </td>
  317.     </tr>
  318.     <tr id="newsPaing1" style="display:'<%If newsPaingType<>1 Then Response.Write "none"%>'">
  319.       <td align='right' bgcolor="#FFFFFF">下页开始标记:</font><br>
  320.         <br>
  321.         <br>
  322.         <br>
  323.         <br>
  324.         <br>
  325.       下页结束标记:</font></td>
  326.       <td bgcolor="#FFFFFF" >
  327.         <textarea name="NPsString" style='width:450px;height:100px'><%=NPsString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(15)' value='测试代码' >
  328.         <br>
  329.       <textarea name="NPoString" style='width:450px;height:100px'><%=NPoString%></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(16)' value='测试代码' ></td>
  330.     </tr>
  331.     <tr id="newsPaing2" style="display:'<%If newsPaingType<>2 Then Response.Write "none"%>'">
  332.       <td width="20%" align="right" bgcolor="#FFFFFF">手动设置:</td>
  333.       <td width="75%" bgcolor="#FFFFFF">
  334.                 <input name="newsPaingStr2" type="text" value="预留功能" size="58">      </td>
  335.     </tr>
  336.   <tr>
  337.     <td align="right" bgcolor="#FFFFFF"> 分析代码: </td>
  338.     <td bgcolor="#FFFFFF">
  339.      <Input type="radio" value="0" name="analyseType" checked onClick="javascript:analyse.style.display='none';">不作分析&nbsp;
  340.      <Input type="radio" value="1" name="analyseType" onClick="javascript:analyse.style.display='';">启用分析
  341.     <font color='#0099FF'>注:此功能为辅助功能与采集配置无关</font>    </td>
  342.   </tr>
  343.   <tr id="analyse" style="display:none">
  344.     <td align="right" bgcolor="#FFFFFF"><strong></strong></strong></td>
  345.     <td bgcolor="#FFFFFF">     分析网页字符:
  346.      <Input TYPE='text' NAME='AnalyseString' value='' id='AnalyseString' size='40' maxlength='200'>
  347.      <Input NAME='AnalyseStart' TYPE='button' class="submit1" onCLICK='Analyse()' value=' 分 析 ' >
  348.      <br>
  349.      <Input TYPE='radio' NAME='AnalyseWay' value='0' checked>向前代码&nbsp;
  350.      <Input TYPE='radio' NAME='AnalyseWay' value='1'>向后代码&nbsp;
  351.      <Input TYPE='radio' NAME='AnalyseWay' value='2'>前后代码&nbsp;
  352.     字符数:
  353.      <Input TYPE='text' NAME='AnalyseNum' value='300' size='5' maxlength='4'>
  354.     <br>
  355.     <TEXTAREA NAME='AnalyseContent' style='width:550px;height:100px'></TEXTAREA>    </td>
  356.     </tr>
  357.  
  358.  
  359.     <tr>
  360.       <td colspan="2" align="center" bgcolor="#FFFFFF"><input name="Action" type="hidden" id="Action" value="SaveEdit">
  361.         <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
  362.         <input name="button1"  type="button" class="submit1" onClick="window.location.href='javascript:history.go(-1)'" value="上&nbsp;一&nbsp;步">
  363.         &nbsp;&nbsp;&nbsp;&nbsp;
  364.       <input name="Submit"  type="submit" class="submit1" value="下&nbsp;一&nbsp;步"></td>
  365.         <input type="hidden" name="UrlTest" id="UrlTest" value="<%=UrlTest%>">
  366.     </tr>
  367. </table>
  368. </form>
  369. </body>        
  370. </html>
  371. <%End Sub%>
  372. <%
  373. Sub SaveEdit
  374.    HsString=Request.Form("HsString")
  375.    HoString=Request.Form("HoString")
  376.    HttpUrlType=Trim(Request.Form("HttpUrlType"))
  377.    HttpUrlStr=Trim(Request.Form("HttpUrlStr"))
  378.  
  379.    If HsString="" Then
  380.       FoundErr=True
  381.       ErrMsg=ErrMsg & "<br><br><li>链接开始标记不能为空</li>"
  382.    End If
  383.    If HoString="" Then
  384.       FoundErr=True
  385.       ErrMsg=ErrMsg & "<br><br><li>链接结束标记不能为空</li>"
  386.    End If
  387.    If HttpUrlType="" Then
  388.       FoundErr=True
  389.       ErrMsg=ErrMsg & "<br><br><li>请选择链接处理类型</li>"
  390.    Else
  391.       HttpUrlType=Clng(HttpUrlType)
  392.       If HttpUrlType=1 Then
  393.          If HttpUrlStr="" Then
  394.             FoundErr=True
  395.             ErrMsg=ErrMsg & "<br><br><li>请设置绝对链接地址</li>"
  396.          Else
  397.             If Len(HttpUrlStr)<15 Then
  398.                FoundErr=True
  399.                ErrMsg=ErrMsg & "<br><br><li>绝对链接地址设置不正确(至少15个字符)</li>"
  400.             End If
  401.          End If
  402.       End If
  403.    End If
  404.  
  405.    If FoundErr<>True Then
  406.       SqlItem="Select ItemID,HsString,HoString,HttpUrlType,HttpUrlStr from Item Where ItemID=" & ItemID
  407.       Set RsItem=server.CreateObject("adodb.recordset")
  408.       RsItem.Open SqlItem,ConnItem,2,3
  409.       RsItem("HsString")=HsString
  410.       RsItem("HoString")=HoString
  411.       RsItem("HttpUrlType")=HttpUrlType
  412.       If HttpUrlType=1 Then
  413.          RsItem("HttpUrlStr")=HttpUrlStr
  414.       End If
  415.       RsItem.UpDate
  416.       RsItem.Close
  417.       Set RsItem=Nothing
  418.    End If
  419. End Sub
  420.  
  421. Sub GetTest
  422.    SqlItem="Select * from Item Where ItemID=" & ItemID
  423.    Set RsItem=server.CreateObject("adodb.recordset")
  424.    RsItem.Open SqlItem,ConnItem,1,1
  425.    If RsItem.Eof And RsItem.Bof Then
  426.       FoundErr=True
  427.       ErrMsg=ErrMsg & "<br><br><li>参数错误,项目ID不能为空</li>"
  428.    Else
  429.       LoginType=RsItem("LoginType")
  430.       LoginUrl=RsItem("LoginUrl")
  431.       LoginPostUrl=RsItem("LoginPostUrl")
  432.       LoginUser=RsItem("LoginUser")
  433.       LoginPass=RsItem("LoginPass")
  434.       LoginFalse=RsItem("LoginFalse")
  435.       ListStr=RsItem("ListStr")
  436.       LsString=RsItem("LsString")
  437.       LoString=RsItem("LoString")
  438.       ListPaingType=RsItem("ListPaingType")
  439.       LPsString=RsItem("LPsString")
  440.       LPoString=RsItem("LPoString")
  441.       ListPaingStr1=RsItem("ListPaingStr1")
  442.       ListPaingStr2=RsItem("ListPaingStr2")
  443.       ListPaingID1=RsItem("ListPaingID1")
  444.       ListPaingID2=RsItem("ListPaingID2")
  445.       ListPaingStr3=RsItem("ListPaingStr3")
  446.       HsString=RsItem("HsString")
  447.       HoString=RsItem("HoString")
  448.       HttpUrlType=RsItem("HttpUrlType")
  449.       HttpUrlStr=RsItem("HttpUrlStr")
  450.       TsString=RsItem("TsString")
  451.       ToString=RsItem("ToString")
  452.       CsString=RsItem("CsString")
  453.       CoString=RsItem("CoString")
  454.      
  455.       DateType=RsItem("DateType")
  456.       DsString=RsItem("DsString")
  457.       DoString=RsItem("DoString")
  458.      
  459.       AuthorType=RsItem("AuthorType")
  460.       AsString=RsItem("AsString")
  461.       AoString=RsItem("AoString")
  462.       AuthorStr=RsItem("AuthorStr")
  463.  
  464.       CopyFromType=RsItem("CopyFromType")
  465.       FsString=RsItem("FsString")
  466.       FoString=RsItem("FoString")
  467.       CopyFromStr=RsItem("CopyFromStr")
  468.  
  469.       KeyType=RsItem("KeyType")
  470.       KsString=RsItem("KsString")
  471.       KoString=RsItem("KoString")
  472.       KeyStr=RsItem("KeyStr")
  473.  
  474.       newsPaingType=RsItem("newsPaingType")
  475.       NPsString=RsItem("NPsString")
  476.       NPoString=RsItem("NPoString")
  477.       newsPaingStr=RsItem("newsPaingStr")
  478.       newsPaingHtml=RsItem("newsPaingHtml")
  479.    End If
  480.    RsItem.Close
  481.    Set RsItem=Nothing    
  482.  
  483.    If LsString="" Then
  484.       FoundErr=True
  485.       ErrMsg=ErrMsg & "<br><br><li>列表开始标记不能为空!</li>"
  486.    End If
  487.    If LoString="" Then
  488.       FoundErr=True
  489.       ErrMsg=ErrMsg & "<br><br><li>列表结束标记不能为空!</li>"
  490.    End If
  491.    If ListPaingType=0 Or ListPaingType=1 Then
  492.       If ListStr="" Then
  493.          FoundErr=True
  494.          ErrMsg=ErrMsg & "<br><br><li>列表索引页不能为空!</li>"
  495.       End If
  496.       If ListPaingType=1 Then    
  497.          If LPsString="" Or LPoString="" Then
  498.             FoundErr=True
  499.             ErrMsg=ErrMsg & "<br><br><li>索引分页开始、结束标记不能为空!</li>"
  500.          End If
  501.       End If      
  502.       If  ListPaingStr1<>""  And  Len(ListPaingStr1)<15  Then
  503.          FoundErr=True
  504.          ErrMsg=ErrMsg & "<br><br><li>索引分页重定向设置不正确!</li>"
  505.             End  IF
  506.    ElseIf ListPaingType=2 Then
  507.       If ListPaingStr2="" Then
  508.          FoundErr=True
  509.          ErrMsg=ErrMsg & "<br><br><li>批量生成原字符串不能为空!</li>"
  510.       End If
  511.       If IsNumeric(ListPaingID1)=False or IsNumeric(ListPaingID2)=False Then
  512.          FoundErr=True
  513.          ErrMsg=ErrMsg & "<br><br><li>批量生成的范围只能是数字!</li>"
  514.       Else
  515.          ListPaingID1=Clng(ListPaingID1)
  516.          ListPaingID2=Clng(ListPaingID2)
  517.          If ListPaingID1=0 And ListPaingID2=0 Then
  518.             FoundErr=True
  519.             ErrMsg=ErrMsg & "<br><br><li>批量生成的范围不正确!</li>"
  520.          End If
  521.       End If
  522.    ElseIf ListPaingType=3 Then
  523.       If ListPaingStr3="" Then
  524.          FoundErr=True
  525.          ErrMsg=ErrMsg & "<br><br><li>索引分页不能为空!</li>"
  526.       End If
  527.    Else
  528.       FoundErr=True
  529.       ErrMsg=ErrMsg & "<br><br><li>请选择返回上一步设置索引分页类型</li>"
  530.    End If
  531.  
  532.    If LoginType=1 Then
  533.       If LoginUrl="" or LoginPostUrl="" or LoginUser="" Or LoginPass="" Or LoginFalse="" Then
  534.          FoundErr=True
  535.          ErrMsg=ErrMsg & "<br><br><li>请将登录信息填写完整</li>"
  536.       End If
  537.    End If
  538.  
  539.    If FoundErr<>True Then
  540.       Select Case ListPaingType
  541.       Case 0,1
  542.             ListUrl=ListStr
  543.       Case 2
  544.          ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
  545.       Case 3
  546.          If Instr(ListPaingStr3,"|")> 0 Then
  547.             ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
  548.          Else
  549.             ListUrl=ListPaingStr3
  550.          End If
  551.       End Select
  552.    End If
  553.  
  554.       If  FoundErr<>True  And Action<>"SaveEdit" And  LoginType=1  Then
  555.       LoginData=UrlEncoding(LoginUser & "&" & LoginPass)
  556.       LoginResult=PostHttpPage(LoginUrl,LoginPostUrl,LoginData)
  557.       If Instr(LoginResult,LoginFalse)>0 Then
  558.          FoundErr=True
  559.          ErrMsg=ErrMsg & "<br><br><li>登录网站时发生错误,请确认登录信息的正确性!</li>"
  560.       End If
  561.       End  If
  562.      
  563.    If FoundErr<>True Then
  564.       ListCode=GetHttpPage(ListUrl)
  565.       If ListCode<>"$False$" Then
  566.          ListCode=GetBody(ListCode,LsString,LoString,False,False)
  567.          If ListCode="$False$" Then
  568.             FoundErr=True
  569.             ErrMsg=ErrMsg & "<br><br><li>在截取列表时发生错误。</li>"
  570.          End If
  571.       Else
  572.          FoundErr=True
  573.          ErrMsg=ErrMsg & "<br><br><li>在获取:" & ListUrl & "网页源码时发生错误。</li>"
  574.       End If
  575.    End If
  576.  
  577.    If FoundErr<>True Then
  578.       newsArrayCode=GetArray(ListCode,HsString,HoString,False,False)
  579.       If newsArrayCode="$False$" Then
  580.          FoundErr=True
  581.          ErrMsg=ErrMsg & "<br><br><li>在分析:" & ListUrl & "信息列表时发生错误!</li>"
  582.       Else
  583.          newsArray=Split(newsArrayCode,"$Array$")
  584.          If IsArray(newsArray)=True Then
  585.             For Testi=0 To Ubound(newsArray)
  586.                If HttpUrlType=1 Then
  587.                   newsArray(Testi)=Replace(HttpUrlStr,"{$ID}",newsArray(Testi))
  588.                Else
  589.                   newsArray(Testi)=DefiniteUrl(newsArray(Testi),ListUrl)
  590.                End If
  591.             Next
  592.             UrlTest=newsArray(0)
  593.             newsCode=GetHttpPage(UrlTest)
  594.                         newsCode=Replace(newsCode,"<textarea","")
  595.                         newsCode=Replace(newsCode,"</textarea>","")
  596.          Else
  597.             FoundErr=True
  598.             ErrMsg=ErrMsg & "<br><br><li>在分析:" & ListUrl & "信息列表时发生错误!</li>"
  599.          End If            
  600.       End If
  601.    End If
  602. End Sub
  603. %>
  604.  
  605.  
downloadAdmin_ItemModify4.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top