修改产品的代码。。。。
<!--#include file="../Conn.asp" -->
<!--#include file="seeion.asp"-->
<%
exec="select * from Products where id="& request.QueryString("id")
set rsa=server.createobject("adodb.recordset")
rsa.open exec,conn,1,1
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<title>修改产品</title>
<script language="javascript">
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("eWebEditor/dialog/i_upload.htm?style=popup&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");}
</script>
<script language = "JavaScript">
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "SELECT * FROM SmallClass ORDER BY SmallClassID asc",conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
i = 0
Do While Not Rs.eof
%>
subcat[<%=i%>] = new Array("<%= Trim(Rs("SmallClassName"))%>","<%= Rs("BigClassID")%>","<%= Rs("SmallClassID")%>");
<%
i = i + 1
Rs.MoveNext
Loop
Rs.Close
%>
onecount=<%=i%>;
function changelocation(locationid,formname)
{
formname.SmallClassID.length = 0;
var locationid = locationid;
var i;
for (i = 0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
formname.SmallClassID.options[formname.SmallClassID.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body>
<form
name="form1" method="post" action="updata_products.asp">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
<tr>
<td height="30" background="images/bg_list.gif"><div
style="padding-left:10px; font-weight:bold; color:#FFFFFF">修改产品</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8" >
<td height="28" width="16%" class="td">产品标题 <font color="#FF0000">*</font></td>
<td width="84%"
class="td">
<input name="title" type="text" value="<%=rsa("title")%>" size="40"
/>
<label>
<input name="id" type="hidden" id="id" value="<%=rsa("id")%>" />
</label>
<label></label></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td width="16%" height="13" class="td">产品分类</td>
<td class="td"><select name="BigClassID" id="BigClassID" onChange="changelocation(document.form1.BigClassID.options[document.form1.BigClassID.selectedIndex].value,document.form1)">
<option value="">请选择大类</option>
<%
i = 0
Set RsBig = Conn.Execute("SELECT * FROM BigClass ORDER BY px_id")
Do While Not RsBig.Eof
If i = 0 Then BigClassID = RsBig(0)
Response.Write("<option value="""&RsBig(0)&""">"&RsBig(1)&"</option>")
i = i + 1
RsBig.MoveNext
Loop
Set RsBig = Nothing
%>
</select>
</td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">产品编号</td>
<td class="td"><input name="zz" type="text" value="<%=rsa("zz")%>" size="30"
/></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">产品略缩图</td>
<td class="td"><input name=img type=text value="<%=rsa("img")%>" size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'form1.img', '')" class="btn"> <span class="bline"><img src="<%=rsa("img")%>" width="80" height="80" /></span></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">产品大图</td>
<td class="td"><input name=img2 type=text value="<%=rsa("img2")%>" size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'form1.img2', '')" class="btn"></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">产品价格</td>
<td class="td"><input name="jiage" type="text" value="<%=rsa("jiage")%>"
size="20" />
元</td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">新闻内容 <font color="#FF0000">*</font></td>
<td class="td"><input type="hidden" name="body" value='<%=replace(rsa("body"),"'","'")%>'/>
<IFRAME ID="eWebEditor1" SRC="eWebEditor/ewebeditor.htm?id=body&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="350"></IFRAME></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">是否推荐</td>
<td class="td"><label>
<input type="radio" name="tuijian" value="0" <%if rsa("tuijian")=0 then%>checked<%end if%>>不推荐
<input type="radio" name="tuijian" value="1" <%if rsa("tuijian")=1 then%>checked<%end if%>>推荐</label></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="12" class="td"> </td>
<td class="td"><input type="submit" name="button" id="button" value="确认修改"
class="btn"/></td>
</tr>
</table>
</td>
</tr>
</table></form>
</body>
</html>