📄 save.asp
字号:
<!--#include file=conn.asp--><!--#include file="chkuser.asp" -->
<!--#include file=../include/config.asp-->
<!--#include file="char.inc"--><!--#include file="../include/md5.asp"-->
<%
IF request.cookies("KEY")="" THEN
response.redirect "index_face.asp"
response.end
END IF
dim sql
dim rs
dim fullname
dim passwd,passwd1
dim question
dim answer,answer1
dim username
dim email
dim sex
dim birthyear,birthmonth,birthday
dim content
dim tel
dim depid
dim depname
dim deptype
dim photo
username=trim(request("username"))
fullname=htmlencode(request.form("fullname"))
passwd=htmlencode(request.form("passwd"))
passwd1=md5(trim(request.form("passwd")))
question=htmlencode(request.form("question"))
answer=htmlencode(request.form("answer"))
answer1=md5(trim(request.form("answer")))
sex=htmlencode(request.form("sex"))
birthyear=request.form("birthyear")
birthmonth=request.form("birthmonth")
birthday=request.form("birthday")
email=htmlencode(request.form("email"))
depid=request.form("depid")
content=htmlencode(request.form("content"))
tel=htmlencode(request.form("tel"))
photo=request.form("photo")
set rs1=server.createobject("adodb.recordset")
sql1="select * from dep where id="&depid
rs1.open sql1,conn,1,3
depname=rs1("depname")
deptype=rs1("deptype")
rs1.close
set rs1=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&username&"'"
rs.open sql,conn,3,3
rs("content")=content
if passwd<>rs("passwd") then
rs("passwd")=passwd1
end if
rs("question")=question
if answer<>rs("answer") then
rs("answer")=answer1
end if
rs("fullname")=fullname
rs("email")=email
rs("sex")=sex
rs("birthyear")=birthyear
rs("birthmonth")=birthmonth
rs("birthday")=birthday
rs("depid")=depid
rs("depname")=depname
rs("deptype")=deptype
rs("tel")=tel
rs("photo")=photo
rs("logins")=rs("logins")+1
rs.update
response.write "<p align=center><font color=red>恭喜您!您的资料已经修改成功!<br>"&freetime&"秒钟后返回上页!</font>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=edit.asp"">"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -