<% if Request.QueryString("updateme") = "yes" then session("login") = Trim(Request.Form("login")) session("password") = Trim(Request.Form("password")) session("sysadmin") = Trim(Request.Form("sysadmin")) session("email") = Trim(Request.Form("email")) session("active") = Cint(Trim(Request.Form("active"))) dim error, error_msg if (session("sysadmin") = "") then error = true error_msg = error_msg & "
  • You can't have a blank sysadmin 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 a invalid email" end if if (session("password") = "") then error = true error_msg = error_msg & "
  • You need to enter a password" 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 sysadmin, login, password " & _ "from server_sysadmin where " & _ "((sysadmin = '" & SQLSafe(session("sysadmin")) & "') or " & _ "(login = '" & SQLSafe(session("login")) & "') or " & _ "(password = '" & SQLSafe(session("password")) & "')) and " & _ "(id <> " & Request.QueryString("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 else 'must be a match, they have to chage some thing do while not tigRS.EOF if tigRS("sysadmin") = session("sysadmin") then 'Response.Write("error is name [" & tigRS("name") & "]
    ") error_msg = error_msg & "
  • The sysadmin 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("password") = session("password") 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 dim Subject, Body 'Response.Write("im here") set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "update server_sysadmin set " & _ "login = '" & SQLsafe(session("login")) & "', " & _ "email = '" & SQLsafe(session("email")) & "', " & _ "sysadmin = '" & SQLsafe(session("sysadmin")) & "', " & _ "password = '" & SQLsafe(session("password")) & "', " & _ "active = " & session("active") & " " & _ "where id =" & Request.QueryString("id") 'Response.Write("query=[" & query & "]
    ") tigCON.Execute(query) 'now send a mail off as someone has joined and needs to be made active Subject = session("sysadmin") & "'s details have changed on ..::LvL" Body = "Your details for "& site_url &"server/ " & _ "have changed or your account has been activated, plz confirm that the changes are correct. " & _ "If you have NOT requested any changes to be made to your account, " & _ "email Tigger-oN (tigger@ebom.org) asap, thanx" & vblf & vblf & _ "your login info;" & vblf & _ "login: " & session("login") & vblf & _ "sysadmin: " & session("sysadmin") & vblf 'emailtime function is in processpage.asp, its what sends the email :] if (Request.ServerVariables("LOCAL_ADDR") = local_ip) then cdontstime session("email"), "lvl@ebom.org", Subject, body else emailtime session("email"), "lvl@ebom.org", Subject, body '(byval sendto, byval from, byval subject, byval body) end if dim all_done all_done = true end if tigRS.close tigCON.close end if %> admin <% if all_done then %> Details for <%=session("sysadmin")%> at <%=session("email")%> has been updated, an email has also beeen sent to the mapper stating that their account has been modified. <% else 'anything could happen 'Response.Write("ReQu id =[" & Request.Cookies("lvlbeta")("mapperid") & "]
    ") set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) query = "select all * from server_sysadmin where id = " & Request.QueryString("id") 'Response.Write("Query = [" & query & "]
    ") set tigRS = tigCON.Execute(query) if (tigRS.EOF) then %> The sysadmin 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") = server.HTMLEncode(tigRS("login")) session("sysadmin") = server.HTMLEncode(tigRS("sysadmin")) session("email") = server.HTMLEncode(tigRS("email")) session("active") = server.HTMLEncode(tigRS("active")) session("password") = server.HTMLEncode(tigRS("password")) end if tigRS.close tigCON.close %>
    ?updateme=yes&id=<%=Request.QueryString("id")%>" method="post">

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

    Sysadmin's Email - (kind of important this is, plz get it right)
    ">

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

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

    make their account active/inactive - (ohh... the power!)
    >active - >disabled

    <% end if %>