<head>
<!--#include file="include/conn.asp"-->
<!--#include file="include/config.asp"-->
<%
key=request("key")
otype=request("otype")
if key="" then
   response.write "<script>alert('查找字符串不能为空！');history.back();</script>"
   response.end
end if
function boldword(strcontent,key) 
dim objregexp 
set objregexp=new regexp 
objregexp.ignorecase =true 
objregexp.global=true 
objregexp.pattern="(" & key & ")" 
strcontent=objregexp.replace(strcontent,"<font color=""#ff0000"">$1</font>" ) 
set objregexp=nothing 
boldword=strcontent 
end function
%>
<script language="javascript" type="text/javascript">

function page()
{
window.location.href="search.asp?page="+ pageg.value;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>电子报纸系统</title>

<style type="text/css">
<!--
@import url("css.css");
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" background="images/bg.jpg"><table width="976" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="336" valign="top">          <table width="97%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="26" class="a10">&nbsp;</td>
              </tr>
            <tr>
              <td><table width="320" border="0" cellpadding="0" cellspacing="0" class="k1">
                <tr>
                  <td><%call imgnews()%></td>
                    </tr>
                </table></td>
              </tr>
            <tr>
              <td height="20" valign="middle">&nbsp;</td>
              </tr>
            <tr>
              <td height="25" valign="middle"><table width="322" border="0" cellpadding="0" cellspacing="0" class="k7">
                <%call gosearch()%>
                </table></td>
              </tr>
            <tr>
              <td height="20" valign="middle">&nbsp;</td>
              </tr>
            <tr>
              <td height="187" valign="top"><table width="322" height="162" border="0" cellpadding="0" cellspacing="0" class="k2">
                <tr>
                  <td height="26">&nbsp; <span class="a2">友情</span><span class="a5">链接　　　　　　　　　　　　<a href="link.asp" class="a3">更多&gt;&gt;</a></span></td>
                    </tr><tr><td align="left" style="text-align:center; line-height:230%" valign="top"><%=getlinks()%></td></tr>
                </table></td>
              </tr>
          </table></td>
        <td width="640" valign="top">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="136" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="72%"><a href="index.asp"><img src="images/lxy1.jpg" width="432" height="80" border="0"></a></td>
                      <td width="28%" rowspan="2" valign="bottom" class="a10"><table width="100%" height="62" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="60" class="a10">·中共电子报纸管理系统委员会主办<br>
                              ·电子报纸系统编缉部出版<br>
                            ·国内统一刊号：CN33-0808/(G)</td>
                          </tr>
                      </table></td>
                    </tr>
                <tr>
                  <td><img src="images/lxy2.gif" width="432" height="33"></td>
                    </tr>
                </table></td>
              </tr>
 
            <tr>
              <td height="54" valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="k2">
                <tr>
                  <td width="61%" height="39">　　　　 <span class="a6">校报导航</span>　　<span class="a9">总第<%call gettotalsum()%>期</span> 　<span class="a9"><%call gettotalname()%></span></td>
                     <form method="get" action="cx.asp?classid=classid" name="search">       <td width="39%">　　<img src="images/s1.jpg" width="26" height="32" align="absbottom" /><span class="a1"> 第</span>
			<input name="classid" type="text" value="..." onFocus="this.value=''" onBlur="if (value ==''){value=' '}" size="6" /> 
			<span class="a1">期</span> <input type="image" src="images/go.gif" width="30" height="23" align="absbottom" /></td></form>
                    </tr>
                </table></td>
              </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="96%" height="26" valign="bottom"><div align="right"><span class="a12">首页&gt;&gt;搜索中心</span></div></td>
<td width="4%">&nbsp;</td>
</tr>
<tr>
<td height="28" colspan="2" bgcolor="#98BA3F" class="a123">　<span class="a14">搜索中心</span></td>
</tr>
<% 
page=clng(request("page"))	
set rs= server.createobject("adodb.recordset")
sql="select  id,title,infotime from news where title like '%"& key &"%' order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr bgcolor='#ffffff'><td colspan='4'><p align='center'>对不起，没有找到相关新闻</p></td></tr>"
else
%>  
			  
			  
<tr>
<td colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F6F9E8" class="k2">
<tr><td height="28" style=" padding-left:10px;"><div align="left">您要查找的关键字是&nbsp;&nbsp;<font color="#ff0000"><strong><%=key%></strong></font>，现共为您找到<font color="#ff0000"><b><%=rs.recordcount%></b></font>条新闻</div></td></tr>
<tr> <td height="420" valign="top" style="padding-top:10px;">
					  <%
rs.pagesize=15
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.absolutepage=page  
for j=1 to rs.pagesize
%>				  
<table width="100%" height="28" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/bg3.gif" class="a1" height="28">&nbsp;&nbsp;·<a href="xbnews.asp?id=<%=rs("id")%>"  target="_blank"><%response.write(boldword(rs("title"),key))%></a>&nbsp;&nbsp;&nbsp;&nbsp;[<%=rs("infotime")%>]</td>
</tr>
</table>
						
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
</td>
</tr>	

<tr>
<td height="48" align="center"><span class="a1">
   <%if page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=?key="&key&"&otype="&otype&"&page=1>首页</a>&nbsp;"
    response.write "<a href=?key="&key&"&otype="&otype&"&page=" & page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=?key="&key&"&otype="&otype&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=?key="&key&"&otype="&otype&"&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>条记录/页"
%>
</td>
</tr>
                    </table></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
      </tr>
   <% 

rs.close
set rs=nothing
conn.close
set conn=nothing
%>    
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      
      
    </table></td>
  </tr>
  <tr>
    <td height="50">      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="50" bgcolor="#478015"><div align="center" class="a10">版权所有 [中共电子报纸管理系统委员会] copyright 2006 All Rights Resenrved</div></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
