📄 show_user.asp
字号:
<!--#include file=conn.asp-->
<!--#include file=Code_Html.asp-->
<!--#include file=Post_Ubb.asp-->
<!--#include file="Config.asp"-->
<%
if not IsNumeric(request("id")) then
Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
Response.end
end if
%>
<%if request("id")="" and request("name")="" then
response.write"<script>alert('用户参数错误!');history.back();</script>"
else
if request("id")<>"" then
id=CLNG(request("id"))
lei="id="&id
rs.open"select * from person where id="&id,conn,1,1
elseif request("name")<>"" then
name=request("name")
lei="name="&name
rs.open"select * from person where name='"&name&"'",conn,1,1
end if
if rs.eof then
response.write"<script>alert('没有所查找的用户!');history.back();</script>"
else
%>
<title>用户信息中心</title>
<!--#include file=top.asp-->
<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 request("lei")="" then%>用户资料</font><%elseif request("lei")="jifen" then%>问吧积分<%elseif request("lei")="da" 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" cellspacing="0" cellpadding="0">
<tr>
<td height="100%" valign="top">
<br>
<%if request("lei")="" then%>
<table width="100%" border="0" cellspacing="4" cellpadding="0" class=zhtable>
<tr>
<td width="110" align="right">用户名: </td>
<td><%=rs("name")%></td>
</tr>
<tr>
<td align="right">E-mail: </td>
<td><%=rs("email")%></td>
</tr>
<tr>
<td align="right">注册时间: </td>
<td><%=rs("time")%></td>
</tr>
<tr>
<td align="right">上次登录时间: </td>
<td><%=rs("logintime")%></td>
</tr>
<tr>
<td valign="top" align="right">自我简介: </td>
<td></td>
</tr>
<tr>
<td valign="top" colspan="2">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td width="96%"><%=HTMLcode(rs("jianjie"))%></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="120"> </td>
<td height="30"><a href="Show_User.asp?<%=lei%>&lei=jifen" target="_blank">问吧积分</a> · <a href="Show_User.asp?<%=lei%>&lei=da" target="_blank">问吧回答</a>
</td>
</tr>
</table>
<br></td>
</tr>
<tr>
<td valign="bottom"><div class="greenBG" style="height:24px; " id="title"></div>
</td>
</tr>
</table>
<br>
<%elseif request("lei")="jifen" then
rs2.open"select sum(shang) as shangfen from question where sender='"&rs("name")&"'",conn,1,1
if rs2.eof then
shangfen="0"
else
shangfen=rs2("shangfen")
end if
rs2.close
%>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" height="24" class="t11">
<tr valign="top">
<td width="470"><img src="img/icon_honor.gif" width="14" height="14" border="0" alt="网友专家"> <span class="f14B"><%=rs("name")%></span>
(<%=rs("jifen")%>) <%=rs("touxian")%></td>
<td width="160" align="right"><a href="userexpert.asp" target="_blank">什么是专精分类</a></td>
<td align="right"> </td>
</tr>
</table><br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<table border="0" width="90%" align="center" 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>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="100"><div align="right">总分: </div></td>
<td width="52"><%=rs("jifen")%></td>
</tr>
<tr>
<td><div align="right">回答得分:</div></td>
<td><%=rs("replynum")%></td>
</tr>
<tr>
<td><div align="right">悬赏付出:</div></td>
<td>-<%=shangfen%></td>
</tr>
<tr>
<td><div align="right">处罚:</div></td>
<td><%=rs("fa")%></td>
</tr>
<tr>
<td><div align="right">其他扣除:</div></td>
<td><%=rs("qtfa")%> </td>
</tr>
</table>
</td>
</tr>
</table>
<br></td>
</tr>
</table>
</td>
</tr>
</table></td>
<td valign="top">
<table border="0" width="90%" align="center" 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>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="100"><div align="right">回答总数: </div></td>
<td width="52"><%=rs("replynum")%></td>
</tr>
<tr>
<td><div align="right">回答被采纳:</div></td>
<td><%=rs("helpnum")%></td>
</tr>
<tr>
<td><div align="right">回答被采纳率:</div></td>
<td><%if rs("helpnum")=0 then baifenbi=0 else baifenbi=(rs("helpnum")/rs("replynum"))*100 end if%><%=round(baifenbi,2)%>% </td>
</tr>
</table>
</td>
</tr>
</table>
<br></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</td>
<td valign="top">
<table border="0" width="90%" align="center" 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>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="149">
<p align="right">分 类</td>
<td width="100" align="left">得 分</td>
</tr>
<%rs2.open"select * from zhuanjia where user='"&rs("name")&"'order by fljifen desc",conn,1,1
if rs2.eof then%>未有专家称号<%else
while not rs2.eof
rs1.open"select * from assort where id="&rs2("flid")&"",conn,1,1
flname=rs1("topic")
rs1.close
%>
<tr>
<td width="149"><div align="right"><a href="List_Little.asp?id=<%=rs2("flid")%>" target="_blank"><%=flname%></a>: </div></td>
<td width="100" align="left"><%=rs2("fljifen")%></td>
</tr>
<%
rs2.movenext
wend
rs2.close
end if
%>
</table>
</td>
</tr>
</table>
<br></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</td> <td valign="top"> </td>
</tr>
</table>
<br>
<%elseif request("lei")="da" then
rs2.open"select * from reply where replyer='"&rs("name")&"'",conn,1,1
if rs2.eof then%>暂时没有回答任何问题!<%else%>
<table width="100%" border="0" align="center" cellspacing="0" class="zhtable">
<tr align=center class="t11">
<td width="43%" height="30"> <strong>标题</strong></td>
<td width="7%"><strong>回答数</strong></td>
<td width="6%"><strong>状态</strong></td>
<td width="6%"><strong>被采纳答案</strong></td>
<td width="16%"><strong>提问时间</strong></td>
</tr>
<%maxnum=rs2.recordcount
rs2.pagesize=UserMaxPerPage
maxpage=rs2.pagecount
if request("pages")="" then
pages=1
else
pages=cint(request("pages"))
end if
if pages>maxpage then
pages=maxpage
end if
if pages=0 then
pages=1
end if
if pages<>1 then
rs2.move (pages-1)*rs2.pagesize
end if
for i=1 to rs2.pagesize
rs3.open"select * from question where id="&rs2("replyid"),conn,1,1
%>
<tr>
<td>·<a href=Show_Question.asp?id=<%=rs2("replyid")%> target="_blank"><%=rs3("title")%></a></td>
<td align="center" valign="middle"><font color="#333333"><%=rs3("replys")%></font></td>
<td align="center" valign="middle"><%if rs3("jie")=0 then %><img src=img/icn_time.gif alt=待解决问题><%elseif rs3("jie")=1 or rs3("jie")=3 then%><img src=img/icn_ok.gif alt =已解决问题><%elseif rs3("jie")=2 then%><img src=img/icn_cancel.gif alt =问题已关闭><%elseif rs3("jie")=4 then%><img src=img/icn_vote.gif alt =投票中问题><%end if%></td>
<td align="center" valign="middle"><%if rs2("isdeal")=1 then %><img src=img/icn_best.gif alt=被采纳为最佳答案><%else%> <%end if%></td>
<td align="center" valign="middle"><%=rs3("sendtime")%></td>
</tr>
<%rs3.close
rs2.movenext
if rs2.eof then exit for
next
end if
rs2.close%>
</table>
<br>
<table width="100%" height="24" border="0" align="center" cellpadding="0" cellspacing="0" class="t11">
<tr>
<td class="bgpagLn"><div align="center">共回答<font color=red><%=maxnum%></font>个问题,每页显示<%=UserMaxPerPage%>个问题,共<font color=red><%=maxpage%></font>页,当前第<font color=red><%=pages%></font>页
<a href=Show_User.asp?<%=lei%>&lei=da&pages=1>首页</a>
<a href=Show_User.asp?<%=lei%>&lei=da&pages=<%=pages-1%>>上页</a>
<a href=Show_User.asp?<%=lei%>&lei=da&pages=<%=pages+1%>>下页</a>
<a href=Show_User.asp?<%=lei%>&lei=da&pages=<%=maxpage%>>尾页</a></div></td>
</tr>
</table>
<table>
<%
end if
end if
rs.close
end if%>
</td>
</tr>
</table>
<br></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file=end.asp-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -