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

📄 sk_getphoto.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
📖 第 1 页 / 共 4 页
字号:

<%
option explicit
response.buffer=true
'=====================================================================
' 软件名称:SK采集管理系统
' 当前版本:2.0
' 更新日期:2006-9-7
' 官方网站:SK娱乐网(www.skxiu.com) QQ:85103270
'=====================================================================
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/cj_cls.asp"-->
<!--#include file="Session.asp"-->
<html>
<head>
<title>采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/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="tableBorder">
  <tr> 
    <td height="22" colspan="2" align="center" bgcolor="#F3F3F3" class="topbg"><strong>图 片 采 集 管 理</td>
  </tr>
</table>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr class="tdbg">
    <td height="30" colspan="2" bgcolor="f3f3f3"><b>说明:</b><br>&nbsp;&nbsp;①、第一次使用本功能,请修改<a href='?action=config'><font color=blue>采集基本设置</font></a>;<br>
    &nbsp;&nbsp;②、采集前请<font color=blue>编辑</font>采集项目,<font color=blue>测试</font>项目确定无误后再进行采集。	</td> 
  </tr> 
  <tr class="tdbg">
    <td width="79" height="30" bgcolor="f3f3f3"><strong>操作导航:</strong></td>
    <td width="837" bgcolor="f3f3f3"><a href=SK_getphoto.asp>管理首页</a> | <a href="sk_getphoto.asp?action=add&Colleclx=3">添加新项目</a> | <a href='?action=config&ChannelID=0'>采集基本设置</a></td>
  </tr>
</table>
<%
'--自定义变量
Dim Rs,Sql,FoundErr
Dim SqlItem,RsItem
Dim ItemID,ItemName,WebName,WebUrl,ChannelID,ChannelDir,ClassID,SpecialID,selEncoding,ItemDemo,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,Colleclx,ListStr,radio,LPsString,LPoString,ListPaingStr2 ,ListPaingID1,ListPaingID2,ListPaingStr3,Passed,SaveFiles,CollecOrder,ListPaingType,Flag,ListUrl,ItemCollecDate,LsString,LoString,HsString,HoString,imhstr,imostr,x_tp,Script_Iframe,Script_Object,Script_Script,Script_Div,Script_Class,Script_Table,Script_Tr,Script_Span,Script_Img,Script_Font,Script_A,Script_Html,Script_Td,Stars,ReadPoint,radioid,Hits,SaveFileUrl,HttpUrlStr,x_tpUrl,FilterType,CollecNewsNum
Dim Thumb_WaterMark,Thumbs_Create
Dim TsString,ToString,CsString,CoString,DateType,DsString,DoString,UpDateTime,AuthorType,AsString,AoString,AuthorStr,CopyFromType,FsString,FoString,CopyFromStr,KeyType,KsString,KoString,KeyStr,NewsPaingType,NPsString,NPoString,NewsPaingStr,NewsPaingHtml,Author,NewsUrlPaing_s,NewsUrlPaing_o
Dim PicUrls,ListTypeCode,ListTypeUrlCode,TypeUrlArray,TypeNewsUrl,NewsTypeCode
Dim CopyFrom,Key,SqlF,RSF,Arr_Filters,strInstallDir,strChannelDir
Dim photourls,photourlo,PhotoPaingType,PhotoType_s,PhotoType_o,PhotoLurl_s,PhotoLurl_o,Phototypefy_s,Phototypefy_o,Phototypefyurl_s,Phototypefyurl_o,Phototypeurl_s,Phototypeurl_o,Title,Content
dim UpDateType
dim temp_Fields
Dim tClass,tSpecial,CurrentPage,MaxPerPage,Allpage,ItemNum,iItem,NewsArrayCode,NewsArray,Testi,HttpUrlType,UrlTest,NewsCode,NewsUrl
dim Newsimage,Newsim
Dim Arr_Channel,i_Channel,i_Class,i_Special,tmpDepth,i,ArrShowLine(20)
Dim ClassName,SpecialName,Item_add,action,action1,ListCode
Dim copyitem(112),rs_num
'----是否登陆
'Call Admin()
'If IsAdmin=false then
'	ErrMsg="<li> 您没有登陆或不是管理员。请<a href='sk_login.asp' target='_top'>登陆</a>。"
'	response.Redirect("Sk_err.asp?action=AdminErr&ErrMsg="&ErrMsg&"")
'	response.End()
'end if
'-----
ItemID=Trim(Request("ItemID"))
action=Trim(Request("action"))
action1=Trim(Request("action1"))
if action="edit" or action1="edit" or action="s1" and action1<>"add" or action="s2" and action1<>"add" then
Response.Write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"" class=""tableBorder"">"
Response.Write "<tr class=""tdbg"">"
Response.Write "<td width=""65"" height=""30"" bgcolor=""#F3F3F3""><strong>管理导航:</strong></td>"
Response.Write "<td height=""30"" bgcolor=""#F3F3F3""> <font color=red><a href=?action=edit&ItemID="& ItemID &">基本设置</a></font> >> <a href=?action=s1&ItemID="& ItemID &">第一步</a> >> <a href=?action=s2&ItemID="& ItemID &">第二步</a> >> <a href=?action=demo&ItemID="& ItemID &">采样测试</a> </td>"
Response.Write "</tr></table>"
end if
	select case action
	case "config"
		Call config'图片采集基本设置	
	case "add"
		Call addnew1()'初步	
	case "edit"
		Call addnew1()'初步		
	case "s1"
	    Call setup1()
	case "s2"
		Call setup2()
	case "demo"
		Call demo()
	case "copy"	
       	Call copy()
	case "Del"	
		Call Del()
	case else
		Call show_Manage()	
	end select 
Call CloseConnItem()
sub show_Manage'项目管理
Const MaxPerPage=10
%>

<SCRIPT language=javascript>
<!--
function unselectall(thisform){
        if(thisform.chkAll.checked){
            thisform.chkAll.checked = thisform.chkAll.checked&0;
        }   
    }
    function CheckAll(thisform){
        for (var i=0;i<thisform.elements.length;i++){
            var e = thisform.elements[i];
            if (e.Name != "chkAll"&&e.disabled!=true)
                e.checked = thisform.chkAll.checked;
        }
    }

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr class='topbg'> 
    <th height="22" colspan="2" align="center" ><strong>采 集 系 统 项 目 管 理</strong></th>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr class="tdbg"> 
    <td width="12" height="10"></td>
    <td width="904" height="1">    
        <%
		'Response.Write "<select name=""menu1"" onChange=""MM_jumpMenu('document',this,0)"">"
'		  Dim Sqlc,Rs
'Set rs = ConnItem.Execute("select ChannelID,ChannelName from sk_Channel where ModuleType=1 order by ChannelID asc")
 'Response.Write "<option value=""?QChannelID=0"">请选择频道</option>" 
 ' Response.Write "<option value=""?QChannelID=0"">所有道频</option>"  
'Do while not Rs.Eof 
' Response.Write "<option value='?QChannelID="&rs("ChannelID")&"' >"&rs("ChannelName")&"</option>"
' rs.movenext
'loop
'rs.close
'set rs=nothing
'Response.Write("</select>")
%>
      </td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#cccccc" class="tableBorder">
  <form name="myform" method="POST" action="SK_getphoto.asp">
    <tr class="tdbg" style="padding: 0px 2px;">
      <td width="33" height="22" align="center" bgcolor="#f3f3f3">选择</td>
      <td width="188" align="center" bgcolor="#f3f3f3">项目名称</td>
      <td width="153" height="22" align="center" bgcolor="#f3f3f3">所属分类</td>
      <td width="133" align="center" bgcolor="#f3f3f3">所属专题</td>
      <td width="32" align="center" bgcolor="#f3f3f3">状态</td>
      <td width="180" height="22" align="center" bgcolor="#f3f3f3">上次采集</td>
      <td width="192" height="22" align="center" bgcolor="#f3f3f3">操作</td>
    </tr>
    <%            
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if                 
Set RsItem=server.createobject("adodb.recordset")  
if Request("QChannelID") <> 0 then
SqlItem="select * from Item where ChannelID="&Request("QChannelID")&" and Colleclx=3 order by ItemID DESC"
else       
SqlItem="select * from Item where Colleclx=3 order by ItemID DESC"  
end if       
RsItem.open SqlItem,ConnItem,1,1
if Not RsItem.Eof then
   RsItem.PageSize=MaxPerPage
   Allpage=RsItem.PageCount
   If Currentpage>Allpage Then Currentpage=1
   ItemNum=RsItem.RecordCount
   RsItem.MoveFirst
   RsItem.AbsolutePage=CurrentPage
   iItem=0
   Do While Not RsItem.Eof
      ItemID=RsItem("ItemID")
      ItemName=RsItem("ItemName")
      WebName=RsItem("WebName")
      ChannelID=RsItem("ChannelID")      
      ClassID=RsItem("ClassID")
      SpecialID=RsItem("SpecialID")
      ListStr=RsItem("ListStr")
      ListPaingType=RsItem("ListPaingType")
      ListPaingStr2=RsItem("ListPaingStr2")
      ListPaingID1=RsItem("ListPaingID1")
      ListPaingID2=RsItem("ListPaingID2")
      ListPaingStr3=RsItem("ListPaingStr3")
	  
      Flag=RsItem("Flag")
      If  ListPaingType=0   Then
            ListUrl=ListStr
      ElseIf  ListPaingType=1  Then
            ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
      ElseIf  ListPaingType=2  Then
            If  Instr(ListPaingStr3,"|")>0  Then
            ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
         Else
               ListUrl=ListPaingStr3
         End  If
      End  If

