<!--#include file="../head.asp"-->
<!--#include file="../checkrole.asp"-->
<%

  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"))
p_z_Z_Subject=Replace_Text(request("p_z_Z_Subject"))

 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'处理种类的id号 
sortid=Replace_Text(request("p_z_Z_RootCategory"))                                   '第一类
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
 
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



p_z_Z_Keywords=Replace_Text(request("p_z_Z_Keywords"))
content=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_Text(request("draw"))
draw1=Replace_Text(request("draw1"))
draw2=Replace_Text(request("draw2"))
tsbz=Replace_Text(request("p_z_Z_tsbz"))
beginDate=Replace_Text(request("beginDate"))
endDate=Replace_Text(request("endDate"))
if tsbz="" then 
tsbz=0 
end if 
 
 flagc=0
 
set rs=server.createobject("adodb.recordset")
sql="select * from websen_Info where showname='"&p_z_Z_Subject&"' and gsid="&gsid&""
 rs.open sql,conn,1,3
if not rs.eof then
	id1=rs("info_id")
	id2=rs("info_id")
 	response.write"<SCRIPT language=JavaScript>alert('对不起，您已经提交过此信息！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end 
else
 	rs.addnew
	rs("type")=p_z_Z_Type
	rs("showname")=p_z_Z_Subject
	if InfoType="mm" then
		rs("sortid")=sortid
	else
		rs("sortid")=InfoType
	end if

	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 
		 picture="../../UploadFile/nopicture.gif"
		rs("picture")=picture
	else
		rs("picture")=picture
	end if 
	if picture_summ="" then picture_summ="../../UploadFile/nopicture.gif"
	rs("picture_summ")=picture_summ
	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
		else
 		rs("TrustpassFlag")=0
 	end if 
 	rs("picsample_0")=picsample_0
	rs("picsample_1")=picsample_1
	rs("picsample_2")=picsample_2
	rs("draw")=draw
	rs("draw1")=draw1
	rs("draw2")=draw2
	if cityscakey=1 then 
		rs("flag")=1
		else
		rs("flag")=0
	End If
	rs("gsid")=gsid
	rs("dateandtime")=now()
	rs("hits")=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
	
	//'自动生成
 	if cityscakey="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
	'自动生成
end if
	conn.close
	set conn=nothing
%>
<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_post.gif" width=578 
            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>
