?? 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 + -