⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 passsave.asp

📁 网络商城系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
if request.form("ppass")="" then
response.write"<script language=javascript>alert('请您填写以前的密码');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("pass1")="" then
response.write"<script language=javascript>alert('请您填写您的新密码');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("pass2")="" then
response.write"<script language=javascript>alert('请您确认您的新密码');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if trim(request.form("pass1"))<>trim(request.form("pass2")) then
response.write"<script language=javascript>alert('您的新密码和确认密码不一致');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
ppass=trim(request.form("ppass"))
pass1=trim(request.form("pass1"))
pass2=trim(request.form("pass2"))
username=trim(request.form("user"))
set rs=server.createobject("adodb.recordset")
sql="select * from member where cname='"&username&"'"
rs.open sql,conn,3,3
if rs.eof then
response.write"<script language=javascript>alert('此用户已经被删除');this.location.href='javascript:history.go(-1)';</script>"
else
password=rs("password")
if password<>md5(ppass) then
response.write"<script language=javascript>alert('您的旧密码错误');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
rs("password")=md5(pass2)
rs.update
response.write"<script language=javascript>alert('用户密码修改成功');this.location.href='javascript:history.go(-1)';</script>"
end if
rs.close
set rs=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -