📄 searchs.asp
字号:
<!--#include file=conn.asp-->
<!--#include file="config.asp"-->
<%
if gx=1 then
if request("content")="" then
response.write"<script>alert('搜索关键字不能为空!');history.back();</script>"
else%>
<html>
<head>
<title><%=webname%>搜索_<%=HTMLcode(request("content"))%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.zhtable {table-layout:fixed; word-wrap:break-word; }
.formfont {FONT-SIZE: 16px}
input{font-family:arial}
td{font-family:"Arial";line-height:18px;font-size:9pt;}
.bnsrh {padding-top:2px;height:24px}
.bgbdy {background-color: #FFFFFF;margin:0px;}
.bgcnt {background-color: #FFFFFF; padding-left: 10px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px;}
.bgpagLn {BORDER: #B4DAF8 1px solid; background-color: #F9FDFF; font-size: 14px;}
.bgtab {BORDER-TOP: #D6D6EB 1px solid; BORDER-left: #D6D6EB 1px solid; BORDER-right: #D6D6EB 1px solid; BORDER-bottom: #FFFFFF 1px solid;}
.bgtabCr {BORDER-top: #58CB64 1px solid; BORDER-left: #58CB64 1px solid; BORDER-right: #58CB64 1px solid; BORDER-bottom: #DDF1D8 1px solid; background-color: #DDF1D8; font-weight:bold; font-size: 14px; color:#000000;}
.f14 {font-size: 14px;line-height: 22px;}
.f9pt {font-size:9pt;}
a:link {text-decoration: underline;Color:#0000cc;}
a:visited {text-decoration: underline;Color:;}
a.lklbe:link {color: #7777cc; text-decoration: underline}
a.lklbe:visited {color: #7777cc; text-decoration: underline}
a.lkgn:link {color: #008800; text-decoration: underline;}
a.lkgn:visited {color: #008800; text-decoration: underline;}
a.cy:link {color: #7777cc;font-size:9pt; text-decoration: underline}
a.cy:visited {color: #7777cc;font-size:9pt; text-decoration: underline}
a.headTit:link{color:#0000cc;font-size:14px; line-height: 24px; font-family:arial;}
a.headTit:visited{color:#0000cc;font-size:14px; line-height: 24px;font-family:arial;}
.headTitB{font-weight:bold;font-size:14px; line-height: 24px;font-family: "Arial";}
.tab{font-size:14px; line-height: 24px;font-family: "Arial";}
.cBaidu{color:#777777;font-size:9pt;}
.fB{Font-weight:bold}
.divC{width:770px;text-align:left;font-family:arial;}
.pC{width:65%; font-size:80%;line-height:18px;}
.ResultTit{font-size : 125%; line-height:120%;margin-bottom:2px;}
.kwC{color:#FF3300;}
.bgdsrh {background-color: #DDF1D8; padding-left: 10px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px;}
.bgdsrhLn {background-color: #58CB64;}
.bglne {background-color: #DDF1D8; padding-right: 10px;}
.fs{font-size:95%;color: #008800;}
#mainDiv{ width:770px; PADDING:0px;}
-->
</style>
</head>
<body class="bgbdy" topmargin="0" >
<!--#include file=top.asp-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" nowrap class=f9pt><a href="<%=weburl%>"><%=webname%></a> > 搜索结果</td>
</tr>
</table>
<center>
<%
content=HTMLcode(request("content"))
rs.open"select * from Share where ftitle like '%"&content&"%' or text like '%"&content&"%'",conn,1,1
maxnum=rs.recordcount
if rs.eof then%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td height="24" class="bglne" colspan=2><div align="right" class="f12we">共搜到相关问题 0 项</div></td>
</tr>
<TR align="left" valign="middle">
<TD height=37 colspan="2" class="bgcnt f14">
<P >未找到和您的查询相匹配的共享资料。</P>
您还可以:
<div style="padding-left:3px">
<LI> 查看输入的文字是否有误; </li>
<LI>去掉可能不必要的字词,如"的"、"什么"等;</li>
<LI>请看<a href="help.asp">问吧帮助</a>;</LI>
</div>
<p>
</P>
</TD>
</TR>
</table>
<%else%>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td height="24" class="bglne"><div align="right" class="f9pt">共搜到相关问题 <%=maxnum%> 项</div></td>
</tr>
</table>
<div class="zhtable" id="mainDiv">
<div class="divC bgcnt">
<%
rs.pagesize=10
maxpage=rs.pagecount
if request("p")="" then
p=1
else
p=cint(request("p"))
end if
if p>maxpage then
p=maxpage
end if
if p=0 then
p=1
end if
if p<>1 then
rs.move (p-1)*rs.pagesize
end if
for i=1 to rs.pagesize
rs1.open"select * from assort where id="&rs("flid"),conn,1,1
topic=rs1("topic")
rs1.close
%>
<p class="pC"><span class="ResultTit"> <a href="Sharev.asp?id=<%=rs("id")%>" target=_blank><%=HTMLcode(rs("ftitle"))%></a></span>
<br><%=left(HTMLcode(rs("text")),150)&"..."%><br>
<font class="fs">
<a href="showperson.asp?name=<%=rs("upuser")%>" class="lkgn" target=_blank><%=rs("upuser")%></a> - <span class="f12gn"><%=rs("uptime")%></span> - <a href="Share.asp?id=<%=rs("flid")%>" class="lklbe"><%=topic%></a></font></p>
<%rs.movenext
if rs.eof then exit for
next%></div></div><br>
<table width="700" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="bgpagLn" align="center">共<font color=red><%=maxnum%></font>个相关问题,10个每页,分<font color=red><%=maxpage%></font>页,当前页<font color=red><%=p%></font>
<a href=searchs.asp?submit=站内搜索&content=<%=content%>&p=1>首页</a>
<a href=searchs.asp?submit=站内搜索&content=<%=content%>&p=<%=p-1%>>上页</a>
<a href=searchs.asp?submit=站内搜索&content=<%=content%>&p=<%=p+1%>>下页</a>
<a href=searchs.asp?submit=站内搜索&content=<%=content%>&p=<%=maxpage%>>尾页</a>
</td>
</tr>
</table>
<br>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;">
<tr>
<td class="bgdsrh" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="55">
<tr>
<form name=fbop method=post action=searchs.asp>
<td nowrap height="26"><input name="content" type="text" id="content" value="" size="47">
<input type="submit" name="Submit" value="搜索资料"></td>
</tr>
</form>
</table></td>
</tr>
</table>
<%
end if
end if
rs.close
%>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;"> <tr> <td height="30" align=center><!--#include file=end.asp--></td>
</tr>
</table>
</center>
</body>
<%
else
Response.Write ("<script>alert('对不起,共享资料功能未启用!');history.back();</script>")
Response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -