<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_popfun.asp -->
<!-- #include file=../inc/bbsmanage_Fun.asp -->
<%
DEF_BBS_HomeUrl = "../../"
Dim GBL_ID
initDatabase
GBL_CHK_TempStr = ""
GBL_ID = checkSupervisorPass

SiteHead(DEF_SiteNameString & " - 管理员")
UserTopicTopInfo
DisplayUserNavigate("修复论坛统计清除在线用户")
If GBL_CHK_Flag=1 Then
	If Request.Form("submitflag") = "yes" then
		ClearOnlineUser
	Else
		%><p><br>
			注意：此功能将完成以下功能：<br><br>
			&nbsp; &nbsp; &nbsp; 1.清除当前在线的所有人员（包括游客）。<br>
			&nbsp; &nbsp; &nbsp; 2.清除后的在线人员，需要在2分钟左右的活动后才能重新成为在线会员<br>
			&nbsp; &nbsp; &nbsp; 3.清除每个版面(包括隐藏版面)的在线人数为零<br>
			&nbsp; &nbsp; &nbsp; 4.清除总在线人数为零<br>
			<br>
			<b><font color=ff0000 class=RedFont>确认信息： 真的要开始清除在线人员么？</font></b><br><br>
			<p>
			
			<form action=ClearOnlineUser.asp method=post>
			<input type=hidden name=submitflag value="yes">
			<input type=submit value=点击开始清除在线人员 class=fmbtn>
			</form>
			
			<p><a href=../SiteManage/RepairSite.asp>如果仅仅是想修复每个版面的在线人数或总在线人数，请点击这里</a>
		<%
	End If
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
UserTopicBottomInfo
closeDataBase
SiteBottom
If GBL_ShowBottomSure = 1 Then Response.Write GBL_SiteBottomString

Function ClearOnlineUser

	Con.execute("delete from LeadBBS_onlineUser")
	GBL_DBNum = GBL_DBNum + 1
	Application.Lock
	application(DEF_MasterCookies & "ActiveUsers") = 0
	Application.UnLock
	
	Dim SQL,I
	If isArray(application(DEF_MasterCookies & "BListAll")) = True Then
		SQL = Ubound(application(DEF_MasterCookies & "BListAll"),2)
		Application.Lock
		For I = 0 To SQL
			Application(DEF_MasterCookies & "BDOL" & application(DEF_MasterCookies & "BListAll")(0,I)) = 0
		Next
		Application.UnLock
	End If
	Response.write "<p><br><b><font color=green class=GreenFont>成功清除所有在线用户！</font></b>[" & DEF_Now & "]"

End Function
%>