<!--#include file="conn.asp"-->
<!--#include file="foxx.asp"-->
<%
dim categoryid,name,mark,code,telll,luuu,waitime,sheng,shi,pweight,beizhu,vipprice,detail,recommend
categoryid=request("categoryid")
name=trim(request("name"))
mark=trim(request("mark"))
code=trim(request("code"))
telll=trim(request("telll"))
waitime=trim(request("waitime"))
luuu=trim(request("luuu"))
sheng=request("sheng")
shi=request("shi")
beizhu=trim(request("beizhu"))
pweight=trim(request("pweight"))
vipprice=trim(request("vipprice"))
detail=trim(request.form("detail"))
recommend=trim(request("recommend"))

if request.form("name")="" then
response.Write "<script language=javascript>alert('请填写名称！');history.go(-1);</script>"
response.End
end if

if Not isNumeric(request.form("vipprice")) then
response.Write "<script language=javascript>alert('折扣必须是数字！');history.go(-1);</script>"
response.End
end if

dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from [FOX_xiao] order by adddate desc"
rs.open sql,conn,1,3
rs.addnew
rs("categoryid")=request("categoryid")
rs("name")=name
rs("mark")=mark
rs("code")=code
rs("telll")=telll
rs("waitime")=waitime
rs("luuu")=luuu
rs("sheng")=sheng
rs("shi")=shi
rs("beizhu")=beizhu
rs("pweight")=pweight
rs("vipprice")=vipprice
rs("detail")=detail
rs("recommend")=recommend
rs("pic")=""
rs("spic")=""
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
closedb
    Response.Write "<script>alert('发布成功！');this.location.href='shangjia.asp';</SCRIPT>"
     response.end
Response.Redirect "shangjia.asp"
%>
</body></html>