%
dim action,username,founderr,errmsg
dim rsuser,sqluser
action=trim(request("action"))
username=trim(request("username"))
if username="" then
username=session("username")
end if
if username="" then
if action="" then
response.redirect "server.asp"
else
founderr=true
errmsg=errmsg & "
参数不足!
"
end if
end if
if founderr=true then
call writeerrmsg()
else
set rsuser=server.createobject("adodb.recordset")
sqluser="select * from [user] where username='" & username & "'"
rsuser.open sqluser,conn,1,3
if rsuser.bof and rsuser.eof then
founderr=true
errmsg=errmsg & "
找不到指定的用户!
"
call writeerrmsg()
else
if action="modify" then
dim sex,email,homepage,qq,msn
sex=trim(request("sex"))
email=trim(request("email"))
homepage=trim(request("homepage"))
comane=trim(request("comane"))
add=trim(request("add"))
somane=trim(request("somane"))
zip=trim(request("zip"))
phone=trim(request("phone"))
fox=trim(request("fox"))
if sex="" then
founderr=true
errmsg=errmsg & "
性别不能为空
"
else
sex=cint(sex)
if sex<>0 and sex<>1 then
sex=1
end if
end if
if email="" then
founderr=true
errmsg=errmsg & "
email不能为空
"
else
if isvalidemail(email)=false then
errmsg=errmsg & "
您的email有错误
"
founderr=true
end if
end if
if comane="" then
founderr=true
errmsg=errmsg & "
公司名称不能为空
"
end if
if add="" then
founderr=true
errmsg=errmsg & "
收货地址不能为空
"
end if
if somane="" then
founderr=true
errmsg=errmsg & "
收货人不能为空
"
end if
if phone="" then
founderr=true
errmsg=errmsg & "
联系电话不能为空
"
end if
if founderr<>true then
rsuser("sex")=sex
rsuser("email")=email
rsuser("homepage")=homepage
rsuser("comane")=comane
rsuser("add")=add
rsuser("somane")=somane
rsuser("zip")=zip
rsuser("phone")=phone
rsuser("fox")=fox
rsuser.update
response.write""
'call writesuccessmsg("会员资料修改成功!")
else
call writeerrmsg()
end if
else
%>
<%
id=session("username")
set rst = server.createobject("adodb.recordset")
sql="select * from user where username='"&id&"'"
rst.open sql,conn,1,1
%>
上海得远国际货运代理有限公司