<%dim Alllx,upNum upNum=0 set upload=new upload_file if upload.form("act")="uploadfile" then Path=trim(upload.form("Path"))&"/" Filelx=trim(upload.form("Filelx")) InputName=trim(upload.form("InputName")) Select Case Filelx Case "All" Alllx=Array("jpg","gif","png","chm","pdf","rar","zip","doc","xls","txt") Case "Pic" Alllx=Array("jpg","gif","png") Case Else Alllx=Array("1715") End Select i=0 for each formName in upload.File set file=upload.File(formName) fileExt=lcase(file.FileExt) '得到的文件扩展名不含有. if file.filesize<3 then response.write "
" response.end end if k=0 For j=0 to UBound(Alllx) IF not instr(Alllx(j),fileExt)=0 then k=1 End if Next IF k=0 then response.write "
" response.end end if Select Case Filelx Case "All" if file.filesize>(2000*1024) then response.write "
" response.end end if Case "Pic" if file.filesize>(1000*1024) then response.write "
" response.end end if Case Else if file.filesize>(50*1024) then response.write "
" response.end end if End Select randomize ranNum=int(90000*rnd)+10000 filename=Path&"ServerList."&fileExt if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据 'file.SaveAs Server.mappath(filename) ''保存文件 file.SaveToFile Server.mappath(FileName) upNum=1 'response.write file.FileName&"　　上传成功!
" 'response.write "新文件名："&FileName&"
" 'response.write "新文件名已复制到所需的位置，可关闭窗口！" Select Case Path Case "../Shop/ProductPic/" filename=mid(filename,9)'ProductPic/开始取 Case "../NewPic/" filename=mid(filename,4)'NewPic//开始取 Case "../Display/Display_Logo/" filename=mid(filename,12)'Display_Logo///开始取 Case "../Job/PersonPic/" filename=mid(filename,18)'Display_Logo///开始取 Case "../Job/RewardPic/" filename=mid(filename,8)'Display_Logo///开始取 End Select response.write "
" end if set file=nothing next set upload=nothing end if if upNum=1 then Path=left(Path,len(Path)-1) response.write " 文件上传成功 [ 继续上传 ]" response.end end if%>