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

📄 list_special.asp

📁 类似于baidu的百度知道
💻 ASP
字号:
<!--#include file=conn.asp-->
<!--#include file="Function_QT.asp"-->
<!--#include file="Config.asp"-->
<!--#include file="md5.asp"-->
<%
if request("lei")<>"" then 
if request("lei")<>"xin" and request("lei")<>"tui" and request("lei")<>"weijie" and request("lei")<>"jie" and request("lei")<>"gaofen" and request("lei")<>"re" and request("lei")<>"tou" then
lei=""
else
lei=request("lei")
end if
end if
%>
<title><%=webname%>-<%if lei="" then%>最新问题</font><%elseif lei="xin" then%>最新问题<%elseif lei="tui" then%>精彩推荐<%elseif lei="weijie" then%>待解决的问题<%elseif lei="jie" then%>新解决的问题<%elseif lei="gaofen" then%>高分问题<%elseif lei="re" then%>热点问题<%end if%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<!--#include file=top.asp-->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="24"><a href="<%=weburl%>"><%=webname%></a> &gt;                
<%if lei="" then%>最新问题<%elseif lei="xin" then%>最新问题<%elseif lei="tui" then%>精彩推荐<%elseif lei="weijie" then%>待解决的问题<%elseif lei="jie" then%>新解决的问题<%elseif lei="gaofen" then%>高分问题<%elseif lei="re" then%>热点问题<%end if%></td>
  </tr>
</table>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top" width="200">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong><%if session("person")<>"" then%>用户信息<%else%>用户登录<%end if%></strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="95%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
  <td>
    <%if request("login")="登录" then
jiance=request("name")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then 
Response.Write "<script language=JavaScript>{alert('用户名非法!');history.back();}</script>"
Response.End 
end if
		if not IsNumeric(request("verifycode")) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
		Response.end
	end if
	if (int(session("SafeCode"))<>int(request("verifycode"))) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
		Response.end
	end if
	  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='"&md5(pwd)&"'",conn,1,1
	  if rs.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  rs3.open"select * from person where name='"&name&"'",conn,1,3
	  rs3("logintime")=now
	  rs3.update
	  rs3.close
	  session("person")=name
	  %>
	  <%end if
	  rs.close
	  end if
	  end if%>
	  
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable"><%if session("person")<>"" then%>
              <tr> 
                <td >您好:<%=session("person")%> </td>
              </tr>
              <tr> 
                <td><%rs.open"select * from person where name='"&session("person")&"'",conn,1,1%> 
                  <a href="Help.asp#n5" target=_blank><%=rs("touxian")%></a> ( <%=rs("jifen")%> )</td>                 
              </tr>
      </table>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
  <tr>
    <td height=22>&#8226; <a href="user.asp?lei=mywen" target="_blank">我的提问</a></td>                
    <td>&#8226; <a href="user.asp" target="_blank">个人中心</a></TD>                
  </tr>
  <tr>
    <td>&#8226; <a href="user.asp?lei=myda" target="_blank">我的回答</a></td>                
    <td>&#8226; <a href="Exit.asp">退出</a><%rs.close%></td>           
  </tr>
  <%end if%><%if session("person")="" then%><tr><form method=post action=List_Special.asp?lei=<%=lei%>><td align="center" valign="top">
	<p>用&nbsp;&nbsp;户:<input name="name" type="text" id="name" size="12" class="ip22"><br>密&nbsp;&nbsp;码:<input name="pwd" type="password" id="pwd" size="12" class="ip22"><br>
	验证码:<input type="text" size=3 maxlength=4 name=verifycode class="ip22"> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT><br><input name="login" type="submit" id="login" value="登录" class="ip2">&nbsp;&nbsp;          
    <a href="Reg.asp">注册</a>
</td></form><%end if%></tr>
</table>
<tr>
                    <td width="100%" height="10"></td>
                  </tr>
                </table>
</td>
	</tr>
</table>
<br></td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
					<tr>
						<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>快捷问答</strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="98%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
       <tr>
        <form name=fbop method=post action=Search.asp>
          <td height="26">
			<p align="center">
			<input name="content" type="text" id="content" value="<%=HTMLcode(request("content"))%>" size="21" class="ip22"></td> 
        </tr>
       <tr>
          <td height="29">&nbsp;<input class="ip2" type="submit" name="Submit" value="搜索答案">&nbsp;&nbsp;     
            <span><font color="#ffffff"><input class="ip2" onclick="ask(fbop);" type="button" value="我要提问"></font></span></td>
       </tr></form>
      </table>
      </div>
      </td>
	</tr>
</table>
<br></td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>
</td>
</tr>
</table></td>
		<td valign="top" width="8"></td>
		<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong><%if lei="" then%>最新问题<%elseif lei="xin" then%>最新问题<%elseif lei="tui" then%>精彩推荐<%elseif lei="weijie" then%>待解决的问题<%elseif lei="jie" then%>新解决的问题<%elseif lei="tou" then%>投票中的问题<%elseif lei="gaofen" then%>高分问题<%elseif lei="re" then%>热点问题<%end if%></strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="98%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="zhtable">
  <tr class="t11" height="24">
    <td><b>&nbsp;  
<%if lei="" then%>最新问题<%elseif lei="xin" then%>最新问题<%elseif lei="tui" then%>精彩推荐<%elseif lei="weijie" then%>待解决的问题<%elseif lei="jie" then%>新解决的问题<%elseif lei="tou" then%>投票中的问题<%elseif lei="gaofen" then%>高分问题<%elseif lei="re" then%>热点问题<%end if%></b></td> 
    <%
if lei="" or lei="xin" then
rs.open"select * from question order by sendtime desc",conn,1,1
elseif lei="tui" then
rs.open"select * from question where tui=1 order by sendtime desc",conn,1,1
elseif lei="weijie" then
rs.open"select * from question where jie<>1 and jie<>3 order by sendtime desc",conn,1,1
elseif lei="jie" then
rs.open"select * from question where jie=1 order by sendtime desc",conn,1,1
elseif lei="tou" then
rs.open"select * from question where jie=4 order by sendtime desc",conn,1,1
elseif lei="gaofen" then
rs.open"select * from question where shang<>0 order by shang desc",conn,1,1
elseif lei="re" then
rs.open"select * from question order by views desc",conn,1,1
end if
totalquestion=rs.recordcount
%> 
    <td height="24"><div align="right"><b>共有相关问题 <%=totalquestion%>   
        项</b></div></td>
  </tr> 
  <tr> 
    <td colspan="2"><table width="100%" border="0" cellspacing="0" class=zhtable>
        <tr height="24"> 
<td><strong>  标题</strong></td>
<td width="50" align=center><strong>回答数</strong></td>
<td width="48"><div align="center"><strong>状态</strong></div></td>
<td width="120"><div align="center"><strong>提问时间</strong></div></td>  
        </tr>
		<%if rs.eof then%>
<tr>
          <td height="34" colspan=6>暂时没有问题!</td>
</tr>
<%else
		rs.pagesize=MaxPerPage
		maxnum=rs.recordcount
		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
		nian=year(rs("sendtime"))
		yue=Month(rs("sendtime"))
		ri=day(rs("sendtime"))
		%>
		<tr>
<td class="ln28"><span class="f14ln20"><%if rs("shang")>"0" then %><img src="img/icn_ps.gif" alt="悬赏<%=rs("shang")%>分" width="12" height="11" align="absmiddle"><span class="f10rd" title="悬赏<%=rs("shang")%>分"><%=rs("shang")%></span> <%end if%><a href=Show_Question.asp?id=<%=rs("id")%> target=_blank><%if len(rs("title"))>26 then%><%=left(rs("title"),26)&"..."%><%else%><%=rs("title")%><%end if%></a> [<a href=List_Little.asp?id=<%=rs("fenleiid")%>&topic=<%=rs("topic")%> class=lgy><%=rs("topic")%></a>]</span></td>  
<td align=center valign="middle" class="ln28"><%=rs("replys")%></td>
<td align="center" valign="middle" class="ln28"><%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%></td>
<td align="center" valign="middle" class="ln28"><%=nian%>-<%=yue%>-<%=ri%></td>
</tr>
<%rs.movenext
		if rs.eof then exit for
		next%>
      </table></td>
  </tr>
</table>
&nbsp;

<br> 
<table width="100%" height="24" border="0" align="center" cellpadding="0" cellspacing="0" class="t11">
  <tr> 
    <td align="center">问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>                                                                                                                                  
		  <a href=List_Special.asp?lei=<%=lei%>>首页</a>                                                                                                                                   
		  <a href=List_Special.asp?lei=<%=lei%>&p=<%=p-1%>>上页</a>                                                                                                                                   
		  <a href=List_Special.asp?lei=<%=lei%>&p=<%=p+1%>>下页</a>                                                                                                                                   
		  <a href=List_Special.asp?lei=<%=lei%>&p=<%=maxpage%>>尾页</a></td> 
  </tr>
</table>
<%end if
		rs.close
%>
</td>
	</tr>
</table>
 </td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>
		</td>
	</tr>
</table>
<!--#include file=end.asp-->
<%
Set rs=nothing
Set rs1=nothing
Set rs2=nothing
Set rs3=nothing
conn.Close
set conn=nothing
%>

⌨️ 快捷键说明

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