📄 profile.asp
字号:
<!-- #include file="Setup.asp" -->
<%
HtmlTop
if SiteConfig("RequireAuthenticationForProfileViewing")=1 and CookieUserName=empty then error("您必须<a href=Login.asp?ReturnUrl="&ReturnUrl&">登录</a>后才能浏览个人资料")
UserName=HTMLEncode(Request("UserName"))
sql="select * from [Wo_Users] where UserName='"&UserName&"'"
Set Rs=Conn.Execute(sql)
if Rs.eof then error("窝友“"&UserName&"”的资料不存在")
ShowRank(Rs("experience"))
select case Rs("UserSex")
case 0
UserSex="未设置"
case 1
UserSex="男"
case 2
UserSex="女"
end select
select case Rs("UserAccountStatus")
case "0"
UserAccountStatus="正等待审核"
case "1"
UserAccountStatus="已通过审核"
case "2"
UserAccountStatus="已禁用"
case "3"
UserAccountStatus="未通过审核"
end select
XMLDOM.loadxml("<Wo>"&Rs("UserInfo")&"</Wo>")
QQ=SelectSingleNode("QQ")
ICQ=SelectSingleNode("ICQ")
AIM=SelectSingleNode("AIM")
MSN=SelectSingleNode("MSN")
Yahoo=SelectSingleNode("Yahoo")
Skype=SelectSingleNode("Skype")
Set XMLDOM=Nothing
%>
<title>查看<%=Rs("UserName")%>的资料 - <%=SiteConfig("SiteName")%></title>
<table width="900" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div id="CommonBreadCrumbArea"><%ClubTree%> → 查看窝友“<%=Rs("UserName")%>”资料</div></td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 border=0 width=900 align="center">
<TR>
<TD vAlign=top width="200">
<TABLE height="100%" width="95%" cellSpacing=1 cellPadding=0 border=0 id=CommonListArea>
<tr id=CommonListTitle3>
<TD colspan="2"> <%=Rs("UserName")%></td>
</tr>
<TR id=CommonListCell>
<TD colspan="2"><%if SiteConfig("EnableAvatars")=1 then%><center><div style="OVERFLOW:auto;WIDTH:<%=SiteConfig("AvatarWidth")%>px;"><img src=<%=Rs("UserFaceUrl")%> border=0 onload='javascript:if(this.width><%=SiteConfig("AvatarWidth")%>)this.width=<%=SiteConfig("AvatarWidth")%>;if(this.heigh><%=SiteConfig("AvatarHeight")%>)this.height=<%=SiteConfig("AvatarHeight")%>;'></div></center><%end if%> <table border="0" cellspacing="0">
<tr><td>窝友状态:<%=UserAccountStatus%></td></tr>
<tr><td>角 色:<%=ShowRole(RS("UserRoleID"))%></td></tr>
<tr><td>等 级:<%=RankName%></td></tr>
<tr><td>注册日期:<%=FormatDateTime(Rs("UserRegisterTime"),2)%></td></tr>
<tr><td>最近活动:<%=FormatDateTime(Rs("UserActivityTime"),2)%></td></tr>
<tr><td>发主题数:<%=Rs("TotalPosts")%></td></tr>
<tr><td>积 分:<%=Rs("UserMoney")%></td></tr>
<tr><td>经 验 值:<%=Rs("experience")%></td></tr>
</table>
</TD>
</TR>
<TR id=CommonListTitle3>
<TD colspan="2"> 选项</td>
</TR>
<TR id=CommonListCell>
<TD>
<table border="0">
<%if CookieUserName=Rs("UserName") then%>
<tr>
<td><img src=images/edit.gif></td>
<td><a href="EditProfile.asp">编辑我的资料</a></td>
</tr>
<%end if%>
<tr>
<td><img src=images/favorite.gif></td>
<td><a href="MyFavorites.asp?menu=FavoriteFriend&FriendUserName=<%=Rs("UserName")%>">将 <%=Rs("UserName")%> 加为好友</a></td>
</tr>
<%if CookieUserName<>empty then%>
<tr>
<td><img src=images/privatemessage.gif></td>
<td><a href="javascript:Wo_Modal.Open('MyMessage.asp?menu=Post&RecipientUserName=<%=Rs("UserName")%>',600,350);">给 <%=Rs("UserName")%> 发送讯息</a></td>
</tr>
<%end if%>
<tr>
<td><img src=images/email.gif></td>
<td><a target="wh" href="mailto:<%=Rs("UserEmail")%>">给 <%=Rs("UserName")%> 发送邮件</a></td>
</tr>
<%if Rs("WebAddress")<>"" then%>
<tr>
<td><img src=images/homepage.gif></td>
<td><a target="wh" href="<%=Rs("WebAddress")%>">查看 <%=Rs("UserName")%> 的主页</a></td>
</tr>
<%end if%>
<%if Rs("WebLog")<>"" then%>
<tr>
<td><img src=images/weblog.gif></td>
<td><a target="wh" href="<%=Rs("WebLog")%>">查看 <%=Rs("UserName")%> 的博客</a></td>
</tr>
<%end if%>
<%if Rs("WebGallery")<>"" then%>
<tr>
<td><img src=images/webgallery.gif></td>
<td><a target="wh" href="<%=Rs("WebGallery")%>">查看 <%=Rs("UserName")%> 的相册</a></td>
</tr>
<%end if%>
<tr>
<td><img src=images/search.gif></td>
<td><a href="ShowBBS.asp?menu=MyTopic&UserName=<%=Rs("UserName")%>">搜索 <%=Rs("UserName")%> 的主题</a></td>
</tr>
<%if QQ<>"" then%>
<tr>
<td><img src=images/im_qq.gif></td>
<td><a target="blank" href="http://wpa.qq.com/msgrd?V=1&Uin=<%=QQ%>&menu=yes&Site=<%=SiteConfig("SiteName")%>"><%=QQ%></a></td>
</tr>
<%end if%>
<%if MSN<>"" then%>
<tr>
<td><img src=images/im_msn.gif></td>
<td><a target="blank" href="http://members.msn.com/?mem=<%=MSN%>"><%=MSN%></a></td>
</tr>
<%end if%>
<%if AIM<>"" then%>
<tr>
<td><img src=images/im_aim.gif></td>
<td><%=AIM%></td>
</tr>
<%end if%>
<%if Yahoo<>"" then%>
<tr>
<td><img src=images/im_yahoo.gif></td>
<td><%=Yahoo%></td>
</tr>
<%end if%>
<%if ICQ<>"" then%>
<tr>
<td><img src=images/im_icq.gif></td>
<td><%=ICQ%></td>
</tr>
<%end if%>
<%if Skype<>"" then%>
<tr>
<td><img src=images/im_skype.gif></td>
<td><%=Skype%></td>
</tr>
<%end if%>
</table>
</TD>
</TR>
</TABLE>
</TD>
<TD vAlign=top>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=3 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle3>
<TD align=Left> <%=Rs("UserName")%> 的Dig文章</TD>
</TR>
<TR id=CommonListCell>
<TD><%
str="select top 8 * from Wo_source where Src_IsOver=true and Src_UserID="&Rs("UserID")&" order by Src_ID desc"
Set Rs1= Server.CreateObject("Adodb.recordset")
Rs1.open str,conn,1,3
if Rs1.eof then
Response.Write("没有该窝友的Dig文章")
else
do while not Rs1.eof
Response.Write(" <img src='Images/frame_0.gif' border=0> <a href='show.asp?Src_ID="&Rs1("Src_ID")&"'>"&Rs1("Src_Title")&"</a> | "&Rs1("Src_AddDate")&"<hr style='BORDER-RIGHT: #eeeeee 1px; BORDER-TOP: #eeeeee 1px dashed; MARGIN: 0px 0px 0px; BORDER-LEFT: #eeeeee 1px; BORDER-BOTTOM: #eeeeee 1px' noShade SIZE=1>")
Rs1.MoveNext
loop
end if
Rs1.close
%></TD>
</TR>
<tr id=CommonListCell><td align="right"><a href="dig_more.asp?UserName=<%=UserName%>">查看更多<%=UserName%>发布的DIG文章</a> </td></tr>
</TABLE><br>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=3 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle3>
<TD align=Left> <%=Rs("UserName")%> 发布的群组主题</TD>
</TR>
<TR id=CommonListCell>
<TD><%
str="select top 8 * from [Wo_Threads] where IsApproved=1 and IsDel=0 and PostAuthor='"&Rs("UserName")&"' order by ThreadID Desc"
Rs1.open str,conn,1,3
if Rs1.eof then
Response.Write("没有该窝友发布的群组主题")
else
do while not Rs1.eof
Response.Write(" <img src='Images/frame_0.gif' border=0> <a href='ShowPost.asp?ThreadID="&Rs1("ThreadID")&"'>"&Rs1("Topic")&"</a> | "&Rs1("PostTime")&"<hr style='BORDER-RIGHT: #eeeeee 1px; BORDER-TOP: #eeeeee 1px dashed; MARGIN: 0px 0px 0px; BORDER-LEFT: #eeeeee 1px; BORDER-BOTTOM: #eeeeee 1px' noShade SIZE=1>")
Rs1.MoveNext
loop
end if
Rs1.close
%></TD>
</TR>
<tr id=CommonListCell><td align="right"><a href="group_more.asp?UserName=<%=UserName%>">查看更多<%=UserName%>发布的群组主题</a> </td></tr>
</TABLE><br>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=0 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle3>
<TD align=Left> 个人资料</TD>
</TR>
<TR id=CommonListCell>
<TD>
<table border="0" width="100%" cellspacing="0">
<tr>
<td>名 字:<%=Rs("RealName")%></td>
</tr>
<tr><td>性 别:<%=UserSex%></td></tr>
<tr><td>生 日:<%=Rs("birthday")%></td></tr>
<tr><td>生 肖:<%=Zodiac(Rs("birthday"))%></td></tr>
<tr><td>星 座:<%=constellation(Rs("birthday"))%></td></tr>
<tr><td>职 业:<%=Rs("Occupation")%></td></tr>
<tr><td>兴 趣:<%=Rs("Interests")%></td></tr>
<tr><td>地 址:<%=Rs("Address")%></td></tr>
</table>
</TD>
</TR>
</TD>
</TR>
</TABLE>
<br>
<%if Rs("UserBio")<>"" then%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=0 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle3>
<TD align=Left> 简介</TD>
</TR>
<TR id=CommonListCell>
<TD><br> <%=Rs("UserBio")%></TD>
</TR>
</TABLE>
<BR>
<%end if%>
<%if SiteConfig("EnableSignatures")=1 and Rs("UserSign")<>"" then%>
<TABLE WIDTH=100% cellSpacing=1 cellPadding=0 align=center border=0 id=CommonListArea>
<TR id=CommonListTitle3>
<TD align=Left> 签名</TD>
</TR>
<TR id=CommonListCell>
<TD><br> <%=YbbEncode(Rs("UserSign"))%></TD>
</TR>
</TABLE>
<%end if%>
</TD>
</TR>
</TABLE>
<%
Set Rs = Nothing
HtmlBottom
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -