<%@ Language=VBScript %>
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strSql,strActive,strTitle,strClass
strSql="Select * from Class order by Class_Desc"
set rs=MyCon.execute(strSql)

strActive=trim(Request.QueryString("active"))

%>

<html>

<head>
<title>关键字查找</title>
<link rel="stylesheet" href="../css.css" type="text/css">
</head>
<body >
<table border="0" width="100%">
    <tr>
        <td width="100%" align="left" bgcolor="#cccccc"> &nbsp;<b><a href="Default.asp" Class="title1">首页</a><font color="#FFFFFF"> 
          |</font></b> 
          <% Do while not rs.eof %>
          <a href="ListNews.asp?ClassID=<%=rs("ClassID")%>" Class=title1><%=rs("Class_Name")%></a> 
          <b><font color="#FFFFFF"> |</font></b> 
          <% rs.movenext %>
          <% Loop %>
        </td>
    </tr>
  </table>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td width="215" valign="top" align="left" bgcolor="#cccccc"> 
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="100%" valign="top" align="left">
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top" align="left"></td>
          </tr>
          <tr>
            <td width="100%" valign="top" align="left"></td>
          </tr>
          <tr>
            <td width="100%" valign="top" align="left"></td>
          </tr>
        </table>
        </td>
      <td width="437" valign="top" align="center">

          <table border="0" cellpadding="0" cellspacing="0" width="96%">
            <tr>
              <td width="100%" valign="top" align="left">
             <%      
               If strActive="DoIt" Then
               strTitle=trim(Request.form("title")) 
               strClass=trim(Request.form("Class"))
               If strTitle="" Then strTitle="www.3rom.com"
               
               set rs1=server.CreateObject("ADODB.RecordSet")
               If strClass=0 Then
               strSql="Select * from News where News_Title like"
               strSql=strSql & " '%" & strTitle & "%'"
               strSql=strSql & " order by NewsID Desc"
               Else
               strSql="Select * from News where (News_Title like"
               strSql=strSql & " '%" & strTitle & "%'"
               strSql=strSql & " and News_Class=" & strClass & ")"
               strSql=strSql & " order by NewsID Desc"
               End If
               rs1.Open strSql,MyCon,1,1
               
            %>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%">
    <% If not rs1.eof Then %>
    关键字:<font color="red"><%=strTitle%></font>
    找到<%=rs1.RecordCount%>条相关帮助信息     
    <% Else %>
    找不到您想要的内容,请使用<a href="Search.asp?active=Admin">高级查找</a>功能试试.      
    <% End If %>
    </td>
  </tr>
  <% Do while not rs1.eof %>
  <tr>
    <td width="100%">
    <a href="ReadNews.asp?NewsID=<%=rs1("NewsID")%>"><%=rs1("News_Title")%></a>
    <br>
    </td>
  </tr>
  <% rs1.movenext %>
  <% Loop %>
  <tr>
    <td width="100%" valign="top" align="center"></td>
  </tr>
</table>
            <% 
               rs1.close
               set rs1=nothing
               End If 
            %>   
              </td>
            </tr>
            <tr>
              <td width="100%" valign="top" align="center">
              <% If strActive="Admin" Then %>
                <form method="POST" action="Search.asp?active=Check">
                  
              <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#6699FF" bordercolordark="#D6D3CE">
                <tr>
                      
                  <td width="100%" bordercolor="#cccccc" bgcolor="#cccccc" Class="title1">帮助中心搜索引擎</td>
                    </tr>
                    <tr>
                      
                  <td width="100%" align="center" nowrap bordercolor="#cccccc">
<input type="text" name="Search" size="20"> 
                        <input type="submit" value=" 给我搜 " name="Search1"></td>
                    </tr>
                    <tr>
                      
                  <td width="100%" align="center" bordercolor="#cccccc">精确匹配:
<input type="radio" value="V1" name="R1">模糊匹配:<input type="radio" name="R1" checked value="V2"></td>
                    </tr>
                  </table>
         
                
                </form>
              <% End If %>
              </td>
            </tr>
            <% 
               If strActive="Check" Then
                
               strSearch=trim(Request.form("Search")) 
               strR=trim(Request.form("R1"))
               If strSearch="" Then strSearch="www.3rom.com"
               
               set rs2=server.CreateObject("ADODB.RecordSet")
               If strR="V2" Then
               strSql="Select * from News where (News_Title like"
               strSql=strSql & " '%" & strSearch & "%'"
               strSql=strSql & " or News_Content like"
               strSql=strSql & " '%" & strSearch & "%'"
               strSql=strSql & " or News_Author like"
               strSql=strSql & " '%" & strSearch & "%'"
               strSql=strSql & " or News_Freind like"
               strSql=strSql & " '%" & strSearch & "%'"
               strSql=strSql & " or News_Link like"
               strSql=strSql & " '%" & strSearch & "%'"
               strSql=strSql & ")"
               strSql=strSql & " order by NewsID Desc"
               Else
               strSql="Select * from News where (News_Title="
               strSql=strSql & " '" & strSearch & "'"
               strSql=strSql & " or News_Content="
               strSql=strSql & " '" & strSearch & "'"
               strSql=strSql & " or News_Author="
               strSql=strSql & " '" & strSearch & "'"
               strSql=strSql & " or News_Freind="
               strSql=strSql & " '" & strSearch & "'"
               strSql=strSql & " or News_Link="
               strSql=strSql & " '" & strSearch & "'"
               strSql=strSql & ")"
               strSql=strSql & " order by NewsID Desc"
               End If
               
               rs2.Open strSql,MyCon,1,1
               
            %>          
            <tr>
              <td width="100%" valign="top" align="center">
              <% If not rs2.eof Then %>
              <div align="Left">
              关键字:<font color="red"><%=strSearch%></font>
              找到<%=rs2.RecordCount%>条相关帮助信息 
              </div>
              <% Else %>
              <div align="center">
              找不到相关内容
              </div>
              <% End If %>              
              </td>
            </tr>
            <% Do while not rs2.eof %>
            <tr>
              <td width="100%" valign="top" align="center">
              <div align="left">
              <a href="ReadNews.asp?NewsID=<%=rs2("NewsID")%>" target="_blank" title="<%=rs2("News_Post_Time")%>">
              <%=rs2("News_Title")%>
              </a>
              </div>              
              </td>
            </tr>
            <% rs2.movenext %>
            <% Loop %>
            
            <% rs2.close
               set rs2=nothing
            %>
            <% End If %>
          </table>
  
      </td>
      <td width="97" valign="top" align="left"></td>
    </tr>
  </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#cccccc">
      <tr>
        <td width="100%" align="right">&nbsp;</td>
    </tr>
  </table>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
<%
rs.close
set rs=nothing
MyCon.close
set MyCon=nothing
%>