<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>

<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
font-size:12px;
}
-->
</style></head>
<body>
<center>

<%
if request.querystring("act")="1"then
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13)&chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from tbl_picarticle order by picid desc"
rs.open sql,conn,1,3
rs.addnew
rs("pic").appendchunk mydata
rs.update
rs.close
set rs=nothing
response.redirect("picarticleadd.asp")
end if
%>
<form name="form1" enctype="multipart/form-data" action="upimg.asp?act=1" method="post" >
<table width="88%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4">
<tr bgcolor="#B6EBC4">
<td bgcolor="#C5D5E4">请选择一张图片</td>
</tr>
<tr bgcolor="#B6EBC4">
<td bgcolor="#C5D5E4" ><input type="file" name="mefile"> (注意：图片的大小为468X130为最佳)</td>
</tr>
<tr bgcolor="#B6EBC4">
<td bgcolor="#C5D5E4"><input type="submit" name="ok" value="上传">
</tr>
</table>
</form>

</center>
</body>
</html>
