<%@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><HEAD>" & vbcrlf
	Response.write "<META http-equiv=Content-Type content=text/html; charset=gb2312>" & vbcrlf
	Response.write "<TITLE>文件上传进度状态显示！</TITLE>" & vbcrlf
	Response.write "<style type='text/css'>p {font-family:arial; font-size: 9pt }</style>" & vbcrlf
	Response.write "</HEAD><BODY BGCOLOR='#C0C0B0' topmargin=0>" & vbcrlf
	Response.write "<IFRAME src='"&sUrl&"?A=Show&PID=" & sPID & "&T=" & sTime &"' title='上传进度' noresize scrolling=no frameborder=0 framespacing=10 width=350 height=90></IFRAME>" & vbcrlf
	'Response.write "<p align='center'>如果想中止上传，请点击您浏览器上的<B>停止</B>按钮！</p>"
	Response.write "</BODY>" & vbcrlf
	Response.write "</HTML>"
End Sub

Sub ShowBar()
	Dim sTemp,sContent
	Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
	sTemp = "<CENTER></CENTER>%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 "<script LANGUAGE=""JavaScript"">" & vbcrlf
		Response.write "window.parent.close();" & vbcrlf
		Response.write "</script>" & vbcrlf
	Else
		Response.write "<HTML><HEAD>" & vbcrlf
		Response.write "<META http-equiv=Content-Type content=text/html; charset=gb2312>" & vbcrlf
		Response.write "<meta HTTP-EQUIV='Refresh' CONTENT='1;URL="&sUrl&"?A=Show&PID="&sPID&"&T="&sTime&"'" & vbcrlf
		Response.write "<TITLE></TITLE>" & vbcrlf
		Response.write "<style type='text/css'>" & vbcrlf
		Response.write "body {font-size: 9pt } td {font-family:arial; font-size: 9pt } td.spread {font-size: 6pt; line-height:6pt } td.brick {font-size:6pt; height:12px}" & vbcrlf
		Response.write "</style>" & vbcrlf
		Response.write "</HEAD><BODY BGCOLOR='#C0C0B0' topmargin=5>" & vbcrlf
		Response.write sContent & vbcrlf
		Response.write "</BODY>" & vbcrlf
		Response.write "</HTML>"
	End If
End Sub

'===================================================
' CreateLive CMS Version 3.1
'							Powered by Aspoo.CoM
'===================================================
' Mail: aspoo@126.com, Info@aspoo.cn
' Q  Q: 3315263, 596197794
' Msn : aspoo@126.com, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005 Aspoo.CoM All Rights Reserved.
'===================================================
%>