<!-- #include file=../inc/BBSsetup.asp -->
<!-- #include file=../inc/Board_popfun.asp -->
<!-- #include file=inc/UserTopic.asp -->
<%
DEF_BBS_HomeUrl = "../"
Dim GBL_ID
initDatabase
GBL_CHK_TempStr = ""
GBL_ID = GBL_UserID
GBL_CHK_TempStr = ""
SiteHead(DEF_SiteNameString & " - 用户会员区")

Dim ShowFlagString
If GBL_CHK_ShowFlag = 1 or GBL_CHK_ShowFlag = True Then
	ShowFlagString = "上线"
Else
	ShowFlagString = "隐身"
End If

UpdateOnlineUserAtInfo GBL_board_ID,ShowFlagString

If GBL_ID=0 Then
	GBL_CHK_TempStr = GBL_CHK_TempStr & "您没有登录!<br>" & VbCrLf
End If

Dim u
u = Lcase(Request.ServerVariables("HTTP_REFERER"))

Dim HomeUrl
HomeUrl = "http://"&Request.ServerVariables("server_name")
If Request.ServerVariables("SERVER_PORT") <> "80" Then HomeUrl = HomeUrl & ":" & Request.ServerVariables("SERVER_PORT")

If Left(u,Len(HomeUrl)) <> HomeUrl Then u = ""
If inStr(u,"/user/hidden.asp") > 0 Then u = ""
'u = Request.QueryString("u")
UserTopicTopInfo
DisplayUserNavigate(ShowFlagString)

If DEF_EnableUserHidden = 1 Then
	If GBL_CHK_Flag=1 Then
		If ShowFlagString = "隐身" Then
			con.ExeCute("Update LeadBBS_User Set ShowFlag=1 where ID=" & GBL_ID)
			GBL_DBNum = GBL_DBNum + 1
			UpdateSessionValue 3,1,0
			con.ExeCute("Update LeadBBS_OnlineUser Set HiddenFlag=0,UserName='隐身会员' where UserID=" & GBL_ID)
			GBL_DBNum = GBL_DBNum + 1
		Else
			con.ExeCute("Update LeadBBS_User Set ShowFlag=0 where ID=" & GBL_ID)
			GBL_DBNum = GBL_DBNum + 1
			UpdateSessionValue 3,0,0
			con.ExeCute("Update LeadBBS_OnlineUser Set HiddenFlag=" & GBL_CHK_UserLimit & ",UserName='" & Replace(GBL_CHK_User,"'","''") & "' where UserID=" & GBL_ID)
			GBL_DBNum = GBL_DBNum + 1
		End If
		Response.Write "<p>您已经成功" & ShowFlagString
			
		If u <> "" Then Response.Redirect u
	Else%>
		<table width=96%>
		<tr>
		<td>
		<%
		If Request("submitflag")="" Then
			Response.Write "<br><b>请先登录</b>"
		Else
			Response.Write "<br><p align=left><font color=ff0000 class=RedFont><b>" & GBL_CHK_TempStr & "</b></font>"
		End If
		DisplayLoginForm
		Response.Write "</p>"%>
		</td>
		</tr>
		</table>
	<%End If
Else%>
		<br><br>
		<table width=96%>
		<tr>
		<td>
		论坛已经禁止使用隐身功能
		</td>
		</tr>
		</table>
<%End If
UserTopicBottomInfo
closeDataBase
SiteBottom
If GBL_ShowBottomSure = 1 Then Response.Write GBL_SiteBottomString%>