📄 uploadbar.asp
字号:
<%@EnableSessionState=False%>
<% Response.Expires = -1
Dim Action,sPID,sTime,sUrl
Action=Trim(Request("A"))
sPID=Trim(Request("PID"))
sTime=Trim(Request("T"))
sUrl=Request.ServerVariables("URL")
If Action="Show" then
ShowBar
Else
Main
End if
Sub Main()
Response.write "<html>" & vbcrlf & _
"<head>" & vbcrlf & _
"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />" & vbcrlf & _
"<title>文件上传进度状态显示!</title>" & vbcrlf & _
"<style type=""text/css"">p {font-family:arial; font-size: 9pt }</style>" & vbcrlf & _
"</head>" & vbcrlf & _
"<body bgcolor=""#C0C0B0"" topmargin=""0"">" & vbcrlf & _
"<iframe src="""&sUrl&"?A=Show&PID=" & sPID & "&T=" & sTime &""" title=""上传进度"" noresize scrolling=""no"" frameborder=""0"" framespacing=""10"" width=""350"" height=""90""></iframe>" & vbcrlf & _
' "<p align='center'>如果想中止上传,请点击您浏览器上的<B>停止</B>按钮!</p>"
"</body>" & vbcrlf & _
"</html>"
End Sub
Sub ShowBar()
Dim sTemp,sContent
Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
'%TUploading files...%t%B3%T%R left (at %S/sec) %r%U/%V(%P)%l%t
sTemp = "%T上传进度...%t%B3%T%R 剩余 (at %S/sec) %r%U/%V(%P)%l%t"
sContent = UploadProgress.FormatProgress(sPID, sTime, "#00007F", sTemp)
If sContent = "" Then
Response.write "<html>" & vbcrlf & _
"<head>" & vbcrlf & _
"<title>upload finished</title>" & vbcrlf & _
"<script language=""JavaScript"">" & vbcrlf & _
"function CloseMe()" & vbcrlf & _
"{" & vbcrlf & _
" window.parent.close();" & vbcrlf & _
" return true;" & vbcrlf & _
"}" & vbcrlf & _
"</script>" & vbcrlf & _
"</head>" & vbcrlf & _
"<body OnLoad=""CloseMe()"">" & vbcrlf & _
"</body>" & vbcrlf & _
"</html>"
Else
Response.write "<html>" & vbcrlf & _
"<head>" & vbcrlf & _
"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />" & vbcrlf & _
"<meta http-equiv=""Refresh"" content=""1;url="&sUrl&"?A=Show&PID="&sPID&"&T="&sTime&""" />" & vbcrlf & _
"<title></title>" & vbcrlf & _
"<style type=""text/css"">" & vbcrlf & _
"body {font-size: 9pt }" & vbcrlf & _
"td {font-family:arial; font-size: 9pt }" & vbcrlf & _
"td.spread {font-size: 6pt; line-height:6pt }" & vbcrlf & _
"td.brick {font-size:6pt; height:12px}" & vbcrlf & _
"</style>" & vbcrlf & _
"</head>" & vbcrlf & _
"<body bgcolor=""#C0C0B0"" topmargin=""5"">" & vbcrlf & _
"<center></center>" & sContent & vbcrlf & _
"</body>" & vbcrlf & _
"</html>"
sContent = Empty
End If
Set UploadProgress = Nothing
End Sub
'===================================================
' CreateLive CMS Version 4.0
' Powered by Aspoo.CoM
'===================================================
' Mail: support@aspoo.cn, Info@aspoo.cn
' Q Q: 3315263, 596197794
' Msn : support@aspoo.cn, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005-2007 Aspoo.CoM All Rights Reserved.
'===================================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -