<link href="../css/style.css" rel="stylesheet" type="text/css">
 <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="22"
	dir="../err.asp" 
 %>
  <!--#include file="../../conn/conn.asp"-->
  <!--#include file="../../inc/filesystem.asp"-->
   <!--#include file="../../inc/safe.asp"-->
   <!--#include file="../rolecheck.asp"-->

 <%
  
 vipinfo_id=Replace_Text(Request("vipinfo_id"))
 
 showname=Replace_Text(Request("showname"))
jgsm=Replace_Text(Request("jgsm"))
 content=replace(Request("content"),"'","")
mmfx=Replace_Text(Request("type"))
p_z_Z_Keywords=Replace_Text(Request("p_z_Z_Keywords"))
  sortid=Replace_Text(Request("p_z_Z_RootCategory"))
 CategoryId=split(Replace_Text(Request("p_z_Z_CategoryId1")),",")
 if mmfx="" then 
response.Write("<script>alert('请选择交易类别！');history.back();</script>")
response.End() 
 end if
 if sortid="" then
response.Write("<script>alert('请选择行业大类！');history.back();</script>")
response.End()
end if
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
 picture=Replace_Text(Request("picture"))
 oldpic=Replace_Text(Request("oldpic"))
period=Replace_Text(Request("period"))
linkman=Replace_Text(Request("linkman"))
phone=Replace_Text(Request("phone"))
company=Replace_Text(Request("company"))
address=Replace_Text(Request("address"))
country=Replace_Text(Request("country"))
city=Replace_Text(Request("city"))
email=Replace_Text(Request("email"))
postcode=Replace_Text(Request("postcode"))
fax=Replace_Text(Request("fax"))
web=Replace_Text(Request("web"))
if Replace_Text(Request("checkbox"))="1" then
tjhome=1
else
tjhome=0
end if
  
set rs=server.createobject("adodb.recordset")
sql="select * from Websen_vipinfo where vipinfo_id="&vipinfo_id
 rs.open sql,conn,1,3
rs("vipshowname")=showname
rs("vippricetems")=jgsm
rs("vipcontent")=content
rs("sortid")=sortid
rs("typeid")=typeid
rs("keywords")=p_z_Z_Keywords
rs("viptype")=mmfx
rs("vipperiod")=period
rs("lxr")=linkman

 if Replace_Text(Request("cimg"))=1 then
 	 
  '删除新上传的而又不使用的图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   if picture<>oldpic then
   if picture<>"nopicture.gif" then
 	 call FileDel(HOPE_InstallDir&"UploadFile/"&picture)
	 end if
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 end if
   if Replace_Text(Request("cimg"))=2 then
     rs("picture")=picture
	 
  '删除原有图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   if picture<>oldpic then
   if oldpic<>"nopicture.gif" then
 	 call FileDel(HOPE_InstallDir&"UploadFile/"&oldpic)
 	end if
	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 end if

rs("phone")=phone
rs("gsmc")=company
rs("gsdz")=address
rs("country")=country
rs("city")=city
rs("email")=email
rs("post")=postcode
rs("fax")=fax
rs("weburl")=web
rs("tjhome")=tjhome
rs("dateandtime")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
 Response.Write("<iframe src='../../manage/makehtml/vipinfo/makedetail.asp?all=update&id1="&vipinfo_id&"&id2="&vipinfo_id&"' widht=0 height=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='index.asp'>&lt;&lt; 返回上一页</a></td>"
response.write"</tr>"
response.write"</table>"
%>
<br>
<!--#include file="../copy.asp" -->