%>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'" style="padding: 0px 2px; " >
      <td width="33" height="22" align="center" style=" border-bottom:#cccccc 1xp solid">
      <input type="checkbox" value="<%=ItemID%>" name="ItemID" onClick="unselectall(this.form)"></td>
      <td width="188" align="center" style=" border-bottom:#cccccc 1xp solid"><a href="<%=ListUrl%>" target="_bank"><%=ItemName%></a></td>
      <td width="153" align="center" style=" border-bottom:#cccccc 1xp solid" title="所属频道-<%Call Admin_ShowChannel_Name(ChannelID)%>"><%Call Admin_ShowClass_Name(ChannelID,ClassID)%></td>
      <td width="133" align="center" style=" border-bottom:#cccccc 1xp solid"><%Call Admin_ShowSpecial_Name(ChannelID,SpecialID)%></td>
      <td width="32" align="center" style=" border-bottom:#cccccc 1xp solid"> <b>
        <%If Flag=True then
                    Response.write "√"
          Else
                 Response.write "<font color=red>×</font>"
          End If
        %>
      </b> </td>
      <td width="180" align="center" style=" border-bottom:#cccccc 1xp solid;">
      <%
       Set Rs=connItem.execute("select Top 1 CollecDate From Histroly Where ItemID=" & ItemID & " Order by HistrolyID desc")
       If Not Rs.Eof Then
          ItemCollecDate=rs("CollecDate")
       Else
          ItemCollecDate=""
       End if
       Set Rs=Nothing
       if ItemCollecDate<>"" then
          Response.Write "<font color=""#FF0000"">"& ItemCollecDate &"</font>"
       Else
          Response.Write "尚无记录"
       End If
       %>      </td>
      <td width="192" align="center" style=" border-bottom:#cccccc 1xp solid"><a href=SK_getphoto.asp?Action=copy&ItemID=<%=ItemID%>>复制</a> <a href=sk_getphoto.asp?Action=edit&ItemID=<%=ItemID%>>编辑</a> <a href=Sk_Collection.asp?ItemID=<%=ItemID%>&ItemNum=1&ListNum=1&NewsSuccesNum=0&NewsFalseNum=0&ImagesNumAll=0&NewsNum_i=0>采集</a> <a href=sk_getphoto.asp?action=demo&ItemID=<%=ItemID%>>测试</a> <a href=SK_getphoto.asp?Action=Del&ItemID=<%=ItemID%> onClick='return confirm("确定要删除此项目吗?请您慎重选择!这将删除该项目的项目信息,历史记录及过滤信息 3 个项目类型数据。");'>删除</a> </td>
    </tr>
    <%
      iItem=iItem+1
      If iItem>=MaxPerPage Then  Exit  Do
      RsItem.MoveNext
   Loop
