<!-- #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
	SiteInfo
	%>
	<p><ul>
	<li><a href=RepairSite.asp>重新统计上传文件及社员数量，社区在线人数</a><br>
	<li><a href=DeleteAllTopAnnounce.asp>取消一切总固顶帖子</a> <font color=888888 class=GrayFont>总固顶帖可能会产生垃圾数据(意外产生)，可用此项清除</font>
	</ul>
	<%
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 SiteInfo


	Dim OnlineTime,PageCount,YesterdayAnc,UploadNum,MaxAnnounce,MaxAncTime
	Dim MaxOnline,MaxolTime
	Dim Temp1
	Set Rs = Con.ExeCute("Select top 1 * from LeadBBS_SiteInfo")
	GBL_DBNum = GBL_DBNum + 1
	If Rs.Eof Then
		OnlineTime = 0
		PageCount = 0
	else
		OnlineTime = cCur(Rs("OnlineTime"))
		PageCount = cCur(Rs("PageCount"))
		YesterdayAnc = cCur(Rs("YesterdayAnc"))
		UploadNum = Rs("UploadNum")
		MaxAnnounce = Rs("MaxAnnounce")
		MaxAncTime = Rs("MaxAncTime")
		MaxOnline = Rs("MaxOnline")
		MaxolTime = Rs("MaxolTime")
	end If
	Rs.Close
	Set Rs = Nothing

	Dim Rs,Temp
	Response.Write "<p><br>始运时间: " & month(application("SiteStartTimeszoieiu")) & "月" & day(application("SiteStartTimeszoieiu")) & "日" & hour(application("SiteStartTimeszoieiu")) & ":" & minute(application("SiteStartTimeszoieiu")) & VbCrLf

	Set Rs = Con.ExeCute("select count(*) from LeadBBS_User")
	GBL_DBNum = GBL_DBNum + 1
	If Rs.Eof Then
		Temp = 0
	Else
		Temp = Rs(0)
		if isNull(Temp) or Temp="" Then Temp=0
		Temp = cCur(Temp)
	End If
	Response.Write "<br>网站社员: " & Temp & "人" & VbCrLf
	Rs.Close
	Set Rs = Nothing
	Response.Write "<br>在线人数: " & GetActiveUserNumber & "人<font color=888888 class=GrayFont>(自行统计)</font>" & VbCrLf
	Response.Write "<br>在线人数: " & Application("ActiveUserszoieiu") & "人<font color=888888 class=GrayFont>(Global.ASA)</font>" & VbCrLf
	
	Response.Write "<br>在线时间: "
	OnlineTime = OnlineTime + application(DEF_MasterCookies & "SiteOlTime")
	Temp = OnlineTime/(24*60*60)
	Response.Write Fix(Temp) & "天"
	OnlineTime=OnlineTime-Fix(Temp)*24*60*60
	Temp = OnlineTime/(60*60)
	Response.Write Fix(Temp) & "时"
	OnlineTime=OnlineTime-Fix(Temp)*60*60
	Temp = OnlineTime/(60)
	Response.Write Fix(Temp) & "分"
	Response.Write "<br>访问总量: " & PageCount+application(DEF_MasterCookies & "SitePageCount") & ""
	Response.Write "<br>昨日发帖: " & YesterdayAnc & "</b>条&nbsp;"
	Response.Write "<br>最高在线: " & MaxOnline & "</b>人&nbsp;发生于" & RestoreTime(MaxolTime)
	Response.Write "<br>最高发帖: " & MaxAnnounce & "</b>条&nbsp;发生于" & RestoreTime(MaxAncTime)
	Response.Write "<br>统计截止: " & year(DEF_Now) & "年" & month(DEF_Now) & "月" & day(DEF_Now) & VbCrLf

End Function

Function GetActiveUserNumber

	dim Rs
	Set Rs = Con.ExeCute("select count(*) from LeadBBS_onlineUser")
	GBL_DBNum = GBL_DBNum + 1
	If Rs.Eof Then
		GetActiveUserNumber = 0
	Else
		GetActiveUserNumber = Rs(0)
	End If
	Rs.Close
	Set Rs = Nothing

End Function
%>