?? user_editpasschk.asp
字號(hào):
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=../config.asp-->
<!--#include file=../mail.asp-->
<!--#include file=../md5.asp-->
<link rel="stylesheet" type="text/css" href="../1.CSS">
<%
dim rs,sql,id,password,username,email
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>參數(shù)錯(cuò)誤!"
response.end
end if
password=trim(request("password"))
if password="" or len(password)<3 or len(password)>15 then
response.write "<li>密碼必須在3-15位之間!"
call cl()
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select username,password,email from [user] where id="&id
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "<li>參數(shù)錯(cuò)誤!"
call cl()
response.end
end if
username=trim(rs("username"))
email=trim(rs("email"))
rs("password")=md5(password)
rs.update
rs.close
set rs=nothing
closedb
response.write "<li>修改密碼成功,并且給用戶發(fā)了一封郵件,以便及時(shí)通知用戶!"
call cl()
call mail()
%>
<%
sub mail()
dim mailbody,Jmail
mailbody="您好,"&username&"!<br>管理員已為你成功修改了密碼!現(xiàn)在資料為:登陸帳號(hào):[<b>"&username&"</b>] 你的新密碼是:[<b>"&password&"</b>]<br> 如果您要發(fā)布您的相關(guān)信息可以到 <a href="&web&">"&web&"</a> 進(jìn)行發(fā)布!我們的失誤,給您帶來的不便,請(qǐng)見諒!<br>謝謝您使用我們<a href="&web&">"&title&"</a>為您提供的真誠(chéng)服務(wù)!<br>["&title&"]打造西安最專業(yè)的二手信息發(fā)布平臺(tái)<br>服務(wù)熱線:029-83732767 QQ:113728857" '郵件內(nèi)容
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
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -