⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.asp

📁 完整的九洲问吧。优秀的问答网站。由ASP+Access开发。
💻 ASP
字号:
<!--#include file=conn.asp-->
<!--#include file="config.asp"-->
<%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> &gt; 搜索结果</td>         
  </tr>
</table>
<center>

<%
content=HTMLcode(request("content"))
rs.open"select * from question where title like '%"&content&"%' or content 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>
      <P ><form name="fasmid" action="send.asp?content=<%=HTMLcode(request("content"))%>" method="get">您可以在此<a href="send.asp?content=<%=HTMLcode(request("content"))%>">提问</a>,让其他网友帮您一起找答案!<input type="text" name="content" maxlength="256" size="30" value="<%=HTMLcode(request("content"))%>">&nbsp;&nbsp;<input type="submit" value="我要提问"></form>
		 您还可以:
<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
		%>
<p class="pC"><span class="ResultTit"><%if rs("jie")=0 then %><img src=img/icn_time.gif  alt=待解决问题><%elseif rs("jie")=1 or rs("jie")=3 then%><img src=img/icn_ok.gif  alt =已解决问题><%elseif rs("jie")=2 then%><img src=img/icn_cancel.gif  alt =问题已关闭><%elseif rs("jie")=4 then%><img src=img/icn_vote.gif  alt =投票中问题><%end if%> <a href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%=HTMLcode(rs("title"))%></a></span>    
<br><%=left(HTMLcode(rs("content")),150)&"..."%><br> 
<font class="fs">
<%if rs("niming")=1 then%>匿名<%else%><a href="showperson.asp?name=<%=rs("sender")%>" class="lkgn" target=_blank><%=rs("sender")%></a><%end if%> - <span class="f12gn"><%=rs("sendtime")%></span>  -  <%if rs("jie")=1 then      

%><span class="f12gn">最佳回答者:</span> <a href="showperson.asp?name=<%=rs("sender")%>" class="lkgn" target=_blank><%=rs("jieuser")%></a>      
 - <%end if%><a href="assort1.asp?id=<%=rs("fenleiid")%>" class="lklbe"><%=rs("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=search.asp?submit=站内搜索&content=<%=content%>&p=1>首页</a> 
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p=<%=p-1%>>上页</a> 
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p=<%=p+1%>>下页</a> 
		<a href=search.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 width="233" height="60" class="bgdsrh"></td>
    <td class="bgdsrh" width="517">
      <table  border="0" cellspacing="0" cellpadding="0" height="55">
       <tr>
        <form name=fbop method=post action=search.asp>
          <td nowrap height="26"><input name="content" type="text" id="content" value="<%=HTMLcode(request("content"))%>" size="47">
            <span style="padding-bottom:15px; "><a href="help.asp" target="_blank">帮助</a></span></td> 
        </tr>
       <tr>
          <td nowrap height="29">&nbsp;<input type="submit" name="Submit" value="搜索答案">&nbsp;&nbsp;     
            <span class="f12gn"><font color="#ffffff"><input onclick="ask(fbop);" type="button" value="我要提问"></font></span></td>
       </tr></form>
      </table></td>
  </tr>
  <tr> 
    <td height="1" class="bglne"></td>
    <td class="bglne"></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>

⌨️ 快捷键说明

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