应神话要求,把搜索插件发上来!!!
By admin
at 2007-07-18
0人收藏 • 1055人看过
<!--#include file="setup.asp"-->
<%
MDBpath="database/"
set rs_type=server.CreateObject("ADODB.RecordSet")
set rs=server.CreateObject("ADODB.RecordSet")
if request("k")="" then
MaxPerPage=10 '###每页显示条数
sePAGE="no"
else
MaxPerPage=10 '###每页显示条数
end if
if request("pp")<>"" then
pp=request("pp")
else
pp="date"
end if
skN=request("k")
skP="更新日期"
if request("pp")="hits" then
skP="下载次数"
elseif request("pp")="hot" then
skP="软件评价"
end if
if request("sou")<>"" then
skN=request("sou")
skCD=" and sou='"&request("sou")&"'"
end if
%>
<html>
<head>
<meta name="GENERATOR" Body="Microsoft FrontPage 6.0">
<meta name="ProgId" Body="FrontPage.Editor.Document">
<meta http-equiv="Body-Type" Body="text/html; charset=gb2312">
<meta http-equiv="Body-Language" Body="zh-cn">
<title>灿斌工作室,全球最小中文软件搜索引擎!</title>
</head>
<body topmargin="2" leftmargin="5">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="772" height="55">
<tr>
<td width="186" height="55">
<p align="center">
<font color="#0000FF" size="5">灿斌工作室搜索</font></td>
<td width="405" height="55"><form action="postso.asp" method="get">
<p align="center">
<input type="text" name="k" size="30" value="<%=request("k")%>">
<input type="submit" value="灿斌工作室,搜索" name="B1" style="font-family: Verdana; font-size: 9pt">
</p>
</td></form>
<td width="181" height="55"> </td>
</tr>
</table>
</center>
</div>
<%if request("k")="" then%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" height="30%">
<tr>
<td width="100%">
<p align="center"><font color="#FF0000">关键词不能为空!</font></td>
</tr>
</table>
</center>
</div>
<%else
set rs_list=server.CreateObject("ADODB.RecordSet")
set rs_type=server.CreateObject("ADODB.RecordSet")
set rs=server.CreateObject("ADODB.RecordSet")
KN=split(request("k")," ")
for i = 0 to ubound(KN)
KNN=KNN&" or Subject like '%"&KN(i)&"%'"
next
%><%
sql="select * from BBSXP_Posts where (Subject like '%"&request("k")&"%'"&KNN&")"
sql="select * from BBSXP_Posts where (Body like '%"&request("k")&"%'"&KNN&")"
rs.open sql,conn,1,1
if rs.eof then
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber3" height="60%">
<tr>
<td width="100%">
<p align="center">
<img src="images/sorryNo.gif" border="0" width="186" height="150"></td>
</tr>
</table>
</center>
</div><%else
if sePAGE<>"no" then '###排行方式时只显示指定数目
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
allshu=rs.recordcount
if request("page")<>"" then
if cint(request("page"))<1 or cint(request("page"))>mpage then
currentPage=1
else
currentPage=cint(request("page"))
end if
else
currentPage=1
end if
rs.move (currentPage-1)*MaxPerPage
end if '###排行方式时只显示指定数目
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="4" width="772" style="border-collapse: collapse" bordercolor="#111111" height="308" bgcolor="#FFFFFF">
<tr>
<td colspan="3" width="708" bgcolor="#F7F7F7" height="22" style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#C0C0C0">
<p align="right"><font size="-1">灿斌工作室搜索一下,共找到相关网页<%=allshu%>篇</font></td>
</tr>
<tr>
<td width="489" height="1"></td>
<td width="4" height="1"></td>
<td width="207" height="1"></td>
</tr>
<tr>
<td valign="top" width="489" height="272" align="left">
<p align="left">
<%do while not rs.eof%>
<%'''软件
softname=rs("Subject")
if request("k")<>"" then
for i = 0 to ubound(KN)
softname=replace(softname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<a target=_blank href="ShowPost.asp?ThreadID=<%=rs("ThreadID")%>"><%=softname%></a>
<br>
<font size="-1">
<%
Body=ReplaceText(Rs("Body"),"<[^>]*>","")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
Body=replace(Body,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<font size="-1">
<%
Body=ReplaceText(Rs("Body"),"<[^>]*>","")
BodySize=len(Body)
if BodySize>222 then Body=Left(Body,222)&"..."
if k<>"" then
Body=replace(Body,("k"),"<font color=#FF0000>"&k&"</font>")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
Body=replace(Body,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><%=Body%><%else%><%=Body%><%end if%></font>
<br> <font color="#008000" size="-1">
<%if rs("Subject")<>"" then%><%
Subject=rs("Subject")
if request("k")<>"" and request("kt")<>"名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
Subject=replace(Subject,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>网址:<%=SiteSettings("SiteURL")%>ShowPost.asp?ThreadID=<%=rs("ThreadID")%>...<%else%>没有网址!<%end if%>
</font></p>
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%> </td>
<td width="4" height="272" style="border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-width: 1" bordercolor="#A6A6FF" align="left"></td>
<td valign="top" width="207" height="272" align="left">
<p align="center"><font size="3">
<a href="http://wpa.qq.com/msgrd?V=1&Uin=517038270&menu=yes&Site=灿斌工作室论坛">广告位出租,联系QQ:517038270</a></font></td>
</tr>
</table>
</center>
</div>
<%if allshu>0 and skPAGE<>"no" then%>
<p><br>
<div align="center">
<center>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="772" id="AutoNumber1" height="25" bgcolor="#FFFFFF">
<tr>
<td width="100%" height="26">
<p align="center"><font size="2" color="#6A6A6A">共<%=mpage%>页,当前第<%=currentPage%>页</font><font size=2>
<%
pageno=currentPage
%><%if cint(pageno)>1 then%><a href="postso.asp?sou=<%=request("sou")%>&pp=<%=request("pp")%>&k=<%=server.urlencode(request("k"))%>" title="最前页"><%end if%><font face="Webdings">9</font></a> <%if cint(pageno)>1 then%><a href="postso.asp?sou=<%=request("sou")%>&pp=<%=request("pp")%>&k=<%=server.urlencode(request("k"))%>&page=<%=pageno-1%>" title="上一页"><%end if%>上一页</a><%
pp=cint(pageno)-5
if pp<1 then
pp=1
end if
for pno=pp to mpage
if len(pno)=1 then
end if
p=p+1
if pno*1=cint(pageno)*1 then
%> <font color="#FF0000">[<%=pno%>]</font><%else%> <a href="postso.asp?sou=<%=request("sou")%>&pp=<%=request("pp")%>&k=<%=server.urlencode(request("k"))%>&page=<%=pno%>">[<%=pno%>]</a><%end if%><%
if p>=9 then exit for
next%> <%if cint(pageno)< mpage then%><a href="postso.asp?sou=<%=request("sou")%>&pp=<%=request("pp")%>&k=<%=server.urlencode(request("k"))%>&page=<%=pageno+1%>" title="下一页"><%end if%>下一页</a> <%if cint(pageno)< mpage then%></font><a href="postso.asp?sou=<%=request("sou")%>&pp=<%=request("pp")%>&k=<%=server.urlencode(request("k"))%>&page=<%=mpage%>" title="最后页"><%end if%></font><font size="2" face="Webdings">:</font></a></td>
</tr>
</table></center>
</div>
<%end if%></font>
<p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="772" id="AutoNumber2" bgcolor="#F6F6F6" height="20">
<tr>
<td width="100%" height="16"> </td>
</tr>
<tr>
<td width="100%" height="1"><form action="postso.asp" method="get">
<p align="center">
<input type="text" name="k" size="36" value="<%=request("k")%>">
<input type="submit" value="灿斌工作室,搜索" name="B1" style="font-family: Verdana; font-size: 9pt">
</p>
</td></form>
</tr>
<tr>
<td width="100%" height="30"> </td>
</tr>
</table>
</center>
</div>
<p align="center">©2007 <font color="#FF0000">
<a href="http://cbgzs.9966.org"><font color="#FF0000">灿斌</font><font color="#0000FF">工作</font><font color="#008000">室</font><font color="#000080">论坛</font></a></p>
</body>
</html>
保存为postso.asp
<html>
<head>
<style type="text/css">
<!--
td, body { font-size: 9pt}
a:link{ color:#000000; text-decoration:none}
a:visited{COLOR: #000000; TEXT-DECORATION: none}
a:active{color:green;text-decoration:none}
a:hover{color:red;text-decoration:underline}.f{font-size:12px}.f14{font-size:14.8px}.m{color:000000}:link.m{text-decoration: none}a{font-family:arial,sans-serif;}
.q{text-decoration:none; color:#0000cc;}
-->
</style>
</style>
<title>灿斌工作室搜索引擎,全球最小中文软件搜索引擎!</title>
<script>
<!--
function sf(){document.f.q.focus();}
function c(p,l,e){var f=document.f;if (f.action && document.getElementById) {var hf=document.getElementById("hf");if (hf) {var t = "<input type=hidden name=tab value="+l+">";hf.innerHTML=t;}f.action = 'http://'+p;e.cancelBubble=true;f.submit();return false;}return true;}
// -->
</script>
</head>
<td rowspan="3">
</td>
<p align="center"><br>
<img border="0" src="images/sousousou.gif">
<p align="center"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="575" height="16" id="AutoNumber3">
<tr>
<td width="575" height="18" align="center" bgcolor="#FFFFFF" style="font-size: 9pt">
<table cellSpacing="0" cellPadding="0" border="0" height="22" bgcolor="#EFEFEF" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width=15> </td>
<td id=0 bgcolor=#efefef align=center width=250 nowrap valign="bottom">
高速检索-共 X 张网页</td><td width=15 valign="bottom"> </td>
<td id=1 bgcolor=#efefef align=center width=250 nowrap onClick="return c('http://cbgzs.9966.org/','bbs',event);" style=cursor:pointer;cursor:hand; valign="bottom">
进入灿斌工作室网上论坛(<b><font color="#FF0000">新</font></b>)</td><td width=15> </td>
</tr>
<tr>
<td colspan=5 bgcolor=#333333><img width=1 height=1 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<p align="center"></a>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="460" height="11" id="AutoNumber2">
<tr><td align="middle" style="font-family: arial,sans-serif">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="535" id="AutoNumber7" height="8">
<tr>
<td width="71" height="4" align="center" style="font-size: 9pt" rowspan="2">
</td>
<td width="389" height="4" align="center" style="font-size: 9pt" rowspan="2">
<u><form action="postso.asp" method="get">
<span style="font-family: Verdana">
<input type="text" name="k" size="36"></u>
<u> <input type="submit" value="灿斌工作室,搜索" name="B1" style="font-family: Verdana; font-size: 9pt"></u></span><span style="font-family: Verdana; font-size: 9pt"></span></td>
</center>
</div>
<div align="center" style="width: 358; height: 44"><center>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1" height="1" id="AutoNumber6">
<tr>
</td>
</tr>
</table>
</center>
</td>
<html><body>
</div>
<u>
</center></div>
<p> <td rowspan="3">
</p>
<div align="center"><center>
</center></div>
</body>
</html>
保存为postso.htm
放根目录下
不知道可以用不!
- 登录后方可回帖