<!-- #include file="conn.asp" -->
<!-- #include file="include.asp" -->
<%
DIM totalPut
DIM CurrentPage
DIM TotalPages
const MaxPerPage=20
if not isempty(request("page")) then
currentPage=cint(request.querystring("page"))
else
currentPage=1
end if
types=request("types")
key=trim(request("key_word"))
%>
<HTML>
<HEAD>
<TITLE>武汉电脑报价网-PCBaoJia.com</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</HEAD>
<BODY BGCOLOR=#003060 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bg.gif">
			<%call head(2)%>
			<table width="764" border="0" cellpadding="0" cellspacing="0" background="images/bg_body.gif" align="center">
              <tr>
                <td align="center"><table width="760" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="159" align="center" valign="top" bgcolor="3E93C9"><TABLE WIDTH=157 BORDER=0 CELLPADDING=0 CELLSPACING=0>
                          <TR>
                            <TD COLSPAN=3> <IMG SRC="images/login_t.gif" WIDTH=157 HEIGHT=38 ALT=""></TD>
                          </TR>
                          <TR>
                            <TD> <IMG SRC="images/login_l.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
                            <TD width="139" align="center" bgcolor="#FFFFFF"><%call login%></TD>
                            <TD> <IMG SRC="images/login_r.gif" WIDTH=9 HEIGHT=112 ALT=""></TD>
                          </TR>
                          <TR>
                            <TD COLSPAN=3> <IMG SRC="images/login_b.gif" WIDTH=157 HEIGHT=8 ALT=""></TD>
                          </TR>
                        </TABLE>
                          <br>
                          <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2F75A6" bgcolor="2F75A6">
                            <tr>
                              <td height="3" bgcolor="#3399CC"></td>
                            </tr>
                            <tr>
                              <td align="center" class="white_b_14">最新加盟经销商</td>
                            </tr>
                        </table></td>
                      <td align="center" valign="top"><TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0>
                          <TR>
                            <TD> <IMG SRC="images/body_l.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
                            <TD></TD>
                            <TD align="right"> <IMG SRC="images/body_r.gif" WIDTH=5 HEIGHT=10 ALT=""></TD>
                          </TR>
                        </TABLE>
                          <table width="96%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td>当前位置：<a href="index.asp" class="wz">武汉电脑报价网</a> → <a href="news.asp" class="wz">新闻资讯</a>
							  <% if types<>"" then Response.Write(" → <a href=news.asp?types="&types&" class=wz>"&types&"</a>")%></td>
                            </tr>
                          </table>
                          <%call search_news%><IMG WIDTH=0 HEIGHT=10><table width="578"  border="0" cellpadding="0" cellspacing="1" bgcolor="2F75A6">
                            <tr>
                              <td bgcolor="FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr align="center">
    <td>『 <a href="news.asp?types=&#28040;&#36153;&#23548;&#36141;"><span class="red">消费导购</span></a> 』</td>
	<td>『 <a href="news.asp?types=&#26032;&#38395;&#28909;&#28857;"><span class="red">新闻热点</span></a> 』</td>
	<td>『 <a href="news.asp?types=&#30828;&#20214;&#35780;&#27979;"><span class="red">硬件评测</span></a> 』</td>
	<td>『 <a href="news.asp?types=&#30005;&#33041;&#32500;&#25252;"><span class="red">电脑维护</span></a> 』</td>
  </tr>
</table> 					  <table width="100%"  border="0" cellpadding="5" cellspacing="0">
                                  <tr>
                                    <td height="390" align="center" valign="top">
                                      <%
