%
'use this to clear the seesion
'session("attemps") = 0
dim error_msg, error, login_chk, email_chk, signupBody, email_sent, email_addy, unactive
if Request.QueryString("check") = "yes" then
'if session("attemps") = "" then
'only give them a few attemps to get things right
' session("attemps") = 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 sysadmin, email, login, password, active " & _
"from server_sysadmin 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("attemps") = session("attemps") + 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 sysadmin 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 sysadmin 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 sysadmin 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 sysadmin login details are as follows:" & vblf & vblf & _
"login: " & tigRS("login") & vblf & _
"pass: " & tigRS("password") & vblf & vblf & _
"All your details can be edited once you have logged in. " & vblf & vblf & _
"===== "& replace(site_url,"http://","") &"server ====="
if (Request.ServerVariables("LOCAL_ADDR") = local_ip) then
cdontstime SQLsafe(tigRS("email")), "lvl@ebom.org", "..::LvL sysadmin details for " & SQLsafe(tigRS("sysadmin")), signupBody
else
'emailtime is using Jmail on the
'planetquake server as cdonts was unrelyable :[
emailtime SQLsafe(tigRS("email")), "lvl@ebom.org", "..::LvL sysadmin details for " & SQLsafe(tigRS("sysadmin")), signupBody
end if
email_sent = true
email_addy = tigRS("email")
session("attemps") = 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. Feel free to send a gentle reminder to lvl@ebom.org asking to have your LvL sysadmin login activated NOW!! " & _
"
You will need to include the following;
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 %>email - | "> |
<% if Request.QueryString("check") = "yes" then %> <% else %> <% end if %> |