<!--#include file="upload_5xsoft.inc" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>图片上传</title>
<style type="text/css">
<!-- 
td           { font-size: 12px; line-height: 17px }
body         { font-size: 12px; line-height: 17px }
p            { margin-top: 1; margin-bottom: 1 }
form         { margin-top: 1; margin-bottom: 1 }
a:link       { text-decoration: none; color: black }
a:visited    { text-decoration: none; color: black }
a:active     { text-decoration: none }
a:hover      { text-decoration: underline; color: red }
-->
</style>
</head>
<body bgcolor="#D4D0C8" leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<script language="Javascript">
function pic(smileface)
{
	window.opener.document.postart.dpic.value=smileface;
}
</script>
<%Server.ScriptTimeout=1000
set upload=new upload_5xSoft
set file=upload.file("file1")
formPath="adpic/"
if file.filesize>0 then
fileExt=lcase(right(file.filename,3))
end if
randomize
ranNum=int(9000000*rnd)+10000
filename=formPath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
formPath1=""
filename1=formPath1&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
sizeLimit=102400'最大100K限制
if file.FileSize>sizeLimit then 
      Response.Write "<font color=ff0000>图片大小超出限制！最大" & FormatNumber(sizeLimit, 0)/1024 & "K，<br>您的图片是" & int(FormatNumber(file.FileSize, 0)/1024) & "K，请压缩后上传！</font>"
	  Response.Write "<br><a href=javascript:history.back();><font color=0099ff>[返回]</font></a>"
      Response.End
else
if file.FileSize>0 then 
file.SaveAs Server.mappath(FileName)
end if
response.write "图片上传成功！<br><br><a href=Javascript:pic('"&filename1&"');><u><font color=red>点击此处可以把图片地址写入表单</font></u></a>"
end if%>
    </td>
  </tr>
</table>
</body>