日期:2014-05-16 浏览次数:20889 次
<HTML>
<BODY BGCOLOR="#666666">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="3_upload_update.asp">
<INPUT TYPE="FILE" SIZE="20" NAME="FILE1"> <INPUT TYPE=SUBMIT VALUE="保存">
</FORM>
</BODY>
</HTML>
<%OPTION EXPLICIT%>
<%Server.ScriptTimeOut=5000%>
<!--#include FILE="upload_5xsoft.inc"-->
<body>
<%
dim upload,file,formName,formPath,iCount,filesize
set upload=new upload_5xsoft ''建立上传对象
formpath="../shujuku/images/"
for each formName in upload.objFile ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.filesize<100000000 then
response.write "<span style=""font-family: 宋体; font-size: 9pt"">请先选择你要上传的文
件! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
response.end
end if
if file.fileext<>"jpg" and file.fileext<>"bmp" then
response.write "<span style=""font-family: 宋体; font-size: 9pt"">只
能上传jpg或bmp格式的图片! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
response.end
end if
if file.filesize>(90000000*90000000) then
response.write "<span style=""font-family: 宋体; font-size: 9pt"">上传图片文件过大!!! [ <a href=# onclick=history.go(-1)>重新上传</a> ]</span>"
response.end
end if
next
file.FileName=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)'重命名
file.fileext=".bmp"
file.SaveAs Server.mappath(formPath&file.FileName&file.Fileext) ''保存文件
response.write ("<a href='del_pic_wai_upload_update.asp?pic="&File.FileName&file.filEext&"'>删除图片</a>")
response.write "<script language=javascript>parent.document.image.value='../images/"&File.Fil