⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tl_cai_index2.asp

📁 音乐管理系统的采集数据程序可自行添加采集点,适合一些大型音乐网站数据的采集
💻 ASP
字号:
<!--#include file="Conn.Asp" -->
<!--#include file="function.asp" -->
<%

if request("add")="on" Then
''''''''''''''''''''''''''''''检查与添加第一步数据'''''''''''''''''''''''''''''''''''''''''
if Trim(request("TlName"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('项目名称不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
		 end if
     if Trim(request("TlWebName"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('网站名称不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
     if Trim(request("TlWebUrl"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('网站网址不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
     if Trim(request("TlclassUrl"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('起始专辑页不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
     if Trim(request("TlstarID"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('起始ID不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
     if Trim(request("TloverID"))="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('结束ID不能为空');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
     if Trim(request("TlstarID")) >= Trim(request("TloverID")) then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('起始ID不能大于结束ID');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
          call TLconnstr1
       set rs=server.createobject("adodb.recordset")
       sql="select * from list"   
       rs.Open sql,conn,1,3
          rs.addnew
          rs("TlName")=request("TlName")
          rs("TlWebName")=request("TlWebName")
          rs("TlWebUrl")=request("TlWebUrl")
		  rs("TlclassUrl")=request("TlclassUrl")
		  rs("TlstarID")=request("TlstarID")
		  rs("TloverID")=request("TloverID")
		  rs("SaveMode")=request("SaveMode")
          rs.update
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

if request("edit") = "on" then
	   if request("TlID") = "" then 
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('参数错误');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
         end if
          call TLconnstr1
	 if request("list") <> "on" then
       set rs=server.createobject("adodb.recordset")
       sql="select * from list where TlID =" & request("TlID")   
       rs.Open sql,conn,1,3
          rs("TlName")=request("TlName")
          rs("TlWebName")=request("TlWebName")
          rs("TlWebUrl")=request("TlWebUrl")
		  rs("TlclassUrl")=request("TlclassUrl")
		  rs("TlstarID")=request("TlstarID")
		  rs("TloverID")=request("TloverID")
		  rs("SaveMode")=request("SaveMode")
          rs.update
		  rs.close
	end if	  
       call TLconnstr
       set rs=server.createobject("adodb.recordset")        
       sql="select * from SClass"
       rs.Open sql,conn,1,1
       count = rs.recordcount
       call TLconnstr1       
         for i = 1 to count
          set rs1=server.createobject("adodb.recordset") 
          sql1="select * from Class where SClass = '"&rs("SClass")&"' and TlID ='"&request("TlID")&"'"
          rs1.Open sql1,conn,1,3
          if rs1.eof and rs1.bof then
          rs1.Addnew
          rs1("SClass") = rs("SClass")
          rs1("TSClass") = 0
          rs1("TlID") = request("TlID")
          rs1.update
          rs1.close
          end if
          rs.movenext 
          next
          rs.close 
end if 

%>
<html>
<head>
<title>音乐通用采集--采集第二步</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href='css/style.css' rel='stylesheet' type='text/css'>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<!--#include file="Tl_TB.asp" -->
  <form name="form1" method="post" action="TL_cai_index3.asp?<%if request("edit") = "on" then%>edit=on&Tlid=<%=request("TlID")%><%else%>add=on&Tlid=<%=rs("TlID")%><%rs.close%><%end if%>">
  <div align="center"></div>
                <%if request("edit") = "on" then%>
                <%
       call TLconnstr1
       set rs=server.createobject("adodb.recordset")        
       sql="select * from list where TlID =" & request("TlID") 
       rs.Open sql,conn,1,1
	   end if
	   %>
  <table width="570" border="1" cellpadding="0" cellspacing="0" bordercolor="#006699" align="center">
    <tr> 
      <td valign="top" height="112" width="566"> 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" height="512">
          <tr> 
            <td width="737" height="509" valign="top"> 
              <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#00FFFF">
                <tr class="tdbg" bgcolor="#006699"> 
                  <td colspan="2" align="center" class="tdbg" height="16"><font color="#FFFFFF">项 
                    目 编 辑 -替 换 与 过 滤</font> </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="32%" class="tdbg" ><strong>(1)截取过滤字符开始标记:</strong></td>
                  <td class="tdbg" width="68%"> 
                    <textarea name="Replace1S" cols="49" rows="7"  style="border: 1 solid #006699"><%call TlLY(rs("Replace1S"))%></textarea>
                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="32%" class="tdbg" ><strong>(1)截取过滤字符结束标记:</strong></td>
                  <td class="tdbg" width="68%"> 
                    <textarea name="Replace1O" cols="49" rows="7" style="border: 1 solid #006699" ><%call TlLY(rs("Replace1O"))%></textarea>
					<br>说明:在采集过程中,通常会有一些不固定的字符串需要过滤!
                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="32%" class="tdbg" ><strong>(2)过滤固定字符串:</strong></td>
                  <td class="tdbg" width="68%"> 
                    <textarea name="Replace2" cols="49" rows="7"  style="border: 1 solid #006699"><%call TlLY(rs("Replace2"))%></textarea>
                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="32%" class="tdbg" ><strong>(3)过滤固定字符串:</strong></td>
                  <td class="tdbg" width="68%"> 
                    <textarea name="Replace3" cols="49" rows="7"  style="border: 1 solid #006699"><%call TlLY(rs("Replace3"))%></textarea>
                  </td>
                </tr>
                <tr class="tdbg"> 
                  <td width="32%" class="tdbg" height="22" ><b>一级分类替换设置:</b></td>
                  <td class="tdbg" width="68%" height="22">
                    <input type="radio" value="0" name="ClassT" <%If rs("ClassT")=0 Then Response.Write "checked"%> onClick="sasdasd.style.display='none'">
                    自动处理&nbsp; 
                    <input type="radio" value="1" name="ClassT" <%If rs("ClassT")=1 Then Response.Write "checked"%> onClick="sasdasd.style.display=''">
                    手动处理 <font color="#FF0000">不做处理将会添加目标站的一级分类</font></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <div align="center">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#00FFFF" id="sasdasd" style="display:'<%If rs("ClassT")="0" Then Response.Write "none"%>'">
                <tr class="tdbg" > 
							  <%rs.close%>
                  <td width="50%" class="tdbg" height="21" bgcolor="#006699"> 
                    
                <div align="center"><font color="#FFFFFF">本站一级分类</font> </div>
                  </td>
                  <td class="tdbg" width="50%" height="21" bgcolor="#006699"> 
                    <p align="center"><font color="#FFFFFF">目标站一级分类</font> </p>
                  </td>
                </tr>
                <%if request("add") = "on" then%>
                <%
       call TLconnstr
       set rs=server.createobject("adodb.recordset")        
       sql="select * from SClass"
       rs.Open sql,conn,1,3
       'response.write rs.recordcount
	   for i = 1 to rs.recordcount
%>
                <tr class="tdbg" > 
                  <td width="50%" class="tdbg" height="13"> 
                    <div align="center"> 
                      <input type="text" name="SClass<%=i%>" value="<%=rs("SClass")%>"  style="border: 1 solid #006699">
                    </div>
                  </td>
                  <td class="tdbg" width="50%" height="13"> 
                    <p align="center"> 
                      <input type="text" name="TSClass<%=i%>" value="0"  style="border: 1 solid #006699">
                    </p>
                  </td>
                </tr>
                <%
rs.movenext 
next
rs.close 
%>
                <%end if%>
                <%if request("edit") = "on" then%>
                <%
       call TLconnstr1
       set rs=server.createobject("adodb.recordset")        
       sql="select * from class where TlID = '"&request("TlID")&"'"
       rs.Open sql,conn,1,3
       'response.write rs.recordcount
	   for i = 1 to rs.recordcount
%>
                <tr class="tdbg" > 
                  <td width="50%" class="tdbg" height="13"> 
                    <div align="center"> 
                      <input type="text" name="SClass<%=i%>" value="<%=rs("SClass")%>"  style="border: 1 solid #006699">
                    </div>
                  </td>
                  <td class="tdbg" width="50%" height="13"> 
                    <p align="center"> 
                      <input type="text" name="TSClass<%=i%>" value="<%=rs("TSClass")%>"  style="border: 1 solid #006699">
                    </p>
                  </td>
                </tr>
                <%
rs.movenext 
next
rs.close 
%>
                <%end if%>
                <tr class="tdbg"> 
                  
              <td colspan="2" align="center" class="tdbg" height="52"> 
                <div align="left">说明:有些站点的一级分类和本站的一级分类不同,这样在采集过程中会将目标站的一级分类添加到本站的一级分类中,所以在这里我们要将目标站的一级替换成本站的一级分类 
                  如果不做任何修改的话,直接点下一步,请勿将框里的“0”去掉!</div>
              </td>
                </tr>
              </table>  
          <input  type="button" name="button12" value="上&nbsp;一&nbsp;步" onClick="window.location.href='javascript:history.go(-1)'"  style="border: 1 solid #006699">
          &nbsp;&nbsp;&nbsp;&nbsp; 
          <input  type="submit" name="Submit2" value="下&nbsp;一&nbsp;步"  style="border: 1 solid #006699">
        </div>
        <p>&nbsp;</p>
      </td>
    </tr>
  </table>
              </form>

<!--#include file="Tl_down.asp" --></body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -