<%@ LANGUAGE="VBScript" %> <% SUB sendmail( fromWho, toWho, Subject, Body ) Dim objCDO Dim iConf Dim Flds Const cdoSendUsingPort = 2 Set objCDO = Server.CreateObject("CDO.Message") Set iConf = Server.CreateObject("CDO.Configuration") Set Flds = iConf.Fields With Flds .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail-fwd" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPconnectiontimeout) = 10 .Update End With Set objCDO.Configuration = iConf objCDO.From = fromWho objCDO.To = toWho objCDO.Subject = Subject objCDO.TextBody = Body objCDO.Send END SUB %> <% 'Set file I/O constants. Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 'Map the file name to the physical path on the server. filename = "bookings.txt" path = Server.MapPath(".") & "\data\" & filename 'Get requested operation, if any. operation = Request.Querystring("operation") 'initialize msgbox, bodytext - indicator for paging back if there's an error message = "" bodytext = "" Validated_Form = true if operation = "append" then Validated_Form = true 'replace comma with nothing because text file is comma delimited 'Get requested information, if any. txtReferral = CStr(Request.Form("referral")) txtOther = CStr(Trim(Replace(Request.Form("other"),",",""))) txtFirstName = Trim(Replace(Request.Form("firstname"),",","")) txtFirstName = Trim(txtFirstName) ' remove any spaces 'check to see if empty If len(txtFirstName)<1 Then operation = "" Validated_Form = false message = message & "Please enter your first name." & vbCrLf End If txtLastName = Trim(Replace(Request.Form("lastname"),",","")) txtLastName = Trim(txtLastName) ' remove any spaces 'check to see if empty If len(txtLastName)<1 Then Validated_Form = false operation = "" message = message & "Please enter your last name." & vbCrLf End If txtCompany = Trim(Replace(Request.Form("company"),",","")) txtAddress = Trim(Replace(Request.Form("address"),",","")) txtCity = Trim(Replace(Request.Form("city"),",","")) txtState = Trim(Replace(Request.Form("state"),",","")) txtZip = Trim(Replace(Request.Form("CityStateZip"),",","")) txtHomePhone = Trim(Replace(Request.Form("home phone"),",","")) txtWorkPhone = Trim(Replace(Request.Form("work phone"),",","")) txtCellPhone = Trim(Replace(Request.Form("cell phone"),",","")) txtFax = Trim(Replace(Request.Form("fax"),",","")) txtEmail = Trim(Replace(Request.Form("email"),",","")) txtEmail = Trim(txtEmail) ' remove any spaces 'check to see if empty 'If len(txtEmail)<1 Then 'operation = "" 'message = message & "Please enter your email." & vbCrLf 'Validated_Form = false 'End If 'check if valid email format IF len(txtEmail)<1 OR InStr(txtEmail,"@")=0 THEN Validated_Form = false operation = "" ' set operation so no appending is done message = message & "Please enter valid email." & vbCrLf END IF txtEvent = Trim(Replace(Request.Form("event"),",","")) txtPerformDate = Trim(Replace(Request.Form("performdate"),",","")) txtShowTime = CStr(Trim(Replace(Request.Form("showtime"),",",""))) txtShowName = Trim(Replace(Request.Form("showname"),",","")) txtShowLength = Trim(Replace(Request.Form("showlength"),",","")) txtShowLocation = Trim(Replace(Request.Form("ShowLocation"),",","")) txtShowAddress = Trim(Replace(Request.Form("ShowAddress"),",","")) txtShowCity = Trim(Replace(Request.Form("ShowCity"),",","")) txtShowZipCode = Trim(Replace(Request.Form("ShowZipCode"),",","")) txtShowPhone = Trim(Replace(Request.Form("ShowPhone"),",","")) txtCardName = Trim(Replace(Request.Form("card name"),",","")) txtCardNumber = Trim(Replace(Request.Form("card number"),",","")) txtCardNumber = Replace(txtCardNumber, " ", "") txtCardNumber = Replace(txtCardNumber, "-", "") If Len(txtCardNumber) <> 16 Then Do While Len(txtCardNumber) <> 16 txtCardNumber = txtCardNumber & "0" Loop End If txtCardNumber = Replace(txtCardNumber, "-", "") If Len(txtCardNumber) <> 16 Then Do While Len(txtCardNumber) <> 16 txtCardNumber = txtCardNumber & "0" Loop End If one = Left(txtCardNumber,4) 'Mid(StringToPullFrom, CharToStartWith[, LengthOfCharsToPull]) two = Mid(txtCardNumber, 5, 4) three = Mid(txtCardNumber, 9, 4) four = Right(txtCardNumber,4) txtCardNumber = one & "-" & two & "-" & three & "-" & four txtExpires = Trim(Replace(Request.Form("expires"),",","")) txtAmount = Trim(Replace(Request.Form("amount"),",","")) txtSiteEvaluation = Trim(Replace(Request.Form("siteevaluation"),",","")) txtNotes = Trim(Replace(Request.Form("notes"),",","")) end if if operation = "append" then if Validated_Form = false then bodytext = "history.back()" message = message end if end if %> Guest Book


 

?operation=append" method="post" onSubmit="return CheckForm(document.form1)">

<% if message = "" then else response.write Validated_Form response.write "

" & message & "

" end if %>

Contact Information

How Did You Hear About Us?

If You Selected "Other"  Please Specify:

Did You Just Want Prices?  Click Here:

While Typing, Please Use Proper Capitalization In All Fields

DO NOT USE ALL CAPS  LIKE THIS!

 

*First Name: *Last Name:    
Company Name (Leave Blank for Private Parties) :  
Address:  City:  State:
Zip Code: 

Please Type Numbers  Without "(  )'s"  Example: 555-555-1212
Home Phone:  Work Phone: 
Cell Phone:   Fax:

  (We Will Not Give Out Your E-Mail Address)
*E-Mail:

*Must Be Filled

Event Information

What Event Are You Planning For?
Example: Billy's Fourth Birthday Party or Widget & Gadget's Christmas Party

Event :
Date of Your Event:   *Show Start Time:
What Show Would You Like To Book?:
Show Length:

* If you are booking a party, the show should start 1/2 hr. or 1 hr. into your party!

Click On Star for More Show Length Info

 

* If you are booking a party, the show should start 1/2 hr. or 1 hr. into your party!

 Show Location Information
  No Need To Fill Out If Show Location is Same As Above Address!

You May Leave Blank If Info Is The Same As Above

Show Location (i.e. City Park Name):
Show Address:    Show City:  
Show Zip Code:
Show Location Phone Number/Cell Phone:


Visa/Master Card/American Express

 

Please Make Sure That We Have Cleared Your Date and Time! 

To Double Check, Call: (800) 687-5193 or Cell: (909) 319-2860

First and Last Name On Card:
Credit Card Number:  Expiration Date:
Amount You Are Charging (Full Payment Required-Like Buying A Show Ticket):


Message/Purchases

What Do You Think About Our Site?  Please Comment:

Leave A  Message Or Describe What Store Purchase (DVD or Marionette) You Would Like To Make

Help Keep Your Information Secure
Please Enter The Four Numbers That Appears On The White Box Below
Enter Number Here

<% 'Perform the request operation. if operation = "create" then CreateFile(path) ReadFile(path) '----------------------------Email------------------------ fromWho = "bookings@haynesmarionettes.com" ' TRIM( Request.Form( "fromWho") ) toWho = "franklin@haynesmarionettes.com" 'TRIM( Request.Form( "toWho") ) 'toWho = "giridhar9866637837@gmail.com" 'TRIM( Request.Form( "toWho") ) Subject = "Guest Booking Notification"'TRIM( Request.Form( "Subject" ) ) Body = "You have received an online booking." 'TRIM( Request.Form( "Body") ) If toWho <> "" THEN sendMail fromWho, toWho, Subject, Body 'Cleanup Set ObjCDO = Nothing Set iConf = Nothing Set Flds = Nothing END IF response.redirect ("/ty.html") elseif operation = "delete" then call DeleteFile(path) elseif operation = "read" then call ReadFile(path) elseif operation = "write" then call WriteFile(path) ReadFile(path) '----------------------------Email------------------------ fromWho = "webmaster@haynesmarionettes.com" ' TRIM( Request.Form( "fromWho") ) toWho = "franklin@haynesmarionettes.com" 'TRIM( Request.Form( "toWho") ) 'toWho = "giridhar9866637837@gmail.com" 'TRIM( Request.Form( "toWho") ) Subject = "Guest Booking Notification"'TRIM( Request.Form( "Subject" ) ) Body = "You have received an online booking." 'TRIM( Request.Form( "Body") ) If toWho <> "" THEN sendMail fromWho, toWho, Subject, Body 'Cleanup Set ObjCDO = Nothing Set iConf = Nothing Set Flds = Nothing END IF response.redirect ("/ty.html") elseif operation = "append" then call AppendFile(path) ReadFile(path) '----------------------------Email------------------------ fromWho = "webmaster@haynesmarionettes.com" ' TRIM( Request.Form( "fromWho") ) toWho = "franklin@haynesmarionettes.com" 'TRIM( Request.Form( "toWho") ) 'toWho = "giridhar9866637837@gmail.com" 'TRIM( Request.Form( "toWho") ) Subject = "Guest Booking Notification"'TRIM( Request.Form( "Subject" ) ) Body = "You have received an online booking." 'TRIM( Request.Form( "Body") ) If toWho <> "" THEN sendMail fromWho, toWho, Subject, Body 'Cleanup Set ObjCDO = Nothing Set iConf = Nothing Set Flds = Nothing END IF response.redirect ("/ty.html") elseif operation = "" then ReadFile(path) end if %>

©2006 - Franklin Haynes Marionettes - all rights reserved
Artwork, Design and Layout by Franklin Haynes
E-mail Us!

<% sub CreateFile(path) dim fs, file 'Response.Write("CreateFile:
") set fs = CreateObject("Scripting.FileSystemObject") 'If the file already exists give an error message. if fs.FileExists(path) then 'Response.Write("File " & filename & " already exists, create aborted.
" & vbCrLf) 'Otherwise create it and write some data to it. else 'Response.Write("Creating " & filename & ".
") set file = fs.CreateTextFile(path) 'Response.Write("Writing data to " & filename & ".
") firstline = "How Did You Hear About Us?, FirstName, LastName, Company, Address, CityStateZip, Phone1, Phone2, Phone3, Fax, Email, Event, PerformDate, ShowTime, ShowName, ShowLength, ShowLocation, ShowAddress, ShowCity, ShowPhone, Credit Card Number , Expiration, TotalPrice, PriceAtShow, Bal, Notes" file.WriteLine(firstline) file.Close() end if set file=nothing set fs=nothing end sub sub DeleteFile(path) dim fs, file Response.Write("DeleteFile:
") set fs = CreateObject("Scripting.FileSystemObject") 'If the file doesn't exist give an error message. if not fs.FileExists(path) then 'Response.Write("File " & filename & " does not exist.
") 'Otherwise delete it. else 'Response.Write("Deleting " & filename & ".
") fs.DeleteFile(path) end if set file=nothing set fs=nothing end sub sub ReadFile(path) dim fs, file 'Response.Write("ReadFile:
") set fs = CreateObject("Scripting.FileSystemObject") 'If the file doesn't exist give an error message. if not fs.FileExists(path) then 'Response.Write("File " & filename & " does not exist, read aborted.
") 'Otherwise, open it and display the contents. else 'set file = fs.OpenTextFile(path, ForReading) 'Response.Write("Reading " & filename & ".
") 'Response.Write("
")
       'do while not file.AtEndOfStream
       'Response.Write(file.ReadLine & vbCrLf)
       'loop
       'Response.Write("
