?? admin_path.asp
字號(hào):
<!--#include file="../conn.asp"-->
<!--#include file="const.asp"-->
<%
Public boards
Dim Admin_Class,Uid
Call Master_Us()
Uid = Cid(Request("uid"))
Header()
Admin_Class=",11,"
Call Master_Se()
team.SaveLog (" 統(tǒng)計(jì)信息")
Select Case Request("action")
Case "discreteness"
Call discreteness
Case "statroom"
Call statroom
Case Else
Call Main
End Select
Sub statroom
Dim fso,upfacedir,d,upphotosize,tolsize,totalBytes,upfacesize,upphotodir
dim upfiledir,upfilesize,toldir
set fso=server.createobject("scripting.filesystemobject")
upfacedir=server.mappath("../images/upface")
set d=fso.getfolder(upfacedir)
upfacesize=d.size
upfiledir=server.mappath("../images/upfile")
set d=fso.getfolder(upfiledir)
upfilesize=d.size
toldir=server.mappath("../")
set d=fso.getfolder(toldir)
tolsize=d.size
totalBytes=upfacesize+upphotosize+upfilesize+tolsize
%>
<body Style="background-color:#8C8C8C" text="#000000" leftmargin="10" topmargin="10">
<br>
<table cellspacing="1" cellpadding="10" width="95%" align="center" class="a2">
<tr class="a1">
<td colspan="2">統(tǒng)計(jì)占用空間 [總 <%totalsize(totalBytes)%>]</td>
</tr>
<tr class="a3">
<td width="20%"> 上傳頭像占用空間 </td>
<td>
<div class="a2" Style="width:<%=Int(upfacesize/totalBytes*100)%>%;padding:3px" title="<%=Int(upfacesize/totalBytes*100)%>%"> <%totalsize(upfacesize)%> </div>
</td>
</tr>
<tr class="a4">
<td> 上傳附件占用空間 </td>
<td>
<div class="a2" Style="width:<%=Int(upfilesize/totalBytes*100)%>%;padding:3px" title="<%=Int(upfilesize/totalBytes*100)%>%"> <%totalsize(upfilesize)%> </div>
</td>
</tr>
<tr class="a3">
<td> 目錄總共占用空間 </td>
<td>
<div class="a2" Style="width:<%=Int(tolsize/totalBytes*100)%>%;padding:3px" title="<%=Int(tolsize/totalBytes*100)%>%"> <%totalsize(tolsize)%> </div>
</td>
</tr>
</table>
<%
End Sub
Sub totalsize(size)
if size<1024 then
response.write size&" Bytes"
elseif size<1048576 then
response.write Int(size/1024)&" KB"
else
response.write Int(size/1024/1024)&" MB"
end if
End sub
Sub discreteness
Echo " <body Style=""background-color:#8C8C8C"" text=""#000000"" leftmargin=""10"" topmargin=""10""> "
Echo " <br>"
Echo " <table cellspacing=""1"" cellpadding=""4"" width=""95%"" align=""center"" class=""a2""> "
Echo " <tr class=""a1"">"
Echo " <td width=""50%"">組件名稱</td><td>詳情</td> "
Echo " </tr>"
Dim theInstalledObjects(17)
theInstalledObjects(0) = "MSWC.AdRotator"
theInstalledObjects(1) = "MSWC.BrowserType"
theInstalledObjects(2) = "MSWC.NextLink"
theInstalledObjects(3) = "MSWC.Tools"
theInstalledObjects(4) = "MSWC.Status"
theInstalledObjects(5) = "MSWC.Counters"
theInstalledObjects(6) = "MSWC.PermissionChecker"
theInstalledObjects(7) = "Scripting.FileSystemObject"
theInstalledObjects(8) = "adodb.connection"
theInstalledObjects(9) = "SoftArtisans.FileUp"
theInstalledObjects(10) = "SoftArtisans.FileManager"
theInstalledObjects(11) = "JMail.Message"
theInstalledObjects(12) = "CDONTS.NewMail"
theInstalledObjects(13) = "Persits.MailSender"
theInstalledObjects(14) = "LyfUpload.UploadFile"
theInstalledObjects(15) = "Persits.Upload.1"
theInstalledObjects(16) = "w3.upload"
theInstalledObjects(17) = "Persits.Jpeg"
For i=0 to 17
Response.Write "<tr class=""a4""><td class=""a2""> " & theInstalledObjects(i) & " "
Select case i
case 7
Response.Write "(FSO 文本文件讀寫)"
case 8
Response.Write "(ACCESS 數(shù)據(jù)庫)"
case 9
Response.Write "(SA-FileUp 文件上傳)"
case 10
Response.Write "(SA-FM 文件管理)"
case 11
Response.Write "(JMail 郵件發(fā)送)"
case 12
Response.Write "(WIN虛擬SMTP 發(fā)信)"
case 13
Response.Write "(ASPEmail 郵件發(fā)送)"
case 14
Response.Write "(LyfUpload 文件上傳)"
case 15
Response.Write "(ASPUpload 文件上傳)"
case 16
Response.Write "(w3 upload 文件上傳)"
case 17
Response.Write "(ASP水印)"
end select
Response.Write " " & getver(theInstalledObjects(i)) & " </td><td><div class=""a2"" style=""width:30;padding:3px;"">"
If Not IsObjInstalled(theInstalledObjects(i)) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<b>√</b> "
End If
Response.Write "</div></td></TR>" & vbCrLf
Next
Echo "</table>"
End Sub
Sub Main%>
<body Style="background-color:#8C8C8C" text="#000000" leftmargin="10" topmargin="10">
<br>
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
<tr class="a1">
<td>技巧提示</td>
</tr>
<tr class="a3">
<td><br>
<ul>
<li>本頁面只做完參考使用,計(jì)算參數(shù)因?yàn)楦鞣?wù)器性能的不同而區(qū)別。
</ul>
</td>
</tr>
</table>
<br>
<form method="post" action="?action=onlinelistok">
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
<tr align="center" class="a1">
<td>測(cè)試項(xiàng)目</td>
<td>測(cè)試值</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器的域名 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("server_name")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器的IP地址 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("LOCAL_ADDR")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器操作系統(tǒng) </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("OS")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器解譯引擎 </td>
<td bgcolor="#F8F8F8"> <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器軟件的名稱及版本 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("SERVER_SOFTWARE")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器正在運(yùn)行的端口 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("server_port")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器CPU數(shù)量 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器Application數(shù)量 </td>
<td bgcolor="#F8F8F8"> <%=Application.Contents.Count%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器Session數(shù)量 </td>
<td bgcolor="#F8F8F8"> <%=Session.Contents.Count%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 請(qǐng)求的物理路徑 </td>
<td bgcolor="#F8F8F8"> <%=Request.ServerVariables("path_translated")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 請(qǐng)求的URL </td>
<td bgcolor="#F8F8F8"> http://<%=Request.ServerVariables("server_name")%><%=Request.ServerVariables("script_name")%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 服務(wù)器當(dāng)前時(shí)間 </td>
<td bgcolor="#F8F8F8"> <%=Now()%> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> 腳本連接超時(shí)時(shí)間 </td>
<td bgcolor="#F8F8F8"> <%=Server.ScriptTimeout%> 秒 </td>
</tr>
</table><BR>
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
<tr align="left" class="a1">
<td> 磁盤文件操作速度測(cè)試 </td>
</tr>
<tr class="a2"><td> <%
Response.Flush
If Not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "不支持FSO,無法測(cè)試文件讀取"
Else
Response.Write "正在重復(fù)創(chuàng)建、寫入和刪除文本文件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 "創(chuàng)建文件錯(cuò)誤!"
iserr=True
Err.Clear
Exit For
End If
tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck"
If Err <> 0 Then
Response.Write "寫入文件錯(cuò)誤!"
iserr=True
Err.Clear
Exit For
End If
tempfileOBJ.close
Set tempfileOBJ = FsoObj.GetFile(tempfile)
tempfileOBJ.Delete
If Err <> 0 Then
Response.Write "刪除文件錯(cuò)誤!"
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 "...已完成!本服務(wù)器執(zhí)行此操作共耗時(shí) <font color=red>" & thetime3 & " 毫秒</font>"
End If
End If
%>
<BR>P4 2.4,2GddrEcc,SCSI36.4G*2 執(zhí)行此操作需要 <font color=red>32~65</font> 毫秒</a>
<%Response.Flush%>
</td>
</tr>
</table>
<BR>
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
<tr align="left" class="a1">
<td> ASP腳本解釋和運(yùn)算速度測(cè)試 </td>
</tr>
<tr class="a2">
<td>
<%
Response.Write "整數(shù)運(yùn)算測(cè)試,正在進(jìn)行50萬次加法運(yùn)算..."
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 "...已完成!共耗時(shí) <font color=red>" & thetime & " 毫秒</font><br>"
Response.Write "浮點(diǎn)運(yùn)算測(cè)試,正在進(jìn)行20萬次開方運(yùn)算..."
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 "...已完成!共耗時(shí) <font color=red>" & thetime2 & " 毫秒</font><br>"
%>
<BR>P4 2.4,2GddrEcc,SCSI36.4G*2 整數(shù)運(yùn)算需要 <font color=red>171~203</font> 毫秒, 浮點(diǎn)運(yùn)算需要 <font color=red>156~171</font> 毫秒
</td></tr>
</table>
<br>
<br>
<%
End Sub
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
''''''''''''''''''''''''''''''
Function getver(Classstr)
On Error Resume Next
getver=""
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(Classstr)
If 0 = Err Then getver=xtestobj.version
Set xTestObj = Nothing
Err = 0
End Function
footer()
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -