BVB Source Codes

Seven VIP jubilee dance CMS management system Show ClsUpLoad.asp Source code

Return Download Seven VIP jubilee dance CMS management system: download ClsUpLoad.asp Source code - Download Seven VIP jubilee dance CMS management system Source code - Type:.asp
  1. <!-- #include file="ClsFileUp.asp" -->
  2. <!--#include file="../Check.asp"-->
  3. <%
  4. '=====================================================
  5. ' 描述: Asp无组件带进度条上传,宝玉1.0 Beta改进版
  6. ' 作者: 花心萝卜(www.7xiwl.com)
  7. ' 修改: 1、图片上传漏洞 2、格式限制 3、上传大小限制 4、文件自动更名 5、上传信息入数据库
  8. ' 日期:2008年7月25日
  9. ' 版权: 本作品由七禧网络修改,但是请勿移除版权信息
  10. '=====================================================
  11. Call YLMV_REFERER(1)
  12. t=request("t")
  13. %>
  14. <html>
  15. <head>
  16. <title>上传文件</title>
  17. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  18. <style type="text/css">
  19. <!--
  20. Body
  21. {
  22. background-position: center center;
  23. font-size: 12px;
  24. line-height: 20px;
  25. color: #333333;
  26. }
  27. a{font-style:normal;text-decoration:none;font-size:9pt;color:#000000;}
  28. -->
  29. </style>
  30. </head>
  31. <body leftmargin="0" topmargin="0" bgColor="#FFFFFF">
  32. <%
  33.   Server.ScriptTimeout = 9999                  
  34.   if t="url" then uploadtype="rm|rmvb|mp3|wma|wav|avi":uploadsize=50000:savepath="/Upload/Url/"
  35.   if t="special" then uploadtype="jpg|gif":uploadsize=1000:savepath="../../Upload/Special/"
  36.   if t="shoppic" then uploadtype="jpg|gif":uploadsize=1000:savepath="../../Upload/Shop/"
  37.   if t="shopurl" then uploadtype="swf|ani|jpg|gif":uploadsize=1000:savepath="../../Upload/Shop/"
  38.   set Upload = new DoteyUpload
  39.   Upload.MaxTotalBytes = uploadsize*1000
  40.  
  41.   Upload.ProgressID = Request.QueryString("ProgressID")
  42.   Upload.Upload() '上传演示,不保存到硬盘
  43.  
  44.   If Request.TotalBytes >Upload.MaxTotalBytes Then
  45.         Response.Write "不要上传超过 "&uploadsize&" KB的文件 >> <a href=Upload.asp?t="&t&">重新上传</a>"
  46.         Response.End
  47.   End If
  48.  
  49.   if Upload.ErrMsg <> "" then
  50.     Response.Write(Upload.ErrMsg)
  51.     Response.End()
  52.   end if
  53.  
  54.   if Upload.Files.Count > 0 then
  55.         Items = Upload.Files.Items
  56.   end if
  57.  
  58.   for each File in Upload.Files.Items
  59.   F_Ext = Mid(File.FileName, InStrRev(File.FileName, ".") + 1)
  60.   FileExt="."&UCase(F_Ext) '转为大写
  61.  
  62.   uploadsuc=false
  63.   Forumupload=split(UCase(uploadtype),"|")
  64.   for i=0 to ubound(Forumupload)
  65.         if fileEXT="."&trim(Forumupload(i)) then
  66.         uploadsuc=true
  67.         exit for
  68.         else
  69.         uploadsuc=false
  70.         end if
  71.   next
  72.  
  73.   '添加禁止上传脚本类型
  74. if fileExt=".ASP" or fileExt=".PHP" or fileExt=".ASPX" or fileExt=".JSP" or fileExt=".CER" or fileExt=".HTR"  or fileExt=".CDX" or fileExt=".SHTML" or fileExt=".SHTM" or fileExt=".HTML" or fileExt=".HTM" or fileExt=".ASA" then  uploadsuc=false
  75.  
  76.   FileName=ctime&RndNumber&"-0"&LCase(FileExt)
  77.   if t="url" or t="shoppic" or t="shopurl" then
  78.   if uploadsuc=false then
  79.         response.write "文件格式不正确 >> <a href=Upload.asp?t="&t&">重新上传</a>"
  80.         response.end
  81.   else
  82.         File.SaveAs(savepath & FileName)        ''如果要保存,则去掉前面的注释
  83.   end if
  84.   elseif t="special" then
  85.     File.SaveAs(savepath&FileName)
  86.     If not CheckFileType(Server.mappath(savepath&FileName)) then
  87.         response.write "错误的图像格式  [ <a href=# onclick=history.go(-1)>重新上传</a> ]"
  88.         Set fso = CreateObject("Scripting.FileSystemObject")
  89.         Set ficn = fso.GetFile(Server.mappath(savepath&FileName))
  90.         ficn.delete
  91.         set ficn=nothing
  92.         set fso=nothing
  93.         response.end
  94.     end if
  95.   end if
  96.   if t="url" then
  97.   Response.Write "<script>parent.form2.url.value+='Upload/Url/"&FileName&"'</script>"
  98.   Response.Write "&nbsp;文件上传成功:<a href='../../Upload/Url/"&FileName&"' target=_blank>"&FileName&"</a> >> <a href=Upload.asp?t="&t&">继续上传</a>"
  99.   elseif t="special" then
  100.   Response.Write "<script>parent.form2.showpic.value+='Upload/Special/"&FileName&"'</script>"
  101.   Response.Write "&nbsp;文件上传成功:<a href='../../Upload/Special/"&FileName&"' target=_blank>"&FileName&"</a> >> <a href=Upload.asp?t="&t&">继续上传</a>"
  102.   elseif t="shoppic" then
  103.   Response.Write "<script>parent.myform.SPic.value+='Upload/Shop/"&FileName&"'</script>"
  104.   Response.Write "&nbsp;文件上传成功:<a href='../../Upload/Shop/"&FileName&"' target=_blank>"&FileName&"</a> >> <a href=Upload.asp?t="&t&">继续上传</a>"
  105.   elseif t="shopurl" then
  106.   Response.Write "<script>parent.myform.SDir.value+='Upload/Shop/"&FileName&"'</script>"
  107.   Response.Write "&nbsp;文件上传成功:<a href='../../Upload/Shop/"&FileName&"' target=_blank>"&FileName&"</a> >> <a href=Upload.asp?t="&t&">继续上传</a>"
  108.   end if
  109.     'Response.Write("您已上传 " & Upload.Files.Count & " 个文件到: " & path & "<hr>")
  110.     'Response.Write("文件名: " & File.FileName & "<br>")
  111.     'Response.Write("文件大小: " & File.FileSize/1024 & " KB<br>")
  112.     'Response.Write("文件类型: " & File.FileType & "<br>")
  113.     'Response.Write("客户端路径: " & File.FilePath & "<br>")
  114.     'Response.Write("文件格式: " & fileExt & "<br>")
  115.     'Response.Write("<hr>")
  116.   next
  117.  
  118. %>
  119. </body>
  120. </html>
downloadClsUpLoad.asp Source code - Download Seven VIP jubilee dance CMS management system Source code
Related Source Codes/Software:
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Download IT mop stand (with site to download the database ACC) - Background management: http://www.xxx.com/admin/ad... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
PeterCMS3 v3.2 - PeterCMS is the original sirenCMS and a series of ... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
126oo CMS film station system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Copy the site source code v2.01 - It is ok to cover the folder % S 2016-09-21
ETsale simple product sales management system V3.0 formal version - ETsale3.0 is developed by PHP+MySQL+Smarty+jQuery ... 2016-09-21
Mobile - shop. Tk all source code - Admin admin.php no database. The total data Modi... 2016-09-22
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top