<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="../inc/msgbox.asp" -->
<html>
<head>
<meta http-equiv="expires" content="0">
</head>
<body>
<%
userID= session("user_id")
if userID="" then
msgbox "您还没有登陆，系统自动返回首页","../"
response.end
end if
username=trim(request.form("username"))
email=trim(request.form("email"))
homeurl=trim(request.form("homeurl"))
address=trim(request.form("address"))
tel=trim(request.form("tel"))
qq=trim(request.form("qq"))
zjtype=trim(request.form("zjtype"))
zjNumber=trim(request.form("zjNumber"))
face=trim(request.form("face"))
messages=trim(request.form("messages"))
if username="" then
msgbox "你怎么连名字都不输啊!","back"
 Response.End 
end if
if address="" then
msgbox "请填写您现在住的地址!","back"
 Response.End 
end if
if tel="" then
tel="None"
end if
if qq="" then
qq="0"
end if
if email="" or email="@" then
email="None"
end if
if homeurl="" then
homeurl="None"
end if
if messages="" then
messages="None"
end if
if zjNumber="" then
msgbox "请填写您的身份证号码!","back"
 Response.End 
end if
if trim(QQ)<>"" then
      if not(isnumeric(QQ)) then 
         msgbox "OICQ号码必须是数字!","back"
         Response.End 
      end if
end if
'第45行
if trim(zjNumber)<>"" then
      if not(isnumeric(zjNumber)) then 
         msgbox "证件号码必须是数字!","back"
         Response.End 
      end if
end if
if trim(Email)<>"None" then
    if instr(Email,"@")<=1 then 
        msgbox "对不起,你的E-mail地址有错误，因此不能发表留言，请核对后再试。","back"
        Response.End 
    else
        aEmail=right(Email,len(Email)-instr(Email,"@"))
        bEmail=right(Email,len(Email)-instr(Email,"."))
        if len(aEmail)<=1 then
            msgbox "对不起,你的E-Email地址有错误，因此不能发表留言，请核对后再试。","back"
            fanhui
            Response.End 
        end if
        if instr(aEmail,".")=0 then
            msgbox "对不起,你的E-Email地址有错误，因此不能发表留言，请核对后再试。","back"
           fanhui
            Response.End
        end if
        if len(bEmail)<=1 then
            msgbox "对不起,你的E-Email地址有错误，因此不能发表留言，请核对后再试。","back"
           fanhui
            Response.End 
        end if
    end if
end if
set rs=server.createobject("adodb.recordset")
exec="select * from user where userID<>'"&userID&"' and username='"&username&"'"
rs.open exec,conn,1,1
if rs.recordcount<>0 then
msgbox "“"&username&"”这个昵称已经存在\n\n请更换昵称！","back"
response.end
end if
rs.close
exec="select * from user where userID='"&userID&"'"
rs.open exec,conn,1,3
rs("username")=username
rs("face")=face
rs("email")=email
rs("homeurl")=homeurl
rs("address")=address
rs("tel")=tel
rs("QQ")=qq
rs("zjtype")=zjtype
rs("ZJNumber")=ZJNumber
rs("messages")=messages
rs.update
rs.close
set rs=nothing
msgbox "信息修改成功！\n\n感谢您对本站的支持","close"
%>
</body>
</html>