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

📄 upload1.asp

📁 21世纪人才www.51zy.net 网站源码
💻 ASP
字号:
<%OPTION EXPLICIT%>
<!--#include FILE="include.asp"-->
<!--#include FILE="upload_godbook.inc"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if%>
<html>
<head>
<title>商品文件上传</title>
</head>
<body>
<%
dim upload,file,formName,formPath,iCount,act,iFail
set upload=new upload_5xSoft

response.write "<br><br>"&upload.Version&"<font size=2>"

if upload.form("filepath")="" then
 HtmEnd "请输入要上传至的目录!",1,""
 set upload=nothing
 response.end
else
 formPath=upload.form("filepath")
 ''在目录后加(/)
 if right(formPath,1)<>"/" then formPath=formPath&"/"
 act=procCheckDir(formpath,1)
 if act<>"ok" then htmEnd "错误! "&act,1,""
end if

iCount=0
iFail=0
for each formName in upload.file
 set file=upload.file(formName)
 if file.FileSize>0 then
  act=procCheckFile(file.FileName,0)
  response.write "<font size=2>"&file.FilePath&file.FileName&",大小:"&file.FileSize&" => "&formPath&File.FileName&"</font>"
  if act="ok" then
   file.SaveAs Server.mappath(formPath&file.FileName)
   response.write " <font color=#0000ff size=2>成功!</font>"
   iCount=iCount+1
  else
   response.write " <font color=#ff0000 size=2>失败! "&act&"</font>"
   iFail=iFail+1
  end if
 end if
 set file=nothing
next
set upload=nothing  ''删除此对象
response.write "<br><font size=2>"&iCount&" 个文件上传成功! "&iFail&"个文件上传失败</font></font>"
%><br>
<input type=button value=返回 onclick="location.href='upfile.asp';">
<input type=button value=关闭 onclick="window.close();">
<script language=javascript>
if(window.opener&&window.opener.refreshit)
 window.opener.refreshit();
</script>
<%htmEnd "",0,""%>
</body>
</html>

⌨️ 快捷键说明

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