%@ LANGUAGE = "VBScript"%>
<% Option Explicit %>
<%
Sub EmailPassword(CName,Email,Password)
Dim myMail, mMessage
mMessage = CName & "," & vbCrLf & vbCrLf
mMessage = mMessage & "Your password is: " & Password & vbCrLf & vbCrLf
mMessage = mMessage & "Thank You" & vbCrLf & "TransTech Systems" & vbCrLf
' send the email .Send FROM, TO, SUBJECT, TEXT
Call SendEmail("Website@ttsys.com", Email, "Customer Password Help", mMessage, False)
End Sub
Dim RSC, TempRec, ErrorMsg
set RSC = Server.CreateObject("ADODB.Connection")
RSC.Open "TransTech","ttsys","jeffy012016"
set TempRec = Server.CreateObject("ADODB.Recordset")
If Request("phelp") <> "" Then
If Trim(Request("account"))="" Then
ErrorMsg="Please enter your account number."
Else
' search database for user
TempRec.Open "select ID,Contact,ContactEmail,Status,Password from Dealers where AccountNo='" & PrepSQLContent(Request("account")) & _
"'", RSC, adOpenStatic, adLockReadOnly, adCmdText
If Not TempRec.EOF Then
Select Case TempRec("Status")
Case 0
TempRec.Close
ErrorMsg="Your account has not been approved yet."
Case 2
TempRec.Close
ErrorMsg="Your account is currently inactive."
Case Else
If Trim(TempRec("ContactEmail")) <> "" Then
Call EmailPassword(TempRec("Contact"),TempRec("ContactEmail"),TempRec("Password"))
Response.Redirect "dealer_phelp_done.asp"
Else
ErrorMsg="An email address is not associated with your account."
End If
End Select
Else
TempRec.Close
ErrorMsg="Account not found."
End If
End If
End If
%>
If you have a web enabled account with us and would
like to shop online but you've forgotten your password, enter your
account number in the adjacent form and we'll email your
password to you.