searchlist.asp

来自「网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。」· ASP 代码 · 共 51 行

ASP
51
字号
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../Inc/Cls.Common.asp"-->
<%
Dim KeyList,i,WM_Type,SType
Key = WRMPS.CheckStr(Request("Key"),0)
Key = WRMPS.GetReplace(WRMPS.GetReplace(Key," ",""),"&nbsp;","")
SType = WRMPS.CheckStr(Request("Type"),0)
Select Case Ucase(SType)
  Case "ARTICLE"
    WM_Type = " WM_Type = 1 and"
  Case "CLASS"
    WM_Type = " WM_Type = 2 and"
  Case "COMPANY","MAP"
    WM_Type = " WM_Type = 3 and"
  Case "COUPON"
    WM_Type = " WM_Type = 4 and"
End Select

If Key <> "" Then
  Call DBConnBegin()
  Set Rs = Conn.Execute("Select Top 10 WM_Key,WM_Hit,WM_Type From WM_Search Where"&WM_Type&" WM_Through = 1 and WM_Key like'%"&Key&"%' Order By WM_Hit Desc")
  i = 0
  Do While Not Rs.Eof and i <= 9
    i = i+1
	Select Case Rs(2)
	  Case 1
        KeyList = KeyList & "<div onMouseMove='this.style.background=""#EFEFEF""' onMouseOut='this.style.background=""#FFFFFF""' style='padding:1px 5px;cursor:pointer' onclick=""Key.value='"&Rs(0)&"';SearchList.innerHTML = '';SearchList.style.display = 'none';window.open('"&WR_Setting(3)&"Search/Search.asp?Type=Article&Key="&Rs(0)&"','_blank')""><span style='float:right;color:green'>"&Rs(1)&" 次搜索</span>"& Rs(0) &"</div>"
	  Case 2
        KeyList = KeyList & "<div onMouseMove='this.style.background=""#EFEFEF""' onMouseOut='this.style.background=""#FFFFFF""' style='padding:1px 5px;cursor:pointer' onclick=""Key.value='"&Rs(0)&"';SearchList.innerHTML = '';SearchList.style.display = 'none';window.open('"&WR_Setting(3)&"Search/Search.asp?Type=Class&Key="&Rs(0)&"','_blank')""><span style='float:right;color:green'>"&Rs(1)&" 次搜索</span>"& Rs(0) &"</div>"
	  Case 3
        Select Case Ucase(SType)
		  Case "MAP"
            KeyList = KeyList & "<div onMouseMove='this.style.background=""#EFEFEF""' onMouseOut='this.style.background=""#FFFFFF""' style='padding:1px 5px;cursor:pointer' onclick=""Key.value='"&Rs(0)&"';SearchList.innerHTML = '';SearchList.style.display = 'none';window.open('"&WR_Setting(3)&"Company/Map/?Key="&Rs(0)&"','_blank')""><span style='float:right;color:green'>"&Rs(1)&" 次搜索</span>"& Rs(0) &"</div>"
          Case Else
            KeyList = KeyList & "<div onMouseMove='this.style.background=""#EFEFEF""' onMouseOut='this.style.background=""#FFFFFF""' style='padding:1px 5px;cursor:pointer' onclick=""Key.value='"&Rs(0)&"';SearchList.innerHTML = '';SearchList.style.display = 'none';window.open('"&WR_Setting(3)&"Search/Search.asp?Type=Company&Key="&Rs(0)&"','_blank')""><span style='float:right;color:green'>"&Rs(1)&" 次搜索</span>"& Rs(0) &"</div>"
        End Select
	  Case 4
        KeyList = KeyList & "<div onMouseMove='this.style.background=""#EFEFEF""' onMouseOut='this.style.background=""#FFFFFF""' style='padding:1px 5px;cursor:pointer' onclick=""Key.value='"&Rs(0)&"';SearchList.innerHTML = '';SearchList.style.display = 'none';window.open('"&WR_Setting(3)&"Search/Search.asp?Type=Coupon&Key="&Rs(0)&"','_blank')""><span style='float:right;color:green'>"&Rs(1)&" 次搜索</span>"& Rs(0) &"</div>"
	End Select
  Rs.MoveNext
  Loop
  Rs.Close
  Set Rs = Nothing

  Call DBConnEnd()
  Call ClassEnd()

End If

Response.Write KeyList
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?