  <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="41"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
  <!--#include file="../../inc/filesystem.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
 
 	
 	id=Replace_Text(Request("id"))
 
	 
	cpmc=Replace_Text(Request("cpmc"))
	cpgg=Replace_Text(Request("cpgg"))
	cpcd=Replace_Text(Request("cpcd"))
	
'处理种类的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"))
	uname=Replace_Text(Request("uname"))
	picture=Replace_Text(Request("picture"))
	oldpic=Replace_Text(Request("oldpic"))
  	xxsm=Replace_Text(Request("xxsm"))
	more_info=Replace_Text(Request("more_info"))
	cpsb=Replace_Text(Request("cpsb"))
	Quantity=Replace_Text(Request("Quantity"))
	Packaging=Replace_Text(Request("Packaging"))
	cpjg=Replace_Text(Request("cpjg"))
	FeedbackFlag=Replace_Text(Request("FeedbackFlag"))
	if FeedbackFlag="" then
	FeedbackFlag=0
	else
	FeedbackFlag=1
	end if
  	
	set rs=server.createobject("adodb.recordset")
	sql="select * from Websen_productshow where id="&id&""
	 rs.open sql,conn,1,3
	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
   if Replace_Text(Request("cimg"))=1 then
   '删除新上传的而又不使用的图片^^^^^^^^^^^^^^^^^^ 
    if picture<>oldpic then
 	 call FileDel(HOPE_InstallDir&"vipcom/"&uname&"/"&picture)
  	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   end if
  if Replace_Text(Request("cimg"))=2 then
     rs("picture")=picture
   '删除原有图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    if picture<>oldpic then
 	 call FileDel(HOPE_InstallDir&"vipcom/"&uname&"/"&oldpic)
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  end if
 	rs("cpsb")=cpsb
	rs("Quantity")=Quantity
	rs("Packaging")=Packaging
	rs("cpjg")=cpjg
	rs("FeedbackFlag")=FeedbackFlag
	rs("idate")=now()
	 rs.update
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
 	
	Response.write "<iframe src='../../manage/makehtml/productshow/makedetail.asp?all=update&id1="&id&"&id2="&id&"&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:history.back(-1)'>&lt;&lt; 返回上一页</a></td>"
	response.write"</tr>"
	response.write"</table>"
%>
