📄 userinfo.asp
字号:
<!--#include file="up.asp"--><!--#include file="inc/grade.asp"--><!--#include file="inc/page.asp"-->
<link rel="stylesheet" type="text/css" href="skin/<%=Cssstyleid%>/bbs.css">
<%
dim userid,seeinfo,userinfo,goodcount,ad_info,topicuserid,newbbs,topic
id=0
userid=checknum(request.querystring("userid"))
if userid="" then userid=lguserid
seeinfo=true
if isnull(lguserid) or lguserid="" then seeinfo=false
set rs=conn.execute("select top 1 * from [user] where userid="&userid&" and not del")
if rs.eof then seeinfo=false
if seeinfo=false then
tl=" 操 作 失 败"
mes="<b>对不起,你不能查看该用户的资料。可能存在以下问题:</b><br>·你还没有<a href=login.asp>登陆</a>。<br>·你要查看的用户不存在。<br>·你要查看的用户已经被删除。"
call sendinfo(tl,mes)
end if
if seeinfo=true then
userinfo=rs("userinfo")
userinfo=split(userinfo,"|")
%><!--#include file="inc/ubbcode.asp"-->
<div class=userinfoall>
<div class=userinfoleft>
<div class=userinfotitle>用户资料</div>
<table class=userinfotablebody>
<tr>
<td width="70" align="right">昵称:</td>
<td><%=checktitle(rs("name"))%></td>
</tr>
<tr>
<td align="right">性别:</td>
<td><%if userinfo(4)=1 then
response.write"帅哥"
else
response.write"靓女"
end if
%></td>
</tr>
<tr>
<td align="right">生日:</td>
<td><%=userinfo(2)%></td>
</tr>
<tr>
<td align="right">E-mail:</td>
<td><a href=mailto:<%=checktitle(userinfo(0))%>><%=checktitle(userinfo(0))%></a></td>
</tr>
<tr>
<td align="right">主页:</td>
<td><%if userinfo(1)<>"" then%><a target=_blank href='<%=checktitle(userinfo(1))%>'><%=checktitle(userinfo(1))%></a><%end if%></td>
</tr>
<tr>
<td align="right">QQ 号码:</td>
<td><%=userinfo(3)%></td>
</tr>
</table><br>
<div class=userinfotitle>论坛信息</div>
<table class=userinfotablebody>
<tr>
<td align="right" width="70">头衔:</td>
<td><%=userinfo(10)%></td>
</tr>
<tr>
<td align="right"><b>
<a title="查看论坛积分方式" href="help.asp?action=mark">论坛积分:</a></b></td>
<td><%=rs("mark")%></td>
</tr>
<tr>
<td align="right"><b>
<a title="查看论坛等级设置" href="help.asp?action=grade">论坛等级:</a></b></td>
<td><%gradename(rs("grade"))%> <img src=images/grade/<%=rs("grade")%>.gif border=0></td>
</tr>
<tr>
<td align="right">帖子数:</td>
<td><%=rs("alltopicnum")%></td>
</tr>
<tr>
<td align="right">精华帖数:</td>
<td><%goodcount=conn.execute("select count(id) from Topic where type=1 and userid="&userid&"")(0)
if goodcount=0 then
response.write goodcount
else
response.write goodcount&" <a href=""Otherlist.asp?action=good&userid="&userid&""">[ 查看 ]</a>"
end if
%></td>
</tr>
<tr>
<td align="right">注册时间:</td>
<td><%=userinfo(9)%></td>
</tr>
<tr>
<td align="right">最后登陆:</td>
<td><%=rs("lasttime")%></td>
</tr>
<tr>
<td align="right">论坛职务:</td>
<td><%if rs("grade")>=10 then
gradename(rs("grade"))
else
response.write"论坛用户"
end if %></td>
</tr>
<tr>
<td align="right">论坛考勤:</td>
<td><%
if DateDiff("d",rs("lasttime"),now+timeset/24) =< 2 then
ad_info="比较勤快,加油哦!"
elseif DateDiff("d",rs("lasttime"),now+timeset/24) =< 7 then
ad_info="7天之内有登录"
elseif DateDiff("d",rs("lasttime"),now+timeset/24)=< 15 then
ad_info="15天内有登录"
elseif DateDiff("d",rs("lasttime"),now+timeset/24) =< 30 then
ad_info="30天未登录"
else
ad_info="连续超过一个月未登陆!<b>"
end if
response.write "<b><font color=red>"&ad_info&"</font></b>"%></td>
</tr>
</table><br>
<div class=userinfotitle>最近发帖:<%set newbbs=conn.execute("select top 8 id,topicinfo,bd,totable from topic where userid="&userid&" order by edittime desc")%></div>
<table width="100%">
<%do while not newbbs.eof
topic=newbbs("topicinfo")
topic=split(topic,"|")
response.write"<tr><td width=100% height=25> <img border=0 src=images/face/"&topic(0)&".gif align=absmiddle> <a href=showbbs.asp?bd="&newbbs("bd")&"&id="&newbbs("id")&"&totable="&newbbs("totable")&">"&checktitle(lefttrue(topic(1),25))&"</a></td></tr>"
%>
<%
newbbs.movenext
loop
set newbbs=nothing%>
<tr>
<td width="100%" height=30 align="right"><a target=_blank href="Rss.asp?userid=<%=userid%>">
<img border="0" src="images/rss.png" align="absmiddle"> 订阅<%=checktitle(rs("name"))%>的帖子</a></td>
</tr></table>
</div>
<div class=userinforight>
<table width="100%" cellpadding="0" style="border-collapse: collapse"><tr>
<td width="150" style="padding:10px;"><img src="<%=checktitle(userinfo(5))%>" width=<%=checktitle(userinfo(6))%> height=<%=checktitle(userinfo(7))%> border=0><br><a href=sms.asp?action=write&toname=<%=checktitle(rs("name"))%>> 给 <b><%=checktitle(rs("name"))%></b> 留言</a>
</td><td><%=ubb(userinfo(8))%></td></tr></table>
<%
'_____________________________________________________________________________________________________________________________________________
dim wzcount,wzrep,wzpagecount,wzpage,pagestr,urlstr,sql,content
urlstr="userid="&userid
wzrep=10
sql="select * from bbs"&totable&" where userid="&userid&" and bid=0 and type<>3 order by edittime desc"
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
if rs.eof or rs.bof then
response.write"<div class=norecord>暂无记录</div>"
else
wzcount=rs.recordcount
wzpagecount = abs(int(-abs(wzcount/wzrep)))
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
rs.absoluteposition=rs.absoluteposition+((abs(wzpage)-1)*wzrep)
pagestr="每页<font color=red>"&wzrep&"</font>条 共<font color=red>"&wzpagecount&"</font>页 ["&pagination(wzpagecount,urlstr)&"] "
response.write"<div class=userinfopagestr>"&pagestr&"</div>"
for i = 0 to wzrep-1
if rs.eof then exit for
content=rs("content")
content=split(content,"|")
response.write"<div class=userinfotopictitle><a href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&totable&"' target=_blank>"&ubb(content(1))&"</a></div>"
response.write"<div class=userinfotopiccontent>"&ubb(content(4))&"</div>"
response.write"<div class=userinfotopictime>发表时间:<span class=sbbstime>"&checktitle(content(5))&"</span></div>"
rs.movenext
next
end if
rs.Close
set rs=nothing
response.write"<div class=userinfopagestr>"&pagestr&"</div>"
%>
</div>
</div>
<%
end if
set rs=nothing
call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -