?? com_passchk.asp
字號:
<!--#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,password,username,email
username=trim(request("username"))
if not isnumeric(username) or username="" then
response.write "<li>參數錯誤1!"
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 username='"&username&"'"
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "<li>參數錯誤2!"
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>修改密碼成功,并且給用戶發了一封郵件,以便及時通知用戶!"
call cl()
call mail()
%>
<%
sub mail()
dim mailbody,Jmail
mailbody="["&name&"],因系統問題管理員已為你成功修改了密碼!現在資料為:登陸帳號:["&username&"] 你的新密碼是:["&password&"] 如果更改密碼可以到 <a href="&web&">"&web&"</a> 謝謝你使用我們<a href="&web&">"&title&"的服務!" '郵件內容
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 ="密碼修改成功!!!『西安二手網』"
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -