<!-- #include file="../conn.asp" -->
<!-- #include file="../admin.asp" -->
<%
Call Head()
call saycardd("网站信息")
%>
====数据统计====<br/>
会员总数：<%=conn.execute("Select count(ID) from [users]")(0)%> <br/>
当前在线：<%=conn.execute("Select count(ID) from [online]")(0)%><br/>
文章总数：<%=conn.execute("Select count(ID) from [sms]")(0)%> <br/>
论坛帖子：<%=conn.execute("Select count(ID) from [sell]")(0)%> <br/>

图片总数：<%=conn.execute("Select count(ID) from [Wjfile]")(0)%> <br/>

<br/>====系统信息====

<br/>服务器名:<%=Request.ServerVariables("SERVER_NAME")%>
<br/>服务器IP:<%=Request.ServerVariables("LOCAL_ADDR")%>
<br/>服务器端口:<%=Request.ServerVariables("SERVER_PORT")%>
<br/>服务器时间:<%=now%>
<br/>服务器CPU数量:<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%>

<br/>IIS版本:<%=Request.ServerVariables("SERVER_SOFTWARE")%>
<br/>服务器解译引擎:<%=ScriptEngine & "/"& ScriptEngineMajorVersion&"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
<br/>脚本超时时间:<%=Server.ScriptTimeout%>
<br/>服务器操作系统:<%=Request.ServerVariables("OS")%>
<br/>支持的文件类型：<%=Request.ServerVariables("HTTP_Accept")%>
<br/><br/>====空间统计=====

<%
response.buffer=true
dim fso,fod,fil,o_c,f_c,siz,i
o_c=0:f_c=0:siz=0
set fso=server.createobject("scripting.filesystemobject")
temp_path=Server.MapPath("/")  '替换成你要要遍历的文件夹路径，如果你不知道绝对路径，可以通过asp中的Server.MapPath方法获得


call getcount(temp_path,1)
response.write "<br/>绝对路径:"&temp_path & "<br/>共有文件夹 " & o_c & " 个,文件 " & f_c & " 个,总大小为 " & formatnumber(siz/1024/1024,2) & " MB<br/> "

'函数名getcount
'作用：遍历文件夹内的所有文件和子文件
'参数:path--要遍历的文件夹，i--文件/文件夹级数
function getcount(path,i)
t_path=path
set fod=fso.getfolder(t_path)
o_c=o_c+fod.subfolders.count
f_c=f_c+fod.files.count
'遍历文件夹中的文件
if fod.files.count>0 then
for each fi in fod.files
for j=1 to i
'response.write "- - "
next 
'response.write t_path&"\"&fi.name&"(<font color=red>"&i+1&"</font>)<br />"&vbcrlf 
siz=siz+fi.size
next
end if
'遍历文件夹中的子文件夹，并回归调用
if fod.subfolders.count>0 then
for each ff in fod.subfolders
for j=1 to i
'response.write "- - "
next 
'response.write t_path&"\"&ff.name&"(<font color=red>"&i+1&"</font>)<br />"&vbcrlf
'response.flush '输出
c_fod=t_path&"\"&ff.name
call getcount(c_fod,i+1)
next
end if
end function
%>
================

<br/>
<a href="../index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[后台首页]</a>
<%
call head1()%>
