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

📄 search.asp

📁 问吧程序 问吧程序 问吧程序 问吧程序
💻 ASP
字号:
<!--#include file=conn.asp--><HTML><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head><title>问吧-解决你的疑难杂症</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<?xml version="1.0" encoding="gb2312"?>
<meta content="all" name="robots" />
<LINK href="/img/index/index.css" type=text/css 
rel=stylesheet>
<style TYPE="text/css">
<!--
A:link{text-decoration:none}
A:visited{text-decoration:none}
A:hover {color: #000000;text-decoration:underline}
 -->
</style>
<style type="text/css">
<!--
.zhtable {table-layout:fixed; word-wrap:break-word;}
.formfont {FONT-SIZE: 16px;font-family:"arial"}
.input2 {font-size:14px;width:90px;height:24px}
td		{font-size: 9pt; line-height: 18px;font-family: "Arial";}
.bnsrh		{padding-top:2px;height:24px}
.bgbdy		{background-color: #FFFFFF;margin:0px}
.bgtle		{border-top: #58CB64 1px solid; background-color: #DDF1D8; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgtleBl	{border-top: #64B7D7 1px solid; background-color: #DEEEF4; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgtleYl	{border-top: #F4BF20 1px solid; background-color: #FBF5C6; padding-left: 10px; padding-right: 10px; height:24px; font-weight:bold; font-size: 14px;}
.bgcntBor3	{BORDER-left: #DDF1D8 2px solid; BORDER-right: #DDF1D8 2px solid; BORDER-bottom: #DDF1D8 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor3Bl	{BORDER-left: #DEEEF4 2px solid; BORDER-right: #DEEEF4 2px solid; BORDER-bottom: #DEEEF4 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor3Yl	{BORDER-left: #FBF5C6 2px solid; BORDER-right: #FBF5C6 2px solid; BORDER-bottom: #FBF5C6 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.bgcntBor4	{BORDER: #DDF1D8 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.yelB4	{BORDER: #FBF5C6 2px solid; background-color: #FFFFFF; padding-left: 8px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px;}
.ln23		{height:23px;border-bottom:1px solid #E1E1E1;}
.f14		{font-size: 14px;line-height: 22px;}
.f14B		{font-size: 14px; font-weight:bold;line-height: 22px;}
.f12gn		{color:#008800;}
a.gn:link 		{color:#008800;}
a.gn:visited	{color:#008800;}
a.rib:link      {color:#FF0000;font-weight:bold}
a.rib:visited   {color:#FF0000;font-weight:bold}
.magBtm12{margin-bottom:12px;}
a:link			{text-decoration: underline;Color:#0000cc;}
a:visited		{text-decoration: underline;Color:;}
a.lbk:link		{color:#000000; text-decoration: underline}
a.lbk:visited		{color: #000000; text-decoration: underline}
a.lwe:link		{color:#FFFFFF; text-decoration: underline}
a.lwe:visited		{color: #FFFFFF; text-decoration: underline}
a.lmore:link		{font-weight:bold; text-decoration: underline}
a.lmore:visited		{font-weight:bold; text-decoration: underline}
a.cy:link		{color: #7777cc; text-decoration: underline}
a.cy:visited		{color: #7777cc; text-decoration: underline}
a.headTit:link{color:#0000cc;font-size:14px; line-height: 24px;}
a.headTit:visited{color:#0000cc;font-size:14px; line-height: 24px;}
.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}
.per80{line-height:80%}
a.lgy:link {color:#555555; text-decoration: underline}
a.lgy:visited {color: #555555; text-decoration: underline}
.topic{margin-bottom:12px;width:376px;height:38px;border:1px solid #00CC00;background-color:F1FFED;font-size:14px}
#footer{ CLEAR: both; MARGIN: 0px 0px 0px 0px; PADDING: 5px; WIDTH: 770px; font-size: 9pt; line-height: 18px;font-family: "Arial";}
-->
</style>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000">

<div align="center">
	<table border="0" width="760" id="table1" style="border-collapse: collapse">
		<tr>
			<td width="137"><IMG 
      src="img/logo-zhidao.gif" border=0></td>
			<td>
      <TABLE cellSpacing=0 cellPadding=0 border=0 id="table2">
        <TBODY>
        <TR>
          <TD class=tab noWrap><font style="font-size:14px"><span class="style4">
			<a href="index.asp" style="text-decoration: underline">
			<font color="#000000">首页</font></a> | 
			<a href="reg.asp" style="text-decoration: underline">
			<font color="#000000">注册</font></a> | 
			<a href="index.asp" style="text-decoration: underline">
			<font color="#000000">登陆</font></a> | 
			<a href="applypwd.asp" style="text-decoration: underline">
			<font color="#000000">密码保护</font></a> | 
			<a href="getpwd.asp" style="text-decoration: underline">
			<font color="#000000">取回密码</font></a></span></font></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 border=0 id="table3">
        <TBODY>
        <TR>
          <TD noWrap style="font-size: 9pt; line-height: 18px; font-family: Arial"><form method=post action=search.asp> 
			<p>
			<input name="content" type="text" id="content" value="" size="50">
    <input type="submit" name="Submit" value="站内搜索""></TD></form></TR></TBODY></TABLE>
     </td>
		</tr>
	</table>
	<br>
	<div align="center">
		<table border="0" width="760" id="table5" style="border-collapse: collapse">
			<tr>
				<td width="157" valign="top">
<TABLE class=zhtable height="100%" cellSpacing=0 cellPadding=0 width=155 
border=0 id="table13">
  <TBODY>
  <TR>
    <TD class=bgtleBl noWrap>问题分类</TD></TR>
  <TR>
    <TD class=bgcntBor3Bl vAlign=top><SPAN 
      class=f12gn>
	<TABLE class="magBtm12 zhtable" cellPadding=0 width="100%" 
border=0 id="table19" style="border-collapse: collapse">
  <TBODY>
  <TR>
    <Td>
      <%if request("login")="登陆" then
	  if request("name")="" then
	  response.write"<script>alert('用户名不能为空!');history.back();</script>"
	  elseif request("pwd")="" then
	  response.write"<script>alert('密码不能为空!');history.back();</script>"
	  else
	  name=request("name")
	  pwd=request("pwd")
	  rs.open"select * from person where name='"&name&"' and pwd='"&pwd&"'",conn,1,1
	  if rs.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  session("person")=name
	  %>
	  <%end if
	  rs.close
	  end if
	  end if%>
	  <%if session("person")<>"" then%>
	  <tr><td align="center" valign="top"><font color="#FFFFFF"><input  type="button"  value="发表问题" onclick="window.navigate('send.asp')"></font>
		<font color="#FFFFFF">        
		<input  type="button"  value="退出" onclick="window.navigate('exit.asp')"></font></td>
      </tr><tr><td align="left" valign="top">用户名:<%=session("person")%><%
		rs.open"select * from person where name='"&session("person")&"'",conn,1,1%>
		<%if rs("qq")<>"" then%><br>用户QQ:<%=rs("qq")%><%end if%>
		<%if rs("email")<>"" then%><br>用户Email:<%=rs("email")%><%end if%>
		<br>用户积分:<%=rs("jifen")%><br>用户头衔:<%=rs("touxian")%>
		<br>用户发表问题数:<%=rs("asknum")%>
		<br>用户回复问题数:<%=rs("replynum")%>
		<br>用户解决问题数:<%=rs("helpnum")%><%rs.close%>
         </td>
      <%end if%><%if session("person")="" then%><tr><form method=post action=index.asp><td align="center" valign="top">
	<p>用 户: <input name="name" type="text" id="name" size="12"><br>密 码: <input name="pwd" type="password" id="pwd" size="12"><br><input name="login" type="submit" id="login" value="登陆">&nbsp;&nbsp;        
              <input name="reg" type="button" id="reg" value="注册" onclick="window.navigate('reg.asp');">
	</font>
</td></form><%end if%></tr></tr></TD></TR></TBODY></TABLE><font color=red><table width="100%" height="67"  border="0" cellpadding="0" cellspacing="0" style="border-bottom:1pt solid dddddd;" id="table14">
        <%rs.open"select top 100 * from assort",conn,1,1
		if rs.eof then%>
		<tr align="right">
          <td height="20">暂时没有分类!</td>
        </tr>
		<%else%>
		<tr><%while not rs.eof
		i=i+1%>
          <td height="30" bgcolor="#FFFFFF"> ·<a href=assort.asp?id=<%=rs("id")%>><font color="#000000"><%=rs("topic")%></font></a></td>
          <%rs.movenext
		  if i>=2 then
		  i=0%>
	    </tr>
        <tr>
		  <%end if
		  wend
		  end if
		  rs.close%>
        </tr>
		<%rs.open"select * from assort",conn,1,1
		if rs.recordcount>8 then%>
		 <tr>
          <td height="20" align="right"><a href="assort.asp">
			<span style="text-decoration: none"><font color="#000000">更多分类</font></span></a></td>
        </tr><%end if
		rs.close%>
      </table>
	</font></SPAN>
				</TD></TR></TBODY></TABLE>
				</td>
				<td valign="top"> <table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table15">
      <tr bgcolor="eeeeee">
        <td width="100%" height="24" class=bgtle noWrap>
		<p align="center"><font color="#6699FF">
		<span style="font-weight: 800; font-size: 13px">问题搜索</span></font></td>
      </tr>
	  <tr bgcolor="eeeeee">
        <td height="24" align="left" bgcolor="#FFFFFF"><%if request("submit")="站内搜索" then
	  if request("content")="" then
	  response.write"<script>alert('搜索关键字不能为空!');history.back();</script>"
	  else
	  content=request("content")
	  rs.open"select * from question where title like '%"&content&"%' or content like '%"&content&"%'",conn,1,1
	  if rs.eof then%>
        <tr>
          <td>没有找到相关问题!</td>
        </tr>
		<%else
		maxnum=rs.recordcount
		rs.pagesize=20
		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%>
		<tr><td>■<a href=showquestion.asp?id=<%=rs("id")%> target="_blank"><%=rs("title")%></a></td></tr>
		<%rs.movenext
		if rs.eof then exit for
		next%><tr><td bgcolor=eeeeee>共<font color=red><%=maxnum%>个相关问题,20个每页,分<font color=red><%=maxpage%>页,当前页<font color=red><%=p%>
		<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>
		<%end if
		rs.close%>
		<%rs.open"select * from reply where replytitle like '%"&content&"%' or replycontent like '%"&content&"%'",conn,1,1
	  if rs.eof then%>
        <tr>
          <td>没有找到相关回复!</td>
        </tr>
		<%else
		maxnum=rs.recordcount
		rs.pagesize=20
		maxpage=rs.pagecount
		if request("p1")="" then
		p1=1
		else
		p1=cint(request("p1"))
		end if
		if p1>maxpage then
		p1=maxpage
		end if
		if p1=0 then
		p1=1
		end if
		if p1<>1 then
		rs.move (p1-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
		<tr><td>■< target="_blank"a href=showreply.asp?id=<%=rs("id")%>>
		<%if rs("replytitle")="" then%><%=left(rs("replycontent"),10)&"..."%><%else%>
		<%=rs("replytitle")%><%end if%></a></td></tr>
		<%rs.movenext
		if rs.eof then exit for
		next%><tr><td bgcolor=eeeeee>共<font color=red><%=maxnum%>个相关回复,20个每页,分<font color=red><%=maxpage%>页,当前页<font color=red><%=p%>
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p1=1>首页</a>
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p1=<%=p1-1%>>上页</a>
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p1=<%=p1+1%>>下页</a>
		<a href=search.asp?submit=站内搜索&content=<%=content%>&p1=<%=maxpage%>>尾页</a>
		<%end if
		rs.close%>
		<%end if
		end if%>
</td></tr>
    </table></form>
    			</td>
			</tr></table>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

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