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

📄 progress_upload.asp

📁 九酷网络个人主页系统破解版
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../chkuser.asp"-->
<!--#include file="../inc/user.asp"-->
<%
Server.ScriptTimeOut=999999
maxsize=rshost("uploadsize")
upfiletype=rshost("filetype")
Set Upload = Server.CreateObject("Persits.Upload")
dir=Request.QueryString("dir")
Upload.ProgressID = Request.QueryString("PID")
Upload.SetMaxSize maxsize*1024, True
On Error Resume Next
Count = Upload.Save(userdir&dir)
If Err <> 0 Then 
      Response.Write "出现错误: " & Err.Description 
end if 
If Err.Number = 8 Then 
   Response.write "<script language='javascript'>alert('对不起,文件大小不能超过"&maxsize&"K,请返回重试!');location.href='javascript:history.back()'</script>" 
   Response.end
end if
For Each File in Upload.Files
types=lcase(mid(file.filename,InStrRev(file.filename, ".")+1))
if upfiletype<>empty then
uptype=split(upfiletype,"|")
for i=0 to ubound(uptype)
	if lcase(types)=lcase(uptype(i)) then
		File.Delete
		ErrMsg("您所上传的文件其中有系统禁止使用的文件类型!")
	end if
next
end if
	if file.size>Request.Cookies("canuse") then
 	Response.write "<script language='javascript'>alert('对不起,您的空间容量已经不足!\n\n请删除部分文件或升级您的空间!');location.href='javascript:history.back()'</script>" 
	File.Delete
	response.end
end if
if file.size<=204800 then
strnohtml=""
set ts = fso.opentextfile(userdir&dir&file.FileName, 1,,0)
do while ts.atendofstream <> true '判别是否文件结尾(循环语句)
str = ts.readline '(每次)读取一行
strnohtml = strnohtml & str
loop
ts.close
set ts = nothing 
strnohtml=replace(strnohtml," ","")
strnohtml=lcase(strnohtml)
end if
if rshost("asp")=False then
if instr(strnohtml,"scripting.") or instr(strnohtml,"adodb.") or instr(strnohtml,"shell.") or instr(strnohtml,".server") or instr(strnohtml,".file") or instr(strnohtml,"folder.") or instr(strnohtml,".application") then
File.Delete
ErrMsg("您所上传(编辑)的文件内容其中含有禁止使用的脚本字符!")
end if
end if
badcode=rshost("badcode")
if badcode<>empty then
filtrate=split(badcode,"|")
for i = 0 to ubound(filtrate)
if instr(strnohtml,filtrate(i))>0 Then
File.Delete
ErrMsg("您所上传(编辑)的文件内容其中含有非法字符!")
end if
next
end if
next 
If not connftp.Execute("Select * From [User accounts] where User='"&Request.Cookies("9cool_username")&"'").eof Then
foldersize=fso.getfolder(userdir&Request.Cookies("9cool_username")).size
connftp.Execute("UpDate [User accounts] set QuotaCurrent='"&foldersize&"' where user='"&Request.Cookies("9cool_username")&"'")
end if
%>
<HTML>
<head>
<title>文件上传结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/webedit.css" type="text/css">
<script language="javascript">
function stopup(){
	window.opener.focus();
	window.close();
}
</script>
</head>
<BODY>
<br>
<br>
<br>
<table  border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td align="center"><font color="#FF0000"><%=Count%>个文件上传成功!</font></td>
  </tr>
  <tr>
    <td align="center"><input type=button class="bt1" onClick="javascript:history.back()" value=继续上传>
<input type=button class="bt1" onClick="stopup()" value=关闭></td>
  </tr>
</table>
<script language=javascript>
if(window.opener&&window.opener.refreshit)
 window.opener.refreshit();
</script>
</BODY>
</HTML>
 

⌨️ 快捷键说明

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