<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
Dim action
action=Request("action")
Select Case action
	Case "hidden"
		Call hidden()
	Case "online"
		Call online()		
	Case Else
End Select
If IsNull(Request.ServerVariables("HTTP_REFERER")) or Request.ServerVariables("HTTP_REFERER")="" Then
	response.redirect "index.asp"
Else
	response.redirect Request.ServerVariables("HTTP_REFERER")
End If

Sub hidden()
	If Not founduser Then
	errmsg="你还没有登录，不能执行操作！"
		call MsLove_error()
	End If
	conn.execute("update [Ms_online] set userhidden=1 where userid="&userid)
	conn.execute("update [Ms_user] set userhidden=1 where userid="&userid)
	Dim usercookies
	usercookies=request.cookies(Forum_sn)("usercookies")
	If IsNull(usercookies) or usercookies="" then usercookies="0"
	Select Case usercookies
		Case "0"
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 1
   			Response.Cookies(Forum_sn).Expires=Date+1
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 2
			Response.Cookies(Forum_sn).Expires=Date+31
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 3
			Response.Cookies(Forum_sn).Expires=Date+365
			Response.Cookies(Forum_sn)("usercookies") = usercookies
	End Select 
	Response.Cookies(Forum_sn)("userhidden") = 1
	Response.Cookies(Forum_sn).path=cookiepath
End Sub

Sub online()
	If Not founduser Then
 		errmsg="你还没有登录，不能执行操作！"
		call MsLove_error()
	End If
	conn.execute("update [Ms_online] set userhidden=2 where userid="&userid)
	conn.execute("update [Ms_user] set userhidden=2 where userid="&userid)
	Dim  usercookies
	usercookies=request.cookies(Forum_sn)("usercookies")
	If IsNull(usercookies) or usercookies="" Then usercookies="0"
	Select Case usercookies
		Case "0"
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 1
   			Response.Cookies(Forum_sn).Expires=Date+1
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 2
			Response.Cookies(Forum_sn).Expires=Date+31
			Response.Cookies(Forum_sn)("usercookies") = usercookies
		Case 3
			Response.Cookies(Forum_sn).Expires=Date+365
			Response.Cookies(Forum_sn)("usercookies") = usercookies
	End select
	Response.Cookies(Forum_sn)("userhidden") = 2
	Response.Cookies(Forum_sn).path=cookiepath
End Sub
%>
