<!--#include file="../Inc/Config.asp" -->
<!--#include file="Admin_Check.asp" -->
<!--#include file="../Inc/AdminClass.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../Inc/edit.CSS" rel="stylesheet" type="text/css">
</head>
<link href="../Inc/edit.CSS" rel="stylesheet" type="text/css"> 
<body bgcolor="#5578b8" leftmargin="0" topmargin="2">
<%
dim UP,url,BLOG_ID,arr
BLOG_ID=REQUEST.FORM("ID")
IF BLOG_ID<>"" THEN
	UP=TRIM(request.form("Submit"))
	url=replace(Request.ServerVariables("HTTP_REFERER"),"page=","")
	If UP="Delete" then
		conn.execute("delete from tb_Rss where id in("&BLOG_ID&")")
		conn.close:Set conn=nothing
		Response.write"<script>alert('成功!');location.href='"&url&"';</script>"		
		Response.End
	END IF
End if
%>
<SCRIPT language=javascript src="../inc/js.js"></SCRIPT>
<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
  <tr bgcolor="#f0f5f9"> 
    <td colspan="3"> <div align="center"> 
        <form name="form1" method="get" action="RssList.asp">
          <div align="center">Rss频道搜索: 
            <input name="Key" type="text" id="Key" size="20">
            <%CblogObj.ClassCodeList "","Tb_RssClass","Rss_Class","Rss_"%>
            <input name="Submit" type="submit" class="SELECT" value="搜索">
          </div>
        </form>
      </div></td>
  </tr>
  <tr bgcolor="#cfdded"> 
    <td width="73" bgcolor="#cfdded"> <div align="center">Check</div></td>
    <td width="649" bgcolor="#cfdded">频道名称</td>
    <td width="249"> <div align="center">Rss地址</div></td>
  </tr>
  <form name="add" method="post" action="RssList.asp">
    <%
dim wherestr,Blog_Class,sqlstr,pages,sql,rscount,Blog_List,key,iii
Pages = Request.QueryString("page")
If Not IsNumeric(Pages) Or Pages = "" Then
	Pages = 1
Else
	Pages = CLng(Pages)
End If
Blog_Class=Request.QueryString("BlogClass")
key=trim(replace(request.QueryString("key"),"'",""))
Sqlstr="select ID,Rssname,RssUrl from Tb_Rss "
if key<>"" and Blog_Class<>"" And ISNUMERIC(Blog_Class) then
	wherestr="where ClassCode Like '"&Blog_Class&"%' and rssname like'%"&key&"%'"
Elseif key<>"" and (Blog_Class="" or not ISNUMERIC(Blog_Class)) then
	wherestr="where rssname like '%"&key&"%'"
Elseif Blog_Class<>"" And ISNUMERIC(Blog_Class) and key="" then
	wherestr="where ClassCode Like '"&Blog_Class&"%' "
end if
sqlstr="select ID,Rssname,RssUrl from Tb_Rss "&wherestr&" order by id desc"
Set rs = Server.CreateObject("Adodb.RecordSet")
rs.open sqlstr,Conn, 1, 1
SqlCount=SqlCount+1
if rs.bof and rs.eof then
	response.write("<tr><td colspan=3><div align=center>对不起,此分类下还没有任何RSS地址!!</div></td></tr>")
else
rs.PageSize = 20
rs.AbsolutePage = pages
rscount=rs.RecordCount
Blog_List=rs.getrows(20)
for iii=0 to Ubound(Blog_List,2)
%>
    <tr bgcolor="#f0f5f9"> 
      <td><div align="center"> 
          <input name="ID" type="checkbox" id="ID" value="<%=Blog_List(0,iii)%>">
        </div></td>
      <td bgcolor="#f0f5f9"><a href="../rssshow.asp?Rssurl=<%=Server.URLEncode(Blog_List(2,iii))%>"  target="_blank"> 
                <%=Blog_List(1,iii)%>
                </a></td>
      <td> 
        <a href="<%=Blog_List(2,iii)%>" target="_blank"> 
                <%=Blog_List(2,iii)%>
                </a>
      </td>
    </tr>
<%
next
end if
rs.close:Set rs=nothing
%>
    <tr bgcolor="#f0f5f9"> 
      <td colspan="3"><div align="center"> 
          <input name="act" type="hidden" id="act" value="OK">
          <INPUT name=all type=button id="all" onclick=CheckAll(this.form) value=全选>
          <INPUT name=sall type=button id="sall" onclick=CheckOthers(this.form) value=反选>
          <input name="Submit2" type="reset" class="in" value=" Reset ">
          <INPUT name=Submit type=submit class="in" id="Submit" onClick="return ConfirmDel();" value=Delete>
        </div></td>
    </tr>
  </form>
  <tr bgcolor="#f0f5f9"> 
    <td colspan="3"> <div align="center"> 
        <%call pagelist(rscount,pages,20)%>
      </div></td>
  </tr>
  <%
'conn.close:Set conn=nothing
%>
</table>
<br>
<div align="center"><%Set Adminobj=Nothing:Set Cblogobj=Nothing%></div></body>
</html>
