<!--#include file="../inc/conn.asp"-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<form name="form2" method="post" action="?action=seach">
  <td height="35" align="center"> &nbsp; &nbsp;信息搜索 
    <input name="keyword" type="text" class="input" size="32">
  
      <select name="class" size="1" class="input" id="12" >
     <option value="">信息类别</option>
<%
set rsr=conn.execute("Select * from xw_fl order by id desc")
 do while not rsr.eof
 %>
 <option value="<%=rsr("id")%>"><%=rsr("cname")%></option>
<%
 rsr.movenext
 loop
 rsr.close
 %>
        </select>
  
  <select name="field_name" class="input">
  <option value="title">标题</option>
  <option value="newnr">内容</option>
  </select>
  <input name="submit" type="submit" class="input" value=" 搜 索 "></td>
</form>
</tr>
</table>


<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center"> 
<%
rem *****************************
page=request.querystring("page")
  if page="" then page=1 end if
  page=cint(page)
  set rser=server.createobject("adodb.recordset")
  classs=request("class") 
  keyword=request("keyword")
  field_name=request("field_name")
rem *****************************
 if request("field_name")<>"" and request("keyword")<>"" then
  if classs><"" then
  sql="select * from new where bianhao="&classs&" and "&request("field_name")&" like '%"&request("keyword")&"%' order by id desc"
  else
   sql="select * from new where "&request("field_name")&" like '%"&request("keyword")&"%' order by id desc"
  end if
 else
   if classs><"" then
     sql="select * From new  where bianhao="&classs&""&" order by did desc"
     'sql="select * from new where bianhao= "&classs&" order by id desc"
   else
     sql="select * from new order by did desc"
   end if
 end if
rser.open sql,conn,1,1
  if not rser.eof then
  rser.pagesize=25
    if page>rser.pagecount then page=rser.pagecount
    rser.absolutepage=page
	
    %> 

<table border="0" cellpadding="0" cellspacing="0" width="100%" valign=top>
        <%for j=1 to 25%>
  <tr> 
   
   <%for i=0 to 0%>
   <%set id=rser("id")
	set  title=rser("title")
	set  namee=rser("name")
	set  newtime=rser("newtime")
	set  newnr=rser("newnr")
	set  hotclick=rser("hotclick")
	 if len(title)>60 then
       title=left(title,60)&"..."
	 end if
	 n=DateDiff("d",newtime,now())
	 
	 newtime=year(newtime)&"-"&month(newtime)&"-"&day(newtime)
	' response.Write(n)
	 %> 
    <td align="center" valign="top">
      <table width="100%" height="33" border="0" cellpadding="0" cellspacing="0" class="b" >

              <tr> 
                <td align="left" valign="middle" height="23" class="newsbot_line">·<a href="?id=<%=id%>">
				
				<% if Instr(lcase(newnr),"<img" )>0 then response.Write  title&"<img src=../images/sys/news.gif width=16 height=11 border=0>"  else response.Write  title end if %>
				
				</a><% if n>-1 and n< 7 then %><img src="../images/sys/New.gif" width="24" height="14">
				<%end if %>
				&nbsp;<font color="#ff3300">[ 浏览：<%=hotclick%> ]</font></td>
                <td width="74" align="center" valign="middle" height="22" class="newsbot_line"><font face="Arial" color="#FF3300"><span style="font-size: 8pt"><%=newtime%></span></font></td>
              </tr>
			  <tr align="left"> 
                <td height="1" colspan="3" valign="middle" background="../images/line.gif"></td>
              </tr>
      </table>
    </td>
  <%rser.movenext
	if rser.eof then exit for end if
	next%>
  </tr>
  <%if rser.eof then exit for end if
	next%> 
</table>    

 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
    <td width="100%" height="42" align="center" valign="middle">
    共有<%=rser.pagecount%>页
	<font color="#ff0000" face="Arial"><%=rser.RecordCount %></font>个信息&nbsp;&nbsp;&nbsp; 当前为第<%=page%>页&nbsp;
      <%if page>1 then%>
        <a href="javascript:page('<%=classs%>',1,'<%=keyword %>','<%=field_name %>')">首页</a>&nbsp; 
      <%end if%>
      <%if page>1 then%> &lt;&lt;&nbsp;<a href="javascript:page(<%=classs%>,<%=page-1 %>,'<%=keyword %>','<%=field_name %>')">上一页</a>&nbsp;
      <%end if%>
      <%if page< rser.pagecount then%>
        <a href="javascript:page('<%=classs%>',<%=page+1 %>,'<%=keyword %>','<%=field_name %>')">下一页</a>&nbsp;&gt;&gt; 
      <%end if%>
      <%if page<rser.pagecount then%>
        <a href="javascript:page('<%=classs%>',<%=rser.pagecount%>,'<%=keyword %>','<%=field_name %>')">最后页</a>&nbsp;
		<%end if%> 
	  <SELECT onchange="window.open(options[selectedIndex].value,'_self')"style="color:#000000">
        <OPTION>转到页 
        <%for i=1to rser.pagecount%>
        <option value="javascript:page('<%=classs%>',<%=i%>,'<%=keyword %>','<%=field_name %>')" <%if i=rser.absolutepage then response.write "selected" end if%>>第<%=i%>页 
        <%next%>
      </select></td>
  </tr>
</table>
<%else%>
<font color="#FF0000">暂时没有新闻!</font>
<%end if 
rser.close
set rser=nothing
set conn=nothing
%></td>
        </tr>
</table>


<script>
function page(classs,page,keyword,field_name)
{ 
   window.location.href = "?class="+ classs+"&page="+page+"&keyword="+keyword+"&field_name="+field_name
}
</script>