<%
Nofill=false
If Request("Send") <> "" Then
nofill=true
Dim Arr(25), AC(25), vfname, vlname, vjobtitle, vorg, vemail, vphone, i, sum, fnamerr, lnamerr, Sumerr, Emailerr
vFname = Request("txtfname")
vLname = Request("txtLname")
vJobtitle = Request("txtJobtitle")
vOrg = Request("txtOrg")
vEmail = Request("txtEmail")
vPhone = Request("txtPhone")
Arr(1)=Request("opc1")
Arr(2)=Request("opc2")
Arr(3)=Request("opc3")
Arr(4)=Request("opc4")
Arr(5)=Request("opc5")
Arr(6)=Request("opc6")
Arr(7)=Request("opc7")
Arr(8)=Request("opc8")
Arr(9)=Request("opc9")
Arr(10)=Request("opc10")
Arr(11)=Request("opc11")
Arr(12)=Request("opc12")
Arr(13)=Request("opc13")
Arr(14)=Request("opc14")
Arr(15)=Request("opc15")
Arr(16)=Request("opc16")
Arr(17)=Request("opc17")
Arr(18)=Request("opc18")
Arr(19)=Request("opc19")
Arr(20)=Request("opc20")
Arr(21)=Request("opc21")
Arr(22)=Request("opc22")
Arr(23)=Request("opc23")
Arr(24)=Request("opc24")
Arr(25)=Request("opc25")
AC( 1) = "01SP"
AC( 2) = "02SP"
AC( 3) = "03SP"
AC( 4) = "04SP"
AC( 5) = "06SP"
AC( 6) = "07SP"
AC( 7) = "08SP"
AC( 8) = "09SP"
AC( 9) = "10SP"
AC(10) = "11SP"
AC(11) = "12SP"
AC(12) = "13SP"
AC(13) = "14G"
AC(14) = "15G"
AC(15) = "16G"
AC(16) = "17G"
AC(17) = "18G"
AC(18) = "19EU"
AC(19) = "20EU"
AC(20) = "21EU"
AC(21) = "22EU"
AC(22) = "23EU"
AC(23) = "25EU"
AC(24) = "27EU"
AC(25) = "28EU"
Sum=0
For i=1 to 25
Sum=Sum+Arr(I)
Next
Fnamerr=false
Lnamerr=false
Sumerr=false
Emailerr=false
if vFname="" then
Fnamerr=true
end if
if vLname="" then
Lnamerr=true
end if
if vEmail="" then
Emailerr=true
end if
if Sum <> 8 then
Sumerr=true
end if
if (not Fnamerr and not Lnamerr and not Emailerr and not Sumerr) then
Dim MyBody
MyBody = "Please DO NOT REPLY. " & vbCrLf & vbCrLf & vbCrLf
MyBody = MyBody & "First name(s) : " & vFname & vbCrLf & vbCrLf
MyBody = MyBody & "Last Name(s) : " & vLname & vbCrLf & vbCrLf
MyBody = MyBody & "Job Title : " & vJobtitle & vbCrLf & vbCrLf
MyBody = MyBody & "Organization : " & vOrg & vbCrLf & vbCrLf
MyBody = MyBody & "Email address : " & vEmail & vbCrLf & vbCrLf
MyBody = MyBody & "Phone number : " & vPhone & vbCrLf & vbCrLf
MyBody = MyBody & "Classes : "
for i=1 to 25
if arr(i)>0 then
MyBody = MyBody & AC(i) & ", "
end if
next
MyBody = MyBody & vbCrLf & vbCrLf
Mybody = MyBody & "Comma delimited: " & vFname & ", " & vLname & ", " & vJobTitle & ", "
MyBody = MyBody & vOrg & ", " & vEmail & ", " & vPhone
for i=1 to 25
if arr(i)>0 then
MyBody = MyBody & ", " & AC(i)
end if
next
MyBody = MyBody & vbCrLf & vbCrLf
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.itretail.com"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "sales@itretail.com"
.To = "vyoungblood@itretail.com, mgoodwin@itretail.com"
.Subject = "Registration for: " & vLname & ", " & vFname
.TextBody = MyBody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
' MyCDONTSMail.Body= MyBody
strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
' MyCDONTSMail.Send
' set MyCDONTSMail=nothing
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
Send=""
else
strErr = "Some required fields were left empty. Please fill in the empty fields and click Send again."
Nofill = true
end if
End if
%>
<% If bsuccess then %>
Thank you for registering.
<%else%>
Registration
HOTEL:
Call
(858) 453 0400 to reserve rooms. Be sure to ask for the IT
Retail discounted rates.
CONFERENCE/TRAINING:
Fields
mark with * are required
<% end if %>
<%
Function IsChecked(vals)
IsChecked=""
if nofill then
if Arr(vals)>0 then
IsChecked="Checked"
end if
end if
End Function
Function FillField(txtval)
if nofill then
FillField=txtval
else
FillField=""
end if
End Function
Function IIf(condition,value1,value2)
If condition Then
IIf = value1
Else
IIf = value2
end if
End Function
' For example, using the state_keeper example above:
'If IsChecked("state_keeper") Then
' ' The checkbox was checked.
'End If
%>