<!--#include file="upload_wj.inc"-->
<link href="../upfile/images/css.css" rel="stylesheet" type="text/css">

<%
'dim filelx filename filename1
'filelx=request("filelx")

set upload=new upload_file
if upload.form("act")="uploadfile" then
	filepath=trim(upload.form("filepath"))
	
	
	i=0
	for each formName in upload.File
		set file=upload.File(formName)
 
'得到的文件扩展名不含有.
 'filelx=trim(request("menu1"))
randomize
 ranNum=int(90000*rnd)+10000
 filename=filepath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&File.FileName
%>
<%
 if file.FileSize=0 then         
 
  response.Write "请选择您要上传的文件,重新上传!!! <br>"
response.End
  elseif file.FileSize>4000000 then 
  response.Write "文件过大~~你上传的文件不得大于 4M !!! <br>"
response.End
else
  file.SaveAs Server.mappath(filename)   ''保存文件
  response.write "文件上传成功!!!　新文件名已复制到所需的位置，可关闭窗口！　<br>"
  response.write "新文件名："&FileName&"<br>"
  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
%>
<style type="text/css">
<!--
.ll {
	font-family: "新宋体";
	font-size: 24px;
	font-style: normal;
	color: #0066CC;
	background-color: #FFFFCC;
	text-align: center;
	vertical-align: middle;
}
-->
</style>
<script language="javascript">
window.close();
</script>