<%@ codepage ="936" %>
   <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="21"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
    <!--#include file="../rolecheck.asp"-->

<link rel="stylesheet" type="text/css" href="../css/style.css">
<%
if Not ChkPost then 
response.redirect ("/login/chklogin.asp?login=4")
response.end
end if

if Chkrequest(request("id")) then
id=request("id")
else
Response.Redirect ("/login/chklogin.asp?login=4")
end if
qymc=Replace_Text(request.form("qymc"))
p_z_Z_EmployeesCount=Replace_Text(request.form("p_z_Z_EmployeesCount"))
if p_z_Z_EmployeesCount="0" then 
p_z_Z_EmployeesCount=1
end if
p_z_Z_LegalStatus=Replace_Text(request.form("p_z_Z_LegalStatus"))
qylb=Replace_Text(request.form("qylb"))
p_z_Z_AnnualRevenue=Replace_Text(request.form("p_z_Z_AnnualRevenue"))
p_z_Z_productionService=Replace_Text(request.form("p_z_Z_productionService"))
p_z_Z_FoundedPlace=Replace_Text(request.form("p_z_Z_FoundedPlace"))
p_z_Z_BizPlace=Replace_Text(request.form("p_z_Z_BizPlace"))
qyjj=Replace_Text(request.form("qyjj"))
p_z_Z_EstablishedYear=Replace_Text(request.form("p_z_Z_EstablishedYear"))
p_z_Z_BrandName=Replace_Text(request.form("p_z_Z_BrandName"))
frdb=Replace_Text(request.form("frdb"))
p_z_Z_RegCapital=Replace_Text(request.form("p_z_Z_RegCapital"))
p_z_Z_KeyClients=Replace_Text(request.form("p_z_Z_KeyClients"))
p_z_Z_AnnualExportAmount=Replace_Text(request.form("p_z_Z_AnnualExportAmount"))
p_z_Z_AnnualImportAmount=Replace_Text(request.form("p_z_Z_AnnualImportAmount"))
p_z_Z_Certification=Replace_Text(request.form("p_z_Z_Certification"))
p_z_Z_Bank=Replace_Text(request.form("p_z_Z_Bank"))
p_z_Z_Account=Replace_Text(request.form("p_z_Z_Account"))
p_z_Z_OemOdm=Replace_Text(request.form("p_z_Z_OemOdm"))


p_z_Z_RndStaffNum=Replace_Text(request.form("p_z_Z_RndStaffNum"))

'response.Write(p_z_Z_RndStaffNum)
'response.End()


p_z_Z_ProductionCapacity=Replace_Text(request.form("p_z_Z_ProductionCapacity"))
p_z_Z_FactorySize=Replace_Text(request.form("p_z_Z_FactorySize"))
p_z_Z_QaQc=Replace_Text(request.form("p_z_Z_QaQc"))
myworldecname=Replace_Text(request.form("myworldecname"))
bm=Replace_Text(request.form("bm"))
zw=Replace_Text(request.form("zw"))
mobile=Replace_Text(request.form("mobile"))
zczj=Replace_Text(request.form("zczj"))
phonecountry=Replace_Text(request.form("phonecountry"))
phonearea=Replace_Text(request.form("phonearea"))
phonenumber=Replace_Text(request.form("phonenumber"))
phone=phonecountry&"&nbsp;"&phonearea&"&nbsp;"&phonenumber
faxCountry=Replace_Text(request.form("faxCountry"))
faxArea=Replace_Text(request.form("faxArea"))
faxNumber=Replace_Text(request.form("faxNumber"))
fax=faxcountry&"&nbsp;"&faxarea&"&nbsp;"&faxnumber
country=Replace_Text(request.form("country1"))
sf=Replace_Text(request.form("province"))
city=Replace_Text(request.form("city"))
address=Replace_Text(request.form("address"))
post=Replace_Text(request.form("post"))
web=Replace_Text(request.form("web"))
email=Replace_Text(request.form("email"))

picture=Replace_Text(request.form("picture"))

sql="select * from Websen_corporation where id<>"&id&" and (qymc='"&qymc&"' or email='"&email&"')" 
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if not (rs.eof and rs.bof) then
response.write"<SCRIPT language=JavaScript>alert('您填写的公司名称或E-mail已存在，请返回重新填写！！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
end if

set rs=server.createobject("adodb.recordset")
sql="select * from Websen_corporation where ID="&id&""
rs.open sql,conn,1,3

rs("qymc")=qymc
rs("qyjj")=qyjj
rs("zycp")=p_z_Z_productionService
rs("qylb")=qylb
rs("frdb")=frdb
rs("zczj")=zczj
rs("phone")=phone
rs("fax")=fax
rs("country")=country
rs("sf")=sf
rs("city")=city
rs("address")=address
rs("post")=post
rs("web")=web
rs("email")=email
rs("p_z_Z_EmployeesCount")=p_z_Z_EmployeesCount
rs("p_z_Z_LegalStatus")=p_z_Z_LegalStatus
rs("p_z_Z_AnnualRevenue")=p_z_Z_AnnualRevenue
rs("p_z_Z_FoundedPlace")=p_z_Z_FoundedPlace
rs("p_z_Z_BizPlace")=p_z_Z_BizPlace
rs("p_z_Z_EstablishedYear")=p_z_Z_EstablishedYear
rs("p_z_Z_BrandName")=p_z_Z_BrandName
if p_z_Z_RegCapital<>"" then 
rs("p_z_Z_RegCapital")=p_z_Z_RegCapital
end if 
rs("p_z_Z_KeyClients")=p_z_Z_KeyClients
if p_z_Z_AnnualExportAmount<>"" then 
rs("p_z_Z_AnnualExportAmount")=p_z_Z_AnnualExportAmount
end if
if p_z_Z_AnnualImportAmount<>"" then 
rs("p_z_Z_AnnualImportAmount")=p_z_Z_AnnualImportAmount
end if 
rs("p_z_Z_Certification")=p_z_Z_Certification
rs("p_z_Z_Bank")=p_z_Z_Bank
rs("p_z_Z_Account")=p_z_Z_Account
rs("p_z_Z_OemOdm")=p_z_Z_OemOdm
rs("p_z_Z_RndStaffNum")=p_z_Z_RndStaffNum
rs("p_z_Z_ProductionCapacity")=p_z_Z_ProductionCapacity
rs("p_z_Z_FactorySize")=p_z_Z_FactorySize
rs("p_z_Z_QaQc")=p_z_Z_QaQc
rs("name")=myworldecname
rs("bm")=bm
rs("zw")=zw
rs("mobile")=mobile
rs("despic")=picture
rs.update
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
</head>
<table cellpadding=2 cellspacing=1 border=0 width=400 class=tableBorder align=center><TR>
  <TH class=tableHeaderText colSpan=2 height=25>修改会员资料信息</TH>
<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br>
企业资料修改成功！</div></td></tr><tr align=center><td height=30 class=forumRowHighlight><a href='edit.asp?id=<%=id%>'>&lt;&lt; 返回上一页</a></td></tr></table>
</body>
</html>