  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="31"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
 <!--#include file="../rolecheck.asp"-->
 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<title>修改会员供求信息</title>
<%
 
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
 
if Not ChkPost then 
response.redirect ("../../login/chklogin.asp?login=4")
response.end
end if

if 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"))
jinji=Replace_Text(request("jinj"))
info_id=Replace_Text(request("info_id"))
p_z_Z_Subject=Replace_Text(request("p_z_Z_Subject"))

beginDate=Replace_Text(request("beginDate"))
endDate=Replace_Text(request("endDate"))


'^^^^^^^^^^^^^^^^^^^^^^^^^^^^  start  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'处理信息类别
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       
	                                   
  
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^  end   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



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"))
period="0"
more_info=Replace_Text(request("more_info"))
Specifications=Replace_Text(request("Specifications"))
Quantity=Replace_Text(request("Quantity"))
picture_summ=Replace_Text(request("picture_summ"))
picture=Replace_Text(request("p_z_Z_TmpPictureName"))
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"))
FeedbackFlag=Replace_Text(request("FeedbackFlag"))
gsid=Replace_Text(request("gsid"))

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
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

rs("Specifications")=Specifications
if jinji<>"" then
rs("jinji")=jinji
else
rs("jinji")=0
end if 

if beginDate="" then
beginDate=date()
end if
if endDate="" then
endDate=date()+11
end if
  	rs("infostartdate")=beginDate
	rs("infoenddate")=endDate
rs("Quantity")=Quantity
rs("Packaging")=Packaging
rs("PriceTerms")=PriceTerms
if TrustpassFlag<>"" then 
rs("TrustpassFlag")=TrustpassFlag
end if 
rs("FeedbackFlag")=FeedbackFlag
'if picsample_0="1" then
'rs("picsample_0")=picsample_0
'rs("draw")=draw
'elseif picsample_1="1" then
'rs("picsample_1")=picsample_1
'rs("draw1")=draw1
'elseif picsample_2="1" then
'rs("picsample_2")=picsample_2
'rs("draw2")=draw2
'end if
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.write "<iframe src='../../manage/makehtml/"&HtmlPath&"/makedetail.asp?all=update&id1="&id1&"&id2="&id2&"&schtml=开始生成>>' frameborder='0' scrolling='yes' height='0' widht='0'></iframe>"
response.write"<table cellpadding=2 cellspacing=1 border=0 width=100% class=tableBorder align=center>"
response.write"<TR>"
response.write"<TH class=tableHeaderText colSpan=2 height=25>修改会员供求信息</TH>"
response.write"<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br>修改会员供求信息成功！</div></td></tr>"
response.write"<tr align=center><td height=30 class=forumRowHighlight><a href='javascript:window.close()'>关闭窗口</a></td>"
response.write"</tr>"
response.write"</table>"
%>
<script>
function window.onbeforeunload(){
window.opener.location.reload()
}
</script>