<!-- #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

Dim GBL_SiteDisbleWhyString,GBL_REQ_Flag

SiteHead(DEF_SiteNameString & " - 管理员")
UserTopicTopInfo
DisplayUserNavigate("网站重新启动")%>
<br>
<%If GBL_CHK_Flag=1 Then
	LoginAccuessFul
Else%>
	<table width=96%>
	<tr>
	<td>
	<br>
	<%
	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 LoginAccuessFul

			If Request.Form("submitflag")="Dieos9xsl29LO_8" Then
				Application.Lock
				If Request("Flag2") <> "" Then
					Application.Contents.RemoveAll()
					Response.Write "<p>成功彻底释放论坛变量．</p>"
				Else
					FreeApplicationMemory
					Response.Write "<p>成功完成论坛变量重置．</p>"
				End If
				If Request("Flag") <> "" then
					application(DEF_MasterCookies & "SiteEnableFlagzoieiu") = 0
					application(DEF_MasterCookies & "SiteDisbleWhyszoieiu") = "论坛已经关闭"
					Response.Write "<p><br>论坛重启成功，并且已经正常关闭，如果想正常反安装论坛，请不要再访问任何管理员页面．</p>"
				Else
					Response.Write "<p><br>论坛重启成功．</p>"
				End If
				Application.UnLock
			Else
				DisplayStringForm
			End If

End Function

Function DisplayStringForm

%>
<p>
请确定是否需要重新启动论坛？重启后论坛一切状态将重置<br>
（相当于Web服务器重启后的结果）<br>
比如在线人数将归零，并释放一些论坛占用的内存．
<form action=SiteReset.asp method="post">
	<br>
	<b><font color=ff0000 class=RedFont>确认信息： 真的重新启动论坛么？</font></b><br><br>
	<br><input class=fmchkbox type="checkbox" name=Flag value="yes">选中则在重启后自动关闭网站访问,如果你需要真正的反安装这个论坛,请在此操作后,不要再进行其它的管理员操作,以保服务器内存彻底释放.
	<br><input class=fmchkbox type="checkbox" name=Flag2 value="yes">选中则彻底释放内存占用(部分服务器不支持)
	<p>
	<input name=submitflag type=hidden value="Dieos9xsl29LO_8">
	<input type=submit value="重启论坛" class=fmbtn> <input type=reset value="取消" class=fmbtn>
</form>
<%
	Response.Write "<b>重启后，以下论坛数据将被释放：</b><table>" & VbCrLf
	Dim Thing
	For Each Thing in Application.Contents
		If Left(Thing,Len(DEF_MasterCookies)) = DEF_MasterCookies Then
			Response.Write "<tr><td><font color=Gray class=GrayFont>" & thing & "</font></td><td>&nbsp;"
			If isObject(Application.Contents(Thing)) Then
				Response.Write "对象"
			ElseIf isArray(Application.Contents(Thing)) Then
				Response.Write "数组"
			Else
				Response.Write Application.Contents(Thing)
			End If
			Response.Write "</td></tr>"
		End If
	Next
	Response.Write "</table>"

End Function

Function FreeApplicationMemory

	Response.Write "<p><b>释放论坛数据列表：</b><table>" & VbCrLf
	Dim Thing
	For Each Thing in Application.Contents
		If Left(Thing,Len(DEF_MasterCookies)) = DEF_MasterCookies Then
			Response.Write "<tr><td><font color=Gray class=GrayFont>" & thing & "</font></td><td>&nbsp;"
			If isObject(Application.Contents(Thing)) Then
				Application.Contents(Thing).close
				Set Application.Contents(Thing) = Nothing
				Application.Contents(Thing) = null
				Response.Write "对象成功关闭"
			ElseIf isArray(Application.Contents(Thing)) Then
				Set Application.Contents(Thing) = Nothing
				Application.Contents(Thing) = null
				Response.Write "数组成功释放"
			Else
				Response.Write htmlencode(Application.Contents(Thing))
				Application.Contents(Thing) = null
			End If
			Response.Write "</td></tr>"
		End If
	Next
	Response.Write "</table>"

End Function%>