<% 'checks for submission' if Request.Form("submitbutton") = "" Then if Request.QueryString("error") <> "" Then Response.Write Request.QueryString("error") end if %>

















First Name: ">
Last Name: ">
Address 1: ">
Address 2: ">
City: ">
State:
Zip: ">
Phone: ">
Email: ">
Child's Grade: ">
Name as you would like it to appear in all Patron recognition:
">

I am attending and would like to purchase " size="2"> tickets at $150 each.
     Please Indicate your Entree Choices
     (Fill in number of entrees to correspond with number of tickets):
     Wolfgang Puck Cuisine: Beef " size="2"> Chicken " size="2"> Vegeterian " size="2">
I am unable to attend, but have made a Patron donation.
I would like to purchase " size="2"> pre-paid cocktail tickets at $6 each.
I would like to use Express Pay for quick auction check-out on the night of the Ball. (Please call Carol Demirjian at 818-505-5306 to setup your Express Pay Option.)

Tables of 10 - Seating Preferences.
Please enter the names of guests you would like to be seated with or the names of your guests and their entree chioices.
Payment Information:
Credit Card Type:
Credit Card Number:
Exp. Date: /

Please review your information carefully before submitting.

<% else Session("level") = request("level") Session("FirstName") = request("FirstName") Session("LastName") = request("LastName") Session("Address1") = request("Address1") Session("Address2") = request("Address2") Session("City") = request("City") Session("State") = request("State") Session("Zip") = request("Zip") Session("Phone") = request("Phone") Session("Email") = request("Email") Session("grade") = request("grade") Session("tickets") = request("tickets") Session("tix") = request("tix") Session("beef") = request("beef") Session("chicken") = request("chicken") Session("vegetarian") = request("vegetarian") Session("attend") = request("attend") Session("unable") = request("unable") Session("drinktickets") = request("drinktickets") Session("drinktix") = request("drinktix") Session("expresspay") = request("expresspay") Session("seating") = request("seating") Session("CC") = Request.Form("cc") Session("cctype") = Request.Form("cctype") Session("expmonth") = Request.Form("expmonth") Session("patronname") = Request.Form("patronname") Session("expyear") = Request.Form("expyear") Session("expdate") = Request.Form("expmonth") & Request.Form("expyear") if Session("firstname")="" or Session("lastname")="" or Session("address1")="" or Session("Email")="" then response.redirect("patronerror.asp") end if 'For Each x in Request.Form ' If x <> "address2" or x <> "tickets" or x <> "beef" or x <> "chicken" or x <> "vegeterian" or x <> "attendance" or x <> "drinktickets" or x <> "drinktix" or x <> "expresspay" then ' If Request.Form(x) = "" Then ' Session.Contents("errormessage") = "" & UCase(x) & " is required." ' %> <% 'Response.End 'end if 'end if 'Next Function ConvertCardNum(CardNum) Set r = new RegExp r.Global = True r.IgnoreCase = True r.Pattern = "([0-9*])" cc = "" cc = r.Replace(Mid(CardNum,1,len(CardNum)-4),"*") & Mid(CardNum,len(CardNum)-3,4) ConvertCardNum = cc End Function If Session("drinktix") <> "" then If Session("drinktix") > 0 then Session("Cost") = (6 * (Session("drinktix"))) end if end if If Session("tix") <> "" then If Session("tix") > 0 then Session("Cost") = (150 * (Session("tix"))) + (6 * (Session("drinktix"))) end if end if response.write("The following information was received") response.write "
" response.write(Session("FirstName")) response.write "
" response.write(Session("LastName")) response.write "
" response.write(Session("Address1")) response.write "
" response.write(Session("Address2")) response.write "
" response.write(Session("City")) response.write "
" response.write(Session("State")) response.write "
" response.write(Session("Zip")) response.write "
" response.write(Session("Phone")) response.write "
" response.write(Session("Email")) response.write "
" response.write("Your childs grade"&Session("grade")) response.write "
" response.write("You are attending the ball:"&Session("attend")) response.write "
" response.write("You purchased "&Session("tix")&" tickets") response.write "
" response.write("You are unable to attend the ball but have made a patron donation:"&Session("unable")) response.write "
" response.write("You requested " &Session("beef")&" beef entrees") response.write "
" response.write("You requested "&Session("chicken")&" chicken entrees") response.write "
" response.write("You requested "&Session("vegeterian")&" vegeterian entrees") response.write "
" response.write("You purchased "&Session("drinktickets")&" drink tickets") response.write "
" response.write("Additional Information : " &Session("seating")) response.write "
" response.write("Credit Card charged " &Session("CC")) response.write "
" response.write("Your total amount charged is "&Session("Cost")) 'if Session("copies") <= 0 then ' Session("copies") = 1 'end if 'Session("Cost") = (10 * Session("copies")) + (2 * Session.Contents("copies")) IF Session("CC") = "5490993420233779" THEN Session("Cost") = 0.01 End If Select Case Session("ccType") Case "Mastercard" Net = Session("Cost") * .98 Case "Visa" Net = Session("Cost") * .98 Case "Amex" Net = Session("Cost") * .9675 Case "Discover" Net = Session("Cost") * .9775 End Select IF ErrorMessage = "" THEN ' create the PNCOMClient component Set client = Server.CreateObject("PFProCOMControl.PFProCOMControl.1") 'build the parameter list, such that we have a sale transaction and 'a credit card tender. parmList = "TRXTYPE=S&TENDER=C&ZIP=" & Session("ZIP") & "&COMMENT1=Ball 2007&COMMENT2=" & sql_esc(Session("firstname")) & " " & sql_esc(Session.Contents("lastname")) 'set the account form the html form parmList = parmList & "&ACCT=" & Session("CC") 'set the password from the html form parmList = parmList & "&PWD=chonline00" 'set the user from the HTML form parmList = parmList & "&USER=campbellhall" 'set the vendor from the HTML form parmList = parmList & "&VENDOR=campbellhall" 'set the partner from the HTML form parmList = parmList & "&PARTNER=VeriSign" 'set the expiration date form the HTML form parmList = parmList & "&EXPDATE=" & Session("Expdate") 'set the amount from the HTML form parmList = parmList & "&AMT=" & Session("Cost") Ctx1 = client.CreateContext("payflow.verisign.com", 443, 30, "", 0, "", "") curString = client.SubmitTransaction(Ctx1, parmList, Len(parmList)) client.DestroyContext (Ctx1) ' handle the response done = 0 Dim PNREF, RESPMSG, AUTHCODE, AVSADDR, AVSZIP, CVV2MATCH 'loop until we're done processing the entire string Do while Len(curString) <> 0 'get the next name value pair if InStr(curString,"&") Then varString = Left(curString, InStr(curString , "&" ) -1) else varString = curString end if 'Response.Write "
" 'get the name part of the name/value pair name = Left(varString, InStr(varString, "=" ) -1) 'get the value out of the name/value pair value = Right(varString, Len(varString) - (Len(name)+1)) Select Case name Case "PNREF" PNREF = value Case "RESPMSG" RESPMSG = value Case "AUTHCODE" AUTHCODE = value Case "AVSADDR" AVSADDR = value Case "AVSZIP" AVSZIP = value Case "CVV2MATCH" CVV2MATCH = value End Select 'write out the name/value pair in "name = value" format 'response.write name 'response.write " = " 'Response.Write value 'Response.Write "
" 'skip over the & if Len(curString) <> Len(varString) Then curString = Right(curString, Len(curString) - (Len(varString)+1)) else curString = "" end if Loop IF RESPMSG = "Approved" THEN Set Crypto = Server.CreateObject("crypto.Encryption") ccnum = Crypto.EnCode(Session.Contents("cc")) Body = "Your Ball Registration Information is below"& _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" &_ "" & _ "" & _ "" & _ "" if Session("attend")="Yes" Then body=body & _ "" & _ "" & _ "" & _ "" end if if session("unable")="unable" then body=body & _ "" & _ "" & _ "" & _ "" end if body=body & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" body=body & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "
Firstname:" & Session("firstname") & "
Lastname:" & Session("lastname") & "
Address 1:" & Session("address1") & "
Address 2:" & Session("address2") & "
City:" & Session("city") & "
State:" & Session("state") & "
Zip:" & Session("zip") & "
Phone:" & Session("phone") & "
Email:" & Session("email") & "
Tickets:" & Session("tix") & "
Drink Tickets:" & Session("drinktix") & "
Your childs grade" & Session("grade") & "
Your name as you would like it to appear in all Patron recognition:" & Session("patronname") & "
I am attending the ball." &"" & "
I am unable to attend the ball but have made a patron donation." & "" & "
You requested" & Session("beef") &" beef entrees"& "
You requested" & Session("chicken") &" chicken entrees"& "
You requested" & Session("vegetarian") &" vegetarian entrees"& "
CC Type:" & Session("cctype") & "
Exp. Date:" & Session.Contents("expdate") & "
Amount Charged:" & FormatCurrency(Session.Contents("Cost")) & "
" & _ "Additional Information
" & _ Session("seating") &"
" if Session("expresspay")="True" then body=body & _ "
I would like to Express pay. I will contact Carol Demirjian at 818-505-5306 to set this up." end if 'send confirmation email SET Mailer = nothing SET Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.ContentType = "text/html" Mailer.FromName = "2007 Campbell Hall Ball - Ticket Purchase" Mailer.FromAddress = "demirjc@campbellhall.org" Mailer.RemoteHost = "smtp.campbellhall.org" 'Mailer.AddBCC "Gerardo Lopez", "glopez@abex.com" Mailer.AddBCC "Alex Roberts", "robertal@campbellhall.org" Mailer.AddBCC "Carol Demirjian", "demirjc@campbellhall.org" Mailer.AddBCC "Courtney Peterson", "petersc@campbellhall.org" Mailer.AddBCC "Stacy Feliz", "felizs@campbellhall.org" Mailer.AddBCC "Lauren Cross", "crossl@campbellhall.org" Mailer.AddBCC "Robbie Blumenfeld", "rblumenfeld@abex.com" Mailer.AddRecipient Session.Contents("firstname") & " " & Session.Contents("lastname"), Session.Contents("email") Mailer.Subject = "2007 Campbell Hall Ball - Ticket Purchase" Mailer.BodyText = body 'send confirmation email if not Mailer.SendMail then Mailer.SendMail else Response.Write "" end if myname=Session("firstname")&" "&Session("lastname") address=Session("address1")&" "&Session("address2") dim misc if Session("attend")="Yes" Then misc=misc & "I am attending the ball" end if if session("unable")="unable" then misc=misc & "I am unable to attend the ball but have made a patron donation." end if if Session("expresspay")="True" then misc=misc & "I would like to Express pay. I will contact Carol Demirjian at 818-505-5306 to set this up." end if misc=misc&" Patron recognition name: "&Session("patronname") insertreg= "insert into registration (name,address,city,state,zip,phone,"&_ "email,childgrade,tickets, drinktickets,patronlevel,seatrequest, ccexp, cctype, total, submitdate, misc) values ('" & sql_esc(myname)&"','"& sql_esc(address)&"','"&sql_esc(Session("city"))&"','"&_ sql_esc(Session("state"))&"','"&sql_esc(Session("zip"))&"','"&sql_esc(Session("phone"))&"','"&sql_esc(Session("email"))&"','"&_ sql_esc(Session("grade"))&"','"&sql_esc(Session("tix"))&"','"&sql_esc(Session("drinktix"))&"','"&sql_esc(Session("level"))&"','"&sql_esc(Session("seating"))&"','"&sql_esc(Session("expdate"))&"','"&_ sql_esc(Session("cctype"))&"','"&sql_esc(FormatCurrency(Session.Contents("Cost")))&"','"& now()&"','"& sql_esc(misc)&"')" Session("insertreg")=insertreg 'response.write(Session("insertreg")) Conn.Execute(insertreg) %> <%Session("body")=body response.redirect("purchaseconfirm.asp")%> <% Conn.Close SET Conn = Nothing else Session.Contents("errormessage") = "Your Credit Card could not be charged.
Please verify that all information is accurate.
" %> <% end if end if end if %>