<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
bigclassname=request.querystring("bigclassname")
selectType=trim(request("select"))
keyWord=trim(request("keyWord"))
if keyWord="" or selectType="" then
response.write "<script language=javascript>alert('错误！可能原因：\n\n没有输入检索关键字\n\n没有选择检索类型');history.back();</script>"
response.end
end if
%>
<SCRIPT language=javascript>
function unselectall()
{
    if(document.del.chkAll.checked){
	document.del.chkAll.checked = document.del.chkAll.checked&0;
    } 	
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
  }
function ConfirmDel()
{
   if(confirm("确定要删除选中的信息吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;
	 
}

</SCRIPT>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="98" align="center" valign="top" bgcolor="#A0CCD8"><!-- #include file="info_left.asp" --></td>
    <td width="895" align="center" valign="top"><table width="100%" height="0"  border="0" cellpadding="5" cellspacing="0">
        <tr>
          <td height="24" background="image/usercenter_3.jpg">
            <div align="center"><font color="#FFFFFF"><strong>信 息 搜 索 结 果</strong> </font> </div></td>
        </tr>
      </table>
	  <table width="100%" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <form name="form1" method="post" action="search.asp">
      <td width="100%" align="center" bgcolor="#C2DAE1"><input type="radio" value="1" name="select" checked>
        按标题
          <input type="text" name="keyword" class="form" size="30">
          <input type="submit" value="搜索" name="B1"></td>
    </form>
  </tr>
</table>
<%if selectType="1" then%>
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse">
  <tr bgcolor="#C2DAE1"> 
    <td width="34" height="25" align="center" bgcolor="#C2DAE1">ID</td>
    <td width="250" align="center">新闻标题</td>
    <td width="109" align="center">来 源</td>
    <td width="86" align="center">所属一级分类</td>
    <td width="90" align="center">所属二级分类</td>
    <td width="113" align="center">发布日期</td>
    <td width="97" align="center" bgcolor="#C2DAE1">操作</td>
  </tr>
  <%
page=clng(request("page"))
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="select * from News where title like '%"&keyWord&"%' and bigclassname='"&bigclassname&"' order by id desc"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("没有记录")
else
rs.PageSize=14
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page  
    
for j=1 to rs.PageSize 
%>
  <tr bgcolor="#FFFFFF"> 
    <td width="34" height="22" align="center" bgcolor="#C2DAE1"><%=rs("id")%></td>
    <td width="250" bgcolor="#EFEEE9">　
      <% if rs("imagenum")<>"0" then response.write "<img src='image/news.gif' border=0 alt='图片新闻'>" end if %>      <a href="../Article.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%=rs("title")%></a></td>
    <td width="109" bgcolor="#EFEEE9"><div align="center"><%=left(rs("user"),6)%></div></td>
    <td width="86" bgcolor="#EFEEE9"><div align="center"><%=rs("BigClassName")%></div></td>
    <td width="90" bgcolor="#EFEEE9"><div align="center"><%=rs("SmallClassName")%></div></td>
    <td width="113" align="center" bgcolor="#EFEEE9"><%=rs("infotime")%>　</td>
    <td width="97" align="center" bgcolor="#EFEEE9"> <div align="center">
      <%call man_r("admin_infomodi.asp?ID="&rs("id")&"","修改","Info_allMan")%>
      　
      <%call man_r("admin_infodel.asp?id="&rs("id")&"&Action=Del","删除","Info_allMan")%>
</div></td>
  </tr>
  <%
rs.movenext
if rs.eof then exit for
next                                                       
%>
</table>  
</center>  
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>　</td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
<form method=Post action="search.asp">  
      <td height="30" align="center"> 
    <%if Page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=search.asp?page=1>首页</a>&nbsp;"
    response.write "<a href=search.asp?page=" & Page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=search.asp?page=" & (page+1) & ">"
    response.write "下一页</a> <a href=search.asp?page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
   response.write " <input class=input type='submit'  value=' Goto '  name='cndok'></span></p>"     
%>
      </td></form>
  </tr>
</table>
<% 
end if
rs.close
set rs=nothing
%>
<%end if%>

<%if selectType="2" then%>
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse">
  <tr bgcolor="#C2DAE1"> 
    <td width="34" height="25" align="center">ID</td>
    <td width="250" align="center">新闻标题</td>
    <td width="110" align="center">来 源</td>
    <td width="85" align="center">所属一级分类</td>
    <td width="93" align="center">所属二级分类</td>
    <td width="113" align="center">发布日期</td>
    <td width="97" align="center">操作</td>
  </tr>
  <%
page=clng(request("page"))
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="select * from News where content like '%"&keyWord&"%' order by id desc"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("没有记录")
else
rs.PageSize=14
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page  
    
for j=1 to rs.PageSize 
%>
  <tr bgcolor="#FFFFFF"> 
    <td width="34" height="22" align="center" bgcolor="#C2DAE1"><%=rs("id")%></td>
    <td width="250" bgcolor="#EFEEE9">　
      <% if rs("imagenum")<>"0" then response.write "<img src='image/news.gif' border=0 alt='图片新闻'>" end if %>      <a href="../Article.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%=left(rs("title"),18)%></a></td>
    <td width="110" bgcolor="#EFEEE9"><div align="center"><%=left(rs("user"),6)%></div></td>
    <td width="85" bgcolor="#EFEEE9"><div align="center"><%=rs("BigClassName")%></div></td>
    <td width="93" bgcolor="#EFEEE9"><div align="center"><%=rs("SmallClassName")%></div></td>
    <td width="113" align="center" bgcolor="#EFEEE9"><%=rs("infotime")%>　</td>
    <td width="97" align="center" bgcolor="#EFEEE9"> <div align="center">
      <%call man_r("admin_infomodi.asp?ID="&rs("id")&"","修改","Info_allMan")%>
　
<%call man_r("admin_infodel.asp?id="&rs("id")&"&Action=Del","删除","Info_allMan")%>
</div></td>
  </tr>
  <%
rs.movenext
if rs.eof then exit for
next                                                       
%>
</table>  
</center>  
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>　</td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
<form method=Post action="search.asp.asp">  
      <td height="30" align="center"> 
    <%if Page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=search.asp.asp?page=1>首页</a>&nbsp;"
    response.write "<a href=search.asp.asp?page=" & Page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=search.asp?page=" & (page+1) & ">"
    response.write "下一页</a> <a href=search.asp.asp?page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
   response.write " <input class=input type='submit'  value=' Goto '  name='cndok'></span></p>"     
%>
      </td></form>
  </tr>
</table>

<% 
end if
rs.close
set rs=nothing
%>
<%end if%>
    </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->