








<%
option explicit
response.buffer=true
'=====================================================================
' 软件名称：w163采集管理系统
' 当前版本：1.0
' 更新日期：2006-11-6
' 官方网站：w163建站(www.w163.cn)

' 'QQ：85651782


'=====================================================================
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/cj_cls.asp"-->
<html>
<head>
<title>w163采集系统</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=w163_GetSoft.asp>管理首页</a> | <a href="?action=add&Colleclx=5">添加新项目</a> | <a href='?action=config&ChannelID=0'>采集基本设置  </a>| <a href="w163_class.asp?Colleclx=5">分类设置</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,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 DownSize,DownYY,DownSQ,DownPT,YSDZ,ZCDZ,PhotoUrl,DownUrls
'下载变量项目字段
dim Downlist_s,Downlist_o,DownUrl_s,DownUrl_o,DownNewType,DownNewlist_s,DownNewlist_o,DownNewUrl_s,DownNewUrl_o,LinkUrlYn
dim ZdType_001,Zds_001,Zdo_001,ZD_001,ZdType_002,Zds_002,Zdo_002,ZD_002,ZdType_003,Zds_003,Zdo_003,ZD_003,ZdType_004,Zds_004,Zdo_004,ZD_004,ZdType_005,Zds_005,Zdo_005,ZD_005,ZdType_006,Zds_006,Zdo_006,ZD_006,ZdType_007,Zds_007,Zdo_007,ZD_007,ZdType_008,Zds_008,Zdo_008,ZD_008 

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,NewsPaingNext,NewsPaingNext_Code,TypeArray_Url
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(148),rs_num
'----是否登陆
Call Admin()
If IsAdmin=false then
	ErrMsg="<li> 您没有登陆或不是管理员。请<a href='w163_login.asp' target='_top'>登陆</a>。"
	response.Redirect("w163_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 CloseConn()
Call CloseConnItem()
sub show_Manage'项目管理
Const MaxPerPage=10
%>
</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" class="title"> <div align="center"><strong>项  目  管  理</strong></div></td>
    </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#cccccc" class="tableBorder">
  <form name="myform" method="POST" action="w163_GetSoft.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") 
SqlItem="select * from Item where Colleclx=5 order by ItemID DESC"      
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,0)%></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=w163_GetSoft.asp?Action=copy&ItemID=<%=ItemID%>>复制</a> <a href=w163_GetSoft.asp?Action=edit&ItemID=<%=ItemID%>>编辑</a> <a href=w163_Collection.asp?ItemID=<%=ItemID%>&ItemNum=1&ListNum=1&NewsSuccesNum=0&NewsFalseNum=0&ImagesNumAll=0&NewsNum_i=0>采集</a> <a href=w163_GetSoft.asp?action=demo&ItemID=<%=ItemID%>>测试</a> <a href=w163_GetSoft.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("w163_GetSoft.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,DownDir,MaxPicSize from w163_Config"
     	Set Rs=server.CreateObject("adodb.recordset")
     	Rs.Open SqlItem,ConnItem,3,3
		rs("DownDir")=Trim(Request.Form("DownDir"))
		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,DownDir,MaxPicSize from w163_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>
  
  <tr class="tdbg">
    <td height="20" align="right"><STRONG>采集保存地址：</STRONG></td>
    <td><input name="DownDir" type="text" class="lostfocus" value="<% =rs("DownDir") %>" size="27" maxlength="30">
    <font class="alert">&nbsp;后面必须带"/"符号</font></td>
  </tr>
  <tr class="tdbg">
    <td height="20" align="right">　</td>
    <td height="30"><input name="Submit2" type="submit" class="lostfocus" value="提交"></td>
  </tr>
  </form>
</table>
<%
Rs.Close	
set rs=nothing
end sub
Sub addnew1()'初步设置
call SetChannel
Colleclx=Trim(Request("Colleclx"))
If action="edit" or action1="edit" Then
   if ItemID<>"" then
	   ItemID=Clng(ItemID)
	   SqlItem ="select * from Item where ItemID=" & ItemID
	   Set RsItem=Server.CreateObject("adodb.recordset")
	   RsItem.Open SqlItem,ConnItem,1,1
	   If RsItem.Eof And RsItem.Bof  Then
		  FoundErr=True
		  ErrMsg=ErrMsg & "<br><li>参数错误，没有找到该项目！</li>"
	   Else
		ItemName=RsItem("ItemName")
		ChannelID=RsItem("ChannelID")
		ClassID=RsItem("ClassID")
	   	SpecialID=RsItem("SpecialID")
		selEncoding=RsItem("selEncoding")
	   	WebUrl=RsItem("WebUrl")
	   	ListStr=RsItem("ListStr")
		ListPaingType=RsItem("ListPaingType")
		LPsString=RsItem("LPsString")
		LPoString=RsItem("LPoString")
		ListPaingStr2=RsItem("ListPaingStr2")
		Select Case ListPaingType
		   Case 0 
			  ListUrl=ListStr
		   Case 1
		   	  ListPaingID1=RsItem("ListPaingID1")
			  ListPaingID2=RsItem("ListPaingID2")
			  ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
		   Case 2
			  ListPaingStr3=RsItem("ListPaingStr3")
			  If  Instr(ListPaingStr3,"|")>0  Then
					ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
			  Else
					ListUrl=ListPaingStr3
			  End  If
			  ListPaingStr3=Replace(ListPaingStr3,"|",CHR(13))
		End Select
	   	Colleclx=RsItem("Colleclx")
		SaveFileUrl=RsItem("SaveFileUrl")
		Passed=RsItem("Passed")
		SaveFiles=RsItem("SaveFiles")
		CollecOrder=RsItem("CollecOrder")
		Script_Iframe=RsItem("Script_Iframe")
     	Script_Object=RsItem("Script_Object")
		Script_Script=RsItem("Script_Script")
		Script_Div=RsItem("Script_Div")
		Script_Class=RsItem("Script_Class")
		Script_Span=RsItem("Script_Span")
		Script_Img=RsItem("Script_Img")
		Script_Font=RsItem("Script_Font")
		Script_A=RsItem("Script_A")
		Script_Html=RsItem("Script_Html")
		Script_Table=RsItem("Script_Table")
		Script_Tr=RsItem("Script_Tr")
		Script_Td=RsItem("Script_Td")
		Stars=RsItem("Stars")
		ReadPoint=RsItem("ReadPoint")
		Hits=RsItem("Hits")
		Colleclx=RsItem("Colleclx")
		CollecNewsNum=RsItem("CollecNewsNum")
	   End If
   RsItem.Close
   Set RsItem=Nothing
   end if
End If
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
  <form method="post" action="w163_Getsoft.asp" name="myform">
    <tr>
      <td height="22" colspan="2" class="title"><div align="center"><strong>添 加 新 
        项 目--基 本 设 置</strong></div></td>
    </tr>
    <tr class="tdbg">
      <td width="20%" align="right" bgcolor="#F3F3F3" class="txtlist"><strong>项目名称：</strong></td>
      <td width="75%" bgcolor="#F3F3F3" class="tdbg"><input name="ItemName" type="text" class="lostfocus" value="<%= ItemName %>" size="27" maxlength="30">
        &nbsp;&nbsp;<font color=red>*</font>如：SK网络－新闻中心 既简单又明了 </td>
    </tr>
    <tr class="tdbg">
      <td width="20%" align="right" bgcolor="#F3F3F3" class="txtlist"><strong> 所属分类：</strong></td>
      <td width="75%" bgcolor="#F3F3F3" class="tdbg"><select id="ClassID" name="ClassID">
        <%call w163_Showclass_d(ClassID,5)%>
      </select>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3" class="txtlist"><strong>目标文档编码：</strong></td>
      <td bgcolor="#F3F3F3" ><font color=blue>请选择编码→</font>
          <select name="selEncoding" size="1" onChange="Encoding.value=this.value;">
            <option>请选择编码</option>
            <option value="GB2312" selected <% if selEncoding="GB2312" then Response.Write "selected" %>>GB2312</option>
            <option value="UTF-8" <% if selEncoding="UTF-8" then Response.Write "selected" %>>UTF-8</option>
            <option value="BIG5" <% if selEncoding="BIG5" then Response.Write "selected" %>>BIG5</option>
        </select></td>
    </tr>
    <tr>
      <td width="20%" align="right" bgcolor="#F3F3F3" class="txtlist"><strong> 网站网址：</strong></td>
      <td width="75%" bgcolor="#F3F3F3" class="tdbg"><input name="WebUrl" class="lostfocus" type="text" value=
	  <%if WebUrl="" then 
	  Response.Write "http://www.skxiu.com" 
	  else
	  Response.Write WebUrl 
	  end if%>  size="49" maxlength="150">
          <font color=red>*</font></td>
    </tr>
    <tr class="tdbg">
      <td  align="right" bgcolor="#F3F3F3" class="txtlist"><strong>远程列表URL:</strong></td>
      <td bgcolor="#F3F3F3" class="tdbg"><input name="ListStr" type="text" class="lostfocus"  value="<%= ListStr %>" size="80" maxlength="200">
          <font color=red>*</font></td>
    </tr>
    <tr class="tdbg">
      <td  align="right" bgcolor="#F3F3F3" class="txtlist"><strong>是否列表分页采集:</strong></td>
      <td bgcolor="#F3F3F3" class="tdbg"><input type="radio" value="0" name="ListPaingType" <% if ListPaingType=0 or ListPaingType="" then Response.Write "checked" %> onClick="ListPaing2.style.display='none';ListPaing3.style.display='none'">
        不作设置&nbsp;&nbsp;
        <input type="radio" value="1" name="ListPaingType" <% if ListPaingType=1 then Response.Write "checked" %> onClick="ListPaing2.style.display='';ListPaing3.style.display='none'">
        批量生成&nbsp;
        <input type="radio" value="2" name="ListPaingType" <% if ListPaingType=2 then Response.Write "checked" %> onClick="ListPaing2.style.display='none';ListPaing3.style.display=''">
        手动添加 </td>
    </tr>
    <tr  class="tdbg" id="ListPaing2" <% if ListPaingType<>1 then Response.Write "style=""display:none""" %> >
      <td  align="right" bgcolor="#F3F3F3" class="txtlist"><strong><font color=blue>批量生成：</font></strong></td>
      <td bgcolor="#F3F3F3" class="tdbg"><input name="ListPaingStr2" type="text" class="lostfocus" value="<% =ListPaingStr2 %>" size="80" maxlength="200">
        分页代码 <font color=red>{$ID}</font><br>
        格式：http://www.scuta.net/list.asp?page={$ID}<br>
        生成范围：<br>
        <input name="ListPaingID1" value="<%= ListPaingID1 %>" type="text" class="lostfocus" size="8" maxlength="200">
        <span lang="en-us"> To </span>
        <input name="ListPaingID2"  value="<%= ListPaingID2 %>" type="text" class="lostfocus" size="8" maxlength="200">
        例如：1 - 9 或者 9 - 1<br>
        格式：只能是数字，可升序或者降序。 </td>
    </tr>
    <tr class="tdbg" id="ListPaing3" <% if ListPaingType<>2 then Response.Write "style=""display:none""" %>>
      <td  align="right" bgcolor="#F3F3F3" class="txtlist" ><strong><font color=blue>手动添加：</font></strong></td>
      <td bgcolor="#F3F3F3" class="tdbg"><textarea name="ListPaingStr3" cols="60" rows="7" class="lostfocus"><%= ListPaingStr3 %></textarea>
        格式：输入一个网址后按回车，再输入下一个</td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td height="30" align="right"><strong>采集图片保存地址</strong>：</td>
      <td><input name="SaveFileUrl" type="text" class="lostfocus" value="<% =SaveFileUrl %>" size="80" maxlength="200">
          <font class="alert">&nbsp;后面必须带"/"符号</font></td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td height="30" align="right"><strong>新闻设置：</strong></td>
      <td><input name="Passed" type="checkbox" value="yes" <%if Passed=1 then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        立即发布
        <input name="SaveFiles" type="checkbox" value="yes" <%if SaveFiles=1 then response.write "checked"%> <%If IsObjInstalled("Scripting.FileSystemObject")=False Then Response.Write "disabled"%> style="border: 0px;background-color: #eeeeee;">
        保存软件
        <input name="CollecOrder" type="checkbox" style="border: 0px;background-color: #eeeeee;" value="yes"  <%if CollecOrder=1 then response.write "checked"%>>
        倒序采集</td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td height="30" width="20%" align="right"><b>标签过滤：</b></td>
      <td><input name="Script_Iframe" type="checkbox" value="yes" <%If Script_Iframe=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Iframe
        <input name="Script_Object" type="checkbox" value="yes" <%If Script_Object=1 Then response.write "checked"%> onClick='return confirm("确定要选择该标记吗？这将删除正文中的所有Object标记，结果将导致该文章中的所有Flash动画被删除！");' style="border: 0px;background-color: #eeeeee;">
        Object
        <input name="Script_Script" type="checkbox" value="yes" <%If Script_Script=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Script
        <input name="Script_Div" type="checkbox"  value="yes" <%If Script_Div=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Div
        <input name="Script_Class" type="checkbox"  value="yes" <%If Script_Class=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Class
        <input name="Script_Table" type="checkbox"  value="yes" <%If Script_Table=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Table
        <input name="Script_Tr" type="checkbox"  value="yes" <%If Script_Tr=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Tr <br>
        <input name="Script_Span" type="checkbox"  value="yes" <%If Script_Span=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Span&nbsp;&nbsp;
        <input name="Script_Img" type="checkbox" value="yes" <%If Script_Img=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Img&nbsp;&nbsp;&nbsp;
        <input name="Script_Font" type="checkbox"  value="yes" <%If Script_Font=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Font&nbsp;&nbsp;
        <input name="Script_A" type="checkbox" value="yes" <%If Script_A=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        A&nbsp;&nbsp;
        <input name="Script_Html" type="checkbox" value="yes" <%If Script_Html=1 Then response.write "checked"%> onClick='return confirm("确定要选择该标记吗？这将删除正文中的所有Html标记，结果将导致该文章的可查看性降低！");' style="border: 0px;background-color: #eeeeee;">
        Html&nbsp;
        <input name="Script_Td" type="checkbox"  value="yes" <%If Script_Td=1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;">
        Td </td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td align="right"><b>数量限制：</b></td>
      <td><input name="CollecNewsNum" type="text" id="CollecNewsNum" value="<%=CollecNewsNum%>" size="10" maxlength="10">
          <font color='#0000FF'>0为采集所有 成功条数 </font></td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td align="right"><b>评分等级：</b></td>
      <td><% if Stars=0 then Stars=5 %>
          <select name="Stars">
            <option value="5" selected <%If Stars=5 Then response.write "selected"%>>★★★★★</option>
            <option value="4" <%If Stars=4 Then response.write "selected"%>>★★★★</option>
            <option value="3" <%If Stars=3 Then response.write "selected"%>>★★★</option>
            <option value="2" <%If Stars=2 Then response.write "selected"%>>★★</option>
            <option value="1" <%If Stars=1 Then response.write "selected"%>>★</option>
            <option value="0" <%If Stars=0 Then response.write "selected"%>>无</option>
          </select>
      </td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td align="right"><b>查看点数：</b></td>
      <td><input name='ReadPoint' type='text' id='ReadPoint' value='<%=ReadPoint%>' size='5' maxlength='3'>
          <font color='#0000FF'>如果大于0，则用户查看此<%=radioid%>时将消耗相应点数。（对游客和管理员无效）</font> </td>
    </tr>
    <tr class="tdbg" bgcolor="#F3F3F3">
      <td align="right"><b>点击数初始值：</b></td>
      <td><input name="Hits" type="text" id="Hits" value="<%=Hits%>" size="10" maxlength="10">
          <font color='#0000FF'>这功能是提供给管理员作弊用的。不过尽量不要用呀！^_^</font> </td>
    </tr>
    <tr class="tdbg">
      <td height="30" colspan="2" align="center" bgcolor="#F3F3F3" class="tdbg"><% 
	  select case action 
	  case "add" 
	  Response.Write "<input name=""Action1"" type=""hidden"" id=""Action1"" value=""add"">"
	  case "edit"
	  Response.Write "<input name=""Action1"" type=""hidden"" id=""Action1"" value=""edit"">"
	  end select
	    %>
          <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
	   	  <input name="Action" type="hidden" id="Action" value="s1">
	      <input name="Colleclx" type="hidden" id="Colleclx" value="<%= Colleclx %>">
          <input name="Cancel" type="button" class="lostfocus" id="Cancel" style="cursor: hand;background-color: #cccccc;" onClick="window.location.href='w163_GetSoft.asp'" value=" 返&nbsp;&nbsp;回 ">
        &nbsp;
        <input name="Submit"  type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" value="下&nbsp;一&nbsp;步">
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <input type="checkbox" name="ShowCode" value="checkbox">
        显示源码</td>
    </tr>
  </form>
</table>
</body>         
</html>
<%end Sub%>
<%
Sub SetChannel

Set Rs=server.createobject("adodb.recordset")
Sql = "select ChannelID from w163_Channel where ModuleType=1 order by ChannelID ASC"
Rs.Open Sql,ConnItem,1,1
If Not Rs.Eof Then
   Arr_Channel=Rs.GetRows()
End If
Rs.Close
Set Rs=Nothing

If IsArray(Arr_Channel)= True then
   i_Class=0
   i_Special=0
   For i=0 To Ubound(ArrShowLine)
      ArrShowLine(i)=False
   Next
%>
<script language = "JavaScript">
var count_class;
var count_special;
arr_class = new Array();
arr_special= new Array();
<%
   For i_Channel=0 To Ubound(Arr_Channel,2)
      Set Rs=server.createobject("adodb.recordset")
      Sql = "select * from w163_Class where ChannelID=" & Arr_Channel(0,i_Channel) & " order by RootID,OrderID"
      Rs.Open Sql,ConnItem,1,1
%>
arr_class[<%=i_Class%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","请选择栏目");
<%
      i_Class=i_Class+1
      If Not Rs.Eof Then
         Do While Not Rs.Eof
            ClassName="" 
            tmpDepth=Rs("Depth")
            If Rs("NextID")>0 then
				ArrShowLine(tmpDepth)=True
			Else
				ArrShowLine(tmpDepth)=False
			End if
			ClassID=Rs("ClassID")
			ClassName=ClassName & Rs("ClassName")
	%>
	arr_class[<%=i_Class%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","<%=ClassID%>","<%=ClassName%>");
	<%
				i_Class = i_Class + 1
				Rs.MoveNext
         Loop
      End if
      Rs.Close
      Set Rs=Nothing

      Set Rs=server.createobject("adodb.recordset")
      Sql = "select SpecialID,SpecialName from w163_Special where ChannelID=" & Arr_Channel(0,i_Channel) & " order by SpecialID"
      Rs.Open Sql,ConnItem,1,1
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","不属于任何专题");
<%
      i_Special=i_Special+1
      If Not Rs.Eof then
         Do While Not Rs.Eof
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","<%=Rs("SpecialID")%>","<%=Rs("SpecialName")%>");
<% 
            i_Special=i_Special + 1
            Rs.MoveNext
         Loop
      End if
      Rs.Close
      Set Rs=Nothing  
   Next
%>
count_class=<%=i_Class%>;
count_special=<%=i_Special%>;

function changelocation(locationid)
    {
    document.myform.ClassID.length = 0; 
    document.myform.SpecialID.length = 0;

    var locationid=locationid;
    var i;
    for (i=0;i < count_class; i++)
        {
            if (arr_class[i][0] == locationid)
            { 
                document.myform.ClassID.options[document.myform.ClassID.length] = new Option(arr_class[i][2], arr_class[i][1]);
            }        
        }
    for (i=0;i < count_special; i++)
        {
            if (arr_special[i][0] == locationid)
            { 
                document.myform.SpecialID.options[document.myform.SpecialID.length] = new Option(arr_special[i][2], arr_special[i][1]);
            }        
        }
    }    
</script>
<%
End if
End sub'初步设置完
Sub setup1()'第一步
if Action1="edit" and Action="s1" or Action1="add" then
	sk.Article_Err_msg 1
	If FoundErr<>True Then
	if action1="add" then sk.item_sql "add"
	if action1="edit" then  sk.item_sql "edit"
	End If
	If FoundErr<>True and Request.Form("ShowCode")="checkbox" Then
		  ListCode=GetHttpPage(ListUrl,"GB2312")
		  If ListCode="$False$" Then
			 FoundErr=True
			 ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误</li>"
		  End If
	End If
End If
If FoundErr=True Then
   call WriteErrMsg(ErrMsg)
Else
If Request.Form("ShowCode")="checkbox" Then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑 -- 采集目标网站源代码&nbsp;&nbsp;&nbsp;&nbsp; </strong>
	  <input type="radio" value="0" name="ShowCodeobt"  onClick="ShowCode1.style.display='none';">
        隐藏源代码窗口&nbsp;&nbsp;
        <input type="radio" value="0" name="ShowCodeobt" checked onClick="ShowCode1.style.display='';">
        显示源代码窗口&nbsp;
		</div>
	  </td>
    </tr>
    <tr class="tdbg" class="tdbg" id="ShowCode1"> 
      <td height="22" colspan="2" bgcolor="f3f3f3" class="tdbg" align="center">
        <textarea name="showCode" cols="120" rows="10" class="lostfocus"><%=ListCode%></textarea><br>采集的目标地址 →<a href=<%=ListUrl%> target="_blank"><%=ListUrl%></a> <a href='view-source:<%=ListUrl%>' target='_blank'><font color='blue'>点击查看目标源代码</font></a></td>
    </tr>
</table>
<% end if 

If action="edit" or action1="edit" or action="s1" and action1<>"add" Then'是否从链接来读数据
Set RsItem=ConnItem.execute("select * from Item where ItemID=" & ItemID)
	  LsString=RsItem("LsString")
   	  LoString=RsItem("LoString")
	  HsString=RsItem("HsString")
  	  HoString=RsItem("HoString")
  	  ListUrl=RsItem("ListStr")
	  RsItem.close
	  set RsItem=nothing
	  action1="edit"
end if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<form method="post" action="?" name="form1">
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>		项 目--列表连接设置</strong></div></td>
    </tr>
    <tr class="tdbg">
      <td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>列表开始代码：</strong></td>
      <td bgcolor="f3f3f3" class="tdbg"><textarea name="LsString" cols="70" rows="7" class="lostfocus"><%=LsString %></textarea></td>
    </tr>
    <tr class="tdbg">
      <td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>列表结束代码：</strong></td>
      <td bgcolor="f3f3f3" class="tdbg"><textarea name="LoString" cols="70" rows="7" class="lostfocus"><%=LoString %></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>链接开始代码：</strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
        <textarea name="HsString" cols="70" rows="7" class="lostfocus"><%= HsString %></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>链接结束代码：</strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="HoString" cols="70" rows="7" class="lostfocus"><%= HoString %></textarea></td>
    </tr>
	
   
    <tr class="tdbg"> 
      <td colspan="2" align="center" bgcolor="f3f3f3" class="tdbg" height="30">
        <input name="ItemID" type="hidden" value="<%=ItemID%>">
		 <% 
	  select case action1 
	  case "add" 
	  Response.Write "<input name=""Action1"" type=""hidden"" id=""Action"" value=""add"">"
	  case "edit"
	  Response.Write "<input name=""Action1"" type=""hidden"" id=""Action"" value=""edit"">"
	  end select
	    %>
		<input name="Action" type="hidden" id="Action" value="s2">
		<input name="Colleclx" type="hidden" id="Colleclx" value="<% =Colleclx %>">
        <input  type="button" name="button1" class="lostfocus"  value="上&nbsp;一&nbsp;步" onClick="window.location.href='javascript:history.go(-1)'"  style="cursor: hand;background-color: #cccccc;">
        &nbsp;&nbsp;&nbsp;&nbsp; 
      <input  type="submit" name="Submit" class="lostfocus"  value="下&nbsp;一&nbsp;步" style="cursor: hand;background-color: #cccccc;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <input type="checkbox" name="ShowCode" value="checkbox">显示源码</td>
    </tr>
</form>
</table>
<%
End If
end sub'第一步完

sub setup2()'第二步
	sk.Article_Err_msg 2
	'======================显示远程源码==============
	If FoundErr<>True and Request.Form("ShowCode")="checkbox" Then'得到远程源码
	 ListCode=GetHttpPage(ListUrl,"GB2312")
	   If ListCode<>"$False$" Then
		  ListCode=GetBody(ListCode,LsString,LoString,False,False)
		  If ListCode<>"$False$" Then 
		  
			 NewsArrayCode=GetArray(ListCode,HsString,HoString,False,False)
			 
			 if x_tp =1 then
			
				Newsimage=GetArray(ListCode,imhstr,imostr,False,False)
			 end if
			 If NewsArrayCode<>"$False$" Then
				   NewsArray=Split(NewsArrayCode,"$Array$")
				   For Testi=0 To Ubound(NewsArray)
					  If HttpUrlType=1 Then
						 NewsArray(Testi)=Replace(HttpUrlStr,"{$ID}",NewsArray(Testi))
					  Else
						 NewsArray(Testi)=DefiniteUrl(NewsArray(Testi),ListUrl)
					  End If
				   Next
				   UrlTest=NewsArray(0)
				   NewsCode=GetHttpPage(UrlTest,"GB2312")
			 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
		'--
		if x_tp =1 then
			If imostr="" or imhstr="" Then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>小图片代码不能为空</li>" 
			else
			   If Newsimage="$False$" Then
				 FoundErr=True
				 ErrMsg=ErrMsg & "<br><li>在分析：" & ListUrl & "新闻列表时发生错误！</li>"
			   Else
				 Newsim=Split(Newsimage,"$Array$")
					 If IsArray(Newsim)=True Then
						For Testi=0 To Ubound(Newsim)
						   If HttpUrlType=1 Then
							  Newsim(Testi)=Replace(HttpUrlStr,"{$ID}",Newsim(Testi))
						   Else
							  Newsim(Testi)=DefiniteUrl(Newsim(Testi),ListUrl)
						   End If
						Next
					 Else
						FoundErr=True
						ErrMsg=ErrMsg & "<br><li>在分析：" & ListUrl & "新闻列表时发生错误！</li>"
					 End If            
				End If  
			End If
		 end if
	End If
	'===================显示远程源码完=============================
If FoundErr=True Then
   call WriteErrMsg(ErrMsg)
Else
If Request.Form("ShowCode")="checkbox" Then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑 -- 采集目标网站源代码&nbsp;&nbsp;&nbsp;&nbsp; </strong>
	  <input type="radio" value="0" name="ShowCodeobt"  onClick="ShowCode1.style.display='none';">
        隐藏源代码窗口&nbsp;&nbsp;
        <input type="radio" value="0" name="ShowCodeobt" checked onClick="ShowCode1.style.display='';">
        显示源代码窗口&nbsp;
		</div></td>
    </tr>
    <tr class="tdbg" id="ShowCode1"> 
      <td height="22" colspan="2" bgcolor="f3f3f3" class="tdbg" align="center">
        <textarea name="showCode" cols="120" rows="10" class="lostfocus"><%=NewsCode%></textarea><br>
<%For Testi=0 To Ubound(NewsArray)
   Response.Write "采集的目标地址 →<a href="& NewsArray(Testi) &" target=""_blank"">"& NewsArray(Testi) &"</a>"
   Response.Write "<a href='view-source:" & NewsArray(Testi) & "' target=_blank><font color='blue'>点击查看目标源代码</font></a><br>"
Next
if x_tp = 1 then
For Testi=0 To Ubound(Newsim)
Response.Write "采集的小图片地址 →"
   Response.Write "<a href='" & Newsim(Testi) & "' target=_blank>" & Newsim(Testi) & "</a><br>"
Next
end if
%>
	</td>
    </tr>
</table>
<% end if
If action="edit" or action1="edit" or action="s2" and action1<>"add" Then'是否从链接来读数据
Set RsItem=ConnItem.execute("select * from Item where ItemID=" & ItemID)
   TsString=RsItem("TsString")
   ToString=RsItem("ToString")
   CsString=RsItem("CsString")
   CoString=RsItem("CoString")
  	
   Downlist_s=RsItem("Downlist_s")'下载地址设置
   Downlist_o=RsItem("Downlist_o")
   DownUrl_s=RsItem("DownUrl_s")
   DownUrl_o=RsItem("DownUrl_o")
   
   DownNewType=RsItem("DownNewType")'新窗口打开下载连接
   DownNewlist_s=RsItem("DownNewlist_s")
   DownNewlist_o=RsItem("DownNewlist_o")
   DownNewUrl_s=RsItem("DownNewUrl_s")
   DownNewUrl_o=RsItem("DownNewUrl_o")
   
   ZdType_001=RsItem("ZdType_001")'软件大小设置
   Zds_001=RsItem("Zds_001")
   Zdo_001=RsItem("Zdo_001")
   
   ZdType_002=RsItem("ZdType_002")'软件语言设置
   Zds_002=RsItem("Zds_002")
   Zdo_002=RsItem("Zdo_002")
   
   ZdType_003=RsItem("ZdType_003")'授权方式设置
   Zds_003=RsItem("Zds_003")
   Zdo_003=RsItem("Zdo_003")
   
   ZdType_004=RsItem("ZdType_004")'运行环境设置
   Zds_004=RsItem("Zds_004")
   Zdo_004=RsItem("Zdo_004")
   
   ZdType_005=RsItem("ZdType_005")'演示地址设置
   Zds_005=RsItem("Zds_005")
   Zdo_005=RsItem("Zdo_005")
   
   ZdType_006=RsItem("ZdType_006")'注册地址设置
   Zds_006=RsItem("Zds_006")
   Zdo_006=RsItem("Zdo_006")
   
   ZdType_007=RsItem("ZdType_007")'软件图片设置
   Zds_007=RsItem("Zds_007")
   Zdo_007=RsItem("Zdo_007")
   
   DateType=RsItem("DateType")
      DsString=RsItem("DsString")
      DoString=RsItem("DoString")

   AuthorType=RsItem("AuthorType")
      AsString=RsItem("AsString")
      AoString=RsItem("AoString")
      AuthorStr=RsItem("AuthorStr")

   CopyFromType=RsItem("CopyFromType")
      FsString=RsItem("FsString")
      FoString=RsItem("FoString")
      CopyFromStr=RsItem("CopyFromStr")

   KeyType=RsItem("KeyType")
      KsString=RsItem("KsString")
      KoString=RsItem("KoString")
      KeyStr=RsItem("KeyStr")
	  
	  LinkUrlYn=RsItem("LinkUrlYn")
	  
	  Colleclx=RsItem("Colleclx")	  
	  RsItem.close
	  set RsItem=nothing
	  action1="edit"
end if
 %>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<form method="post" action="?" name="form1">
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>添 加 新 
		项 目--软 件 下 载 页 设 置</strong></div>      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="30%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>软件标题开始标记：</strong><p>　</p>
      <strong>软件标题结束标记：</strong></td>
      <td width="70%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="TsString" cols="70" rows="5" class="lostfocus"><%= TsString %></textarea><br>
      <textarea name="ToString" cols="70" rows="5" class="lostfocus"><%= ToString %></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>软件简介开始标记：</strong><p>　</p>
      <strong>软件简介结束标记：</strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="CsString" cols="70" rows="5" class="lostfocus"><%= CsString %></textarea><br>
      <textarea name="CoString" cols="70" rows="5" class="lostfocus"><%= CoString %></textarea></td>
    </tr>
	<tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong>下载地址列表开始标记：</strong><p>　</p>
      <strong>下载地址列表结束标记：</strong><p>　</p>
	  <strong>下载地址开始标记：</strong><p>　</p>
      <strong>下载地址结束标记：</strong>
	  </td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Downlist_s" cols="70" rows="5" class="lostfocus"><%= Downlist_s %></textarea><br>
      <textarea name="Downlist_o" cols="70" rows="5" class="lostfocus"><%= Downlist_o %></textarea><br>
	  <textarea name="DownUrl_s" cols="70" rows="5" class="lostfocus"><%= DownUrl_s %></textarea><br>
      <textarea name="DownUrl_o" cols="70" rows="5" class="lostfocus"><%= DownUrl_o %></textarea>
	  <input type="checkbox" name="LinkUrlYn" <% if LinkUrlYn=1 then Response.Write "checked" %> value="1" >是否有下载列表
	  </td>
    </tr>
	
	<tr class="tdbg">
      <td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>是否新窗口打开下载连接设置：</strong></td>
      <td bgcolor="f3f3f3" class="tdbg">
	  <input type="radio" name="DownNewType" value="0" <% if DownNewType<>1 then Response.Write("checked")%>  onClick="picl222.style.display='none'">
不作设置
  <input type="radio" name="DownNewType" value="1" <% if DownNewType=1 then Response.Write("checked")%> onClick="picl222.style.display=''">
新窗口打开</td>
    </tr>
    <tr class="tdbg" id="picl222" style="display:none" >
      <td align="right" bgcolor="f3f3f3" class="tdbg" >
	  	<strong><font color=blue>下载地址列表开始代码(新窗口)：</font></strong><p>　</p>
		<strong><font color=blue>下载地址列表结束代码(新窗口)：</font></strong><p>　</p>
	  	<strong><font color=blue>获取下载连接开始代码(新窗口)：</font></strong><p>　</p>
		<strong><font color=blue>获取下载连接结束代码(新窗口)：</font></strong>
	  </td>
      <td bgcolor="f3f3f3" class="tdbg">
	  <textarea name="DownNewlist_s" cols="70" rows="5" class="lostfocus"><%= DownNewlist_s %></textarea><br>
      <textarea name="DownNewlist_o" cols="70" rows="5" class="lostfocus"><%= DownNewlist_o %></textarea><br>
	  <textarea name="DownNewUrl_s" cols="70" rows="5" class="lostfocus"><%= DownNewUrl_s %></textarea><br>
      <textarea name="DownNewUrl_o" cols="70" rows="5" class="lostfocus"><%= DownNewUrl_o %></textarea>
	  </td>
    </tr>
	
	 <tr class="tdbg">
      <td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>软件图片设置：</strong></td>
      <td bgcolor="f3f3f3" class="tdbg">
	  <input type="radio" name="ZdType_007" value="0" <% if ZdType_007<>1 then Response.Write("checked")%>  onClick="picl1.style.display='none'">
不作设置
  <input type="radio" name="ZdType_007" value="1" <% if ZdType_007=1 then Response.Write("checked")%> onClick="picl1.style.display=''">
软件图片</td>
    </tr>
    <tr class="tdbg" id="picl1" style="display:none" >
      <td align="right" bgcolor="f3f3f3" class="tdbg" ><p><strong><font color=blue>软件图片开始代码：</font>
      </strong></p>
      <p>　</p>
      <p><strong><font color=blue>软件图片结束代码：</font></strong></p></td>
      <td bgcolor="f3f3f3" class="tdbg"><textarea name="Zds_007" cols="70" rows="7" id="Zds_007" class="lostfocus"><%= Zds_007 %></textarea>
      <textarea name="Zdo_007" cols="70" rows="7" id="Zdo_007" class="lostfocus"><%= Zdo_007 %></textarea></td>
    </tr>
	
	<tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>软 件 大 小 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_001" <% if ZdType_001<>1 then Response.Write("checked") %> onClick="ZD001.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_001=1 then Response.Write("checked") %> name="ZdType_001" onClick="ZD001.style.display=''">设置标签&nbsp;    </tr>
    <tr class="tdbg" id="ZD001" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>获取软件大小开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>获取软件大小结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_001" cols="70" rows="5" class="lostfocus"><%= Zds_001 %></textarea><br>
      <textarea name="Zdo_001" cols="70" rows="5" class="lostfocus"><%= Zdo_001 %></textarea></td>
    </tr>
	
  <tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>软 件 语 言 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_002" <% if ZdType_002<>1 then Response.Write("checked") %> onClick="ZD002.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_002=1 then Response.Write("checked") %> name="ZdType_002" onClick="ZD002.style.display=''">设置标签&nbsp;
	   </td>
	</tr>
    <tr class="tdbg" id="ZD002" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>软件语言开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>软件语言结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_002" cols="70" rows="5" class="lostfocus"><%= Zds_002 %></textarea><br>
      <textarea name="Zdo_002" cols="70" rows="5" class="lostfocus"><%= Zdo_002 %></textarea>
	  </td>
    </tr>
	
		<tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>授 权 方 式 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_003" <% if ZdType_003<>1 then Response.Write("checked") %> onClick="ZD003.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_003=1 then Response.Write("checked") %> name="ZdType_003" onClick="ZD003.style.display=''">设置标签&nbsp;
	   </td>
	</tr>
    <tr class="tdbg" id="ZD003" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>授权方式开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>授权方式结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_003" cols="70" rows="5" class="lostfocus"><%= Zds_003 %></textarea><br>
      <textarea name="Zdo_003" cols="70" rows="5" class="lostfocus"><%= Zdo_003 %></textarea>
	  </td>
    </tr>
	
	<tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>运 行 环 境 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_004" <% if ZdType_004<>1 then Response.Write("checked") %> onClick="ZD004.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_004=1 then Response.Write("checked") %> name="ZdType_004" onClick="ZD004.style.display=''">设置标签&nbsp;
	   </td>
	</tr>
    <tr class="tdbg" id="ZD004" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>运行环境开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>运行环境结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_004" cols="70" rows="5" class="lostfocus"><%= Zds_004 %></textarea><br>
      <textarea name="Zdo_004" cols="70" rows="5" class="lostfocus"><%= Zdo_004 %></textarea>
	  </td>
    </tr>
	
	<tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>演 示 地 址 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_005" <% if ZdType_005<>1 then Response.Write("checked") %> onClick="ZD005.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_005=1 then Response.Write("checked") %> name="ZdType_005" onClick="ZD005.style.display=''">设置标签&nbsp;
	   </td>
	</tr>
    <tr class="tdbg" id="ZD005" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>演示地址开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>演示地址结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_005" cols="70" rows="5" class="lostfocus"><%= Zds_005 %></textarea><br>
      <textarea name="Zdo_005" cols="70" rows="5" class="lostfocus"><%= Zdo_005 %></textarea>
	  </td>
    </tr>
	
	<tr class="tdbg"> 
	 <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>注 册 地 址 设 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="ZdType_006" <% if ZdType_006<>1 then Response.Write("checked") %> onClick="ZD006.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if ZdType_006=1 then Response.Write("checked") %> name="ZdType_006" onClick="ZD006.style.display=''">设置标签&nbsp;
	   </td>
	</tr>
    <tr class="tdbg" id="ZD006" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" >
	  <strong><font color=blue>注册地址开始代码：</font></strong>
		<p>　</p>
      <strong><font color=blue>注册地址结束代码：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="Zds_006" cols="70" rows="5" class="lostfocus"><%= Zds_006 %></textarea><br>
      <textarea name="Zdo_006" cols="70" rows="5" class="lostfocus"><%= Zdo_006 %></textarea>
	  </td>
    </tr>
	
	<tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>时&nbsp; 间&nbsp;
		设&nbsp; 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="DateType" <% if DateType<>1 then Response.Write("checked") %> onClick="Date1.style.display='none'">不作设置&nbsp;
	<input type="radio" value="1" <% if DateType=1 then Response.Write("checked") %> name="DateType" onClick="Date1.style.display=''">设置标签&nbsp;    </tr>
    <tr class="tdbg" id="Date1" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>时间开始标记：</font></strong><p>　</p>
      <strong><font color=blue>时间结束标记：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="DsString" cols="70" rows="5" class="lostfocus"><%= DsString %></textarea><br>
      <textarea name="DoString" cols="70" rows="5" class="lostfocus"><%= DoString %></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>作<span lang="en-us">&nbsp; </span>者<span lang="en-us">&nbsp;
		</span>设<span lang="en-us">&nbsp; </span>置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" <% if AuthorType=0 or AuthorType="" then Response.Write("checked") %> name="AuthorType"  onClick="Author1.style.display='none';Author2.style.display='none'">不作设置&nbsp;
		<input type="radio" value="1" <% if AuthorType=1 then Response.Write("checked") %> name="AuthorType" onClick="Author1.style.display='';Author2.style.display='none'">设置标签&nbsp;
		<input type="radio" value="2" name="AuthorType" <% if AuthorType=2 then Response.Write("checked") %> onClick="Author1.style.display='none';Author2.style.display=''">指定作者</td>
    </tr>
    <tr class="tdbg" id="Author1" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>作者开始标记：</font></strong><p>　</p>
		<p>　</p>
      <strong><font color=blue>作者结束标记：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="AsString" cols="70" rows="7" class="lostfocus"><%= AsString %></textarea><br>
      <textarea name="AoString" cols="70" rows="7" class="lostfocus"><%= AoString %></textarea></td>
    </tr>
    <tr class="tdbg" id="Author2" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>请指定作者：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <input name="AuthorStr" type="text" class="lostfocus" id="AuthorStr" value="<%= AuthorStr %>">      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>来&nbsp; 源&nbsp;
		设&nbsp; 置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="CopyFromType" <% if CopyFromType=0 or CopyFromType="" then Response.Write("checked") %> onClick="CopyFrom1.style.display='none';CopyFrom2.style.display='none'">不作设置&nbsp;
		<input type="radio" value="1" name="CopyFromType" <% if CopyFromType=1 then Response.Write("checked") %> onClick="CopyFrom1.style.display='';CopyFrom2.style.display='none'">设置标签&nbsp;
		<input type="radio" value="2" name="CopyFromType" <% if CopyFromType=2 then Response.Write("checked") %> onClick="CopyFrom1.style.display='none';CopyFrom2.style.display=''">指定来源</td>
    </tr>
    <tr class="tdbg" id="CopyFrom1" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>来源开始标记：</font></strong><p>　</p>
		<p>　</p>
      <strong><font color=blue>来源结束标记：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="FsString" cols="70" rows="7" class="lostfocus"><%= FsString %></textarea><br>
      <textarea name="FoString" cols="70" rows="7" class="lostfocus"><%= FoString %></textarea></td>
    </tr>
    <tr class="tdbg" id="CopyFrom2" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>请指定来源：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <input name="CopyFromStr" type="text" class="lostfocus" id="CopyFromStr" value="<%= CopyFromStr %>">      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><b>关键字词设置：</b></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      	<input type="radio" value="0" name="KeyType" <% if KeyType=0 or KeyType="" then Response.Write("checked") %> onClick="Key1.style.display='none';Key2.style.display='none'">标题生成&nbsp;
		<input type="radio" value="1" name="KeyType" <% if KeyType=1  then Response.Write("checked") %> onClick="Key1.style.display='';Key2.style.display='none'">标签生成&nbsp;
		<input type="radio" value="2" name="KeyType" <% if KeyType=2  then Response.Write("checked") %> onClick="Key1.style.display='none';Key2.style.display=''">自定义关键字</td>
    </tr>
    <tr class="tdbg" id="Key1" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>关键词开始标记：</font></strong><p>　</p>
		<p>　</p>
      <strong><font color=blue>关键词结束标记：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg">
      <textarea name="KsString" cols="70" rows="7" class="lostfocus"><%= KsString %></textarea><br>
      <textarea name="KoString" cols="70" rows="7" class="lostfocus"><%= KoString %></textarea></td>
    </tr>
    <tr class="tdbg" id="Key2" style="display:none"> 
      <td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong><font color=blue>请指定关键：</font></strong></td>
      <td width="75%" bgcolor="f3f3f3" class="tdbg"><input name="KeyStr" type="text" class="lostfocus" id="KeyStr" value="<%= KeyStr %>">
        <br>
      格式：关键字之间用<font color=red>|</font>分隔，如：新闻|IT      </td>
    </tr>
    <tr class="tdbg"> 
      <td height="30" colspan="2" align="center" bgcolor="f3f3f3" class="tdbg">
       <input name="ItemID" type="hidden" value="<%=ItemID%>"> 
	  <% 
	  Response.Write "<input name=""Action1"" type=""hidden"" id=""Action"" value="& action1 &">"
	    %>
		<input name="Colleclx" type="hidden" id="Colleclx" value="<% =Colleclx %>">
		<input name="Action" type="hidden" id="Action" value="demo">
		<input type="hidden" name="UrlTest" id="UrlTest" value="<%=UrlTest%>">
        <input name="button1"  type="button" class="lostfocus"  style="cursor: hand;background-color: #cccccc;" onClick="window.location.href='javascript:history.go(-1)'" value="上&nbsp;一&nbsp;步">
        &nbsp;&nbsp;&nbsp;&nbsp; 
        <input name="Submit"  type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" value="下&nbsp;一&nbsp;步">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <input type="checkbox" name="ShowCode" value="checkbox">显示源码</td>
    </tr>
	</form>
</table>

<%
end if
end sub'第二完

sub demo()'测试页
	If ItemID="" Then
	   FoundErr=True
	   ErrMsg=ErrMsg & "<br><li>参数错误，项目ID不能为空</li>"
	Else
	   ItemID=Clng(ItemID)
	End If
	set rs=connItem.execute("Select Colleclx from Item Where ItemID=" & ItemID)
	Colleclx=rs(0) : rs.close : set rs=nothing
	If FoundErr<>True then
	SK.Article_Err_msg 3
	End if
	If FoundErr<>True and Action="demo" and Action1=""  Then
	   SK.GetTest()
	End If
	
If FoundErr=True Then
   Call WriteErrMsg(ErrMsg)
Else
if Action1="" and Action="demo" or Request.Form("ShowCode")="checkbox" then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder"  >
    <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="tableBorder" >
  <tr align="center" class="tdbg"> 
    <td colspan="2" valign="bottom"><span lang="zh-cn">
	<%=Title%></span></td>
  </tr>
  <tr align="center" class="tdbg">
    <td colspan="2">
        作者：<%=Author%>&nbsp;&nbsp;来源：<%=CopyFrom%>&nbsp;&nbsp;更新时间：<%=UpDateTime%>
    </td>
  </tr>
  <tr class="tdbg">
    <td colspan="2">
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
        <tr>
          <td height="200" valign="top">
		  <%
		  Response.Write "<strong>下载地址:</strong><a href="& DownUrls &">"& DownUrls &"<a/><br>"
		  Response.Write "<strong>软件图片:</strong><a href="& PhotoUrl &">"& PhotoUrl &"<a/><br>" 
		  Response.Write "<strong>软件大小:</strong>" & DownSize & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" 
		  Response.Write "<strong>软件语言:</strong>" & DownYY & "<br>"
		  Response.Write "<strong>授权方式:</strong>" & DownSQ & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" 
		  Response.Write "<strong>运行环境:</strong>" & DownPT & "<br>"
		  Response.Write "<strong>演示地址:</strong>" & YSDZ & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" 
   		  Response.Write "<strong>注册地址:</strong>" & ZCDZ & "<br>"
		  Response.Write "<strong>软件简介:</strong><br>" & Content  &"<br>"
		  Response.Write "<strong>关键字:</strong>" & Key 
		  %>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <form method="post" action="w163_GetSoft.asp" name="form1">
  <tr class="tdbg">
  	<td colspan="2" align="center">
	    <input name="Cancel" class="lostfocus" type="button"  value=" 上&nbsp;一&nbsp;步 " onClick="window.location.href='javascript:history.go(-1)'" style="cursor: hand;background-color: #cccccc;">&nbsp;&nbsp;<input  type="submit" name="Submit" class="lostfocus" value=" 设置完成&nbsp; " style="cursor: hand;background-color: #cccccc;">
	</td>
  </tr>
  </form>
</table>
<%
else
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
  
  <tr class="tdbg">
    <td colspan="2">
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
        <tr>
          <td height="30" valign="top"><a href="?action=demo&ItemID=<%= ItemID %>">点击查看测试页</a></td>
        </tr>
      </table>    </td>
  </tr>
  <form method="post" action="w163_GetSoft.asp" name="form1">
  <tr class="tdbg">
  	<td colspan="2" align="center">
	    <input name="Cancel" class="lostfocus" type="button"  value=" 上&nbsp;一&nbsp;步 " onClick="window.location.href='javascript:history.go(-1)'" style="cursor: hand;background-color: #cccccc;">&nbsp;&nbsp;<input  type="submit" name="Submit" class="lostfocus" value=" 设置完成&nbsp; " style="cursor: hand;background-color: #cccccc;">	</td>
  </tr>
  </form>
</table>

<%
end if
End If
end sub

sub copy
ItemID=Trim(Request("ItemID"))
If ItemID="" Then
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>请选择要删除的项目！</li>"
   Else
	SqlItem="select top 1 * from Item where ItemID="& ItemID
	Set RsItem=server.CreateObject("adodb.recordset")
   	RsItem.Open SqlItem,ConnItem,3,3
	for i=1 to Ubound(copyitem)
	copyitem(i)=RsItem(i)
	next
	RsItem.AddNew
	for i=1 to Ubound(copyitem)
	RsItem(i)=copyitem(i)
	RsItem(1)=copyitem(1) & " 复制"
	next
	RsItem.update
    RsItem.close
	Call show_Manage()
end if
  
end sub

Sub Del
ItemID=Trim(Request("ItemID"))

If Request("Del")="清空所有记录" Then
 
   ConnItem.Execute("Delete From Item")
   ConnItem.Execute("Delete From Filters")
   ConnItem.Execute("Delete From Histroly")
Else
   If ItemID="" Then
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>请选择要删除的项目！</li>"
   Else
      ItemID=Replace(ItemID," ","")   
      ConnItem.Execute("Delete From [Item] Where ItemID In(" & ItemID & ")")
      ConnItem.Execute("Delete From [Filters] Where ItemID In(" & ItemID & ")")
      ConnItem.Execute("Delete From [Histroly] Where ItemID In(" & ItemID & ")")
   End If
End  If
Call show_Manage()
End Sub
%><!--#include file="Admin_ItemFoot.asp"-->