") 'file.Close() end if set file=nothing set fs=nothing end sub sub WriteFile(path) dim fs, file 'Response.Write("WriteFile:
") set fs = CreateObject("Scripting.FileSystemObject") 'If the file doesn't exist give an error message. if not fs.FileExists(path) then 'Response.Write("File " & filename & " does not exist, write aborted.
") 'Otherwise, overwrite the contents. else set file = fs.OpenTextFile(path, ForWriting) 'Repeat Customer, null, mh, spiral, 615, brea, ca, 12345, 909-123-4567, 909-111-2222, 909-222-3333, 909-444-4444, 'maria@spiral.com, Test Event, 01-01-06, 8 am, Airmail To The Moon, One Half Hour (Standard Show Length), , 01/06, 200.00, , firstline = "How Did You Hear About Us?, FirstName, LastName, Company, Address, CityStateZip, Phone1, Phone2, Phone3, Fax, Email, Event, PerformDate, ShowTime, ShowName, ShowLength, ShowLocation, ShowAddress, ShowCity, ShowPhone, Credit Card Number, Expiration, TotalPrice, PriceAtShow, Bal, Notes" 'How Did You Hear About Us?, FirstName, LastName, Company, Address, 'CityStateZip, Phone1, Phone2, Phone3, Fax, Email, Event, PerformDate, 'ShowTime, ShowName, ShowLength, ShowLocation, ShowAddress, ShowCity, 'ShowPhone, Credit Card Number, Expiration, TotalPrice, PriceAtShow, Bal, Notes file.WriteLine(firstline & txtReferral & ", " & txtFirstName & ", " & txtLastName & ", " & txtCompany & ", " & _ txtAddress & ", " & txtCity & " " & txtState & " " & txtZip & ", " & txtHomePhone & ", " & _ txtWorkPhone & ", " & txtCellPhone & ", " & txtFax & ", " & txtEmail & ", " & _ txtEvent & ", " & txtPerformDate & ", " & txtShowTime & ", " & _ txtShowName & ", " & txtShowLength & ", " & txtShowLocation & ", " & _ txtShowAddress & ", " & txtShowCity & " " & txtShowZipCode & ", " & txtShowPhone & ", " & _ txtCardNumber & ", " & txtExpires & ", " & txtAmount & ", " & txtAmount & ", " & txtAmount & ", " & txtNotes) file.Close() end if set file=nothing set fs=nothing end sub sub AppendFile(path) dim fs, file 'Response.Write("AppendFile:
") set fs = CreateObject("Scripting.FileSystemObject") 'If the file exists, check its size and exit if it exceeds 500K. if fs.FileExists(path) then set file = fs.GetFile(path) 'if file.size > 300 then ' Response.Write("Size limit exceeded for file " & filename & ", append aborted.
") 'exit sub 'end if 'If the file doesn't exists, give a informational message. else 'Response.Write("File " & filename & " does not exist, will create.
") CreateFile(path) end if 'Open or create the file as needed and append a line to it. 'Response.Write("Appending line to " & filename & ".
") set file = fs.OpenTextFile(path, ForAppending, true) file.WriteLine(txtReferral & ", " & txtFirstName & ", " & txtLastName & ", " & txtCompany & ", " & _ txtAddress & ", " & txtCity & " " & txtState & " " & txtZip & ", " & txtHomePhone & ", " & _ txtWorkPhone & ", " & txtCellPhone & ", " & txtFax & ", " & txtEmail & ", " & _ txtEvent & ", " & txtPerformDate & ", " & txtShowTime & ", " & _ txtShowName & ", " & txtShowLength & ", " & txtShowLocation & ", " & _ txtShowAddress & ", " & txtShowCity & " " & txtShowZipCode & ", " & txtShowPhone & ", " & _ txtCardNumber & ", " & txtExpires & ", " & txtAmount & ", " & txtAmount & ", " & txtAmount & ", " & txtNotes) file.Close() set file=nothing set fs=nothing end sub %>