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

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
  
 call checkuser("sj")
 if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
if Not ChkPost then 
    response.write "<script language='javascript'>"
	response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
	response.end
end if
 
if Replace_Text(request("p_z_Z_Details"))="" then
response.write"<SCRIPT language=JavaScript>alert('详细说明必须填写！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

InfoType=Replace_Text(request("InfoType"))
p_z_Z_Type=Replace_Text(request("p_z_Z_Type"))

'生成详细页面路径
if p_z_Z_Type="卖" then 
	HtmlPath="tradeinfo"
else
	HtmlPath="seller"
end if
'生成详细页面路径

jinji=Replace_Text(request("jinj"))
info_id=Replace_Text(request("info_id"))
p_z_Z_Subject=Replace_Text(request("p_z_Z_Subject"))



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

sortid=Replace_Text(request("p_z_Z_RootCategory"))                                      '第一类

if sortid="" then
response.Write("<script>alert('对不起！,请你选择行业大类!');history.back(-1);</script>")
response.End()
end if

CategoryId=split(Replace_Text(request("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
  
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



flagc=0
p_z_Z_Keywords=Replace_Text(request("p_z_Z_Keywords"))
content=replace(request("p_z_Z_Details"),"'","")
'period=Replace_Text(request("p_z_Z_OfferExpire"))
more_info=Replace_Text(request("more_info"))
Specifications=Replace_Text(request("Specifications"))
Quantity=Replace_Text(request("Quantity"))
picture=Replace_Text(request("p_z_Z_TmpPictureName"))
picture_summ=Replace_Text(request("picture_summ"))
Packaging=Replace_Text(request("Packaging"))
PriceTerms=Replace_Text(request("PriceTerms"))
picsample_0=Replace_Text(request("picsample_0"))
picsample_1=Replace_Text(request("picsample_1"))
picsample_2=Replace_Text(request("picsample_2"))
draw=replace(Replace_Text(request("draw")),",","")
draw1=replace(Replace_Text(request("draw1")),",","")
draw2=replace(Replace_Text(request("draw2")),",","")
beginDate=Replace_Text(request("beginDate"))
endDate=Replace_Text(request("endDate"))
tsbz=Replace_Text(request("p_z_Z_tsbz"))

if tsbz="" then 
tsbz=0 
end if 
FeedbackFlag=Replace_Text(request("FeedbackFlag"))
if FeedbackFlag="" then
FeedbackFlag=0
else
FeedbackFlag=1
end if
 

sql="select info_id from Websen_Info where type='"&p_z_Z_Type&"' and showname='"&p_z_Z_Subject&"' and gsid="&gsid&" and info_id<>"&info_id&"" 
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if not rs.eof then
	response.write"<SCRIPT language=JavaScript>alert('对不起，此信息有误！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end 
end if


set rs=server.createobject("adodb.recordset")
sql="select * from Websen_Info where info_id="&info_id&""
 rs.open sql,conn,1,3
 sid=rs("sortid")
 tid=rs("typeid")
 tid2=rs("typeid_2")
 hname=sid&"-"&tid&"-"&tid2
 tty=rs("type")
 	flagc=rs("flag")
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
rs("type")=p_z_Z_Type
rs("showname")=p_z_Z_Subject

'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 rs("sortid")=sortid
  rs("typeid")=typeid
rs("typeid_2")=typeid_2

'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rs("keywords")=p_z_Z_Keywords
rs("content")=content
if jinji="1" then
'rs("period")="3"
else
'rs("period")=period
end if

if picture="" then 
 rs("picture")="../../UploadFile/nopicture.gif"
else
rs("picture")=picture
end if 
 if picture_summ="" then 
picture_summ="../../UploadFile/nopicture.gif"
else
picture_summ_new=split(picture_summ,"/")

picture_summ_new=picture_summ_new(2)

end if

rs("picture_summ")=picture_summ_new
rs("Specifications")=Specifications
if jinji<>"" then 
rs("jinji")=jinji
else
rs("jinji")=0
end if 
rs("Quantity")=Quantity
rs("Packaging")=Packaging
rs("PriceTerms")=PriceTerms
if TrustpassFlag<>"" then 
rs("TrustpassFlag")=TrustpassFlag
end if
rs("FeedbackFlag")=FeedbackFlag
rs("draw")=trim(draw)
rs("draw1")=trim(draw1)
rs("draw2")=trim(draw2)
rs("html_pass")=0
 	rs("tsbz")=tsbz  '特色标志
  	rs("infostartdate")=beginDate
	rs("infoenddate")=endDate	
rs.update
	id1=rs("info_id")
	id2=rs("info_id")

rs.close
set rs=nothing 

  '删除当种类变化时原有的html页面^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 if trim(hname)<>trim(sortid&"-"&typeid&"-"&typeid_2) then
  if tty="买" then
     call FileDel(HOPE_InstallDir&"seller/offerdetail/"&hname&"-"&info_id&".html")
  else 
     call FileDel(HOPE_InstallDir&"tradeinfo/offerdetail/"&hname&"-"&info_id&".html")
   end if
 end if
 
 
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
//'自动生成用户网站*******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   

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


 
 
 
conn.close
set conn=nothing
 
 
 
if flagc="1" then 
	%>
		<iframe src="../../manage/Autohtml/<%=HtmlPath%>/makedetail.asp?all=update&id1=<%=id1%>&id2=<%=id2%>&schtml=开始生成>>&other=Member" frameborder="0" scrolling="yes" height="0" widht="0"></iframe>

<% end if
 %>

 
<TABLE width=628 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle width=628>
      <BR>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
        <TD width="92%" background="../images/info_bg.gif"><IMG src="../images/offer_Modifypost.gif" width=575 height="31" 
            border=0></TD>
        </TR></TBODY></TABLE>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content_border">
		        <tr> 
	              <td align="center">
		                
 <br>
<br>
<TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="95%" 
              border=0>
  <TBODY>
    <TR>
      <TD><TABLE class=bdr2 cellSpacing=0 cellPadding=0 width="100%" 
                  border=0>
        <TBODY>
          <TR>
            <TD height=91 align="center" class=lh13><span class="lh15 C"><font color=#FF0000 class="M">恭喜您，信息已修改成功！</font></span> </TD>
          </TR>
        </TBODY>
      </TABLE></TD>
    </TR>
  </TBODY>
</TABLE><br>
 <br>

<table width="492" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td height="30" class="C lh18">
            <p class="c">
                <img src="../images/indexpoint.gif" width="5" height="9">
                想宣传其他产品，请继续 
                <a href="add_info.asp"><img src="../images/myalibaba_button_postinfo.gif" width="119" height="22" border="0" align="absmiddle"></a>
            </p>
        </td>
    </tr>
        <tr>
        <td height="30" class="c">
            <img src="../images/indexpoint.gif" width="5" height="9"> 想推广自己的产品，请 
            <a href="<%=HOPE_InstallDir%>member/productshow/add_product.asp"><img src="../images/myalibaba_button_quickpost.gif" width="90" height="22" border="0" align="absmiddle"></a> </td>
    </tr>
        <tr>
        <td height="30" class="c">
            <img src="../images/indexpoint.gif" width="5" height="9"> 
            信息发布后，您可以“<a href="edit.asp">管理商业信息</a>”，查看和编辑已发布上网的商业信息。
        </td>
    </tr>
</table>
<br>
<hr width="95%" size=1 color=#CCCCCC>
<br>
</td>
		        </tr>
      </table><BR><BR></TD></TR>
</TABLE>
</body>
</html>