📄 user_passchk.asp
字号:
<!--#include file=conn1.asp-->
<!--#include file=usercookies.asp-->
<!--#include file=md5.asp-->
<!--#include file="config.asp"-->
<!--#include file=mail.asp-->
<%
dim rs,sql
dim pass1,pass2,pass3,pass_1,pass_2,username,email,password
pass1=trim(request("pass1"))
pass2=trim(request("pass2"))
pass3=trim(request("pass3"))
if pass1="" or pass2="" or pass3="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('信息不完整,返回重新输入!!');" & "window.location='user_pass.asp'" & "</script>"
response.end
end if
if pass2<>pass3 then
response.write "<script language=JavaScript>" & chr(13) & "alert('两次密码输入不同,返回重新输入!!');" & "window.location='user_pass.asp'" & "</script>"
response.end
end if
pass_1=md5(pass1)
pass_2=md5(pass2)
username=request.cookies("cnmai")("username")
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-修改密码</title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0" leftmargin="0">
<!--#include file=top.asp-->
<div align="center">
<center>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="768" height="24">
<tr>
<td width="157" height="24" valign="top"><br>
<!--#include file=userleft.asp--></td>
<td width="10" height="24" background="images/line_01.gif"> </td>
<td width="603" height="24" valign="top" align="center">
<p align="left">
<%
set rs=server.createobject("adodb.recordset")
sql="select password,username,email from [user] where username='"&username&"'"
rs.open sql,conn,1,3
if rs("password")<>md5(pass1) then
response.write "<li>原密码错误!"
else
username=trim(rs("username"))
email=trim(rs("email"))
rs("password")=md5(pass2)
rs.update
response.write "<li>修改密码成功,同时我们已经将您的新密码发送到|<b>"&email&"</b>|,请保管好您的新密码!"
call mail()
Response.cookies("cnmai")=""
end if
rs.close
set rs=nothing
closedb
%>
</td>
<td width="8" height="24" background="images/line_01.gif"> </td>
</tr><!--#include file=end.htm-->
</table>
</center>
</div>
</body>
</html>
<%
sub mail()
dim mailbody,Jmail
mailbody="您好,"&username&"!<br>您已成功修改了密码!现在资料为:登陆帐号:[<b>"&username&"</b>] 你的新密码是:[<b>"&pass2&"</b>]<br> 欢迎登陆<a target=_blank href="&web&">"&title&""&web&"</a> 发布您的二手信息!<br>感谢您使用我们<a target=_blank href="&web&">"&title&"</a>为您提供的真诚服务!<br>["&title&"]打造西安最大、最专业的二手信息发布平台<br>服务热线:07555-83722157 QQ:113728857" '邮件内容
Set Jmail=server.createobject("Jmail.Message")
Jmail.Charset ="gb2312"
JMail.ContentType = "text/html"
Jmail.Silent =true
Jmail.Priority = 3
Jmail.MailServerUserName = mailname
Jmail.MailServerPassword = mailpass
Jmail.From = mailform
Jmail.FromName =""&title&""
Jmail.Subject ="密码修改成功!-"&title&""
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -