?? serachpass.asp
字號:
<!--#include file="conn.asp"-->
<%
dim sql
dim nichen
dim email
dim subject
dim yourpassword
dim yourname
nichen=trim(request("usernichen"))
If nichen="" Then
response.write "<script language='javascript'>" & chr(13)
response.write "alert('先把名字輸入呀!');" & Chr(13)
response.write "window.document.location.href='modify.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.end
'發郵件給用戶,先需要索檢用戶的名稱和MAIL,然后將密碼發送給用戶
End If
sql="select * from myclass where nichen='"+Request.form("usernichen")+"'"
rs.open sql,conn,1,1
nichen=rs("nichen")
email=trim(rs("email"))
yourname=trim(rs("name"))
subject="接收你的密碼"
yourpassword=trim(rs("password"))
rs.close
set rs=nothing
conn.close
set conn=nothing
'建立一個CDONTS.NewMail對象
Set objMail=Server.CreateObject("CDONTS.NewMail")
'設置寄件人
objMail.From="intereye@etang.com"
'設置收件人
objMail.To=email
'設置郵件主題
objMail.Subject=Subject
'設置郵件內容
objMail.Body="你好,"&yourname&"!你的密碼是:"&yourpassword&"要記牢啊!下次可不能忘了!"
'將郵件格式設成HTML,若這兩行省略,則使用默認的TXT格式。
'objMail.BodyFormat = 0
'objMail.MailFormat = 0
'寄出郵件
objMail.Send
response.write "<script language='javascript'>" & chr(13)
response.write "alert('密碼已經寄到你的注冊郵箱里了!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.end
%>
<head><title>找回密碼</title></head>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -