<!-- #include file=../inc/BBSsetup.asp -->
<!-- #include file=../inc/User_Setup.ASP -->
<!-- #include file=../inc/Board_Popfun.asp -->
<!-- #include file=../inc/Constellation.asp -->
<!-- #include file=../inc/Limit_fun.asp -->
<!-- #include file=inc/UserTopic.asp -->
<!--#include file="xgcity_community_head.asp" -->
<%
dim Assort_id
Assort_id=0
%>
<script>
if(self!=top){top.location=self.location;}
function switchSysBar(){
if (switchPoint.innerText==3){
switchPoint.innerText=4
document.all("frmTitle").style.display="none"
}else{
switchPoint.innerText=3
document.all("frmTitle").style.display=""
}}
</script>
<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tbody>
  <tr>
    <td height="100%" align="left" vAlign="top" noWrap id="frmTitle">
    <iframe frameBorder="0" id="carnoc" name="carnoc" scrolling="no" src="../left.asp?Assort_id=<%=Assort_id%>" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 92px; Z-INDEX: 2">
    </iframe>    </td>
    <td style="WIDTH: 9pt" >
    <table border="0" cellPadding="0" cellSpacing="0" height="100%">
	<tbody>
      <tr>
        <td style="HEIGHT: 100%" onclick="switchSysBar()" background="../images/left/bg.gif" style=CURSOR:hand; title=开启/关闭左边导航栏>
<font style=COLOR:#ffffff;CURSOR:hand;FONT-FAMILY:Webdings;FONT-SIZE:9pt;>
<SPAN id=switchPoint>3</SPAN></font></td>
      </tr>
	  </tbody>
    </table>
    </td>
    <td align="left" valign="top" style="WIDTH: 100%">

<%
DEF_BBS_HomeUrl = "../"
Dim GBL_ID,GBL_Name
GBL_CHK_TempStr = ""
GBL_Name = Request("Name")
GBL_ID = Left(Request("ID"),14)
If GBL_Name = "" Then GBL_Name = GBL_ID
If GBL_ID="" or isNumeric(GBL_ID)=0 Then GBL_ID = 0
GBL_ID = cCur(GBL_ID)
initDatabase

SiteHead(DEF_SiteNameString & " - 用户会员区")
UpdateOnlineUserAtInfo GBL_board_ID,"查看用户资料"

If GBL_ID = 0 and GBL_Name = "" Then
	If GBL_ID = 0 Then GBL_ID = GBL_UserID
	GBL_CHK_TempStr = ""
	If GBL_ID = 0 Then
		GBL_CHK_TempStr = "找不到用户，要查看自己的资料请先登录。<br>" & VbCrLf
	End If
Else
	If GBL_ID <> 0 Then GBL_Name = ""
	GBL_CHK_TempStr = ""
End If

UserTopicTopInfo
DisplayUserNavigate("查看用户信息")
If GBL_UserID < 1 Then GBL_CHK_TempStr = "请确认您的身份，游客无权查看用户资料"
if GBL_CHK_TempStr <> "" Then
	Response.Write "<br><p align=left><font color=ff0000 class=RedFont><b>" & GBL_CHK_TempStr & "</b></font>"
Else
	GBL_CHK_TempStr = ""
	If LookUserInfo = 0 Then Response.Write "<br><p align=left><font color=ff0000 class=RedFont><b>" & GBL_CHK_TempStr & "</b></font>"
End If
UserTopicBottomInfo
closeDataBase
SiteBottom
If GBL_ShowBottomSure = 1 Then Response.Write GBL_SiteBottomString

