<!--#include file="ct.asp"-->
<%function s1()%>
<table width=100% align=center border=0  cellpadding=0 cellspacing=0  style="border-bottom-width: 1px;border-bottom-style: dotted;border-bottom-color: #CCCCCC;">

<tr>
<td height="30">&nbsp;&nbsp;<img src="images/body_r1_c1_r15_c17.jpg" width="6" height="7" />&nbsp;&nbsp;<a href="view.asp?id=<%=id%>&lb=<%=lb%>" target="_blank"><%=tt%></a></td>
</tr>
</table>
<%end function%>
		  <%
	   if request.querystring("page")="" then
                     page=1
                     else
                     page=request.querystring("page")
					 
						end if
					lb=request.querystring("lb")
					kw=request.querystring("kw")
						if kw="" then											
									if lb="" then
									sql="select * from xld_news"
									else
									 sql="select * from xld_news where news_type="&lb&""		
									 end if	
					    else
									 if dl="" then
									 sql="select * from xld_news where news_title like '%"&kw&"%'"
									 else
								    sql="select * from xld_news where news_type="&lb&" and news_title like '%"&kw&"%'"		
									 end if
									 
						end if
					 
					 page=cint(page)
                     Const adOpenKeyset1 = 1
                     Const adLockReadOnly1 = 1
					  set rst=server.createobject("adodb.recordset")
                          rst.open sql,conn,adOpenKeyset1, adLockReadOnly1
						  if err.number<>0 then
						  response.end
						  response.redirect("error.asp?msg=访问失败")
						  end if
						  
						  if rst.eof then
						%>
						<table width="334" height="84" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">暂无相关信息</td>
  </tr>
</table>

						<%
						  else
						  rst.pagesize=12
                          TotalPages=rst.PageCount
                          Pagesize=rst.pagesize
                          rst.absolutepage=page
                        totalrows = rst.RecordCount 
                         how=0
						 %>
                        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0"> 
                          <tr>
 						<%
                         Do until rst.EOF or how= PageSize 
						 
						id=rst("news_id")
						tt=rst("news_title")
						rq=rst("news_rq")
						lb=rst("news_type")
						 if how mod 2=0 then
						 bg="#ffffff"
						 else
						 bg="#f9f9f9"
						 end if
						  m=how
						 if m mod 1=0 then
						  %>
						  </tr><tr>  
        				  <%end if%>
						   <td valign="top"><%s1()%></td>					
	  
						<%						
    					  rst.movenext
						  how=how+1
						  loop
						  rst.close
						  set rst=nothing
						
						
						  %>		
</tr>  </table>
		 <%end if%>
		  <%
					  if totalrows=0 then
					  else
					  %>
					  <form name="formgo" action="<%=pathinfo%>" method="get" style="margin:0px">
			          <table width="99%" height="36" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="30" align="center">共<%=totalrows%>条信息，<%=totalpages%>页，页次:<%=page%>/<%=totalpages%>页 &nbsp;&nbsp;
                         
							    <%
if page<>1 then
%>
                                <a href="<%=pathinfo%>?lb=<%=request.querystring("lb")%>&kw=<%=request.querystring("kw")%>&page=1">首 页</a> <a href="<%=pathinfo%>?lb=<%=request.querystring("lb")%>&kw=<%=request.querystring("kw")%>&page=<%=page-1%>">上一页</a>
                                <%else%>
      首 页 上一页
      <%end if%>
      <%
if page<>TotalPages then
%>
      <a href="<%=pathinfo%>?lb=<%=request.querystring("lb")%>&kw=<%=request.querystring("kw")%>&page=<%=page+1%>">下一页</a> <a href="<%=pathinfo%>?lb=<%=request.querystring("lb")%>&kw=<%=request.querystring("kw")%>&page=<%=TotalPages%>">末 页</a>
      <%else%>
      下一页 末 页
      <%end if%>
	  
	  &nbsp;跳转到第
	 
<select name="page" size="1">
<option value=<%=page%>><%=page%></option>
<%
for i=1 to totalpages
if i=page then
else
%>
  <option value=<%=i%>><%=i%></option>
<%
end if
next%>
</select>

<input type="submit" name="Submit" value="GO">
<input name="lb" type="hidden" value="<%=request.querystring("lb")%>">
<input name="kw" type="hidden" value="<%=request.querystring("kw")%>">
</td></tr></table>
 <%end if%> 
 </form>