<!--#include file="../admin_inc.asp"-->
<!--#include file="../../inc/UpLoad_Class.asp"-->
<style type="text/css">*{font-size:12px;}</style>
<%
Server.ScriptTimeOut=999999
dim up_formName,up_formPath,filename,up_file_name,up_fileExt,up_Filesize,up_F_Type
Dim isslide,isnews,iszt:isslide=request.QueryString("is")="slide":isnews=request.QueryString("is")="news":iszt=request.QueryString("is")="zt"
if isslide=true then
  up_formPath="../../pic/slide/"
elseif iszt=true then
  up_formPath="../../pic/zt/"
elseif isnews=true then
  sitePic=sitePic&"/newspic/"&Year(now())&"-"&Month(now()):up_formPath="../../template/"&defaultTemplate&"/images/"&sitePic&"/"
else
  sitePic=sitePic&"/"&Year(now())&"-"&Month(now()):up_formPath="../../template/"&defaultTemplate&"/images/"&sitePic&"/"
end if
select case request.QueryString("act")
  case"up":call upload()
end select
terminateAllObjects
'===========================无组件上传============================
sub upload
  dim upload
  set upload = new AnUpLoad
  upload.Exe ="jpg|gif|zip|png"
  upload.MaxSize = 1000 * 1024 * 1024 '1000M
  upload.GetData()
  if upload.ErrorID>0 then 
	  Fun.echo upload.Description
  else
	  dim file,result
	  set file = upload.files("file1")
	  if not(file is nothing) then
		set result = file.saveToFile(up_formPath,0,true)
		if not result.error then
			dim pic:pic=request.QueryString("pic")
			Fun.echo "<script>parent.document.getElementById('"&pic&"').value='"&sitePic&"/"&file.filename&"'</scri"&"pt>"
			Fun.echo "<table><tr><td bgcolor=#E9F5F5><a href='"&up_formPath&file.filename&"' target='_blank'><font color=red >上传成功!</font></a>&nbsp;&nbsp;[ <a href=# onclick=history.go(-1)>重新上传</a> ]</td></tr></table>"
		else
			Fun.echo file.Exception
		end if
	  end if
  end if
  set upload = nothing
end sub
%>