<% data_path="../../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/filesystem.asp"-->
 <!--#include file="../../inc/safe.asp"-->
  <!--#include file="../checkrole.asp"-->


<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
 
     call checkuser("gj")
	 
if issession=0 then
id=Replace_Text(request.Cookies("Yxmemberid"))
 username=Replace_Text(request.Cookies("Yxmember"))
 flag=Replace_Text(request.Cookies("yxFlag"))
 else
id=session("id")
username=session("user")
flag=session("yxFlag")
 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
 
 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"))
if p_z_Z_RndStaffNum="" then p_z_Z_RndStaffNum=0
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"))
tm=Replace_Text(request.form("tm"))

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
rs("p_z_Z_RegCapital")=p_z_Z_RegCapital
rs("p_z_Z_KeyClients")=p_z_Z_KeyClients
rs("p_z_Z_AnnualExportAmount")=p_z_Z_AnnualExportAmount
rs("p_z_Z_AnnualImportAmount")=p_z_Z_AnnualImportAmount
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("tm")=tm
rs.update

 
 Member_type=rs("flag")'
 	id1=rs("id")
	id2=rs("id")
rs.close
set rs=nothing




//'自动生成用户网站*******20080420********************************
	 
if issession=0 then
   gradeid=Replace_Text(request.Cookies("gradeid"))
else
   gradeid=session("gradeid")
end if 		 
rolelist="no"
set rsgg=server.CreateObject("adodb.recordset")
sqlgg=" select rolelist from Websen_vipgrade where  roleid="&gradeid
rsgg.open sqlgg,conn,1,1
if not rsgg.eof then
   rolelist=rsgg("rolelist")
   rsgg.close
end if
if instr(rolelist,"qw")>0 then
   if autozz=1 and cityscakey="1" then
      %>
      <iframe src=" ../co.asp	" frameborder="0" scrolling="no" width=0 height=0></iframe>
      <%
   end if
//else

end if   

//****************************************************************







goname=username
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='3;url=company_edit.asp'>
</head>
<body>
<%
if id<>"" and flag=1 then
	
	if id1<>"" and id2<>"" then %>
  <iframe src="../../manage/Autohtml/corporation/makedetail.asp?all=update&id1=<%=id1%>&id2=<%=id2%>&schtml=开始生成>>&other=Confirm" frameborder="0" scrolling="no" width=0 height=0></iframe>	

<%	end if
	Content="<center>公司介绍已经修改成功,３秒钟后返回!<br><br><input name='' type='button' value='返回上一页' onclick='javascript:history.go(-1)'></center>  "

	Call Operation(Content,1)
	Response.End()
end if
%>
<!--#include file="co.asp"-->

<%
Content="<center>恭喜您，公司介绍已经修改成功！<br><br><input name='' type='button' value='返回上一页' onclick='javascript:history.go(-1)'></center>"

Call Operation(Content,1)
%>

</body>
</html>
<%
conn.close
set conn=nothing
%>