<% if not Request.Cookies("lvlmods")("id") > 0 then 'they ain't welcomed, get them out of here Response.Redirect("login.asp") end if if Request.QueryString("submitted") = "yes" then 'make some sessions, incase of error session("login") = Trim(Request.Form("login")) session("pass") = Trim(Request.Form("pass")) session("passchk") = Trim(Request.Form("passchk")) session("name") = Trim(Request.Form("name")) session("email") = Trim(Request.Form("email")) session("active") = Trim(Request.Form("active")) dim error, error_msg if (session("name") = "") then error = true error_msg = error_msg & "
  • You can't have a blank name - try again" end if if (session("login") = "") then error = true error_msg = error_msg & "
  • You can't have a blank login - try again" end if if (session("email") = "") then error = true error_msg = error_msg & "
  • You can't have a blank email - try again" end if if not (instr(2,session("email"),"@") > 1) or not (instr(4,session("email"),".") > 3) then 'Response.Write("email check 1 = [" & (instr(2,session("email"),"@")) & "]
    ") 'Response.Write("email check 2 = [" & (instr(4,session("email"),".")) & "]
    ") error = true error_msg = error_msg & "
  • You can't have an invalid email - try again" end if if session("pass") <> session("passchk") then error = true error_msg = error_msg & "
  • The passwords you have entered didn't match - try again" end if if (session("pass") = "") then error = true error_msg = error_msg & "
  • You need to enter a password - try again" end if if (session("passchk") = "") then error = true error_msg = error_msg & "
  • You need to enter a check password - try again" end if '1st check to see if their name, login, pass, is already listed set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "select name, login, pass " & _ "from mods_login where " & _ "((name = '" & SQLSafe(session("name")) & "') or " & _ "(login = '" & SQLSafe(session("login")) & "') or " & _ "(pass = '" & SQLSafe(session("pass")) & "')) and " & _ "(id <> " & Request.Cookies("lvlmods")("id") & ")" 'Response.Write("Query = [" & query & "]
    ") set tigRS = tigCON.Execute(query) dim no_worries if (tigRS.EOF) then 'ok, all is good, they can be added no_worries = true 'Response.Write("ahhh!
    ") else 'Response.Write("brr
    ") 'must be a match, they have to chage some thing do while not tigRS.EOF if lcase(tigRS("name")) = lcase(session("name")) then 'Response.Write("error is name [" & tigRS("name") & "]
    ") error_msg = error_msg & "
  • The name you have chosen is already in use." error = true end if if lcase(tigRS("login")) = lcase(session("login")) then 'Response.Write("error is login [" & tigRS("login") & "]
    ") error_msg = error_msg & "
  • The login you have chosen is already in use." error = true end if if lcase(tigRS("pass")) = lcase(session("pass")) then 'Response.Write("error is pass [" & tigRS("pass") & "]
    ") error_msg = error_msg & "
  • The password you have chosen is already in use." error = true end if tigRS.MoveNext loop end if 'Response.Write("no worries?={" & no_worries & "}
    ") 'Response.Write("error?={" & error & "}
    ") if no_worries and not error then set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) 'Response.Write("start query
    ") query = "update mods_login set " & _ "login = '" & SQLsafe(session("login")) & "', " & _ "pass = '" & SQLsafe(session("pass")) & "', " & _ "name = '" & SQLsafe(session("name")) & "', " & _ "email = '" & SQLsafe(session("email")) & "' " & _ "where id =" & Request.Cookies("lvlmods")("id") tigCON.Execute(query) 'Response.Write("run query
    ") 'now send a mail off as someone has join and needs to be made active dim updated updated = true end if tigRS.close tigCON.close else 'they just got here, lets grab some details set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "select name, login, email " & _ "from mods_login where " & _ "(id = " & Request.Cookies("lvlmods")("id") & ") and " & _ "(active = 1)" 'Response.Write("Query = [" & query & "]
    ") set tigRS = tigCON.Execute(query) if (tigRS.EOF) then 'ok, all is good, they can be added error = true else session("name") = tigRS("name") session("login") = tigRS("login") session("email") = tigRS("email") end if end if %> [ login ] <% if error then Response.Write(error_msg) end if if updated then %> Your details have been updated sucessfully. <% else 'ok, there must have been a problem if Request.QueryString("signmeup") = "yes" then if error then Response.Write(error_msg) end if end if %>
    ?submitted=yes" method="post"> <% if not Request.QueryString("submitted") = "yes" then %> Just edit the details below and hit the Ready? button to change your details. <% end if %>

    Authors Name - (if it was a mod by IdSoftware it would be IdSoftware)
    ">

    Authors Email - (where people can get in touch with you)
    ">

    Login name - (you will use this to login into your account, no where else)
    ">

    Password - (so others can't just change your details)
    ">

    Password check - (so can you type it in the 2nd time?)

    <% 'end the sign_up = true end if %>
    <% 'end if %>