dim rs
dim sql
set rs=server.createobject("adodb.recordset")
sql = "select * from news where news_title & news_content like '%" & key & "%'"
if types<>"" then
sql = sql & " and types='"&types&"'"
end if
sql = sql & " order by idate desc"
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
if not key="" then
response.write "<p align='center'>对不起，没有查询到和 <span class=red>"&key&"</span> 相关的报价!</p>" 
else
response.write "<p align='center'>对不起，没有查询到相关的报价!</p>" 
end if
else 
totalPut=rs.recordcount 
if currentpage<1 then 
currentpage=1 
end if 
if (currentpage-1)*MaxPerPage>totalput then 
if (totalPut mod MaxPerPage)=0 then 
currentpage= totalPut \ MaxPerPage 
else 
currentpage= totalPut \ MaxPerPage + 1 
end if 
end if 
if currentPage=1 then 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,""
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,""
else 
currentPage=1 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,""
end if 
end if 
rs.close 
end if 
set rs=nothing
sub showContent (totalput,MaxPerPage)
if not key="" then
response.write "<p align='left'>&nbsp;&nbsp;&nbsp;&nbsp;以下是查询到和 <span class=red>"&key&"</span> 相关的报价：</p>"
end if%>
                                      <table width="100%"  border="1" cellpadding="3" cellspacing="0" bordercolor="eeeeee"  frame=hsides rules=rows>
                                        <tr align="center" bgcolor="#C7F3FF">
                                          <td width="85%">标题</td>
                                          <td width="15%">日期</td>
                                        </tr>
                                        <%do while not rs.eof%>
                                        <tr bgcolor="<%if i mod 2 then Response.Write("#F8F8F8") else Response.Write("#ffffff")%>" onMouseOver="this.style.backgroundColor='#EFFCFE'" onMouseOut="this.style.backgroundColor='<%if i mod 2 then Response.Write("#F8F8F8") else Response.Write("#ffffff")%>'">
                                          <td>·<a href="news_info.asp?id=<%=rs("news_id")%>"><%=replace(rs("news_title"),key,"<b>"&key&"</b>")%></a><% if rs("pic")<>"-" then
Response.Write("[<font color=red>图</font>]")
end if %></td>
                                          <td align=center><%=int(rs("idate"))%></td>
                                        </tr>
                                        <% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
                                      </table>
                                    <%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then 
n= totalnumber \ maxperpage 
else 
n= totalnumber \ maxperpage+1 
end if 
if CurrentPage<2 then 
response.write "<table border=0 width=96% cellspacing=0 cellpadding=0>" 
response.write "<tr height=30>"
response.write "<td>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>" 
response.write "<td align=right>"
response.write "【最前页】【上一页】" 
else 
response.write "<table border=0 width=96% cellspacing=0 cellpadding=0>"
response.write "<tr height=30>"
response.write "<td>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>"
response.write "<td align=right>"
response.write "【<a href="&filename&"?page=1&types="&types&"&key="&key&">最前页</a>】" 
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&types="&types&"&key="&key&">上一页</a>】" 
end if 
if n-currentpage<1 then 
response.write "【下一页】【最后页】" 
else 
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&types="&types&"&key="&key&">" 
response.write "下一页</a>】【<a href="&filename&"?page="&n&"&types="&types&"&key="&key&">最后页</a>】" 
end if 
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</form>"
end function
%></td>
                                  </tr>
                                  <tr>
                                    <td height="4" bgcolor="ADECF9"></td>
                                  </tr>
                              </table></td>
                            </tr>
                        </table></td>
                    </tr>
                </table></td>
              </tr>
            </table>
			<TABLE WIDTH=764 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
              <TR>
                <TD> <IMG SRC="images/foot_1.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
                <TD> <IMG SRC="images/foot_2.gif" WIDTH=153 HEIGHT=8 ALT=""></TD>
                <TD> <IMG SRC="images/foot_3.gif" WIDTH=3 HEIGHT=8 ALT=""></TD>
                <TD> <IMG SRC="images/foot_4.gif" WIDTH=600 HEIGHT=8 ALT=""></TD>
                <TD> <IMG SRC="images/foot_5.gif" WIDTH=4 HEIGHT=8 ALT=""></TD>
              </TR>
            </TABLE>
			<br>
			<!-- #include file="foot.asp" --></div>
</body>
</html>
