📄 admin_info.asp
字号:
<%
'===================================================================
'= ASP FILENAME : /admin/admin_info.asp
'= CREATED TIME : 2006-4-30
'= LAST MODIFIED: 2006-4-30
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 系统信息
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/admin/include_admin_action_view.asp" -->
<!-- #include file = "./admin_inc.asp" -->
<%
'========================================================
'== Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE = "admin/admin_info.asp"
'== 页面标题/功能
Const CONST_PAGE_TITLE = "系统信息"
'== 功能函数名字空间
Const CONST_ACTION_FUNC = "SystemInfoCtl"
'== 相对根目录路径
GBL_strHomeURL = "../"
'== 页面构造
Call ActionBuild()
'== 在模板中引用的标签变量
Dim TAG_objRS '== 列表记录集
'== 请求校验与过滤
Call ActionViewFilterAdmin(CONST_PAGE_FILE,CONST_ACTION_FUNC)
%>
<!-- #include file = "../template_a/page_admin_sys_info.html.asp" -->
<%
'== 页面析构
Call ActionOver()
%>
<%
'===================================================================
'= Function : LoadPageTpl()
'= Time : Created At 2006-5-4
'= Description : 加载页面模块
'===================================================================
Function LoadPageTpl()
%>
<%
End Function
'===================================================================
'= Function : SystemInfoCtl()
'= Time : Created At 2006-5-2
'= Input : None
'= Description : 管理系统首页
'===================================================================
Function SystemInfoCtl()
Dim okCPUS,okOS
Call GetSystemInfo()
Call GetSysinfo()
End Function
'== 取得系统信息
Function GetSystemInfo()
On error resume next
GetSysInfo()
Dim t
't = GetAllSpace
Dim FoundFso
FoundFso = False
FoundFso = IsObjInstalled("Scripting.FileSystemObject")
%>
<div id="main_content">
<div id="main_content_title">
<div class="note">系统信息检测情况</div>
</div>
<div id="main_content_list">
<table border="0" cellspacing="1" class="main" cellpadding="5" height="1" align=center width="95%">
<tr class="even">
<td width="100%" height=23 colspan=4>
<B>校友录信息</B>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
当前校友录版本
</td>
<td width="25%">
<a href="http://www.cclinux.com/" target=_blank><%=CONST_WEB_VER%></a>
</td>
<td width="25%">
数据库类型:
</td>
<td width="25%">
<%
Response.Write "Access"
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23 >
服务器名和IP
</td>
<td width="25%">
<%=Request.ServerVariables("SERVER_NAME")%><BR><%=Request.ServerVariables("LOCAL_ADDR")%>
</td>
<td width="25%">
数据库占用空间
</td>
<td width="25%">
<%=GetFileSize(GBL_strHomeURL & GBL_strDBPath)%>
</td>
</tr>
<tr class="even">
<td width="100%" height=23 colspan=4>
<B>服务器相关信息</B>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
ASP脚本解释引擎
</td>
<td width="25%">
<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
</td>
<td width="25%">
IIS 版本
</td>
<td width="25%">
<%=Request.ServerVariables("SERVER_SOFTWARE")%>
</td>
</tr>
<tr class="even">
<td width="100%" height=23 colspan=4>
本文件路径:<%=Server.Mappath("admin_info.asp")%>
</td>
</tr>
<tr class="even">
<td width="100%" colspan=4 height=23>
<B>主要组件信息</B>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
FSO文件读写
</td>
<td width="25%">
<%
If FoundFso Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">
Jmail发送邮件支持
</td>
<td width="25%">
<%
If IsObjInstalled("JMail.SmtpMail") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
CDONTS发送邮件支持
</td>
<td width="25%">
<%
If IsObjInstalled("CDONTS.NewMail") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">
AspEmail发送邮件支持
</td>
<td width="25%">
<%
If IsObjInstalled("Persits.MailSender") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
无组件上传支持
</td>
<td width="25%">
<%
If IsObjInstalled("Adodb.Stream") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">
AspUpload上传支持
</td>
<td width="25%">
<%
If IsObjInstalled("Persits.Upload") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
SA-FileUp上传支持
</td>
<td width="25%">
<%
If IsObjInstalled("SoftArtisans.FileUp") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">
ccFile-Up上传支持
</td>
<td width="25%">
<%
If IsObjInstalled("ccFile.Upload") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
CreatePreviewImage生成预览图片
</td>
<td width="25%">
<%
If IsObjInstalled("CreatePreviewImage.cGvbox") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">
AspJpeg生成预览图片
</td>
<td width="25%">
<%
If IsObjInstalled("Persits.Jpeg") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="25%" height=23>
SA-ImgWriter生成预览图片
</td>
<td width="25%">
<%
If IsObjInstalled("SoftArtisans.ImageGen") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="25%">ADO(数据库访问)版本:<%=conn.Version%>
</td>
<td width="25%"><font color=green><b>√</b></font>
</td>
</tr>
</table>
</div>
<%Response.Flush%>
<div id="main_content_list">
<table border="0" cellspacing="1" class="main" cellpadding="5" height="1" align=center width="95%">
<tr class="even">
<td width="100%" colspan=5 height=23>
<B>磁盘文件操作速度测试</B>
</td>
</tr>
<tr class="even">
<td width="100%" colspan=5 height=23>
<%
Response.Write "正在重复创建、写入和删除文本文件50次..."
Dim thetime3,tempfile,iserr,t1,FsoObj,tempfileOBJ,t2
Set FsoObj=Server.CreateObject("Scripting.FileSystemObject")
iserr=False
t1=timer
tempfile=server.MapPath("./") & "\aspchecktest.txt"
For i=1 To 50
Err.Clear
Set tempfileOBJ = FsoObj.CreateTextFile(tempfile,true)
If Err <> 0 Then
Response.Write "创建文件错误!"
iserr=True
Err.Clear
Exit For
End If
tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck"
If Err <> 0 Then
Response.Write "写入文件错误!"
iserr=True
Err.Clear
Exit For
End If
tempfileOBJ.close
Set tempfileOBJ = FsoObj.GetFile(tempfile)
tempfileOBJ.Delete
If Err <> 0 Then
Response.Write "删除文件错误!"
iserr=True
Err.Clear
Exit For
end if
Set tempfileOBJ=Nothing
Next
t2=timer
If Not iserr Then
thetime3=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!本服务器执行此操作共耗时 <font color=red>" & thetime3 & " 毫秒</font>"
End If
%>
</td>
</tr>
<tr class="even">
<td width="100%" colspan=5 height=23>
<%
Response.Write "整数运算测试,正在进行50万次加法运算..."
dim lsabc,thetime,thetime2
t1=timer
for i=1 to 500000
lsabc= 1 + 1
next
t2=timer
thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!共耗时 <font color=red>" & thetime & " 毫秒</font><br>"
Response.Write "浮点运算测试,正在进行20万次开方运算..."
t1=timer
for i=1 to 200000
lsabc= 2^0.5
next
t2=timer
thetime2=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!共耗时 <font color=red>" & thetime2 & " 毫秒</font><br>"
%>
</td>
</tr>
</table>
</div>
<div id="main_content_foot"> </div>
</div>
<%
End Function
Function GetSysInfo()
On Error Resume Next
Dim WshShell,WshSysEnv
Set WshShell = Server.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
okOS = Cstr(WshSysEnv("OS"))
okCPUS = Cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
okCPU = Cstr(WshSysEnv("PROCESSOR_IDENTIFIER"))
If IsNull(okCPUS) Then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
ElseIf okCPUS="" Then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
End If
If Request.ServerVariables("OS")="" Then okOS=okOS & "(可能是 Windows Server 2003)"
End Function
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If Err = 0 Then IsObjInstalled = True
If Err = -2147352567 Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
Function GetFileSize(FileName)
Dim fso,drvpath,d,size,showsize
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath(FileName)
set d=fso.getfile(drvpath)
size=d.size
showsize=size & " Byte"
if size>1024 then
size=(Size/1024)
showsize=size & " KB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end if
set fso=nothing
GetFileSize = showsize
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -