<%
key=request("key")
otype=request("otype")
searid=request("sid")
if key="" then
   response.write "<script>alert(' ַΪգ');history.back();</Script>"
   response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body topmargin="0">
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
  <tr> 
    <td width="170" height="300" valign="top" bgcolor="efefef"> 
      
    </td>
    <td width="600" align="center" valign="top" bgcolor="#FFFFFF">
<table width="100%" height="40" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
        <% 

Set rs= Server.CreateObject("ADODB.Recordset")
if otype="title" and eval(searid)<>"" then
sql="select * from NEWS where title Like '%"& key &"%' order by id desc"
elseif otype="msg" then
sql="select * from NEWS where content Like '%"& key &"%' order by id desc"
else
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>Բûҵ</p>"
else
%>
        <tr bgcolor="#9999CC"> 
          <td width="9%" height="25" align="center" bgcolor="#0066CC">ID</td>
          <td width="55%" align="center" bgcolor="#0066CC"></td>
          <td width="15%" align="center" bgcolor="#0066CC"></td>
          <td width="21%" align="center" bgcolor="#0066CC"></td>
        </tr>
        <%
i=0
do while not rs.eof
%>
        <tr bgcolor="#FFFFFF"> 
          <td height="22" align="center"><%=rs("id")%></td>
          <td><a href="ONEWS.asp?id=<%=rs("id")%>"  target="_blank"><%=rs("title")%></a></td>
          <td align="center"><%=left(rs("user"),5)%></td>
          <td align="center"><%=rs("infotime")%></td>
        </tr>
        <%
rs.movenext
i=i+1                                                         
loop
%>
        <tr bgcolor="#FFFFFF"> 
          <td height="24" colspan="4"> 
            <div align="center">ؼ<font color="#FF0000"><strong><%=key%></strong></font>Ϊҵ<font color="#FF0000"><%=i%></font>Ϣ</div></td>
        </tr>
        <% 
end if
rs.close
set rs=nothing
%>
      </table> 
    </td>
  </tr>
</table>
</body>
</html>

