<% if not Request.Cookies("lvlbeta")("mapperid") > 0 then 'they ain't welcomed, get them out of here Response.Redirect("login.asp") else 'they must have logged in fine let them have the world 'they have hit *update* so.. update them if Request.QueryString("updateme") = "yes" then if Request.Form("submit") = "Cancel" then Response.Redirect("login.asp") end if 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("homepage") = Trim(Request.Form("homepage")) session("email") = Trim(Request.Form("email")) 'session("active") = Cint(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" end if if (session("login") = "") then error = true error_msg = error_msg & "
  • You can't have a blank login" end if if (session("email") = "") then error = true error_msg = error_msg & "
  • You can't have a blank email" end if if not (instr(2,session("email"),"@") > 1) or not (instr(4,session("email"),".") > 3) then error = true error_msg = error_msg & "
  • You can't have an invalid email" end if if (session("pass") = "") then error = true error_msg = error_msg & "
  • You need to enter a password" end if if (session("passchk") = "") then error = true error_msg = error_msg & "
  • You need to enter a check password" end if if not (session("passchk")) = (session("pass")) then error = true error_msg = error_msg & "
  • The password and password check did not match" 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 " query = query & "from beta_mappers where " query = query & "((name = '" & SQLSafe(session("name")) & "') or " query = query & "(login = '" & SQLSafe(session("login")) & "') or " query = query & "(pass = '" & SQLSafe(session("pass")) & "')) and " query = query & "(id <> " & Request.Cookies("lvlbeta")("mapperid") & ")" '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 else 'must be a match, they have to chage some thing do while not tigRS.EOF if tigRS("name") = 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 tigRS("login") = 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 tigRS("pass") = 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 if no_worries and not error then 'Response.Write("im here") set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "update beta_mappers set " query = query & "login = '" & SQLsafe(session("login")) & "', " query = query & "email = '" & SQLsafe(session("email")) & "', " query = query & "name = '" & SQLsafe(session("name")) & "', " query = query & "homepage = '" & SQLsafe(session("homepage")) & "', " query = query & "pass = '" & SQLsafe(session("pass")) & "' " query = query & "where id =" & Request.Cookies("lvlbeta")("mapperid") 'Response.Write("query=[" & query & "]
    ") tigCON.Execute(query) dim all_done all_done = true end if tigRS.close tigCON.close else 'they just got here, so grab some details from the database set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "select all * " query = query & "from beta_mappers where " query = query & "(id = " & Request.Cookies("lvlbeta")("mapperid") & ")" 'Response.Write("Query = [" & query & "]
    ") set tigRS = tigCON.Execute(query) dim no_info if (tigRS.EOF) then 'ok, this means they ain't got a cookie, or there is no info no_info = true else session("login") = tigRS("login") session("pass") = tigRS("pass") session("name") = tigRS("name") session("homepage") = tigRS("homepage") session("email") = tigRS("email") end if tigRS.close tigCON.close end if %> admin <% if all_done then %> The account details for <%=session("name")%> have been updated successfully
  • add a new beta level
  • edit details of a beta level
  • edit mappers details
  • <% else 'Response.Write("ReQu id =[" & Request.Cookies("lvlbeta")("mapperid") & "]
    ") if Request.QueryString("updateme") = "yes" then set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "select all * from beta_mappers where id = " & Request.Cookies("lvlbeta")("mapperid") & _ " and active = 1" 'Response.Write("Query = [" & query & "]
    ") set tigRS = tigCON.Execute(query) if (tigRS.EOF) then %> The mapper's account you have requested has not been activated, does not exist, or some thing has gone wrong - email tigger@ebom.org if there is a real problem. <% else 'create some session vars for this level session("login") = tigRS("login") session("name") = tigRS("name") session("email") = tigRS("email") session("homepage") = tigRS("homepage") end if tigRS.close tigCON.close end if if error then Response.Write(error_msg) end if %>
    ?updateme=yes" method="post">

    Author's Name - (thats your name or nick, it will appear everywhere)
    ">

    Author's Email - (kind of important this is, so get it right, OK)
    ">

    You got a homepage? - (want to let others know more about you?)
    <% if session("homepage") = "" then %> <% else %> "> <% end if %>

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

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

    Password check- (how about we check that password)

    <% 'end the all_one end if %>
    <% end if %>