<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select pic from cbgl where id="&request("id")
rs.open sql,conn,1,1
%>
<html>

<head>
<title>上传产品图片！</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type="text/css" href="js/media.css">
<link rel=stylesheet type="text/css" href="js/form_media.css">
<style type="text/css">
<!--
body {
	background-color: #EFEFEF;
}
-->
</style></head>
<script language=javascript>
function See(hh,ff) {
    if (ff.value!="") {
        hh.src=ff.value;
    }    
}   
function ww()
{
    str= document.form1.fname.value
    lens=str.length
    extname=str.substring(lens-4,lens);
    if (str=="" || (extname!=".gif" && extname!=".jpg")){
    alert("请上传gif或jpg格式的图片！");
    document.form1.fname.focus();
    return false;
  }
}
</script>
<body leftmargin="0" topmargin="0">
<div align="center">
  <table width="100%" cellspacing="0" cellpadding="0" height="100%">
    <tr> 
      <td width="100%" height="26" align="center" bgcolor="177B2F" style="letter-spacing:3px;font-size:14px"><font color="#FFFFFF">－－－上传图片－－－</font></td>
    </tr>
    <tr> 
      <td align="center" valign="middle" width="602"> 
        <table width="520" border="0" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolor="#A27D03">
          <form method=POST enctype="multipart/form-data" action="upload_pic_imgok.asp" name="form1" onsubmit="return ww()">
            <tr> 
              <td height="25" align="center"> <input name=fname type=file class="text" value="" size="40" onfocus="See(lhy,this);"></td>
            </tr>
			<tr> 
              <td align=center height="110"><img id="lhy" src="upload/<%=rs("pic")%>" name="picview"><br>
              </td>
            </tr>
            <tr> 
              <td align=center width="520" height="35">                <input name="zt" type="hidden" id="zt" value="<%=request("zt")%>">
                <input name="ssxn" type="hidden" id="ssxn" value="<%=request("ssxn")%>">
                <input name="submit" type="hidden" id="submit" value="<%=request("submit")%>">
                <input name="topage" type="hidden" id="topage" value="<%=request("topage")%>">
              <input type="hidden" value="<%=request("id")%>" name="id"><input type="submit" name="submit" value="就这样上传了">              </td>
            </tr>
          </form>
        </table>
      </td>
    </tr>

    <tr> 
      <td width="602" height="26" align="center" valign="top" bgcolor="177B2F">&nbsp;</td>
    </tr>
  </table>
</div>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
%>