% Option Explicit %> <% Dim iOrderID 'as integer Dim iAffNUM 'as integer Dim iAction 'as integer Dim iRet 'as integer Dim sContactName 'as string Dim sBookCode 'as string Dim sCoverStyle 'as string Dim sBookQuantity 'as string Dim sMFirstName 'as string -- main character (Heroine) Dim sMLastName 'as string 'Dim sMGender 'as string 'Dim sMAge 'as string Dim sMHairColor 'as string Dim sMHairLength 'as string Dim sMHairStyle 'as string Dim sMEyeColor 'as string Dim sMFigure 'as string Dim sMFavDrink 'as string ! Dim sMPet 'as string Dim sMPetName 'as string Dim sMRoadRest 'as string Dim sFFirstName 'as string -- friend character (of Heroine) Dim sFLastName 'as string .. 'Dim sFGender 'as string Dim sFHairColor 'as string Dim sFHairLength 'as string Dim sFHairStyle 'as string Dim sFEyeColor 'as string Dim sFFigure 'as string .. Dim sHFirstName 'as string -- Hero character Dim sHLastName 'as string .. 'Dim shGender 'as string Dim sHHairColor 'as string Dim sHHairLength 'as string Dim sHHairStyle 'as string Dim sHEyeColor 'as string Dim sHBody 'as string .. Dim sCFirstName 'as string -- contact / payment info Dim sCLastName 'as string Dim sCAddress 'as string Dim sCCity 'as string Dim sCState 'as string Dim sCZipCode 'as string Dim sCCountry 'as string Dim sCCountry2 'as string Dim sCHomePhone 'as string Dim sCWorkPhone 'as string Dim sCFax 'as string Dim sCEmail 'as string Dim sCardType 'as string Dim sCardNumber 'as string Dim sCardExpiry 'as string Dim sDelivery 'as string Dim sSFirstName 'as string -- shipping info Dim sSLastName 'as string Dim sSAddress 'as string Dim sSCity 'as string Dim sSState 'as string Dim sSZipCode 'as string Dim sSCountry 'as string Dim sSCountry2 'as string Dim sComputer 'as string Dim sUsername 'as string Dim sBrowser 'as string Dim sSQL 'as string Dim sMessage 'as string Dim sSubject 'as string Dim sBody 'as string Dim oConn 'as connection Dim RecordSet 'as record set '-- iOrderID = 0 '-- iAction = Request("a") IF iAction = 1 THEN sMFirstName = Request.Form("heroinefirstname") sMLastName = Request.Form("heroinelastname") 'sMGender = Request.Form("heroinegender") 'sMAge = Request.Form("heroineage") sMHairColor = Request.Form("heroinehaircolor") sMHairLength = Request.Form("heroinehairlength") sMHairStyle = Request.Form("heroinehairstyle") sMEyeColor = Request.Form("heroineeyecolor") sMFigure = Request.Form("heroinefigure") sMFavDrink = Request.Form("favdrink") sMPet = Request.Form("pet") sMPetName = Request.Form("petname") sMRoadRest = Request.Form("roadrest") sFFirstName = Request.Form("friendfirstname") sFLastName = Request.Form("friendlastname") 'sFGender = Request.Form("friendgender") sFHairColor = Request.Form("friendhaircolor") sFHairLength = Request.Form("friendhairlength") sFHairStyle = Request.Form("friendhairstyle") sFEyeColor = Request.Form("friendeyecolor") sFFigure = Request.Form("friendfigure") sHFirstName = Request.Form("herofirstname") sHLastName = Request.Form("herolastname") 'sHGender = Request.Form("herogender") sHHairColor = Request.Form("herohaircolor") sHHairLength = Request.Form("herohairlength") sHHairStyle = Request.Form("herohairstyle") sHEyeColor = Request.Form("heroeyecolor") sHBody = Request.Form("herobody") sCoverStyle = Request.Form("cover") sBookQuantity = Request.Form("quantity") sCFirstName = Request.Form("contactfirstname") sCLastName = Request.Form("contactlastname") sCAddress = Request.Form("contactstreetaddress") sCCity = Request.Form("contactcity") sCState = Request.Form("contactstate") sCZipCode = Request.Form("contactzipcode") sCCountry = Request.Form("country") sCCountry2 = Request.Form("othercountry") sCHomePhone = Request.Form("homephone") sCWorkPhone = Request.Form("workphone") sCFax = Request.Form("contactfax") sCEmail = Request.Form("contactemail") sCardType = Request.Form("card") sCardNumber = Request.Form("cardnumber") sCardExpiry = Request.Form("cardmonth") & "/" & Request.Form("cardyear") sDelivery = Request.Form("deliverymethod") sSFirstName = Request.Form("alternatefirstname") sSLastName = Request.Form("alternatelastname") sSAddress = Request.Form("alternatestreetaddress") sSCity = Request.Form("alternatecity") sSState = Request.Form("alternatestate") sSZipCode = Request.Form("alternatezipcode") sSCountry = Request.Form("alternatecountry") sSCountry2 = Request.Form("alternateothercountry") sBookCode = Request.Form("productid") iAffNUM = Request.Form("ID") sComputer = Request.ServerVariables("REMOTE_ADDR") sUsername = Request.ServerVariables("LOGON_USER") sBrowser = Request.ServerVariables("USER_AGENT") '-- open database connection Set oConn = dbOpenConnection(g_DSN) '-- sSQL = "INSERT INTO orders (heroinefirstname, heroinelastname, heroinehaircolor, " &_ "heroinehairlength, heroinehairstyle, heroineeyecolor, heroinefigure, favdrink, pet, petname, roadrest, friendfirstname, " &_ "friendlastname, friendhaircolor, friendhairlength, friendhairstyle, friendeyecolor, friendfigure, " &_ "herofirstname, herolastname, herohaircolor, " &_ "herohairlength, herohairstyle, heroeyecolor, herobody, cover, quantity, contactfirstname, contactlastname, " &_ "contactstreetaddress, contactcity, contactstate, contactzipcode, country, othercountry, homephone, workphone, " &_ "contactfax, contactemail, card, cardnumber, cardexpiry, deliverymethod, alternatefirstname, alternatelastname, " &_ "alternatestreetaddress, alternatecity, alternatestate, alternatezipcode, alternatecountry, alternateothercountry, " &_ "productid, ordertime, computername, username, browser, affiliateNUM) VALUES ('" & FixSQL(sMFirstName) & "', '" &_ FixSQL(sMLastName) & "', '" & sMHairColor & "', '" & sMHairLength & "', '" &_ sMHairStyle & "', '" & sMEyeColor & "', '" & FixSQL(sMFigure) & "', '" & FixSQL(sMFavDrink) & "', '" & FixSQL(sMPet) & "', '" &_ FixSQL(sMPetName) & "', '" & FixSQL(sMRoadRest) & "', '" & FixSQL(sFFirstName) & "', '" & FixSQL(sFLastName) & "', '" &_ sFHairColor & "', '" & sFHairLength & "', '" & sFHairStyle & "', '" & sFEyeColor & "', '" &_ FixSQL(sFFigure) & "', '" & FixSQL(sHFirstName) & "', '" & FixSQL(sHLastName) & "', '" & FixSQL(sHHairColor) & "', '" &_ sHHairLength & "', '" & FixSQL(sHHairStyle) & "', '" & FixSQL(sHEyeColor) & "', '" & FixSQL(sHBody) & "', '" &_ FixSQL(sCoverStyle) & "', '" & FixSQL(sBookQuantity) & "', '" & FixSQL(sCFirstName) & "', '" &_ FixSQL(sCLastName) & "', '" & FixSQL(sCAddress) & "', '" & FixSQL(sCCity) & "', '" & FixSQL(sCState) & "', '" &_ FixSQL(sCZipCode) & "', '" & FixSQL(sCCountry) & "', '" & FixSQL(sCCountry2) & "', '" & FixSQL(sCHomePhone) & "', '" &_ FixSQL(sCWorkPhone) & "', '" & FixSQL(sCFax) & "', '" & sCEmail & "', '" & sCardType & "', '" & sCardNumber & "', '" &_ sCardExpiry & "', '" & FixSQL(sDelivery) & "', '" & FixSQL(sSFirstName) & "', '" & FixSQL(sSLastName) & "', '" &_ FixSQL(sSAddress) & "', '" & FixSQL(sSCity) & "', '" & FixSQL(sSState) & "', '" & FixSQL(sSZipCode) & "', '" &_ FixSQL(sSCountry) & "', '" & FixSQL(sSCountry2) & "', '" & sBookCode & "', #" & Now() & "#, '" & sComputer & "', '" &_ sUsername & "', '" & sBrowser & "', '" & FixSQL(iAffNUM) & "');" oConn.Execute(sSQL) IF Err.Number = 0 THEN sSQL = "SELECT @@IDENTITY As NewID" Set RecordSet = oConn.Execute(sSQL) IF NOT RecordSet.EOF THEN iOrderID = RecordSet(0).Value END IF Set RecordSet = Nothing ELSE '-- errors probably occured END IF IF iOrderID > 0 THEN sContactName = sCFirstName & " " & sCLastName sSubject = "Tropical Treasure - Order Confirmation" sBody = "
" sBody = sBody & FormatOrderConfirmation(iOrderID, sContactName, sBookCode, sDelivery) sBody = sBody & "" iRet = SendMail("publish@bookbyyou.com", sCEmail, "", "", sSubject, sBody, TRUE) Response.Redirect("/confirmation/tt-order-conf.asp?oid=" & iOrderID) END IF '-- clean up oConn.Close Set oConn = Nothing END IF %>
|
|
|||||||||
| Vampire Kisses |
| Pirates of Desire |
| Tropical Treasure |
| Medieval Passion |
| Love's Next Door |
| Kids Book By You |
| Click to Email Us |
| Address Info |
| Toll-Free: 1-877-898-1440 |