<%
Response.Expires = 0 
Response.ExpiresAbsolute = DEF_Now - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private" 
Response.CacheControl = "no-cache"

Dim BDM_isBoardMasterFlag,BDM_SpecialPopedomFlag
BDM_isBoardMasterFlag = 0
BDM_SpecialPopedomFlag = 0

Sub CheckisBoardMasterFlag

	If GBL_UserID > 0 and GBL_CHK_Flag=1 Then
		If  GetBinarybit(GBL_CHK_UserLimit,10) = 1 or CheckSupervisorUserName = 1 Then
			BDM_isBoardMasterFlag = 1
		Else
			GBL_CHK_Flag = 0
			GBL_UserID = 0
		End If
		If BDM_isBoardMasterFlag = 1 and (GetBinarybit(GBL_CHK_UserLimit,12) = 1 or CheckSupervisorUserName = 1) Then BDM_SpecialPopedomFlag = 1
	Else
		GBL_CHK_Flag = 0
	End If

End Sub

Function DisplayUserCenter

	CheckisBoardMasterFlag
	%>
	<BR>
	<a href=default.asp><img src=<%=DEF_BBS_HomeUrl%>images/<%=GBL_DefineImage%>manage/bbsmanageDirectory.GIF border=0></a><br>
	<table align=center>
	<tr>
		<td><%If BDM_isBoardMasterFlag = 1 Then%>
			<p><a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/ClearTopAnc.asp>清除总固顶数据</a><br><%If BDM_SpecialPopedomFlag = 1 Then%>
			<p>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/LimitUserManage.asp><b>限制社员管理</b></a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/NewSpecialUser.asp?GBL_Assort=3>屏蔽社员发言</a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/NewSpecialUser.asp?GBL_Assort=4>禁止社员发言</a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/NewSpecialUser.asp?GBL_Assort=5>禁止社员修改</a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/NewForbidIP.asp><font color=Red class=RedFont>屏蔽社员IP地址</font></a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/ModifyUser.asp>强制修改社员资料</a><br>
			<a href=<%=DEF_BBS_HomeUrl%>User/BoardMaster/User/DeleteForbidIPandUser.asp><font color=Blue class=BlueFont>解除到期特殊社员及IP</font></a><br>
			<%End If
			End If%>
			<p>
			<a href=<%=DEF_BBS_HomeUrl%>User/Logout.asp>退出登录</a>
			</br></br>
		</td>
	</tr>
	</table>
	<br>
<%

End Function

Function DisplayLoginForm
%>
	<script language="javascript">
	function submitonce(theform)
	{
		if (document.all||document.getElementById)
		{
			for (i=0;i<theform.length;i++)
			{
				var tempobj=theform.elements[i];
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
				tempobj.disabled=true;
			}
		}
	}
	</script>
<p>
<form action=<%=DEF_BBS_HomeUrl%>User/login.asp method="post" onSubmit="submitonce(this);">
	社员名: <input name=user type=text maxlength=20 size=22 value="<%=htmlencode(GBL_CHK_user)%>" class=fminpt><br>
	密　码: <input name=pass type=password maxlength=20 size=22 value="<%=htmlencode(GBL_CHK_pass)%>" class=fminpt><br>
	有效期: <Select name=CkiExp>
				<option value="-1">无效
				<option value="365">一年
				<option value=1>一天
				<option value=2>两天
				<option value=7>一周
				<option value=31>一月
			</select> Cookie保留时间<p>
	<input name=submitflag type=hidden value="ddddls-+++">
	<input type=submit value="登录" class=fmbtn> <input type=reset value="取消" class=fmbtn>
</form>
<%

End Function

Function DisplayUserNavigate(str)

	Dim NewUrl
	NewUrl = DEF_BBS_HomeUrl
	If Left(NewUrl,3) = "../" or Left(NewUrl,3) = "..\" Then NewUrl = Mid(NewUrl,4)
	If DEF_SiteHomeUrl = "" Then DEF_SiteHomeUrl = DEF_BBS_HomeUrl & "index.asp"
	Response.Write "<a href=""" & DEF_SiteHomeUrl & """>" & "首页</a> &gt;&gt; "
	Response.Write "<a href=""" & DEF_BBS_HomeUrl & "index.asp"">" & DEF_BBS_Name & "</a> &gt;&gt; <a href=""BoardMaster/" & NewUrl & "Default.asp"">总版主管理</a> &gt;&gt; " & Str

End Function
Sub UserTopicTopInfo

	If GBL_TableHeadString <> "" Then
		Response.Write "<table width=" & DEF_BBS_ScreenWidth & " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>"
		Response.Write GBL_TableHeadString
		Response.Write "</td></tr></table>"
	End If
%>
	<table width="<%=DEF_BBS_ScreenWidth%>" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=DEF_BBS_DarkColor%>" class=TBone>
	<tr> 
		<td width="<%=DEF_BBS_LeftTDWidth%>" bgcolor="<%=DEF_BBS_LightColor%>" class=TBBG1 valign="top"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><%If GBL_CHK_Flag=1 Then DisplayUserCenter%></td>
			</tr>
			</table>
		</td>
		<td valign="top" bgcolor=<%=DEF_BBS_LightestColor%> class=TBBG9> <br>
			<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
			<tr> 
				<td height="20"> 

<%End Sub

Sub UserTopicBottomInfo

%>
				</p></td>
			</tr>
			</table>
			<br><br></td>
	</tr>
	</table><%
	If GBL_TableBottomString <> "" Then
		%><table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=0 cellpadding=0 align=center><tr><td><%=GBL_TableBottomString%></td></tr></table><%
	End If

End Sub%>