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

📄 forgotpass.asp

📁 一个虚拟主机代理系统
💻 ASP
字号:
<%'=========================================
'ScriptMate User Manager Version 2.1
'Copyright 2001 (C) ScriptMate.Com
'User Module
'This module sends the forgotten password to a member to his email
'For any help with modification to
'this file contact support@scriptmate.com
'=========================================%>

<script language="JAVASCRIPT">

	var errfound = false;

		function ValidLength(item, len) {
		   return (item.length >= len);
		}

		function error(elem, text) {
		   if (errfound) return;
		   window.alert(text);
		   elem.select();
		   elem.focus();
		   elem.style.backgroundColor=errorcolor;
		   errfound = true;
		}
		function Validate() {
		   errfound = false;
		   d=document.forgotpass
		   if (!ValidLength(d.members_username.value,1))error(d.members_username,"Username should not be blank.");
		   return !errfound;
		}

</script>

<%Sub Forgotpass()
	
	dim todo,action,members_username,records,members_id,members_firstname,members_email,messagebody,subject,result,smumerrormsg

	if not Application("smumdebugmode") then on error resume next
	
	action= request("action")
	
	todo = request("todo")

	if todo = "" then
	
		smumFormAction "<form action="""&Request.ServerVariables("url")&"?action=forgotpass"" method=post name=forgotpass language=""JAVASCRIPT"" onsubmit=""return Validate();"">"
		smumFormHiddenField "todo","forgotpass"
		smumFormOpenTable
		smumFormHeader "Forgot Password"
		smumFormResponseCol "Please enter your User Name and we will send your Password to your Email Id."
		smumFormFields "Username","<input class=fieldbox type=text size=35 maxlength=50 name=members_username>"
		smumFormButtons "<input class=fieldbox type=submit value=""Submit"" id=submit2 name=submit2>"
		smumFormCloseTable
		smumFormClose		

	elseif todo = "forgotpass" then

		members_username = smFixer(request("members_username"))
		
		smumquery = "select members_id,members_firstname,members_email from smum_memberstbl where members_username = '"& members_username &"'"
		smumOpenrs smumquery,"smumrs",action
			
			if smumrs.eof then
				records = false
			else
				records = true
				members_id = smumrs("members_id")
				members_firstname = smumrs("members_firstname")
				members_email = smumrs("members_email")
			end if

		smumClosers(smumrs)
			
		if not records then
				
			smJSalert("Invalid User Name. Please try again or if you are a New User Please Register now !")

		else

			messagebody = convertmes(Application("smummesforgotpassmailcontent"), members_id )
			subject = Application("smumforgotpassmailsubject")
			result = sendmail(Application("smumadminemail"), members_email, Application("smumadminname"), members_firstname, Application("smummailserver"), subject, messagebody, Application("smummailcomponent"))

			if  result = "sent" then

				smumFormOpenTable
				smumFormHeader "Forgot Password"
				smumFormResponse Application("smummesforgotpasssuccess")
				smumFormCloseTable

			else

				smumFormOpenTable
				smumFormHeader "Forgot Password"
				smumFormResponse Application("smummesforgotpasserror")
				smumFormCloseTable
		
			end if

		end if
				
	end if

End Sub%>
<html></html>

⌨️ 快捷键说明

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