%>
    <tr class="tdbg">
      <td colspan=7 height="30" >
        <input name="Action" type="hidden"  value="Del">
&nbsp;
        <input name="chkAll" type="checkbox" id="chkAll" onClick=CheckAll(this.form) value="checkbox" >
        全选 </td>
    </tr>
    <tr class="tdbg">
      <td colspan=7 height="30" align=center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input name="Del" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" onClick='return confirm("确定要删除选中的项目吗?请您慎重选择!这将删除该项目的项目信息,历史记录及过滤信息 3 个项目类型数据。");' value=" 删&nbsp;&nbsp;除 ">
  &nbsp;&nbsp;
          <input name="Del" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" onClick='return confirm("您真的要确定要清空所有项目吗?这将彻底格式化采集数据库的所有信息,请您先备份再选择!!!");' value="清空所有记录">
  &nbsp;&nbsp; </td>
    </tr>
    <%Else%>
    <tr class="tdbg">
      <td colspan='7' class="tdbg" align="center"><br>
        系统中暂无采集项目!</td>
    </tr>
    <%End If
RsItem.Close
Set  RsItem=Nothing
%>
  </form>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <td height="22" colspan="2" class="tdbg">
<%
Response.Write ShowPage("SK_getphoto.asp",ItemNum,MaxPerPage,True,True," 个项目")
%>

      </td>
    </tr>
</table>

<%
end sub'项目管理完
Sub config()'采集基本设置
if Trim(Request("config"))="save" then
		SqlItem="select top 1 WebName,WebUrl,WebLogo,Webabout,ArticleDir,flashdir,photoDir,MaxPicSize from SK_Config"
     	Set Rs=server.CreateObject("adodb.recordset")
     	Rs.Open SqlItem,ConnItem,3,3
		rs("ArticleDir")=Trim(Request.Form("ArticleDir"))
		rs("flashdir")=Trim(Request.Form("flashdir"))
		rs("photoDir")=Trim(Request.Form("photoDir"))
		rs("MaxPicSize")=Sk.ChkNumeric(Trim(Request.Form("MaxPicSize")))
		Rs.UpDate
      	Rs.Close	
	  	set rs=nothing
		response.write "<script>alert('修改成功!');</script>"'关闭窗口 
		config_main() 
Else
	config_main()
End if	
End sub
sub config_main()
set rs = ConnItem.execute("select top 1 WebName,WebUrl,WebLogo,Webabout,ArticleDir,flashdir,photoDir,MaxPicSize from SK_Config")
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr class='topbg'> 
    <th height="22" colspan="2" align="center" ><strong>采 集 集 基 本 设 置</strong></th>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<form action="?action=config&config=save" method="post">
  <tr class="tdbg">
    <td width="20%" height="20" align="right"><STRONG>允许下载的图片大小:</STRONG></td>
    <td><input name="MaxPicSize" type="text" class="lostfocus" value="<%= rs("MaxPicSize") %>" size="27" maxlength="9">
    <STRONG>KB </STRONG> <font class="alert">* 不限制请输入“0”</font></td>
  </tr>
  

⌨️ 快捷键说明

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