%
stats="修改资料"
if membername="" then
errmsg=errmsg+" "+"
您没有登录。"
founderr=true
else
set rs=server.createobject("adodb.recordset")
if request("action")="update" then
if request("sex")="" then
errmsg=errmsg+" "+"
请选择您的性别。"
founderr=true
elseif request("sex")=0 or request("sex")=1 then
sex=request("sex")
else
errmsg=errmsg+" "+"
您输入的字符非法。"
founderr=true
end if
if request("showRe")="" then
errmsg=errmsg+" "+"
请选择有回帖时是否提示您。"
founderr=true
elseif request("showRe")=0 or request("showRe")=1 then
showRe=request("showRe")
else
errmsg=errmsg+" "+"
您输入的字符非法。"
founderr=true
end if
if request("psw")="" then
errmsg=errmsg+" "+"
请输入您的密码。"
founderr=true
else
password=request("psw")
end if
if request("myface")<>"" then
if request("width")="" or request("height")="" then
errmsg=errmsg+" "+"
请输入图片的宽度和高度。"
founderr=true
elseif not isInteger(request("width")) or not isInteger(request("height")) then
errmsg=errmsg+" "+"
您输入的字符不合法。"
founderr=true
elseif request("width")<20 or request("width")>80 then
errmsg=errmsg+" "+"
您输入的图片宽度不符合标准。"
founderr=true
elseif request("height")<20 or request("height")>80 then
errmsg=errmsg+" "+"
您输入的图片高度不符合标准。"
founderr=true
else
face=request("myface")
width=request("width")
height=request("height")
end if
else
if request("face")="" then
errmsg=errmsg+" "+"
您选择了错误的头像。"
founderr=true
end if
end if
if IsValidEmail(request("Email"))=false then
errmsg=errmsg+" "+"
您的Email有错误。"
founderr=true
else
Email=request("Email")
end if
if request("oicq")<>"" then
if not isnumeric(request("oicq")) or len(request("oicq"))>10 then
errmsg=errmsg+" "+"
Oicq号码只能是4-10位数字,您可以选择不输入。"
founderr=true
end if
end if
else
call nav()
call headline(1)
call userinfo()
end if
end if
if founderr then
call nav()
call headline(1)
call error()
else
if request("action")="update" then
if founderr then
call nav()
call headline(1)
call error()
else
call update()
call nav()
call headline(1)
if founderr then
call error()
else
call success()
end if
end if
end if
end if
call endline()
sub userinfo()
sql="Select * from [User] where username='"&trim(membername)&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
errmsg=errmsg+" "+"