<!--#include file="inc/function.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>采集管理 - 采集项目管理 - 126电影程序CMS</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="../images/css_body.css" type=text/css rel=stylesheet>
<script language="javascript" src="../images/admin.js"></script>
</head>

<body >
<%
dim action
action=Trim(request("action"))
Select Case action
case "Del"
 call Del()
case "Delall"
 call DelAll()
Case "Alldr"
 call Alldr()
Case else
 call List()
End Select

sub List()
Dim int_RPP,cPageNo,i 
dim rs,sql
 int_RPP=30
%>
<div class="container" id="cpcontainer">
<form name="forms" action="?action=Alldr" method="post">
<TABLE width="96%" border=0 align=center cellpadding="5" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
 <tbody>
 <tr bgColor="#f5fafe">
   <th  colspan="7" >规则库查看(<font color="red" style="font-weight:500">collect目录下 <a href="collecttemp.mdb"><b><font color="red">collecttemp.mdb</font></b></a> 文件是规则库</font>)</th>
   </tr>
 <tr bgColor="#f5fafe">
 <td align="left" >ID</td>
 <td>采集项目名称</td>
 <td>采集站点链接</td>
 <td>播放类型</td>
 <td>入库分类</td>

 <td>操 作</td>
 </tr>
 <% 
 set rs=Server.CreateObject("ADODB.Recordset")
 Sql="Select * from programe Order By ID Desc,ID"
 Rs.open sql,connt,1,2
 if Rs.eof Then
 Response.Write"<td  colspan=""7"" align=""center"" >暂无记录!</td>"
 else
 Rs.PageSize=int_RPP
 cPageNo=Request.QueryString("Page")
 If cPageNo="" Then cPageNo = 1
 If not isnumeric(cPageNo) Then cPageNo = 1
 cPageNo = Clng(cPageNo)
 If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
 If cPageNo<=0 Then cPageNo=1
 Rs.AbsolutePage=cPageNo 
 for i=1 to int_RPP
 if Rs.eof Then exit For  
%>
 <tr bgcolor="#FFFFFF">
 <td><input name="ID" type="checkbox" id="ID" value="<% = RS("ID")%>"> <%=RS("ID")%></td>
 <td><%=RS("CollectName")%></td>
 <td>&nbsp;<A href="<%=RS("WebUrl")%>" target="_blank" ><%=left(RS("WebUrl"),30)%></A></td> 
 <td><%=RS("Server")%></td>
 <%if RS("ClassType")=1 Then
 response.write("<td  ><font color=red >自定义分类</font></td>")
 else
 %>
 <td><%=Get_ClassCN1(RS("ClassID"))%></td>
 <%end if%>
 <td><A href="?action=Del&ID=<%=RS("ID")%>">删除</A></td>
 </tr>

 <%Rs.MoveNext
 next 
 end if%>
  <tr bgcolor="#FFFFFF">
   <td height=27 colspan="7" align="center"  >全选<input type="checkbox" name="chkall" id="chkall" class="checkbox" onClick="checkAll(this.checked,'input','ID')" />反选<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onClick="checkOthers('input','ID')" />&nbsp;&nbsp;&nbsp;<input type="button" class="btn" name="Submit" value="批量删除"  onClick="document.forms.action='?action=Delall';{if(confirm('确定删除您所选择的影片吗？')){this.document.forms.submit();return true;}return false;}">
&nbsp; <input type="button" class="btn" name="Submit"  style="background-color:#BFBFBF"  value="导入所选规则" onClick="{if(confirm('确定导入规则吗？')){this.document.forms.submit();return true;}return false;}"><% response.Write fPageCount(Rs,cPageNo) %>
</td>
   </tr>
   
</table>
</form>
</div>
<%
Rs.Close
set Rs = nothing
end sub

