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

<%
if Not ChkPost then 
response.redirect ("/login/chklogin.asp?login=4")
response.end
end if


name1=Replace_Text(request.form("name"))
ch=Replace_Text(request.form("ch"))
email=Replace_Text(request.form("email"))
mark=Replace_Text(request.form("mark"))
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
mobile=Replace_Text(request.form("mobile"))
post=Replace_Text(request.form("post"))
country=Replace_Text(request.form("country1"))
sf=Replace_Text(request.form("province"))
city=Replace_Text(request.form("city"))
address=Replace_Text(request.form("address"))
qymc=Replace_Text(request.form("qymc"))
zw=Replace_Text(request.form("zw"))
categoryid=Replace_Text(request.form("categoryid"))
msn=Replace_Text(request.form("msn"))

'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'处理种类的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
  
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  web=Replace_Text(request.form("web"))
 p_z_Z_productionService=Replace_Text(request.form("p_z_Z_productionService"))
qylb=Replace_Text(request.form("qylb"))
frdb=Replace_Text(request.form("frdb"))
qyjj=Replace_Text(request.form("qyjj"))
user=Replace_Text(request.form("user"))
pass=Replace_Text(request.form("password"))
gradeid=Replace_Text(request.form("gradeid"))

'-查出该等级的默认空间大小------------------------------------------------------------
set rsk=server.CreateObject("adodb.recordset")
sqlk="select * from Websen_vipgrade where roleid="&gradeid
rsk.open sqlk,conn,1,1
if rsk.eof then
foldersize=500
end if
if not rsk.eof then 
foldersize=rsk("foldersize")
rsk.close
end if
'---------------------------------------------------------------
set rs=server.CreateObject ("adodb.recordset")
sql="select * from Websen_corporation where [user]='"&user&"'"
rs.open sql,conn,1,3
if not rs.eof then
	response.write "<script>alert('用户名已存在！返回重新输入!!!');history.back();</script>" 
	response.end
end if 
rs.addnew
rs("user")=user
rs("pass")=pass
rs("name")=name1
rs("ch")=ch
rs("email")=email
rs("phone")=phone
rs("fax")=fax
rs("mobile")=mobile
rs("post")=post
rs("country")=country
rs("sf")=sf
rs("city")=city
rs("address")=address
rs("qymc")=qymc
rs("zw")=zw
rs("sortid")=sortid
rs("typeid")=typeid
rs("typeid_2")=typeid_2
rs("web")=web
rs("msn")=msn
rs("zycp")=p_z_Z_productionService
rs("qylb")=qylb
rs("frdb")=frdb
rs("qyjj")=qyjj
idate=date()
rs("foldersize")=foldersize
rs("begindate")=idate  
rs("enddate")=idate+365     
rs("trust_score")=10     
rs("flag")=1
rs("gradeid")=gradeid
 rs.update
id=rs("id")
if markct then
rs("markct")=markct
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
 </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>