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

📄 taojinjbwpic_1.asp

📁 WEB2.0圈子交友平台,以用户影音创意和分享为主导, 为用户提供:圈子,个人空间,博客,话题,相册,分类信息,短信,交友等免费服务,致力打造中国第一套 WEB2.0交友系统开源网站.
💻 ASP
字号:
<!--#include file="TaoJinJbwPic.inc"-->
<!--#include file="main.asp" -->
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
<%
File=trim(request.Cookies("username"))
strFolder="2007/" & File
    '首选判断要建立的文件夹是否已经存在
    Dim strTestFolder, objFSO
    strTestFolder = Server.Mappath(strFolder)
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    ' 检查文件夹是否存在
    If not objFSO.FolderExists(strTestFolder) Then '如果不存在
    strTestFolder = Server.Mappath(strFolder)
    Set objFSO = CreateObject("Scripting.FileSystemObject")
 ' 建立文件夹
   objFSO.CreateFolder(strTestFolder)
   Set objFSO = Nothing
    End If
set upload=new upload_file
if upload.form("act")="uploadfile" then
	filepath=trim(upload.form("filepath"))
	filelx=trim(upload.form("filelx"))
	
	i=0
	for each formName in upload.File
		set file=upload.File(formName)
 
 fileExt=lcase(file.FileExt)	'得到的文件扩展名不含有.
 if file.filesize<100 then
 	response.write "<span style=""font-family: 宋体; font-size: 9pt"">请先选择你要上传的文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
	response.end
 end if
 if (filelx<>"swf") and (filelx<>"jpg") then 
 	response.write "<span style=""font-family: 宋体; font-size: 9pt"">该文件类型不能上传! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
	response.end
 end if
 if filelx="swf" then
	if fileext<>"swf"  then
		response.write "<span style=""font-family: 宋体; font-size: 9pt"">只能上传swf格式的Flash文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
		response.end
	end if
 end if
 if filelx="jpg" then
	if fileext<>"gif" and fileext<>"jpg"  and fileext<>"bmp" then
		response.write "<span style=""font-family: 宋体; font-size: 9pt"">只能上传jpg、gif、bmp格式的图片! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
		response.end
     	end if
 end if
 if filelx="swf" then
	if file.filesize>(300*1024) then
		response.write "<span style=""font-family: 宋体; font-size: 9pt"">最大只能上传 3M 的Flash文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
		response.end
	end if
 end if
 if filelx="jpg" then
	if file.filesize>(200*1024) then
		response.write "<span style=""font-family: 宋体; font-size: 9pt"">最大只能上传 100K 的图片文件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
		response.end
	end if
 end if

 randomize
 ranNum=int(90000*rnd)+10000
 filename=filepath&trim(request.Cookies("username"))&"_"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
%>
<%
 if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
  'file.SaveAs Server.mappath(filename)   ''保存文件
  file.SaveToFile Server.mappath(FileName)
  'response.write file.FileName&"  上传成功!  <br>"
  'response.write "新文件名:"&FileName&"<br>"
  'response.write "新文件名已复制到所需的位置,可关闭窗口!"
  if filelx="swf" then
      response.write "<script>window.opener.document."&upload.form("FormName")&".size.value='"&int(file.FileSize/1024)&" K'</script>"
  end if
  response.write "<script>window.opener.document."&upload.form("FormName")&"."&upload.form("EditName")&".value='"&FileName&"'</script>"
%>
<%
 end if
 set file=nothing
	next
	set upload=nothing
end if
%>
<script language="javascript">
window.alert("文件上传成功!请不要修改生成的链接地址!");
window.close();
</script>

⌨️ 快捷键说明

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