BVB Source Codes

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

Return Download Jie Yang v0.6.3 article system: download Admin_ItemAddNew2.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="../admin_check.asp"-->
  4. <link rel="stylesheet" type="text/css" href="../style/Style.css">
  5. <%
  6. Dim SqlItem,RsItem
  7. Dim ItemID,ItemName,WebName,ListStr,infoChannelID,infoClassID,strChannelDir,ClassID,SpecialID,ItemDemo,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse
  8. Dim tClass,tSpecial
  9.  
  10. ItemName=Trim(Request.Form("ItemName"))
  11. WebName=Trim(Request.Form("WebName"))
  12. ListStr=Trim(Request.Form("ListStr"))
  13. infoChannelID=Request.Form("infoChannelID")
  14. infoClassID=Request.Form("infoClassID")
  15. LoginType=Request.Form("LoginType")
  16. LoginUrl=Trim(Request.Form("LoginUrl"))
  17. LoginPostUrl=Trim(Request.Form("LoginPostUrl"))
  18. LoginUser=Trim(Request.Form("LoginUser"))
  19. LoginPass=Trim(Request.Form("LoginPass"))
  20. LoginFalse=Trim(Request.Form("LoginFalse"))
  21. ItemDemo=Trim(Request.Form("ItemDemo"))
  22.  
  23. If ItemName="" Then
  24.    FoundErr=True
  25.    ErrMsg=ErrMsg & "<br><br><li>项目名称不能为空</li>"
  26. End If
  27. If WebName="" Then
  28.    FoundErr=True
  29.    ErrMsg=ErrMsg & "<br><br><li>网站名称不能为空</li>"
  30. End If
  31. If ListStr="" Then
  32.    FoundErr=True
  33.    ErrMsg=ErrMsg & "<br><br><li>列表网址不能为空</li>"
  34. else
  35. ListCode=GetHttpPage(ListStr)
  36. If ListCode="$False$" Then
  37.         FoundErr=True
  38.         ErrMsg=ErrMsg & "<br><br><li>在截取:" & ListStr & "信息列表时发生错误</li>"
  39.         End If
  40. End If
  41.  
  42. If infoClassID=""  Then
  43.    FoundErr=True
  44.    ErrMsg=ErrMsg & "<br><br><li>未指定栏目</li>"
  45. End if
  46.  
  47. If LoginType="" Then
  48.    FoundErr=True
  49.    ErrMsg=ErrMsg & "<br><br><li>请选择登录类型</li>"
  50. Else
  51.    LoginType=Clng(LoginType)
  52.    If LoginType=1 Then
  53.          If LoginUrl="" or LoginPostUrl="" or LoginUser="" or  LoginPass="" or  LoginFalse="" then
  54.          FoundErr=True
  55.          ErrMsg=ErrMsg& "<br><br><li>请将登录参数填写完整</li>"
  56.       End If
  57.    End If
  58. End If
  59.  
  60. If FoundErr<>True Then
  61.    SqlItem="Select * from Item"
  62.    Set RsItem=server.CreateObject("adodb.recordset")
  63.    RsItem.Open SqlItem,ConnItem,1,3
  64.    RsItem.AddNew
  65.    RsItem("ItemName")=ItemName
  66.    RsItem("WebName")=WebName
  67.    RsItem("ListStr")=ListStr
  68.    RsItem("ChannelID")=infoChannelID
  69.    RsItem("ClassID")=infoClassID
  70.    If ItemDemo<>"" then
  71.       RsItem("ItemDemo")=ItemDemo
  72.    End if
  73.    RsItem("LoginType")=LoginType
  74.    If LoginType=1 Then
  75.       RsItem("LoginUrl")=LoginUrl
  76.       RsItem("LoginPostUrl")=LoginPostUrl
  77.       RsItem("LoginUser")=LoginUser
  78.       RsItem("LoginPass")=LoginPass
  79.       RsItem("LoginFalse")=LoginFalse
  80.    End If
  81.    ItemID=RsItem("ItemID")
  82.    RsItem.UpDate
  83.    RsItem.Close
  84.    Set RsItem=Nothing
  85. End If
  86.  
  87. If FoundErr=True Then
  88.    Call WriteErrMsg(ErrMsg)
  89. Else
  90.    Call Main
  91. End If
  92. %>
  93. <%Sub Main%>
  94. <html>
  95. <head>
  96. <title>信息采集系统</title>
  97. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  98. <script language="VBScript">
  99. Private Sub ceshi(Num)
  100. Dim content
  101. Content=document.form1.Content.value
  102. Select Case Num  
  103.         Case 1
  104.         huoqv=document.form1.LsString.value
  105.         Case 2
  106.         huoqv=document.form1.LoString.value
  107.         Case 3
  108.         huoqv=document.form1.LPsString.value
  109.         Case 4
  110.         huoqv=document.form1.LPoString.value
  111.         Case 5
  112.         huoqv=document.form1.TsString.value
  113.         Case 6
  114.         huoqv=document.form1.ToString.value
  115.         Case 7
  116.         huoqv=document.form1.CsString.value
  117.         Case 8
  118.         huoqv=document.form1.CoString.value
  119.         Case 9
  120.         huoqv=document.form1.AsString.value
  121.         Case 10
  122.         huoqv=document.form1.AoString.value
  123.         Case 11
  124.         huoqv=document.form1.FsString.value
  125.         Case 12
  126.         huoqv=document.form1.FoString.value
  127.         Case 13
  128.         huoqv=document.form1.KsString.value
  129.         Case 14
  130.         huoqv=document.form1.KoString.value
  131.         Case 15
  132.         huoqv=document.form1.NPsString.value
  133.         Case 16
  134.         huoqv=document.form1.NPsString.value
  135.         Case 17
  136.         huoqv=document.form1.DsString.value
  137.         Case 18
  138.         huoqv=document.form1.DoString.value
  139.         Case Else
  140.         Exit sub
  141. End Select
  142. if huoqv="" then
  143.         alert("测试无效!代码为空!")
  144.         exit Sub
  145. End if
  146. If InStr(Content,huoqv) = 0 Then
  147.         alert("测试无效!网页没有这些代码。")
  148. Else
  149.         If InStr(Mid(Content,InStr(Content,huoqv)+LenB(huoqv),LenB(Content)),huoqv) = 0 Then
  150.                 alert("测试成功!代码在页面是唯一的。")
  151.         Else
  152.                 alert("测试失败!代码有重复,开始或结束至少有一处代码是唯一才有效!")
  153.         End if
  154. End if
  155. End Sub
  156.  
  157. Private Sub Analyse()
  158. Dim AnalyseString,AnalyseString2
  159. Dim content,Analysetemp
  160. Content=document.form1.Content.value
  161. AnalyseString=document.form1.AnalyseString.value
  162. if AnalyseString="" then
  163.         alert("分析无效!分析代码为空!")
  164.         Exit Sub
  165. End if
  166. if isNumeric(document.form1.AnalyseNum.value)=false then
  167.         alert("分析字符数不是有效数字!")
  168.         Exit Sub
  169. End if
  170. AnalyseString2=LenB(AnalyseString)
  171. If InStr(Content,AnalyseString) = 0 Then
  172.         alert("分析无效!网页没有这些代码。")
  173. Else
  174.         if InStr(Content,AnalyseString)-document.form1.AnalyseNum.value <= 0 then
  175.                 Analysetemp = 1
  176.         Else
  177.                 Analysetemp =InStr(Content,AnalyseString)-document.form1.AnalyseNum.value
  178.         End if
  179.         If InStr(Mid(Content,InStr(Content,AnalyseString)+AnalyseString2, LenB(Content)),AnalyseString) = 0 Then
  180.                 if document.form1.AnalyseWay(0).checked=true Then
  181.                         document.form1.AnalyseContent.value=Mid(Content,Analysetemp,Len(AnalyseString)+document.form1.AnalyseNum.value)
  182.                 elseif document.form1.AnalyseWay(1).checked=true then
  183.                         document.form1.AnalyseContent.value=Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
  184.                 elseif document.form1.AnalyseWay(2).checked=true then
  185.                         document.form1.AnalyseContent.value=Mid(Content,Analysetemp,document.form1.AnalyseNum.value)+Mid(Content,InStr(Content,AnalyseString),Len(AnalyseString)+document.form1.AnalyseNum.value)
  186.                 End if
  187.         Else
  188.                 alert("分析失败!分析代码有重复,要确认为一的字符。")
  189.                 Exit Sub
  190.         End if
  191. End if
  192. End Sub
  193. </script>
  194. <script language="JavaScript">
  195. <!--
  196. function CheckForm()
  197. {
  198.         if (document.form1.Content.value.length > 200000)
  199.         {
  200.                 document.form1.Content.value="";
  201.         }
  202. }
  203. function setFileFileds(weburl)
  204. {  
  205.         str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='99%' height='300' src="+weburl+"></iframe>";
  206.         objFiles.innerHTML=str;
  207. }
  208. //-->
  209. </script>
  210. <style type="text/css">
  211. <!--
  212. .STYLE2 {color: #0099FF}
  213. -->
  214. </style>
  215. </head>
  216. <body>
  217. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  218.   <tr>
  219.     <td colspan="2" class="td28">采集系统项目管理</td>
  220.   </tr>
  221.   <tr class="td26" bgcolor="#FFFFFF">
  222.     <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>
  223.   </tr>
  224.   <tr bgcolor="#FFFFFF">
  225.     <td style="padding-left:10px;"><a href="Admin_ItemAddNew.asp">添加项目</a> >> <a href="Admin_ItemModify.asp">基本设置</a> >> <font color=red>列表设置</font> >> 链接设置 >> 正文设置 >> 采样测试 >> 属性设置 >> 完成</td>        
  226.   </tr>
  227. </table>      
  228. <table width="98%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  229. <form method="post" action="Admin_ItemAddNew3.asp" name="form1">
  230.     <tr>
  231.       <td colspan="2" class="td28">项目编辑--采集目标网页<Input name="page" type="radio" class="checkbox" onClick="javascript:ShowPage.style.display='none';" value="0" checked>不查看 <Input name="page" type="radio" class="checkbox" onClick="javascript:ShowPage.style.display='';javascript:setFileFileds('<%=ListStr%>');" value="1" >查看网页</td>
  232.   </tr>
  233.   <tr bgcolor="#FFFFFF" id="ShowPage" style="display:'none'">
  234.     <td colspan='2' align='center' id='objFiles'></td>
  235.   </tr>
  236.   <tr>
  237.     <td colspan="2" class="td28">项目编辑--采集目标源码<Input name="code" type="radio" class="checkbox" onClick="javascript:document.getElementById('codes').style.display='none';" value="0" >不查看 <Input name="code" type="radio" class="checkbox" onClick="javascript:document.getElementById('codes').style.display='block';" value="1" checked>查看源码</td>
  238.   </tr>
  239.   <tr id="codes" bgcolor="#FFFFFF">
  240.     <td colspan='2' align='center'><textarea name="Content" rows="" cols="" style="width:99%;height:300px;word-break:break-all;"><%=ListCode%></textarea></td>
  241.     </tr>
  242.     <tr bgcolor="#FFFFFF">
  243.       <td width="20%" align="right">列表开始标记:</td>
  244.       <td width="75%"><textarea name="LsString" cols="49" rows="7"></textarea> <input TYPE='button' class="submit1" onCLICK='ceshi(1)' value='测试代码' ></td>
  245.     </tr>
  246.     <tr bgcolor="#FFFFFF">
  247.       <td width="20%" align="right">列表结束标记:</td>
  248.       <td width="75%"><textarea name="LoString" cols="49" rows="7"></textarea> <input TYPE='button' class="submit1" onCLICK='ceshi(2)' value='测试代码' ></td>
  249.     </tr>
  250.     <tr bgcolor="#FFFFFF">
  251.       <td align="right">列表索引分页:&nbsp;</td>
  252.    <td >
  253.     <input name="ListPaingType" type="radio" class="checkbox"    onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='none';ListPaing3.style.display='none'" value="0"checked>
  254.     不作设置&nbsp;
  255.     <input name="ListPaingType" type="radio" class="checkbox"    onClick="javascript:ListPaing1.style.display='';ListPaing12.style.display='';ListPaing2.style.display='none';ListPaing3.style.display='none'" value="1">
  256.     设置标签&nbsp;
  257.     <input name="ListPaingType" type="radio" class="checkbox"    onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='';ListPaing3.style.display='none'" value="2">
  258.     批量生成&nbsp;
  259.     <input name="ListPaingType" type="radio" class="checkbox"    onClick="javascript:ListPaing1.style.display='none';ListPaing12.style.display='none';ListPaing2.style.display='none';ListPaing3.style.display=''" value="3">
  260.     手动添加   </td>
  261.   </tr bgcolor="#FFFFFF">
  262.   <tr id="ListPaing1" style="display:'none'">
  263.    <td align="right" bgcolor="#FFFFFF">下页开始标记:<br>
  264.        <br>
  265.        <br>
  266.        <br>
  267.        <br>
  268.        <br>
  269.        下页结束标记:</font>   </td>
  270.    <td bgcolor="#FFFFFF" >
  271.     <textarea name="LPsString" style='width:450px;height:100px'></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(3)' value='测试代码' >
  272.     <br>
  273.     <textarea name="LPoString" style='width:450px;height:100px'></textarea>&nbsp;<input TYPE='button' class="submit1" onCLICK='ceshi(4)' value='测试代码' >   </td>
  274.   </tr>
  275.   <tr id="ListPaing12" style="display:'none'">
  276.    <td align="right" bgcolor="#FFFFFF">索引分页重定向:&nbsp;</td>
  277.    <td bgcolor="#FFFFFF" >
  278.     <input name="ListPaingStr1" type="text" size="60" maxlength="200" value=>
  279.     <br><font color=#0099FF>一般不会用到,如果采集分页很纵深,并且下一页代码是相对路径。
  280.     <br>在下一步链接设置分析到的下一页列表的URL和实际不符,应用此功能。
  281.     <br>在列表设置捕获相对路径,如果是动态页捕获ID。
  282.     <br>例:在索引分页中填写实际路径 http://www.xxxxx.com/xxx/xx/xxx/news/{$ID}  {$ID}就是列表捕获的相对路径或动态ID。</font>
  283.     <br>
  284.     <span class="STYLE2">系统能智能分析网站的相对路径,如果特殊情况分析不对,请按上述步骤使用此功能。   </span></td>
  285.   </tr>
  286.   <tr id="ListPaing2" style="display:'none'">
  287.    <td align="right" bgcolor="#FFFFFF">批量生成:&nbsp;</td>
  288.    <td bgcolor="#FFFFFF" >原字符串:<br>
  289.     <input name="ListPaingStr2" type="text" size="60" maxlength="200" value=><br>
  290.      <font color=#0099FF>例:http://www.xxxxx.com/news/index_{$ID}.html {$ID}代表分页数</font><br>
  291.      生成范围:<br>
  292.     <input name="ListPaingID1" type="text" size="8" maxlength="200" value=><span lang="en-us"> To </span><input name="ListPaingID2" type="text" size="8" maxlength="200" value=>
  293.     <font color=#0099FF>例: 1 ~ 9 或 9 ~ 1 升序或倒序采集</font><br>   </td>
  294.   </tr>
  295.   <tr id="ListPaing3" style="display:'none'">
  296.    <td align="right" bgcolor="#FFFFFF">手动添加:&nbsp;</td>
  297.    <td bgcolor="#FFFFFF" >
  298.      <textarea name="ListPaingStr3" style='width:450px;height:100px'></textarea>
  299. <br><font color=#0099FF>注:一行写一个网页地址</font>   </td>
  300.     </tr>
  301.     <tr>
  302.       <td colspan="2" align="center" bgcolor="#FFFFFF">
  303.         <input name="button1"  type="button" class="submit1" onClick="window.location.href='javascript:history.go(-1)'" value="上&nbsp;一&nbsp;步">
  304.         <input name="ItemID" type="hidden" value="<%=ItemID%>">
  305.       <input name="Submit"  type="submit" class="submit1" value="下&nbsp;一&nbsp;步"></td>
  306.     </tr>
  307. </form>
  308. </table>
  309. <br>
  310. </body>        
  311. </html>
  312. <%End Sub%>
downloadAdmin_ItemAddNew2.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