?? saveuserinfo.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%dim action,username
action=request.QueryString("action")
username=request.Cookies("bookshop")("username")
select case action
'//收貨人信息
case "shouhuoxx"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [user] where username='"&username&"' ",conn,1,3
'rs("shouname")=trim(request("shouname"))
'rs("shengshi")=trim(request("shengshi"))
'rs("shouhuodizhi")=trim(request("shouhuodizhi"))
'rs("youbian")=cstr(request("youbian"))
'rs("usertel")=trim(request("usertel"))
'rs("songhuofangshi")=int(request("songhuofangshi"))
'rs("zhifufangshi")=int(request("zhifufangshi"))
'rs("shousex")=int(request("shousex"))
rs("reglx")=2 '設用戶為修改了資料
rs("dadyname")=trim(request("dadyname"))
rs("szSheng")=trim(request("szSheng"))
rs("szShi")=trim(request("szShi"))
rs("shouhuodizhi")=trim(request("shouhuodizhi"))
rs("youbian")=trim(request("youbian"))
rs("usertel")=trim(request("usertel"))
rs("MoMname")=trim(request("MoMname"))
rs("MoMNo")=trim(request("MoMNo"))
rs("yuchan")=trim(request("yuchan"))
rs("babysex")=trim(request("babysex"))
rs("songhuofangshi")=trim(request("songhuofangshi"))
rs("zhifufangshi")=trim(request("zhifufangshi"))
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('您的詳細資料信息保存成功!');</script>"
response.redirect "myuser.asp?action=shouhuoxx"
response.End
'//用戶資料
case "userziliao"
set rs=server.CreateObject("adodb.recordset")
rs.open "select useremail,userzhenshiname,quesion,answer from [user] where username='"&username&"'",conn,1,3
rs("useremail")=trim(request("useremail"))
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("quesion")=trim(request("quesion"))
if trim(request("answer"))<>""then
rs("answer")=md5(trim(request("answer")))
end if
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('您的個人資料修改成功!');history.go(-1);</script>"
case "savepass"
set rs=server.CreateObject("adodb.recordset")
rs.open "select userpassword from [user] where username='"&username&"'",conn,1,3
if md5(trim(request("userpassword")))<>trim(rs("userpassword")) then
response.Write "<script language=javascript>alert('對不起,您輸入的原密碼錯誤!');history.go(-1);</script>"
response.End
else
rs("userpassword")=md5(trim(request("userpassword1")))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('密碼更改成功!');history.go(-1);</script>"
response.End
end if
'//取回密碼
case "repass"
set rs=server.CreateObject("adodb.recordset")
rs.open "select userpassword from [user] where username='"&trim(request("username2"))&"'",conn,1,3
rs("userpassword")=md5(trim(request("userpassword2")))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('您的密碼取回成功,請登陸!');history.go(-1);</script>"
end select
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -