<!--#include file="../xyconn.asp" -->
<!--#include file="seeion.asp" -->
<% 
id=request("id")
title=request.form("title")
BigClassID=request.form("BigClassID")
SmallClassID=request.form("SmallClassID")
zz=request.form("zz")
img=request.form("img")
body=request.form("body")
tuijian=request.form("tuijian")
if id="" or not isnumeric(id) then
Response.Write "<script>alert('参数錯誤!');history.go(-1);</script>" 
Response.End()
end if
SQL="Select * from products where id="&id
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,1,3
if rs.eof and rs.bof then
Response.Write "<script>alert('参数不正确，ID值不存在!');history.go(-1);</script>" 
Response.End()
end if
if title=""  then 
response.Write("<script language=javascript>alert('产品标题不能为空!');history.go(-1)</script>") 
response.end 
end if
if BigClassID="" then
response.Write("<script language=javascript>alert('请选择产品分类!');history.go(-1)</script>")
response.End()
end if
if SmallClassID="" then
SmallClassID=0
end if
if body=""  then 
response.Write("<script language=javascript>alert('产品内容不能为空!');history.go(-1)</script>") 
response.end 
end if
rs("title")=title
rs("BigClassID")=BigClassID
rs("SmallClassID")=SmallClassID
rs("img")=img
rs("zz")=zz
rs("body")=body
rs("tuijian")=tuijian
rs.update 
rs.close 
response.write "<script>alert('恭喜你，产品页面内容修改成功!');window.location.href='manage_products.asp';</script>" 
%> 
