📄 ixs_upviewbar.asp
字号:
<!--#include file="Inc/Const.asp" -->
<%
' 取消缓存
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Dim UpLoaddingDate
Dim Files, FileList, FileNum
iXs.ReqNumLen = 18
UpLoaddingDate = iXs.ReqNum("UpLoaddingDate")
If UpLoaddingDate = "" Then UpLoaddingDate = 0
Files = Split(iXs.ReqStr("Files"), "|")
FileNum = 0
For i = 0 To UBound(Files)
If Files(i) <> "" Then
FileNum = FileNum + 1
FileList = FileList & "文件" & FileNum & ":" & Right(Files(i), Len(Files(i)) - InStrRev(Files(i), "\")) & " "
End If
Next
' 去掉最后一个回车符
FileList = iXs.RegExpFilter(" $", FileList, 1, "")
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><% = iXs.Sys_Info(100) %></title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type="text/css">
body,td,th {
color: #000000;
font: 12px Tahoma, "宋体";
}
body {
background-color:buttonface;
}
/*进度条边框样式*/
#tdUpBar {
height:1px;
padding:1px;
border:1px inset threedshadow;
}
/*进度条主体样式*/
#imgUpBar {
height:16px;
background-color:appworkspace;
}
</style>
</head>
<body onselectstart="return false;" ondragstart="return false;">
<table align="center" width="100%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td>
<fieldset><legend>上传进度</legend>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed;">
<tr>
<td rowspan="4" align="center" width="15%"><img src="images/Others/Up_Logo.gif" height="32" width="32" vspace="0" hspace="0"></td>
<td style="WORD-WRAP: break-word;">文件:<span title="<% = FileList %>">共 <font color="#FF0000"><% = FileNum %></font> 个</span> 总大小:<span id="FileTotalSize"></span> MB</td>
</tr>
<tr>
<td width="85%" id="tdUpUsedTime" name="tdUpUsedTime" style="WORD-WRAP: break-word;">信息</td>
</tr>
<tr>
<td id="tdUpBar" style="WORD-WRAP: break-word; height:20px;">进度条</td>
</tr>
<tr>
<td id="tdUpLeftTime" style="WORD-WRAP: break-word;">信息</td>
</tr>
</table>
</fieldset>
<hr align="center" size="1">
<div align="right" style="font: 12px Verdana, Arial, Helvetica, sans-serif, '宋体';">
<span disabled>-做人要厚道- <em>114XP.CN</em></span>
<a href="http://www.114xp.cn/" target="_blank"><span style=" color:activecaption;"><u title="点击进入爱雪儿工作室">爱雪儿工作室</u></span></a>
<span style="color:activecaption;"> 版权所有 作者:<a href="http://wpa.qq.com/msgrd?V=1&Uin=120468681&Site=&Menu=yes" target="_blank"><u style="color:activecaption;" title="点击给 Guidy 留言! QQ号码:120468681">Guidy</u></span>
</div>
</td>
</tr>
</table>
<script id="downLoadControl" language="JavaScript" type="text/javascript"></script>
<script language="javascript1.2">
<!--
var intTimeStep = 1000;
var lngUsedTime = 0;
var lngTotalSize = 0;
var lngReadSize = 0;
function downLoadData(url){
try{
downLoadControl.src = url;
}catch(e){
return false;
}
}
function upLoadData(){
downLoadData("iXs_StartUpLoad.asp?UpLoaddingDate=<% = UpLoaddingDate %>&t=" + Math.random());
upLoadding();
return true;
}
function upLoadding(){
downLoadData("UpLoadData/<% = UpLoaddingDate %>.js?y=" + Math.random());
var lngLeftSize = lngTotalSize-lngReadSize;
var dblPercent = (lngTotalSize) ? lngReadSize * 100 / lngTotalSize : 0;
var dblSpeed = (lngUsedTime>0) ? lngReadSize / (lngUsedTime*1.024) : 0;
var lngLeftTime = (dblSpeed>0) ? lngLeftSize / dblSpeed : 0;
lngUsedTime += intTimeStep;
var strTemp = (lngUsedTime >= 60000)? fxFormat(lngUsedTime / 60000) + " 分" : lngUsedTime / 1000 + " 秒";
var strTemp2 = (lngLeftTime > 60000)? fxFormat(lngLeftTime / 60000) + " 分" : fxFormat(lngLeftTime / 1000) + " 秒";
document.getElementById("tdUpUsedTime").innerHTML = "已用时间:" + strTemp + " 剩余时间:" + strTemp2 + " 进度:<strong>" + fxFormat(dblPercent) + "</strong> %";
document.getElementById("tdUpBar").innerHTML = "<img src=\"images/Others/Up_Bar.gif\" id=\"imgUpBar\" width=\""+fxFormat(dblPercent)+"%\">";
document.getElementById("tdUpLeftTime").innerHTML = "平均速度:" + fxFormat(dblSpeed) + " KB/秒 已经复制:" + fxFormat(lngReadSize / 1048576) + " MB";
document.getElementById("FileTotalSize").innerHTML = fxFormat(lngTotalSize / 1048576);
if(lngReadSize<lngTotalSize||!dblSpeed){
var timeoutid = null;
timeoutid = setTimeout("upLoadding()", intTimeStep);
}else{
lngUsedTime = 0;
lngTotalSize = 0;
lngReadSize = 0;
downLoadData("iXs_StartUpLoad.asp?UpLoaddingDate=<% = UpLoaddingDate %>&t=" + Math.random());
//上传完成后关闭进度条对话框
window.close();
}
}
// 格式化数字 保留2位浮点
function fxFormat(num){
return Math.round(Number(num) * 100) / 100;
}
upLoadData();
//-->
</script>
<SCRIPT FOR="window" EVENT="onunload">
<!--
// 当窗口卸载的时候删除进度数据文件
downLoadData("iXs_StartUpLoad.asp?UpLoaddingDate=<% = UpLoaddingDate %>&t=" + Math.random());
//-->
</SCRIPT>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -