📄 list.asp
字号:
<!--#include file=conn.asp-->
<!--#include file="function.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
%>
<html>
<head>
<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">
<link href="iknow.css" rel="stylesheet" type="text/css">
</head>
<body class="bgbdy" topmargin="0">
<center>
<!--#include file=top.asp-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" nowrap><a href="<%=weburl%>"><%=webname%></a> >
<%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>
<div id="cDiv">
<table border="0" align="right" cellpadding="0" cellspacing="0">
<tr><td width="170" valign="top" class="padL12">
<!--出现登陆框-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="magBtm12 zhtable">
<tr>
<td class="bgtle" nowrap><%if session("person")<>"" then%>用户信息<%else%>用户登录<%end if%></td>
</tr>
<tr>
<td class="bgcntBor3">
<%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 class="f14">您好:<%=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>• <a href="user.asp?lei=mywen" target="_blank">我的提问</a></td>
<td>• <a href="user.asp" target="_blank">个人中心</a></TD>
</tr>
<tr>
<td>• <a href="user.asp?lei=myda" target="_blank">我的回答</a></td>
<td>• <a href="exit.asp">退出</a><%rs.close%></td>
</tr>
<%end if%><%if session("person")="" then%><tr><form method=post action=list.asp?lei=<%=lei%>><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 type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT><br><input name="login" type="submit" id="login" value="登录">
<a href="reg.asp">注册</a>
</td></form><%end if%></tr>
</table>
<tr>
<td width="100%" height="10"></td>
</tr>
</table>
<!--结束登陆框--></td></tr></table>
<table width="588" border="0" align="center" cellpadding="0" cellspacing="0" class="zhtable">
<tr>
<td class="bgtleL">
<%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%></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" class="bgtleR"><div align="right" class="f12we">共有相关问题 <%=totalquestion%>
项</div></td>
</tr>
<tr>
<td class="bgcnt" colspan="2"><table width="100%" border="0" cellspacing="0" class=zhtable>
<tr>
<td nowrap><strong> 标题</strong></td>
<td width="42" nowrap align=center><strong>回答数</strong></td>
<td width="32" nowrap><div align="center"><strong>状态</strong></div></td>
<td width="55" nowrap><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=showquestion.asp?id=<%=rs("id")%> target=_blank><%if len(rs("title"))>26 then%><%=left(rs("title"),26)&"..."%><%else%><%=rs("title")%><%end if%></a> [<a href=assort1.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" nowrap><%=nian%>-<%=yue%>-<%=ri%></td>
</tr>
<%rs.movenext
if rs.eof then exit for
next%>
</table></td>
</tr>
</table>
<br><div style="width:588px;" align="center">
<table width="90%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="bgpagLn">问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>
<a href=list.asp?lei=<%=lei%>>首页</a>
<a href=list.asp?lei=<%=lei%>&p=<%=p-1%>>上页</a>
<a href=list.asp?lei=<%=lei%>&p=<%=p+1%>>下页</a>
<a href=list.asp?lei=<%=lei%>&p=<%=maxpage%>>尾页</a></td>
</tr>
</table></div>
<%end if
rs.close
%>
<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"> <input type="submit" name="Submit" value="搜索答案">
<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>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;">
<tr>
<td height="25"><div align="right"><a href="#top">返回页首</a></div></td>
</tr>
<tr>
<td height="30" align=center><!--#include file=end.asp--></td>
</tr>
</table></center>
</body>
<%
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 + -