📄 keyword_js.asp
字号:
javastr=""
<!--#include file="setup.asp"-->
<!--#include file="connstr.asp"-->
<%
'================================================================================
'Product:K-Search Version 2.1
'本“软件产品”受《中华人民共和国著作权法》和《中华人民共和国计算机软件保护条例》
'和国际条约的保护。如未经授权而擅自复制或传播本程序(或其中任何部分),将受到严厉
'的刑事及民事制裁,并将在法律许可的范围内受到最大可能的起诉!
'Homepage:http://www.lucoo.com/
'--------------------------------------------------------------------------------
'Copyright(c) 2005 lucoo.com All Rights Reserved 绿色互联 版权所有
'================================================================================
function filtration(str)
str=replace(str,chr(34),"")
str=replace(str,chr(35),"")
str=replace(str,chr(37),"")
str=replace(str,chr(38),"")
str=replace(str,chr(39),"")
str=replace(str,chr(40),"")
str=replace(str,chr(41),"")
str=replace(str,chr(42),"")
str=replace(str,chr(43),"")
str=replace(str,chr(45),"")
str=replace(str,chr(46),"")
str=replace(str,chr(58),"")
str=replace(str,chr(59),"")
str=replace(str,chr(60),"")
str=replace(str,chr(61),"")
str=replace(str,chr(62),"")
filtration=str
end Function
dim rs
dim keyword
dim count
count=Request.QueryString("count")
keyword=Request.QueryString("keyword")
keyword=replace(keyword," "," ")
keyword=filtration(keyword)
if len(keyword)<8 and keyword_add=1 then
set rs=server.createobject("adodb.recordset")
rs.open "select keyword,hot from keyword where keyword='"&keyword&"'",conn,1,3
if rs.eof and rs.bof then
rs.addnew
rs("keyword")=keyword
rs("hot")="0"
rs.update
rs.close
set rs=nothing
else
set rs=conn.execute("update keyword set hot=hot+1 where keyword='"&keyword&"'")
rs.close
set rs=nothing
end if
end if
keyword=ltrim(rtrim(keyword))
if len(keyword)>=3 then
keyword_left=left(keyword,2)
keyword_right=right(keyword,2)
keywordlist=keyword &" "& keyword_left &" "&keyword_right
keywordlist=split(keywordlist,chr(32))
else
keywordlist=split(keyword,chr(32))
end if
for i=0 to ubound(keywordlist)
sql=sql &" keyword.keyword like '%" & keywordlist(i) & "%' or "
next
sql=Left(SQL,(LEN(SQL)-3))
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select top 9 keyword,hot from keyword where ("&sql&") and keyword<>'"&keyword&"' order by hot desc",conn,1,1
if rs.eof and rs.bof then
'
else
do while not rs.eof
%>
javastr=javastr+"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
javastr=javastr+"<tr><td width=\"20%\" height=\"25\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td width=\"20%\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td width=\"20%\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td width=\"20%\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td width=\"20%\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td></tr>"
javastr=javastr+"<tr><td height=\"25\">"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td>"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td>"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td>"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"search.asp?keyword=<%=rs("keyword")%>\"><%=rs("keyword")%></a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td>"
javastr=javastr+"<td>"
<%if not rs.eof then%>
javastr=javastr+"<a href=\"keyword.asp?keyword=<%=keyword%>\" target=\"_blank\">>>更多相关搜索</a>"
<%
count=count-1
rs.movenext
end if
%>
javastr=javastr+"</td></tr>"
javastr=javastr+"</table>"
<%
count=count-1
if count<1 then exit do
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
document.write (javastr)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -