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

📄 password.asp

📁 代码名称: Snitz Forums 2000 代码语言: 英文 代码类型: 国外代码 运行环境: ASP 授权方式: 免费代码 代码大小: 530kb 代码等级: 3 整
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	Err_Msg = ""

	if trim(Request.Form("Name")) = "" then
		Err_Msg = Err_Msg & "<li>You must enter your UserName</li>"
	end if

	if trim(Request.Form("Email")) = "" then
		Err_Msg = Err_Msg & "<li>You must enter your E-mail Address</li>"
	end if

	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_NAME, M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE M_NAME = '" & ChkString(Trim(Request.Form("Name")), "SQLString") &"'"
	strSql = strSql & " AND M_EMAIL = '" & ChkString(Trim(Request.Form("Email")), "SQLString") &"'"

	set rs = my_Conn.Execute (strSql)

	if rs.BOF and rs.EOF then
		Err_Msg = Err_Msg & "<li>Either the UserName or the E-mail Address you entered does not exist in the database.</li>"
	else
		PWMember_ID = rs("MEMBER_ID")
		PWMember_Name = rs("M_NAME")
		PWMember_Email = rs("M_EMAIL")
	end if
	
	rs.close
	set rs = nothing

	if Err_Msg = "" then
		pwkey = GetKey("none")

		'Update the user Member Level
		strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
		strSql = strSql & " SET M_PWKEY = '" & chkString(pwkey,"SQLString") & "'"
		strSql = strSql & " WHERE MEMBER_ID = " & PWMember_ID

		my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

		if lcase(strEmail) = "1" then
			'## E-mails Message to the Author of this Reply.  
			strRecipientsName = PWMember_Name
			strRecipients = PWMember_Email
			strFrom = strSender
			strFromName = strForumTitle
			strsubject = strForumTitle & " - Forgot Your Password? "
			strMessage = "Hello " & PWMember_Name & vbNewline & vbNewline
			strMessage = strMessage & "You received this message from " & strForumTitle & " because you have completed the First Step on the ""Forgot Your Password?"" page." & vbNewline & vbNewline
			strMessage = strMessage & "Please click on the link below to proceed to the next step." & vbNewline & vbNewLine
			strMessage = strMessage & strForumURL & "password.asp?pwkey=" & pwkey & vbNewline & vbNewline
			strMessage = strMessage & vbNewLine & "If you did not forget your password and received this e-mail in error, then you can just disregard/delete this e-mail, no further action is necessary." & vbNewLine & vbNewLine
%>
			<!--#INCLUDE FILE="inc_mail.asp" -->
<%
		end if
	else
		if Err_Msg <> "" then 
			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem With Your Details</font></p>" & vbNewLine & _
					"      <table align=""center"" border=""0"">" & vbNewLine & _
					"        <tr>" & vbNewLine & _
					"          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
					"        </tr>" & vbNewLine & _
					"      </table>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back To Enter Data</a></font></p>" & vbNewLine
			WriteFooter
			Response.End 
		end if
	end if
	Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Step One is Complete!</font></p>" & vbNewLine & _
			"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Please follow the instructions in the e-mail that has been sent to <b>" & ChkString(PWMember_Email,"email") & "</b> to complete the next step in this process.</font></p>" & vbNewLine
	Response.Write	"      <meta http-equiv=""Refresh"" content=""5; URL=default.asp"">" & vbNewLine
	Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</font></a></p>" & vbNewLine
end if 
WriteFooter
Response.End

sub ShowForm()
	Response.Write	"      <form action=""password.asp"" method=""Post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
			"      <input name=""mode"" type=""hidden"" value=""DoIt"">" & vbNewLine & _
			"      <table width=""100%"" border=""0"" align=""center"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td bgcolor=""" & strTableBorderColor & """>" & vbNewline & _
			"            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline & _
			"              <tr>" & vbNewline & _
			"                <td colspan=""2"" align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Forgot your Password?</font></b></td>" & vbNewline & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewline & _
			"                <td colspan=""2"" align=""left"" bgcolor=""" & strForumCellColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>This is a 3 step process:" & vbNewLine & _
			"                <ul>" & vbNewLine & _
			"                 <font color=""" & strHiLiteFontColor & """><li><b>First Step:</b><br />Enter your username and e-mail address in the form below to receive an e-mail containing a code to verify that you are who you say you are.</li></font>" & vbNewLine & _
			"                <li><b>Second Step:</b><br />Check your e-mail and then click on the link that is provided to return to this page.</li>" & vbNewLine & _
			"                <li><b>Third Step:</b><br />Choose your new password.</li>" & vbNewLine & _
			"                </ul></font></td>" & vbNewline & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td width=""50%"" align=""right"" bgcolor=""" & strForumCellColor & """ nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>&nbsp;UserName:&nbsp;</font></b></td>" & vbNewLine & _
			"                <td width=""50%"" bgcolor=""" & strForumCellColor & """><input type=""text"" name=""Name"" size=""25"" maxLength=""25""></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td width=""50%"" align=""right"" bgcolor=""" & strForumCellColor & """ nowrap><b><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>E-mail Address:&nbsp;</font></b></td>" & vbNewLine & _
			"                <td width=""50%"" bgcolor=""" & strForumCellColor & """><input type=""text"" name=""Email"" size=""25"" maxLength=""50""></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td colspan=""2"" bgcolor=""" & strForumCellColor & """ align=""center""><input type=""submit"" value=""Submit"" id=""Submit1"" name=""Submit1"">&nbsp;&nbsp;&nbsp;<input type=""reset"" value=""Reset"" id=""Submit1"" name=""Submit1""></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"      </form><br />" & vbNewLine
end sub

sub ShowForm2()
	Response.Write	"      <form action=""password.asp"" method=""Post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
			"      <input name=""mode"" type=""hidden"" value=""UpdateIt"">" & vbNewLine & _
			"      <input name=""MEMBER_ID"" type=""hidden"" value=""" & PWMember_ID & """>" & vbNewLine & _
			"      <input name=""pwkey"" type=""hidden"" value=""" & key & """>" & vbNewLine & _
			"      <table width=""100%"" border=""0"" align=""center"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td bgcolor=""" & strTableBorderColor & """>" & vbNewline & _
			"            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline & _
			"              <tr>" & vbNewline & _
			"                <td colspan=""2"" align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Forgot your Password?</font></b></td>" & vbNewline & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewline & _
			"                <td colspan=""2"" align=""left"" bgcolor=""" & strForumCellColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>This is a 3 step process:" & vbNewLine & _
			"                <ul>" & vbNewLine & _
			"                <li><b>First Step:</b><br />Enter your username and e-mail address in the form below to receive an e-mail containing a code to verify that you are who you say you are. <b>(COMPLETED)</b></li>" & vbNewLine & _
			"                <li><b>Second Step:</b><br />Check your e-mail and then click on the link that is provided to return to this page. <b>(COMPLETED)</b></li>" & vbNewLine & _
			"                <font color=""" & strHiLiteFontColor & """><li><b>Third Step:</b><br />Choose your new password.</li></font>" & vbNewLine & _
			"                </ul></font></td>" & vbNewline & _
			"              </tr>" & vbNewLine & _
       			"              <tr>" & vbNewLine & _
			"                <td width=""50%"" bgColor=""" & strForumCellColor & """ align=""right"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Password:&nbsp;</font></b></td>" & vbNewLine & _
			"                <td width=""50%"" bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Password"" type=""Password"" size=""25"" maxLength=""25"" value=""""></font></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
       			"              <tr>" & vbNewLine & _
			"                <td width=""50%"" bgColor=""" & strForumCellColor & """ align=""right"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Password Again:&nbsp;</font></b></td>" & vbNewLine & _
			"                <td width=""50%"" bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Password2"" type=""Password"" maxLength=""25"" size=""25"" value=""""></font></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td colspan=""2"" bgcolor=""" & strForumCellColor & """ align=""center""><input type=""submit"" value=""Submit"" id=""Submit1"" name=""Submit1"">&nbsp;&nbsp;&nbsp;<input type=""reset"" value=""Reset"" id=""Submit1"" name=""Submit1""></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"      </form><br />" & vbNewLine
end sub
%>

⌨️ 快捷键说明

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