<% 'use this to clear the seesion 'session("attempts") = 0 dim error_msg, error, login_chk, email_chk, email_sent, unactive dim signupBody, email_addy if Request.QueryString("check") = "yes" then if session("attempts") = "" then 'only give them a few attemps to get things right session("attempts") = 0 end if if Request.Form("login") <> "" then login_chk = true end if if Request.Form("email") <> "" then email_chk = true end if 'we only want to to check the database for 'a mapper when the form request contains data :] if (email_chk) or (login_chk) then set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) 'build the query query = "select user_name as name, email, login, pass, active, unlock_key " & _ "from forum_user where " if Request.Form("login") <> "" then query = query & "(login = '" & SQLSafe(Trim(Request.Form("login"))) & "')" end if if Request.Form("email") <> "" then if Request.Form("login") <> "" then query = query & " and " end if query = query & "(email = '" & SQLSafe(Trim(Request.Form("email"))) & "') " end if 'Response.Write("Query = [" & query & "]
") set tigRS = tigCON.Execute(query) if (tigRS.EOF) then session("attempts") = session("attempts") + 1 if (Request.Form("login") <> "") and (Request.Form("email") <> "") then error_msg = "Looks like the Login and email address combination you entered " & Request.Form("login") & " and " & Request.Form("email") & " doesn't exist in the ..::LvL Forum database. We suggest you only check for one item." error = true elseif Request.Form("login") <> "" then error_msg = "Looks like the Login you entered " & Request.Form("login") & " doesn't exist in the ..::LvL Forum database, want to try again?" error = true elseif Request.Form("email") <> "" then error_msg = "Looks like the email address you entered " & Request.Form("email") & " doesn't exist in the ..::LvL Forum database, want to try again?" error = true end if else 'they must have got it right :], but we need to check to see if their 'account is active or not 'Response.Write("active?=[" & tigRS("active") & "]
") if tigRS("active") then 'this is where we would send the email off to them 'Response.Write("send email with password
") signupBody = "Your ..::LvL Forum login details are as follows:" & vblf & vblf & _ "login: " & tigRS("login") & vblf & _ "pass: " & tigRS("pass") & vblf & vblf & _ "All your details can be edited once you have logged in. " & vblf & vblf & _ "===== " & replace(site_url,"http://","") & "forum =====" if (Request.ServerVariables("LOCAL_ADDR") = local_ip) then cdontstime SQLsafe(tigRS("email")), "lvl@ebom.org", "..::LvL Forum account details for " & SQLsafe(tigRS("name")), signupBody else 'emailtime is using Jmail on the 'planetquake server as cdonts was unrelyable :[ emailtime SQLsafe(tigRS("email")), "lvl@ebom.org", "..::LvL Forum account details for " & SQLsafe(tigRS("name")), signupBody end if email_sent = true email_addy = tigRS("email") session("attempts") = 0 else 'there account is correct, but it aint active yet :[ 'Response.Write("not active?=[" & tigRS("active") & "]
") error_msg = "Looks like your login has not yet been activated. You can unlock your account right now by visiting this URL" & _ "

If you still have problems logging in make sure you have cookies enable on your browser (and you except them). And then if you still have problems it might be time to email Tigger-oN" error = true unactive = true end if end if 'end the login_chk and email_chk statement tigRS.close tigCON.Close end if end if %> So you have forgotten your password...
<% if email_sent then %>

An email is now on its way to your email account (<%=email_addy%>) with your login and password details.

<% else if error then Response.Write("

" & error_msg) else %>

In order to get your password sent out, you need to enter your login name or your email address. <% end if %> <% if not unactive then %> ?check=yes" method="post">
login - ">
email - ">
<% if Request.QueryString("check") = "yes" then %> <% else %> <% end if %>
<% end if 'close the email_sent statement end if %>