<!--#include file="top.asp"-->
<%if userflag1=0 then
response.redirect"ok.asp?action=flag"
end if

cpname = Request("cpname")
sortid = Request("sortid")
cpjg = Request("cpjg")
jgdw = request("jgdw")
cpjl = Request("cpjl")
cpbh = Request("cpbh")
if cpbh="" then cpbh=null
cpcd=Request("cpcd")
if cpcd="" then cpcd=null
cpgg=Request("cpgg")
if cpgg="" then cpgg=null
if Request("ypxxtwo_id")="" then
ypxxone_id=Request("aaa")
ypxxtwo_id=Request("bbb")
else
ypxxone_id=Request("ypxxone_id")
ypxxtwo_id=Request("ypxxtwo_id")
end if
cpjm=Request("cpjm")
cpsm=Request("cpsm")
if cpsm="" then cpsm="暂无"
pic=Request("dlxf_pic")
if pic="" then pic="img/null.gif"

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_cp where dlxf_yp_id="& session("id")
rs.open sql,conn,1,3

if userflag1<>0 then
if rs.recordcount >= cint(userflag1) then
errstyle="·您是"&vipshow&"，只能上传最多 "&userflag1&" 个产品！"
scripterr
end if
else
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs.addnew
rs("dlxf_pic")=pic
rs("dlxf_cpname")=cpname
rs("dlxf_sortid")=cint(sortid)
rs("dlxf_cpjg")=cpjg
rs("dlxf_cpjgdw")=jgdw
rs("dlxf_cpjl")=cpjl
rs("dlxf_cpbh")=cpbh
rs("dlxf_cpcd")=cpcd
rs("dlxf_cpgg")=cpgg
rs("dlxf_ypxxtwo_id")=ypxxtwo_id
rs("dlxf_ypxxone_id")=ypxxone_id
rs("dlxf_cpjm")=cpjm
rs("dlxf_cpsm")=cpsm
rs("dlxf_key1")=application("citycpkey")
rs("dlxf_yp_id")=session("id")
rs.update
rs.close
set rs=nothing
conn.close
set conn = nothing

if application("citycpkey")=1 then
response.redirect"ok.asp?url=cp_add.asp"
else
response.redirect"ok.asp?url=cp_add.asp&key=yes"
end if

%>