<!--#include file="UPLOAD.INC.asp" -->
<!--#include file="Admin.asp"-->
<!--#include file="cf.asp" -->

<%if session("adminuser")="" then%>
<style type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>
<link rel="stylesheet" href="../include/css.css" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #333333;
}
-->
</style>
对不起，您不是会员，不会进行此项操作！
<%else%>
<%
dim arr(3)
dim upload,file,formname,formpath,icount,filename,fileext,i
set upload=new upload_5xsoft ''建立上传对象
						
formpath="../uppic/"     '图片存放的路径：product目录下的uploadimages文件夹       ''在目录后加(/)

	''列出所有上传了的文件
    for each formname in upload.file
      set file=upload.file(formname)
	  if file.filesize>0 then
      if file.filesize>10000000 then
		response.write "<font size=2>图片大小超小了限制[<a href=# onclick=history.go(-1)>重新上传</a>]</font>"
		response.end
      end if



fileext=lcase(right(file.filename,4))
 uploadsuc=false
forum_upload="gif,jpg,png"
 forumupload=split(forum_upload,",")
 for i=0 to ubound(forumupload)
    if fileext="."&trim(forumupload(i)) then
    uploadsuc=true
    exit for
    else
    uploadsuc=false
    end if
 next


if uploadsuc=false then
         response.write "<font size=2>文件格式限制[<a href=# onclick=history.go(-1)>请重新上传</a>]</font>"
         response.end
      end if
	end if
						
	filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&file.filename
	
    if file.filesize>0 then         ''如果 filesize > 0 说明有文件数据
       file.saveas server.mappath(formpath&filename)   ''保存文件
       'response.write file.filepath&file.filename&"("&file.filesize&") => "&formpath&file.filename&"上传成功<br>"
       response.write "<font size=2>上传成功 <a href=# onclick=history.go(-1)>请返回</a>" 

	   end if
set file=nothing
next
set upload=nothing
response.write "<script>parent.addlink.pic_url.value='"&filename&"'</script>"
%>
<%end if%>