Function LookUserInfo

	Dim Form_UserName,Form_Pass,Form_Mail,Form_Address
	Dim Form_Sex,Form_Birthday,Form_ApplyTime,Form_ICQ,Form_OICQ
	Dim Form_Prevtime,Form_Userphoto,Form_UserLevel,Form_Homepage,Form_Underwrite
	Dim Form_Officer,Form_Points,Form_OnlineTime
	Dim Form_FaceUrl,Form_FaceWidth,Form_FaceHeight,Form_NongLiBirth,Form_UserLimit
	Dim Form_AnnounceNum,Form_AnnounceTopic,Form_AnnounceGood,Form_NotSecret,Form_AnnounceNum2
	Dim Form_LastDoingTime,Form_CachetValue,Form_CharmPoint,LastWriteTime
	Dim Rs
	If GBL_Name <> "" Then
		Set Rs = Con.ExeCute("Select top 1 ID,UserName,Mail,Address,Sex,ICQ,OICQ,Userphoto,Homepage,PrintUnderwrite,birthday,NotSecret,ApplyTime,UserLevel,Officer,Points,Onlinetime,Prevtime,NongLiBirth,UserLimit,AnnounceNum,AnnounceTopic,AnnounceGood,LastDoingTime,CachetValue,CharmPoint,LastWriteTime,FaceUrl,FaceWidth,FaceHeight,AnnounceNum2 from LeadBBS_User where UserName='" & Replace(GBL_Name,"'","''") & "'")
		GBL_DBNum = GBL_DBNum + 1
	Else
		Set Rs = Con.ExeCute("Select top 1 ID,UserName,Mail,Address,Sex,ICQ,OICQ,Userphoto,Homepage,PrintUnderwrite,birthday,NotSecret,ApplyTime,UserLevel,Officer,Points,Onlinetime,Prevtime,NongLiBirth,UserLimit,AnnounceNum,AnnounceTopic,AnnounceGood,LastDoingTime,CachetValue,CharmPoint,LastWriteTime,FaceUrl,FaceWidth,FaceHeight,AnnounceNum2 from LeadBBS_User where id=" & GBL_ID)
		GBL_DBNum = GBL_DBNum + 1
	End If
	If Rs.Eof Then
		GBL_CHK_TempStr = GBL_CHK_TempStr & "用户不存在，要查看的用户可能已经删除，或者是游客的名字。<br>" & VbCrLf
		LookUserInfo = 0
		GBL_CHK_Flag = 0
		Rs.Close
		Set Rs = Nothing
		Exit Function
	End If
	
	GBL_ID = cCur(Rs(0))
	Form_UserName = Rs(1)
	Form_Mail = Rs(2)
	Form_Address = Rs(3)
	Form_Sex = Rs(4)
	Form_ICQ = Rs(5)
	Form_OICQ = Rs(6)
	Form_Userphoto = Rs(7)
	Form_Homepage = Rs(8)
	Form_Underwrite = Rs(9)
	Form_birthday = Rs(10)
	Form_NotSecret = Rs(11)
	If Form_NotSecret = 1 or Form_NotSecret = True Then
		Form_NotSecret = 1
	Else
		Form_NotSecret = 0
	End If

	REM 特殊数据
	Form_ApplyTime = Rs(12)
	Form_UserLevel = Rs(13)
	Form_Officer = Rs(14)
	Form_Points = Rs(15)
	Form_OnlineTime = Rs(16)
	Form_Prevtime = Rs(17)
	Form_NongLiBirth = Rs(18)
	Form_UserLimit = Rs(19)
	Form_AnnounceNum = cCur(Rs(20))
	Form_AnnounceTopic = cCur(Rs(21))
	Form_AnnounceGood = cCur(Rs(22))
	Form_LastDoingTime = Rs(23)
	Form_CachetValue = Rs(24)
	Form_CharmPoint = cCur(Rs(25))
	LastWriteTime = cCur(Rs(26))
	Dim Temp

	If DEF_AllDefineFace = 1 Then
		Form_FaceUrl = Rs(27)
		Form_FaceWidth = Rs(28)
		Form_FaceHeight = Rs(29)
	End If
	Form_AnnounceNum2 = Rs(30)
	Rs.Close
	Set Rs = Nothing
	%><br>
	<br><p><b>[<%=htmlencode(Form_Username)%>] <font color=888888 class=GrayFont>基本资料</font>
	<a href=UserAnc.asp?ID=<%=GBL_ID%>>所有帖子</a>
	<a href=UserAncTopic.asp?ID=<%=GBL_ID%>>主题帖子</a>
	<a href=UserAncGood.asp?ID=<%=GBL_ID%>>精华帖子</a>
	<a href=UserUpload.asp?ID=<%=GBL_ID%>>上传附件</a></b>
	<TABLE border=0 cellpadding="0" cellspacing="0" width=100%>
	<TR align=middle>
		<TD colspan="2">
			<TABLE border=0 class=font cellpadding="0" cellspacing="0" width=100%>
			<TR>
				<TD height=2 bgcolor="#ececff" width=75 class=TBBG1><img src="<%=DEF_BBS_HomeUrl%>images/null.GIF" width=2 height=1></TD>
				<TD height=2 bgcolor="#ececff" class=TBBG1><img src="<%=DEF_BBS_HomeUrl%>images/null.GIF" width=311 height=1></TD>
			</TR>
			<TR>
				<TD height="25" align=center width=75>
					<p>用户编号：
				</TD>
				<TD height="25">
					<%=GBL_ID%></TD>
			</TR>
			<TR>
				<TD height="25" align=center width=75>
					<p>用户名称：
				</TD>
				<TD height="25">
					<%=Server.HtmlEncode(Form_Username)%></TD>
			</TR><%If Form_mail <> "" and (Form_NotSecret = 1 or GBL_UserID=GBL_ID) Then%>
			<TR style="WORD-BREAK: break-all;">
				<TD height="25" align=center width=75>
					<p>电子邮件：
				</TD>
				<TD height="25">
					<%If Form_mail<>"" Then Response.Write "<a href=""mailto:" & HtmlEncode(Form_mail) & """>" & HtmlEncode(Form_mail) & "</a>"%></TD>
			</TR><%End If%><%If Form_homepage <> "" Then%>
			<TR style="WORD-BREAK: break-all;">
				<TD height="25" align=center width=75>
					<p>主页地址：
				</TD>
				<TD height="25">
					<%If Form_homepage<>"" Then
						Form_mail = Form_homepage
						If Left(lcase(Form_mail),4)<>"http" Then Form_mail = "http://" & Form_mail
						Response.Write "<a href=""" & HtmlEncode(Form_mail) & """ target=_blank>" & HtmlEncode(Form_homepage) & "</a>"
					End if%></TD>
			</TR><%End If%><%If Form_icq <> "" and Form_icq <> "0" Then%>
			<TR>
				<TD height="25" align=center>
					<p>ICQ 号码：
				</TD>
				<TD height="25">
					<%=HtmlEncode(Form_icq)%></TD>
			</TR><%End If%><%If Form_oicq <> "" and Form_oicq <> "0" and (Form_NotSecret = 1 or GBL_UserID=GBL_ID) Then%>
			<TR>
				<TD height="25" align=center>
					<p>OICQ号码：
				</TD>
				<TD height="25">
					<%=HtmlEncode(Form_oicq)%></TD>
			</TR><%End If%><%If Form_address <> "" and (Form_NotSecret = 1 or GBL_UserID=GBL_ID) Then%>
			<TR style="WORD-BREAK: break-all;">
				<TD height="25" align=center>
					<p>用户地址：
				</TD>
				<TD height="25">
					<%=HtmlEncode(Form_address)%></TD>
			</TR><%End If%>
			<TR>
				<TD height="25" align=center>
					<p>用户性别：
				</TD>
				<TD height="25">
					<%=Form_sex%></TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>用户头像：
				</TD>
				<TD height="25">
					<%
					If isNull(Form_FaceUrl) Then Form_FaceUrl = ""
					If DEF_AllDefineFace = 0 or Trim(Form_FaceUrl) = "" Then%>
					<img src=<%=DEF_BBS_HomeUrl%>images/face/<%=string(4-len(cstr(Form_userphoto)),"0")&Form_userphoto%>.gif align=absmiddle width=62 height=62>
					<%Else%>
						<img src="<%=htmlencode(Form_FaceUrl)%>" align=absmiddle width=<%=Form_FaceWidth%> height=<%=Form_FaceHeight%>>
					<%End If%>
					<br><img src=../images/blank.gif width=2 height=5><br>
				</TD>
			</TR><%if len(Form_birthday)=14 and (Form_NotSecret = 1 or GBL_UserID=GBL_ID) Then%>
			<TR>
				<TD height="25" align=center>
					<p>用户生日： 
				</TD>
				<TD height="25" align="left">
					<%If len(Form_birthday)=14 Then%>
					<%=RestoreTime(Left(Form_birthday,8))%></TD>
					<%End If%></TD>
			</TR><%End If%>
			<%If len(Form_Birthday) = 14 Then%>
			<TR>
				<TD height="25" align=center>
					<p>用户星座： 
				</TD>
				<TD height="25" align="left">
					<%
					Rs = RestoreTime(Left(Form_Birthday,8))
					If isTrueDate(Rs) Then
						Response.Write Replace(Replace(Constellation(Rs),".gif","b.gif"),"<img width=15 height=15","<img width=80 height=80") & "</TD>"
					End If%></TD>
			</TR><%
					Rs = RestoreTime(Left(Form_NongLiBirth,8))
					If isTrueDate(Rs) Then%>
			<TR>
				<TD height="25" align=center>
					<p>十二生肖：
				</TD>
				<TD height="25" align="left">
					<%=Replace(Replace(DisplayBirthAnimal(year(Rs)),"s.gif",".gif"),"<img width=15 height=15","<img width=80 height=80")%></TD>
			</TR><%End If
			End If
			If Form_Underwrite <> "" Then%>
			<TR>
				<TD height="25" align=center>
					<p>签 名 栏：
				</TD>
				<TD height="25">
					<br>
					<table style="table-layout:fixed; word-break:break-all" width=319 border="0" cellspacing="0" cellpadding="0"><tr><td>
					<%=Form_Underwrite%></td></tr></table><br></TD>
			</TR><%End If%>
			<tr>
				<td colspan=2 bgcolor=F7F7F7 height=25 class=TBBG1>
					:::::::::::特殊资料:::::::::::</td>
			</tr>
			<TR>
				<TD height="25" align=center>
					<p>申请时间：
				</TD>
				<TD height="25">
					<%=RestoreTime(Form_ApplyTime)%></TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>最后活动：
				</TD>
				<TD height="25">
					<%
					If cCur(Form_LastDoingTime) > cCur(Form_Prevtime) Then Form_Prevtime = Form_LastDoingTime
					If cCur(LastWriteTime) > cCur(Form_Prevtime) Then Form_Prevtime = LastWriteTime
					Response.Write RestoreTime(Form_Prevtime)%></TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>用户等级：
				</TD>
				<TD height="25">
					<%=DEF_UserLevelString(Form_UserLevel)%></TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>用户<%=DEF_PointsName%>：
				</TD>
				<TD height="25">
					<%=HtmlEncode(Form_Points)%></TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>发表帖子：
				</TD>
				<TD height="25">
					<%
					If Form_AnnounceNum = 0 Then
						Response.Write "无任何帖子"
					Else
						Response.Write "现存<b>" & Form_AnnounceNum & "</b>篇"
						Response.Write "，主题<b>" & Form_AnnounceTopic & "</b>篇，回复<b>" & Form_AnnounceNum - Form_AnnounceTopic & "</b>篇"
						Response.Write "，精华<b>" & Form_AnnounceGood & "</b>篇"
					End If
					%> 历史累计<b><%=Form_AnnounceNum2%></b>篇</TD>
			</TR>
			<TR>
				<TD height="25" align=center>
					<p>经 验 值：
				</TD>
				<TD height="25">
					<%=clng(cCur(Form_OnlineTime)/60)%></TD>
			</TR><%
			If Form_CachetValue <> 0 Then%>
			<TR>
				<TD height="25" align=center>
					<p>威&nbsp; &nbsp; 望：
				</TD>
				<TD height="25">
			<%
				If Form_CachetValue > 127 Then
					Form_CachetValue = 127-Form_CachetValue
					Response.write Form_CachetValue & "<br>"
				Else
					Response.write "<font color=blue class=BlueFont>＋" & Form_CachetValue & "</font><br>"
				End If%></TD>
			</TR>
			<%
			End If
			If Form_CharmPoint <> 0 Then%>
			<TR>
				<TD height="25" align=center>
					<p>魅&nbsp; &nbsp; 力：
				</TD>
				<TD height="25">
				<%=Form_CharmPoint%></TD>
			</TR>
			<%
			End If
			If Form_Officer <> "0" and Form_Officer <> "" Then%>
			<TR>
				<TD height="25" align=center>
					<p>荣誉称号：
				</TD>
				<TD height="25">
					<%=DisplayOfficerString(Form_Officer)%></TD>
			</TR><%End If%><%If GetBinarybit(Form_UserLimit,8) = 1 or GetBinarybit(Form_UserLimit,2) = 1 Then%>
			<TR>
				<TD height="25" align=center>
					<p>其它信息：
				</TD>
				<TD height="25">
					<%
			If GetBinarybit(Form_UserLimit,10) = 1 Then
				Response.write "<font color=555555>职务：</font>总版主<br>"
			ElseIf GetBinarybit(Form_UserLimit,14) = 1 Then
				Response.write "<font color=555555 class=GrayFont>担任</font><b>区版主</b><font color=555555 class=GrayFont>一职</font>"
			ElseIf GetBinarybit(Form_UserLimit,8) = 1 Then
				Response.write "<font color=555555 class=GrayFont>担任</font><b>论坛版主</b><font color=555555 class=GrayFont>一职</font>"
			End If

			If GetBinarybit(Form_UserLimit,2) = 1 Then
				Response.write " <font color=555555 class=GrayFont>已经是</font>认证会员<br>"
			End If%></TD>
			</TR><%End If%><%If GBL_UserID=GBL_ID Then%>
			<tr>
				<td align=center height=25>
					你的权限：<br>
					<font color=888888 class=GrayFont>某些设定仅<br>
					版主才有效</font></td>
				<td>
					<table cellpadding="5" cellspacing="1" bgcolor=<%=DEF_BBS_LightColor%> class=TBBG1><%
				Dim TempN
			for TempN = 1 to LimitUserStringDataNum
				If (GetBinarybit(Form_UserLimit,8) = 1 or GetBinarybit(Form_UserLimit,10) = 1) or CheckSupervisorUserName = 1 Then
					Response.Write "<tr bgcolor=" & DEF_BBS_LightestColor & "  class=TBBG9><td>" & LimitUserStringData(tempN)
					If GetBinarybit(Form_UserLimit,TempN+1) = 1 Then
						Response.Write "</td><td>是</td></tr>"
					Else
						Response.Write "</td><td>否</td></tr>"
					End If
				Else
					If TempN = 4 or TempN = 8 or TempN = 5 Then
					Else
						Response.Write "<tr"
						If (TempN mod 2) = 1 Then Response.Write " bgcolor=" & DEF_BBS_LightColor & "  class=TBBG1"
						Response.Write "><td>" & LimitUserStringData(tempN)
						If GetBinarybit(Form_UserLimit,TempN+1) = 1 Then
							Response.Write "</td><td>是</td></tr>"
						Else
							Response.Write "</td><td>否</td></tr>"
						End If
					End If
				End If
			Next%></table></td>
			</tr><%End If%>
			</TABLE>
		</TD>
	</TR>
	<TR>
		<TD colspan="2" height=2 bgcolor="ececff" class=TBBG1><img src="<%=DEF_BBS_HomeUrl%>images/null.GIF" width=1 height=1></TD>
	</TR>
	
	<TR>
		<TD colspan=2 align=right>
			<script language=javascript>
			function addfriend(id)
			{
				window.open('../announce/AddFriend.asp?BoardID=<%=GBL_board_ID%>&AddSureFlag=yes&FriendName='+id,'','width=450,height=37,scrollbars=auto,status=no');
			}
			</script>
			<br>
			<%Response.Write " <a href='javascript:addfriend(""" & Server.HtmlEncode(Form_Username) & """);'>添加为好友</a>"%>
			<a href="SendMessage.asp?SdM_ToUser=<%=HtmlEncode(Form_Username)%>">立即发送短消息</a>
			<a href="LookUserMoreInfo.asp?ID=<%=GBL_ID%>">查看更多资料</a></TD>
	</TR>
	</TABLE>
	<%

End Function

Function DisplayOfficerString(Officer)

	Dim Officer_Temp,Temp_N,dotFlag
	dotFlag = 0
	Officer_Temp = split(Officer,",")
	For Temp_N = 0 to Ubound(Officer_Temp,1)
		If isNumeric(Officer_Temp(Temp_N)) Then
			Officer_Temp(Temp_N) = cCur(Officer_Temp(Temp_N))
			If Officer_Temp(Temp_N)>=0 and Officer_Temp(Temp_N)<=DEF_UserOfficerNum Then
				If dotFlag = 0 Then
					dotFlag = 1
					DisplayOfficerString = DisplayOfficerString & DEF_UserOfficerString(Officer_Temp(Temp_N))
				Else
					DisplayOfficerString = DisplayOfficerString & "," & DEF_UserOfficerString(Officer_Temp(Temp_N))
				End If
			End If
		End If
	Next

End Function
%>
 </td>
  </tr>
  </tbody>
</table>
<script>
if(window.screen.width<'1024'){switchSysBar()}
</script>