sub Alldr()
dim ids:ids=replace(request.Form("id")," ","")
dim rs,sql,rst,sqlt
if not isNul(ids) then 
	Set Rs = connt.Execute("Select * From programe where id in ("&ids&")")
	Do Until Rs.Eof
	 set rst=Server.CreateObject("ADODB.Recordset")
	 sqlt="select * from programe where id in ("&ids&")"
	 Rst.open sqlt,connc,1,3
	 RSt.Addnew
	 RSt("CollectName")=rs("CollectName")
	 RSt("selEncoding")=rs("selEncoding")
	 RSt("WebUrl")=rs("WebUrl")
	 RSt("Harea")=rs("Harea")
	 RSt("Farea")=rs("Farea")
	 RSt("Server")=rs("Server")
	 RSt("ClassID")=rs("ClassID")
	 RSt("ListPaingType")=rs("ListPaingType")
	 RSt("ListPaingStr")=rs("ListPaingStr")
	 RSt("ListPaingStr2")=rs("ListPaingStr2")
	 RSt("ListPaingID1")=rs("ListPaingID1")
	 RSt("ListPaingID2")=rs("ListPaingID2")
	 RSt("ListPaingStr3")=rs("ListPaingStr3")
	 RSt("Script_Iframe")=rs("Script_Iframe")
	 RSt("Script_Object")=rs("Script_Object")
	 RSt("Script_Script")=rs("Script_Script")
	 RSt("Script_Div")=rs("Script_Div")
	 RSt("Script_Class")=rs("Script_Class")
	 RSt("Script_Table")=rs("Script_Table")
	 RSt("Script_Tr")=rs("Script_Tr")
	 RSt("Script_Span")=rs("Script_Span")
	 RSt("Script_Img")=rs("Script_Img")
	 RSt("Script_Font")=rs("Script_Font")
	 RSt("Script_A")=rs("Script_A")
	 RSt("Script_Html")=rs("Script_Html")
	 RSt("Script_Td")=rs("Script_Td")
	 RSt("SaveFiles")=rs("SaveFiles")
	 RSt("CollecOrder")=rs("CollecOrder")
	 RSt("RepeatCollect")=rs("RepeatCollect")
	 RSt("LsString")=rs("LsString")
	 RSt("LoString")=rs("LoString")
	 RSt("HsString")=rs("HsString")
	 RSt("HoString")=rs("HoString")
	 RSt("Htitle")=rs("Htitle")
	 RSt("ListPaingStr3")=rs("ListPaingStr3") 
	 RSt("Ftitle")=rs("Ftitle")
	 RSt("Hname")=rs("Hname")
	 RSt("Fname")=rs("Fname")
	 RSt("Htupian")=rs("Htupian")
	 RSt("Ftupian")=rs("Ftupian")
	 RSt("ClassType")=RS("ClassType")
	 RSt("CollectClass")=RSt("ClassID")
	 RSt("HClass")=rs("HClass")
	 RSt("FClass")=rs("FClass")
	 RSt("RegionType")=rs("RegionType")
	 RSt("CollectRegion")=rs("CollectRegion")
	 RSt("HRegion")=rs("HRegion")
	 RSt("FRegion")=rs("FRegion")
	 RSt("Hcontent")=rs("Hcontent")
	 RSt("Fcontent")=rs("Fcontent")
	 RSt("ScopeOn")=rs("ScopeOn")
	 RSt("Hscope")=rs("Hscope")
	 RSt("Fscope")=rs("Fscope")
	 RSt("Hweburl")=rs("Hweburl")
	 RSt("Fweburl")=rs("Fweburl")
	 RSt("urlType")=rs("urlType")
	 RSt("Rurl")=rs("Rurl")
	 RSt("Reurl")=rs("Reurl")
	 RSt("Hpurl")=rs("Hpurl")
	 RSt("Fpurl")=rs("Fpurl")
	 RSt.Update
	 RSt.close 
	 set RSt=nothing
	Rs.MoveNext
	Loop
	Rs.Close
	Set Rs = Nothing
	 call Admin_ShowErr("<li>导入采集规则成功</li>","admin_collect.asp",1)
else
	call Admin_ShowErr("请选择需要导入的规则 ","admin_rules.asp",0)
end if
end sub

sub Del()
 connt.execute "delete from programe WHERE ID="&Request.QueryString("ID")
 call Admin_ShowErr("<li>规则删除成功！</li>","admin_rules.asp",1)
end sub

sub DelAll()
dim ids:ids=replace(Request.form("ID")," ","")
if not isNul(ids) then 
 connt.execute "delete from programe WHERE ID in ("&ids&")"
else
	 call Admin_ShowErr("<li>请选择相应规则！</li>","admin_rules.asp",1)
end if
 call Admin_ShowErr("<li>规则删除成功！</li>","admin_rules.asp",1)
end sub
%>
<script language="JavaScript">
currObj = "uuuu";
function getActiveText(obj)
{
 obj.focus();
 currObj = obj;
}

function addTag(ibTag)
{
 var isClose = false;
 var obj_ta = currObj;
 if (obj_ta.isTextEdit)
 {
 obj_ta.focus();
 var sel = document.selection;
 var rng = sel.createRange();
 rng.colapse;

 if((sel.type == "Text" || sel.type == "None") && rng != null)
 {
 rng.text = ibTag;
 }
 obj_ta.focus();
 return isClose;
 }
 else return false;
} 
</script>
<%call conncclose()%>
</BODY></HTML>
