⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uploadbar.asp

📁 FLASH吧网站源码 v2.0栏目版: 功能不是很强大
💻 ASP
字号:
<%@EnableSessionState=False%>
<% 
Response.CacheControl = "no-cache"
Response.Expires = -1
Dim Per 
Per=Application("UpPercent")
%> 
<html> 
<head> 
<meta http-equiv=refresh content="1"> 
<title>上传进度</title> 
<style>
td,body {
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:9pt;
}
</style>
</head> 
<body bgcolor="buttonface" style="margin:10px;">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000"> 
<tr> 
<td bgcolor="buttonface"> 
<table ID="Prog" border="0" width="<%=Per%>%" bgcolor="#336699">
<tr> 
<td width="100%" height="30" align="center"><font color="white"><b><%=Per%>%</b></font></td>
</tr> 
</table>
</td>
</tr>
</table>
<br>
<%
Select Case Per
	Case 0:Response.Write "正在准备..."
	Case 100
		Response.Write "上传百分比:"&Per&"%,上传完毕!"
		If UCase(Request("b"))="NN" Then Response.Write "<script language=""javascript"">window.close();</script>"
	Case Else
		Dim tGone,bRead,fLeft
		fLeft=-1
		tGone=FormatNumber(Timer()-Application("UpStart"),0)
		bRead=Application("ReadBytes")/1024
		If bRead>0 Then fLeft=(Application("TotalBytes")-Application("ReadBytes"))*tGone/Application("ReadBytes")
		Response.Write FormatSize(bRead,true)&"/"&FormatSize(Application("TotalBytes")/1024,true)&"("&CStr(Per)&"%),耗时: "&FormatSec(tGone)&",速度: "&FormatSize(bRead/tGone,false)&"/S"
		If fLeft<>-1 Then
			Response.Write ",剩余时间:"&FormatSec(fLeft)
		Else
			Response.Write ",剩余时间:正在估计..."
		End If
End Select
%>
<br>您可以按浏览器的 <font color="red"><b>停止</b></font> 按钮来停止上传!
</body>
</html>
<%
Function FormatSec(intV)
	Dim iHour,iMinute,iSec,t
	intV=ABS(intV)
	If intV=0 Then FormatSec="00:00":Exit Function
	If intV>=3600 Then
		iHour=Fix(intV/3600)
		t=intV mod 3600
		If t>=60 Then
			iMinute=Fix(t/60)
			iSec=t mod 60
		Else
			iMinute=0
			iSec=t
		End If
	ElseIf intV>=60 Then
		iHour=0
		iMinute=Fix(intV/60)
		iSec=intV mod 60
	Else
		iHour=0
		iMinute=0
		iSec=intV
	End if
	If iHour<>0 Then FormatSec=CStr(iHour)&":"
	FormatSec=FormatSec&Right("0"&CStr(iMinute),2)&":"
	FormatSec=FormatSec&Right("0"&CStr(iSec),2)
End Function

Function FormatSize(fv,isK)
	If isK Then fv=fv*1024
	If fv>=1024000 Then
		FormatSize=CStr(Round(fv/1024000,1))&"M"
	ElseIf fv>=1000 Then
		FormatSize=CStr(Round(fv/1024,1))&"K"
	Else
		FormatSize=CStr(fv)&"B"
	End If
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -