%@ language=vbscript%>
<%
AddDate = request("AddDate")
name = request("name")
surname = request("surname")
title = request("title")
med = request("med")
add1 = request("add1")
add2 = request("add2")
add3 = request("add3")
code = request("code")
country = request("country")
email = request("email")
telcode = request("telcode")
telnum = request("telnum")
faxcode = request("faxcode")
faxnum = request("faxnum")
mobile = request("mobile")
employer = request("employer")
priv = request("priv")
manage = request("manage")
state = request("state")
academic = request("academic")
job = request("job")
qual1 = request("qual1")
qual2 = request("qual2")
qual3 = request("qual3")
qual4 = request("qual4")
newsletter = request("newsletter")
electronic = request("electronic")
post = request("post")
sUserName = request("txtUserName")
sPassword1 = request("Password1")
sPassword2 = request("Password2")
sHint = request("Hint")
activate = request("activate")
security = lcase(request("security"))
if priv = "" then priv = "0"
if manage = "" then manage = "0"
if state = "" then state = "0"
if academic = "" then academic = "0"
if newsletter = "" then newletter = "0"
if electronic = "" then electronic = "0"
if post = "" then post = "0"
if activate = "" then activate = "0"
theYear = DatePart("yyyy", Now())
theMonth = DatePart("m", Now())
theDay = DatePart("d", Now())
theMonth = Right("00" & CStr(theMonth),2)
theDay = Right("00" & CStr(theDay),2)
strDateAdded = theYear & "/" & theMonth & "/" & theDay
Action = Request("action")
If Action = "send" then
If len(sUserName) < 5 Then
sUErr = "Username is too short"
Action = ""
End If
If len(sPassword1) < 5 then
sP1Err = "Password is too short"
Action = ""
End If
If sPassword1 <> sPassword2 Then
sP2Err = "Password does not match"
Action = ""
End If
If Len(email) < 5 Then
errorEmail="Please enter an E-Mail Address..."
Action = ""
Else
If Instr(email, " ") <> 0 Then
errorEmail="Please enter a valid E-Mail Address..."
Action = ""
Else
If InStr(email, "@") < 2 Then
errorEmail="Please enter a valid E-Mail Address..."
Action = ""
Else
If InStrRev(email, ".") < InStr(email, "@") + 2 Then
errorEmail="Please enter a valid E-Mail Address..."
Action = ""
End If
End If
End If
End If
If name ="" Then
errorName="Please enter your Name"
Action = ""
end if
If surname ="" Then
errorSurname="Please enter your Surname"
Action = ""
end if
If title ="" Then
errorTitle="Please enter your Title"
Action = ""
end if
If security <> "spf5amz" Then
errorSecurity="Please enter your Word Verification"
Action = ""
end if
IF Action = "send" then
set myRS = Server.CreateObject ("ADODB.Recordset")
SQL = "INSERT INTO Member(mem_DateAdded, mem_name, mem_surname, mem_title, mem_med, mem_add1, mem_add2, mem_add3, mem_code, mem_country, mem_email, mem_telcode, mem_telnum, mem_faxcode, mem_faxnum, mem_employer, mem_private, mem_manage, mem_state, mem_academic, mem_job, mem_qual1, mem_qual2, mem_qual3, mem_qual4, mem_newsletter, mem_electronic, mem_post, mem_activate, mem_mobile, mem_username, mem_password, mem_Hint, mem_active ) VALUES ('" & strDateAdded & "','" & name & "', '" & surname & "', '" & title & "', '" & med & "', '" & add1 & "', '" & add2 & "', '" & add3 & "', '" & code & "', '" & country & "', '" & email & "', '" & telcode & "', '" & telnum & "', '" & faxcode & "', '" & faxnum & "', '" & employer & "', '" & priv & "', '" & manage & "', '" & state & "', '" & academic & "', '" & job & "', '" & qual1 & "', '" & qual2 & "', '" & qual3 & "', '" & qual4 & "', '" & newsletter & "', '" & electronic & "', '" & post & "', '" & activate & "', '" & mobile & "', '" & sUserName & "', '" & sPassword1 & "', '" & sHint & "', '1')"
myRS.Open SQL, oConn
set myRS = nothing
Session("email") = email
thisbody = "Information recieved on " & now ()& "
"
thisbody = thisbody & "Title : " & title & "
"
thisbody = thisbody & "First Name : " & name & "
"
thisbody = thisbody & "Surname : " & surname & ",
"
thisbody = thisbody & "Email : " & email & ",
"
thisbody = thisbody & "Phone : (" & telcode & ")" & telnum & ",
"
thisbody = thisbody & "Mobile : (" & mobile & ")" & telnum & ",
"
thisbody = thisbody & "Username : " & sUserName & "
"
thisbody = thisbody & "Password : " & sPassword1 & "
"
thisbody = thisbody & "Password Hint: " & sHint & "
"
Set myCDONTS = Server.CreateObject("CDONTS.NewMail")
thisBody = "
" & thisBody & "
" thisBody = thisBody & "This user has applied for membership and awaits approval.
" 'myCDONTS.MailFormat = 0 myCDONTS.BodyFormat = 0 myCDONTS.From = "" thisBody = thisBody & "Thank you for applying for registration. Your details are as follows:
" thisbody = thisbody & "Title : " & title & "" & thisBody & "
" 'myCDONTS.MailFormat = 0 myCDONTS.BodyFormat = 0 myCDONTS.From = "![]() |
|||||
![]() |
|
||||