<% data_path="../../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../inc/filesystem.asp"-->
 <!--#include file="../checkrole.asp"-->

<%

  call checkuser("cp")
	if issession=0 then
	username=Replace_Text(request.Cookies("Yxmember"))
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
	else
	username=session("user")
	gsid=session("id")
	end if 
dim photo,logo,photopath,logopath

 id=Replace_Text(request.Form("id"))
 
 sql="select qymc from Websen_corporation where id="&gsid&""
Set rss= Server.CreateObject("ADODB.Recordset") 
rss.open sql,conn,1,1
qymc=rss("qymc")
rss.close

set rss=nothing
bigclassid=Replace_Text(Request.form("bigclassid"))
smallclassid=Replace_Text(Request.form("smallclassid")) 
cpmc=Replace_Text(Request.form("cpmc"))
cpgg=Replace_Text(Request.form("cpgg"))
cpcd=Replace_Text(Request.form("cpcd"))
proprice= Replace_Text(Request.form("proprice"))

'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'处理种类的id号 

 sortid=Replace_Text(Request.form("p_z_Z_RootCategory"))                                '第一类
CategoryId=split(Replace_Text(Request.form("p_z_Z_CategoryId1")),",")
typeid=CategoryId(0)                                                                   '第二类

if ubound(CategoryId)>=1 then
typeid_2=CategoryId(1)                                                                 '第三类     
	else
typeid_2=0
	end if
	
	if typeid="" then
    typeid=0
	end if
	if typeid_2="" then
    typeid_2=0
	end if
   
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
p_z_Z_Keywords=Replace_Text(Request.form("p_z_Z_Keywords"))
xxsm=Replace_Text(Request.form("xxsm"))
more_info=Replace_Text(Request.form("more_info"))
cpsb=Replace_Text(Request.form("cpsb"))
Quantity=Replace_Text(Request.form("Quantity"))
Packaging=Replace_Text(Request.form("Packaging"))
cpjg=Replace_Text(Request.form("cpjg"))
 yx_pic=Replace_Text(Request.form("yx_pic"))
yx_pic2=Replace_Text(Request.form("yx_pic2"))
iscpbj=Replace_Text(Request.form("iscpbj"))
if iscpbj="" then 
iscpbj=0
end if 
if not isnumeric(proprice)  then
proprice=0
end if
 
user= username



set rs=server.createobject("adodb.recordset")
sql="select * from Websen_productshow where id="&id&""
 rs.open sql,conn,1,3
 flagc=rs("flag")
 sid=rs("sortid")
 tid=rs("typeid")
 tid2=rs("typeid_2")
 hname=sid&"-"&tid&"-"&tid2
 
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rs("cpmc")=cpmc
rs("cpgg")=cpgg
rs("cpcd")=cpcd
rs("sortid")=sortid
rs("typeid")=typeid
rs("typeid_2")=typeid_2
rs("keywords")=p_z_Z_Keywords
rs("xxsm")=xxsm
 rs("idate")=now()
 
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if yx_pic="" and yx_pic2="" then 
 rs("picture")="../../UploadFile/nopicture.gif"
rs("picture_summ")="../../UploadFile/nopicture.gif"
elseif yx_pic2<>"" and yx_pic="" then 
rs("picture")=yx_pic2
rs("picture_summ")=yx_pic2
elseif yx_pic2="" and yx_pic<>"" then 
rs("picture")=yx_pic
rs("picture_summ")=yx_pic
else 
rs("picture")=yx_pic2
rs("picture_summ")=yx_pic
end if 
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rs("iscpbj")=iscpbj '产品报价
rs("proprice")=proprice
rs("cpsb")=cpsb
rs("Quantity")=Quantity
rs("Packaging")=Packaging
rs("cpjg")=cpjg
 rs("gsid")=gsid
rs("bigclassid")=bigclassid
rs("FeedbackFlag")=0
rs("smallclassid")=smallclassid
rs("html_pass")=0
rs.update
		id1=rs("id")
	    id2=rs("id")
rs.close
set rs=nothing


//'自动生成用户网站*******20080420********************************
	 
if issession=0 then
   gradeid=Replace_Text(request.Cookies("gradeid"))
else
   gradeid=session("gradeid")
end if 		 
rolelist="no"
set rsgg=server.CreateObject("adodb.recordset")
sqlgg=" select rolelist from Websen_vipgrade where  roleid="&gradeid
rsgg.open sqlgg,conn,1,1
if not rsgg.eof then
   rolelist=rsgg("rolelist")
   rsgg.close
end if
if instr(rolelist,"qw")>0 then
   if autozz=1 and cityscakey="1" then
      %>
      <iframe src=" ../co.asp	" frameborder="0" scrolling="no" width=0 height=0></iframe>
      <%
   end if
//else

end if   

//****************************************************************






 
 '删除当种类变化时原有的html页面^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 if trim(hname)<>trim(sortid&"-"&typeid&"-"&typeid_2) then
      call FileDel(HOPE_InstallDir&"productshow/offerdetail/"&hname&"-"&id&".html")
  end if
 
 
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 if flagc="1" then
%>
<iframe src="../../manage/Autohtml/productshow/makedetail.asp?all=update&id1=<%=id1%>&id2=<%=id2%>&schtml=开始生成>>&M_other=Product" frameborder="0" scrolling="no" width=0 height=0></iframe>
<%
end if
  %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='3;url=edit.asp'>
</head>

<%
Content="<center>恭喜您，您的产品已经发布成功!<br><br><input name='' type='button' value='返回上一页' onclick='javascript:history.go(-1)'></center>"

Call Operation(Content,1)
Response.end
conn.close
set conn=nothing
%>
<body>
</body>
</html>