<%@ Language=VBScript %> <% On Error Resume Next Dim defaultUserID 'default for employee list Dim locADORecords 'locRecordset Dim objRegistration 'AldaT Registration Object Dim MailBody 'email content Dim objMail 'mail object Dim ErrorFlag 'Flag if string error occurs Dim ErrorNumber 'Err.number to error.asp Dim ErrorDescription 'Err.description to error.asp Dim ErrorSource 'Err.source to error.asp Dim ErrorPage 'Error source page Dim ErrorUser 'Error source user ErrorFlag = false If Session("CustomerID") <> "" Then Response.Redirect(Session("CurrentPage") & "?urlmessage=" & Server.URLEncode("You are already logged in")) End If If Request("find_status")="submit" then defaultUserID = Session("EmployeeID") Set objRegistration = Server.CreateObject("aldatRegistration.Customer") Set locADORecords = objRegistration.findCustomer(Application("Company"), Trim(LCase(Request("email")))) 'error check when obj is returned 'if EOF in .findEmployee then not account found create following email not error.asp If Err.number = 5001 then Err.Clear MailBody = Application("CompanyDisplay") & " Registration System:" & Chr(13) & Chr(13) &_ "Your request for log in information returned no existing accounts for " & Request("email") & "." & Chr(13) &_ "There may be an error in your request or a different email account may be registered." & Chr(13) & Chr(13) ErrorFlag = true End If If Err.number > 0 then 'create error for obj return ErrorNumber = Server.URLEncode("Error Number: " & Err.number) ErrorDescription = Server.URLEncode("Error Description: " & Err.description) ErrorSource = Server.URLEncode("Error Source: " & Err.source) ErrorPage = Server.URLEncode("Error Page: " & Request.ServerVariables("SCRIPT_NAME")) ErrorUser = Server.URLEncode("Error User: " & Session("EmployeeID")) Response.Redirect ("error.asp?errornum=" & ErrorNumber & "&errordes=" &_ ErrorDescription & "&errorsrc=" & ErrorSource &_ "&errorpg=" & ErrorPage & "&errorusr=" & ErrorUser) ErrorFlag = true End If If ErrorFlag = false Then If Not locADORecords.EOF then MailBody = locADORecords("firstname") & " " & locADORecords("lastname") & "," & Chr(13) & Chr(13) &_ "this email is in response to your request for your log in information on the " &_ Application("CompanyDisplay") & " website." & Chr(13) & Chr(13) &_ "User ID: " & locADORecords("customerid") & Chr(13) &_ "Password: " & locADORecords("pwd") & Chr(13) & Chr(13) locADORecords.MoveNext() End If If Not locADORecords.EOF then MailBody = MailBody & "--Additional Accounts using the same email address--" & Chr(13) & Chr(13) End If While Not locADORecords.EOF MailBody = MailBody & "User ID: " & locADORecords("customerid") & Chr(13) &_ "Password: " & locADORecords("pwd") & Chr(13) & Chr(13) locADORecords.MoveNext() Wend End If MailBody = MailBody & "If you need additional help, please reply to this email." locADORecords.Close() 'Create email Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.To = Request("email") objMail.From = Application("ContactFrom") objMail.subject = "Request for Log in Information " & Application("CompanyDisplay") objMail.body = MailBody objMail.send set objMail = nothing End If Dim PageType PageType = "customer" %> <%=Application("CompanyDisplay")%> Find Customer Find Customer Log In Information
<% If Request("find_status")<>"submit" then %>
Request log in information
--to be sent to the same email address
   
Email:
   
 
<% Else %>
 
Your request has been processed.

The results will be emailed to the account you provided.
 
<% End If %>
<% Set locADORecords = Nothing Set objRegistration = Nothing %>