<% '############################################################################## ' ' inc.root.cfg.asp - include unit with all constants for web site. ' '############################################################################## dim localDB dim CUST_SVR dim CUST_DSN dim CUST_UID dim CUST_PWD dim DEF_USEDCARS dim DEF_PARTSANDSERVICE dim DEF_MEETOURPEOPLE dim DEF_AREA dim AREAS dim DEBUG_SQL dim DEBUG_INCOMING dim DEBUG_EMAIL dim DEBUG_EMAILADDRESS dim conn dim i dim gTemp dim gNum dim random dim Ssql dim DBUN ' Database constants ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if Request.ServerVariables("SERVER_NAME") = "gs" then ' Use settings to connect to local database CUST_DSN = "fallo9.fallonautomall" 'DSN FOR THE DATABASE CUST_UID = "fallo9" 'DSN USERNAME USED TO CONNECT CUST_PWD = "zbwb+nah" 'DSN PASSWORD USED TO CONNECT else ' Use setting to connect to remote database CUST_SVR = "sqlvs01" ' DATABASE SERVER CUST_DSN = "334463_fallonautomall" ' DATABASE NAME CUST_UID = "334463_fallonautomall" ' DATABASE USERNAME CUST_PWD = "zbwb+nah" ' DATABASE PASSWORD end if DBUN = "tbl_" ' Debugging settings ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' DEBUG_SQL = 0 ' Shows all SQL statments DEBUG_INCOMING = 0 ' Shows all incoming variables before and after validation DEBUG_EMAIL = 1 ' Will send all emails to debug email address DEBUG_EMAILADDRESS = "info@globalstudio.com" ' Default incoming variables settings ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' DEF_USEDCARS = 1 ' Default usedcarsid DEF_PARTSANDSERVICE = 1 ' Default partsandserviceid DEF_MEETOURPEOPLE = 1 ' Default meetourpeopleid DEF_AREA = 0 ' Default area index AREAS = array("usedcarsearch", _ "usedcarsearchlist", _ "usedcarsearchfull", _ "creditapplication", _ "creditapplicationsubmission", _ "partsandservice", _ "partsandservicefull", _ "meetourpeople", _ "meetourpeoplefull", _ "maintenance", _ "maintenancefull" _ ) ' All allowed areas ' Interface settings ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' For later use randomize random = Int((100000000 * Rnd) + 1) ' Random number to fix IE caching problem if DEBUG_SQL or DEBUG_INCOMING then Response.Write "
" end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void dbOpenConnection () ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub dbOpenConnection () set conn = server.createobject("adodb.connection") if request.ServerVariables("SERVER_NAME") = "gs" then conn.open CUST_DSN, CUST_UID, CUST_PWD else conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=" & CUST_SVR & ";UID=" & CUST_UID & ";PWD=" & CUST_PWD & ";DATABASE=" & CUST_DSN end if end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void dbCloseConnection () ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub dbCloseConnection () conn.close set conn = nothing end sub %> <% dbOpenConnection() %> <% '############################################################################## ' ' varcheck.inc.asp - include unit for checking all incoming variables. ' '############################################################################## dim area dim submit dim admin dim usedcarsearchid dim partsandserviceid dim meetourpeopleid dim maintenanceid dim fromvehicleyear dim tovehicleyear dim maxvehicleyear dim minvehicleyear dim vehiclemake dim vehiclemodel dim vehiclemileage dim vehiclesort dim makearray(1000) dim makecount ' Get incoming variables ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' area = request.queryString("area") ' Area Name submit = request.queryString("submit") ' Submit value to be passed from buttons pushed on certain forms, for security fromvehicleyear = Request.Form("fromvehicleyear") tovehicleyear = Request.Form("tovehicleyear") vehiclemake = Request.Form("vehiclemake") vehiclemodel = Request.Form("vehiclemodel") vehiclemileage = Request.Form("vehiclemileage") vehiclesort = Request.Form("vehiclesort") usedcarsearchid = request.queryString("usedcarsearchid") ' Full Listing ID partsandserviceid = request.queryString("partsandserviceid") ' Full Listing ID meetourpeopleid = request.queryString("meetourpeopleid") ' Full Listing ID maintenanceid = request.queryString("maintenanceid") ' Full Listing ID '----- Begin debugging code ------ if DEBUG_INCOMING then ' Output all incoming variables before validation response.write "area (before validation): " & area & "
" response.write "submit (before validation): " & submit & "
" response.write "----------------
" end if '----- End debugging code ------ ' Check area against array ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' dim checked checked = 0 ' Compare to public array of areas for i = 0 to uBound(AREAS) ' Check if area is from allowed scope if uCase(area) = uCase(AREAS(i)) then ' Set checked property to true checked = 1 end if next if checked = 0 then ' Reset area to default value area = AREAS(DEF_AREA) end if ' Check ID against numeric non-zero content ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if isNumeric(usedcarsearchid) and not isNull(usedcarsearchid) then if usedcarsearchid < 1 then ' Reset property ID to default value usedcarsearchid = DEF_USEDCARS end if else ' Reset property ID to default value usedcarsearchid = DEF_USEDCARS end if ' Check ID against numeric non-zero content ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if isNumeric(partsandserviceid) and not isNull(partsandserviceid) then if partsandserviceid < 1 then ' Reset property ID to default value partsandserviceid = DEF_PARTSANDSERVICE end if else ' Reset property ID to default value partsandserviceid = DEF_PARTSANDSERVICE end if ' Check ID against numeric non-zero content ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if isNumeric(meetourpeopleid) and not isNull(meetourpeopleid) then if meetourpeopleid < 1 then ' Reset property ID to default value meetourpeopleid = DEF_MEETOURPEOPLE end if else ' Reset property ID to default value meetourpeopleid = DEF_MEETOURPEOPLE end if ' Check ID against numeric non-zero content ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if isNumeric(maintenanceid) and not isNull(maintenanceid) then if maintenanceid < 1 then ' Reset property ID to default value maintenanceid = DEF_MEETOURPEOPLE end if else ' Reset property ID to default value maintenanceid = DEF_MEETOURPEOPLE end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Credit Application ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' dim formSalesperson dim formFirstname dim formLastname dim formMiddleinitial dim formAddress1 dim formAddress2 dim formCity dim formState dim formZip dim formHomephone dim formSsn dim formDateofbirth dim formEmployer dim formEmployeraddr1 dim formEmployeraddr2 dim formEmployercity dim formEmployerstate dim formEmployerzip dim formWorkphone dim formMonthlyincome dim formOnjobyears dim formOnjobmonths dim formAdditionalincome dim formEmail dim formResidence dim formLandlord dim formLandlordphone dim formLandlordpayment dim formTradein dim formTradeinyear dim formTradeinmake dim formTradeinmodel dim formTradeinpayoff dim formLender dim formLenderaddr1 dim formLenderaddr2 dim formLendercity dim formLenderstate dim formLenderzip dim formLenderphone dim formLenderaccountnum dim formPayoffbalance dim formPayoffdate dim formVehicletype dim formVehiclepreference dim formVehiclepurchasetimeframe dim formVehiclestocknumber dim formVehicleofferprice dim formJointapplication dim formCoapplicantname dim formCoapplicantssn dim formCoapplicantdob formSalesperson = Trim(request.form("Salesperson")) formFirstname = Trim(request.form("Firstname")) formLastname = Trim(request.form("Lastname")) formMiddleinitial = Trim(request.form("Middleinitial")) formAddress1 = Trim(request.form("Address1")) formAddress2 = Trim(request.form("Address2")) formCity = Trim(request.form("City")) formState = Trim(request.form("State")) formZip = Trim(request.form("Zip")) formHomephone = Trim(request.form("Homephone")) formSsn = Trim(request.form("Ssn")) formDateofbirth = Trim(request.form("Dateofbirth")) formEmployer = Trim(request.form("Employer")) formEmployeraddr1 = Trim(request.form("Employeraddr1")) formEmployeraddr2 = Trim(request.form("Employeraddr2")) formEmployercity = Trim(request.form("Employercity")) formEmployerstate = Trim(request.form("Employerstate")) formEmployerzip = Trim(request.form("Employerzip")) formWorkphone = Trim(request.form("Workphone")) formMonthlyincome = Trim(request.form("Monthlyincome")) formOnjobyears = Trim(request.form("Onjobyears")) formOnjobmonths = Trim(request.form("Onjobmonths")) formAdditionalincome = Trim(request.form("Additionalincome")) formEmail = Trim(request.form("Email")) formResidence = Trim(request.form("Residence")) formLandlord = Trim(request.form("Landlord")) formLandlordphone = Trim(request.form("Landlordphone")) formLandlordpayment = Trim(request.form("Landlordpayment")) formTradein = Trim(request.form("Tradein")) formTradeinyear = Trim(request.form("Tradeinyear")) formTradeinmake = Trim(request.form("Tradeinmake")) formTradeinmodel = Trim(request.form("Tradeinmodel")) formTradeinpayoff = Trim(request.form("Tradeinpayoff")) formLender = Trim(request.form("Lender")) formLenderaddr1 = Trim(request.form("Lenderaddr1")) formLenderaddr2 = Trim(request.form("Lenderaddr2")) formLendercity = Trim(request.form("Lendercity")) formLenderstate = Trim(request.form("Lenderstate")) formLenderzip = Trim(request.form("Lenderzip")) formLenderphone = Trim(request.form("Lenderphone")) formLenderaccountnum = Trim(request.form("Lenderaccountnum")) formPayoffbalance = Trim(request.form("Payoffbalance")) formPayoffdate = Trim(request.form("Payoffdate")) formVehicletype = Trim(request.form("Vehicletype")) formVehiclepreference = Trim(request.form("Vehiclepreference")) formVehiclepurchasetimeframe = Trim(request.form("Vehiclepurchasetimeframe")) formVehiclestocknumber = Trim(request.form("Vehiclestocknumber")) formVehicleofferprice = Trim(request.form("Vehicleofferprice")) formJointapplication = Trim(request.form("Jointapplication")) formCoapplicantname = Trim(request.form("Coapplicantname")) formCoapplicantssn = Trim(request.form("Coapplicantssn")) formCoapplicantdob = Trim(request.form("Coapplicantdob")) dim creditapperrors(30) dim creditapperrorscount creditapperrorscount = 0 'The following fields are error-checked as being required fields if formFirstname = "" then creditapperrors(creditapperrorscount) = "Personal - First Name" creditapperrorscount = creditapperrorscount + 1 end if if formLastname = "" then creditapperrors(creditapperrorscount) = "Personal - Last Name" creditapperrorscount = creditapperrorscount + 1 end if if formAddress1 = "" then creditapperrors(creditapperrorscount) = "Personal - Address" creditapperrorscount = creditapperrorscount + 1 end if if formCity = "" then creditapperrors(creditapperrorscount) = "Personal - City" creditapperrorscount = creditapperrorscount + 1 end if if formState = "" then creditapperrors(creditapperrorscount) = "Personal - State" creditapperrorscount = creditapperrorscount + 1 end if if formZip = "" then creditapperrors(creditapperrorscount) = "Personal - Zip" creditapperrorscount = creditapperrorscount + 1 end if if formHomephone = "" then creditapperrors(creditapperrorscount) = "Personal - Home Phone" creditapperrorscount = creditapperrorscount + 1 end if if formSsn = "" then creditapperrors(creditapperrorscount) = "Personal - Social Security Number" creditapperrorscount = creditapperrorscount + 1 end if if formDateofbirth = "" then creditapperrors(creditapperrorscount) = "Personal - Date of Birth" creditapperrorscount = creditapperrorscount + 1 end if if formEmployer = "" then creditapperrors(creditapperrorscount) = "Employer - Name" creditapperrorscount = creditapperrorscount + 1 end if if formEmployeraddr1 = "" then creditapperrors(creditapperrorscount) = "Employer - Address" creditapperrorscount = creditapperrorscount + 1 end if if formEmployercity = "" then creditapperrors(creditapperrorscount) = "Employer - City" creditapperrorscount = creditapperrorscount + 1 end if if formEmployerstate = "" then creditapperrors(creditapperrorscount) = "Employer - State" creditapperrorscount = creditapperrorscount + 1 end if if formEmployerzip = "" then creditapperrors(creditapperrorscount) = "Employer - Zip" creditapperrorscount = creditapperrorscount + 1 end if if formMonthlyincome = "" then creditapperrors(creditapperrorscount) = "Employment - Monthly Income" creditapperrorscount = creditapperrorscount + 1 end if if formOnjobyears = "" then creditapperrors(creditapperrorscount) = "Employment - Time on Job Years" creditapperrorscount = creditapperrorscount + 1 end if if formOnjobmonths = "" then creditapperrors(creditapperrorscount) = "Employment - Time on Job Months" creditapperrorscount = creditapperrorscount + 1 end if if formEmail = "" then creditapperrors(creditapperrorscount) = "Employment - e-Mail Address" creditapperrorscount = creditapperrorscount + 1 end if 'The following fields are checked for numerical values 'and if a non-required number field is left blank we need to write a 0 if formOnjobyears <> "" then if Not IsNumeric(formOnjobyears) then creditapperrors(creditapperrorscount) = "Employment - Time on Job Years (Must be a Number)" creditapperrorscount = creditapperrorscount + 1 end if end if if formOnjobmonths <> "" then if Not IsNumeric(formOnjobmonths) then creditapperrors(creditapperrorscount) = "Employment - Time on Job Months (Must be a Number)" creditapperrorscount = creditapperrorscount + 1 end if end if if formTradeinyear <> "" then if Not IsNumeric(formTradeinyear) then creditapperrors(creditapperrorscount) = "Trade-In - Year (Must be a Number)" creditapperrorscount = creditapperrorscount + 1 end if else formTradeinyear = "0" end if 'Check for valid Email address Dim atcount Dim emailloopcounter Dim emailerrorid emailerrorid = 0 If len(Trim(formEmail)) <> 0 then 'Check length (a@b.cc is the smallest possible email) If len(formEmail) < 6 Then emailerrorid = 2 'Check Format, at least one "@" ElseIf instr(formEmail,"@") = 0 Then emailerrorid = 2 'Check for at least one "." ElseIf instr(formEmail,".") = 0 Then emailerrorid = 2 'Check for no more than 7 characters after the last "." ElseIf len(formEmail) - instrrev(formEmail,".") > 7 Then emailerrorid = 2 'Check for at least 2 characters after the last "." ElseIf len(formEmail) - instrrev(formEmail,".") < 2 Then emailerrorid = 2 'Check for no "_" after the "@" ElseIf instr(formEmail,"_") <> 0 And instrrev(formEmail,"_") > instrrev(formEmail,"@") Then emailerrorid = 2 'Check for at least one character before the "@" ElseIf instr(formEmail,"@") = 1 Then emailerrorid = 2 Else 'Check for only one "@" atcount = 0 For emailloopcounter = 1 to len(formEmail) If mid(formEmail,emailloopcounter,1) = "@" Then atcount = atcount + 1 End If Next If atcount > 1 Then emailerrorid = 2 End If 'Check Each character for validity For emailloopcounter = 1 to len(formEmail) If Not IsNumeric(mid(formEmail,emailloopcounter,1)) And _ (lcase(mid(formEmail,emailloopcounter,1)) < "a" Or _ lcase(mid(formEmail,emailloopcounter,1)) > "z") And _ mid(formEmail,emailloopcounter,1) <> "_" And _ mid(formEmail,emailloopcounter,1) <> "." And _ mid(formEmail,emailloopcounter,1) <> "@" And _ mid(formEmail,emailloopcounter,1) <> "-" Then emailerrorid = 2 End If Next End If End If if emailerrorid <> 0 then creditapperrors(creditapperrorscount) = "Employment - e-Mail Address (Not a Valid Address, ie. user@domain.com)" creditapperrorscount = creditapperrorscount + 1 end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' string ReplaceText (string pattern, string origString, string replString) ' ' Replaces all found substrings with new string. Requres definition of ' string to be searched as pattern, string in which will be search performed ' as origString, and string to be replaced - replString. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function ReplaceText (pattern, origString, replString) If Trim(origString) <> "" and Trim(replString) <> "" Then ' Response.Write "Trim(origString): " & Trim(origString) & "

" ' Response.Write "Trim(replString): " & Trim(replString) & "

" Dim regEx Set regEx = New RegExp ' Create regular expression regEx.Global = True regEx.Pattern = pattern ' Set pattern regEx.IgnoreCase = True ' Make case insensitive ReplaceText = regEx.Replace(origString, replString) ' Make replacement' End If End Function %> <% '############################################################################## ' ' inc.content.asp - include unit to extract data from database ' and to prepare it for design output layer. ' ' dbOpenConnection () - opens connection to database server ' dbCloseConnection () - closes opened connection to database server ' ' getUsedcarsearch() ' getUsedcarsearchlist() ' getUsedcarsearchfull(int id) ' ' writeCreditapplication() 'Writes the Credit App and adds to Networker ' sendCreditapplicationemail() ' ' getPartsandservicelist() ' getPartsandservicefull(int id) ' ' getMeetourpeoplelist() ' getMeetourpeoplefull(int id) ' '############################################################################## ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getUsedcarsearch() ' ' Returns Used Car parameters for the Used Car search page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getUsedcarsearch() dim sql dim result ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM karpower" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearch() [num]: " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable if gNum then ' Pull selected information for the Vehicle Year and Mileage sql = "SELECT MAX(vehicleyear) as MaxVehicleyear, MIN(vehicleyear) as MinVehicleyear " _ & "FROM karpower" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearch(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Global Variable assignments maxvehicleyear = result("MaxVehicleyear") minvehicleyear = result("MinVehicleyear") ' Pull selected information for the Make sql = "SELECT make " _ & "FROM karpower ORDER BY make" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearch(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) makecount = 0 dim previousmake previousmake = result("make") dim currentmake result.movenext do while not result.eof currentmake = result("make") if Trim(previousmake) <> Trim(currentmake) then makearray(makecount) = Trim(previousmake) previousmake = currentmake makecount = makecount + 1 end if result.movenext loop makearray(makecount) = Trim(previousmake) end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getUsedcarsearchlist() ' ' Returns the Used Car list of properties from the search page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getUsedcarsearchlist() dim sql dim result gNum = 0 ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM karpower WHERE ((vehicleyear >= " & fromvehicleyear & " AND vehicleyear <= " & tovehicleyear & ")" if vehiclemake <> "all_makes" then sql = sql & " AND make = '" & vehiclemake & "'" end if if Trim(vehiclemodel) <> "" then sql = sql & " AND model like '%" & vehiclemodel & "%'" end if if vehiclemileage <> "all_mileages" then if vehiclemileage = "0to20" then sql = sql & " AND (mileage >= 0 AND mileage <= 20000)" end if if vehiclemileage = "20to40" then sql = sql & " AND (mileage >= 20000 AND mileage <= 40000)" end if if vehiclemileage = "40to60" then sql = sql & " AND (mileage >= 40000 AND mileage <= 60000)" end if if vehiclemileage = "60to80" then sql = sql & " AND (mileage >= 60000 AND mileage <= 80000)" end if if vehiclemileage = "80to100" then sql = sql & " AND (mileage >= 80000 AND mileage <= 100000)" end if if vehiclemileage = "100to150" then sql = sql & " AND (mileage >= 100000 AND mileage <= 150000)" end if if vehiclemileage = "150to200" then sql = sql & " AND (mileage >= 150000 AND mileage <= 200000)" end if if vehiclemileage = "over200" then sql = sql & " AND (mileage >= 200000)" end if end if sql = sql & ")" ' response.write sql ' response.write "
----------------
" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearchlist(): " & sql & "
" response.write "----------------
" else ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable end if '----- End debugging code ------ if gNum > 0 then ' Select number of records sql = "SELECT ID,stock#,vehicleyear,make,model,mileage,priceadjust,retail " _ & "FROM karpower WHERE ((vehicleyear >= " & fromvehicleyear & " AND vehicleyear <= " & tovehicleyear & ")" if vehiclemake <> "all_makes" then sql = sql & " AND make = '" & vehiclemake & "'" end if if Trim(vehiclemodel) <> "" then sql = sql & " AND model like '%" & vehiclemodel & "%'" end if if vehiclemileage <> "all_mileages" then if vehiclemileage = "0to20" then sql = sql & " AND (mileage >= 0 AND mileage <= 20000)" end if if vehiclemileage = "20to40" then sql = sql & " AND (mileage >= 20000 AND mileage <= 40000)" end if if vehiclemileage = "40to60" then sql = sql & " AND (mileage >= 40000 AND mileage <= 60000)" end if if vehiclemileage = "60to80" then sql = sql & " AND (mileage >= 60000 AND mileage <= 80000)" end if if vehiclemileage = "80to100" then sql = sql & " AND (mileage >= 80000 AND mileage <= 100000)" end if if vehiclemileage = "100to150" then sql = sql & " AND (mileage >= 100000 AND mileage <= 150000)" end if if vehiclemileage = "150to200" then sql = sql & " AND (mileage >= 150000 AND mileage <= 200000)" end if if vehiclemileage = "over200" then sql = sql & " AND (mileage >= 200000)" end if end if sql = sql & ") ORDER BY " & vehiclesort ' response.write sql ' Execute SQL statement set result = conn.execute(sql) set getUsedcarsearchlist = result else ' Return error code as no records were found set getUsedcarsearchlist = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getUsedcarsearchfull(usedcarsearchid) ' ' Returns Used Car full listing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getUsedcarsearchfull(usedcarsearchid) dim sql dim result ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM karpower WHERE ID = " & usedcarsearchid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearchfull() [num]: " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable if gNum then ' Pull selected event information sql = "SELECT stock#,stored,vehicleyear,make,model,engine,transmission," _ & "color,mileage,vin,priceadjust,retail,image," _ & "equipment1,equipment2,equipment3,equipment4,equipment5,equipment6,equipment7,equipment8,equipment9," _ & "equipment10,equipment11,equipment12,equipment13,equipment14,equipment15,equipment16,equipment17," _ & "equipment18,equipment19,equipment20,equipment21,equipment22,equipment23,equipment24 " _ & "FROM karpower " _ & "WHERE ID = " & usedcarsearchid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getUsedcarsearchfull(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) set getUsedcarsearchfull = result else ' Return error code as no records were found set getUsedcarsearchfull = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void writeCreditapplication() ' ' Saves Credit Application ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub writeCreditapplication() dim sql 'Prepare values to write to the database formSalesperson = ReplaceText("'", formSalesperson, "''") formFirstname = ReplaceText("'", formFirstname, "''") formLastname = ReplaceText("'", formLastname, "''") formMiddleinitial = ReplaceText("'", formMiddleinitial, "''") formAddress1 = ReplaceText("'", formAddress1, "''") formAddress2 = ReplaceText("'", formAddress2, "''") formCity = ReplaceText("'", formCity, "''") formState = ReplaceText("'", formState, "''") formZip = ReplaceText("'", formZip, "''") formHomephone = ReplaceText("'", formHomephone, "''") formSsn = ReplaceText("'", formSsn, "''") formDateofbirth = ReplaceText("'", formDateofbirth, "''") formEmployer = ReplaceText("'", formEmployer, "''") formEmployeraddr1 = ReplaceText("'", formEmployeraddr1, "''") formEmployeraddr2 = ReplaceText("'", formEmployeraddr2, "''") formEmployercity = ReplaceText("'", formEmployercity, "''") formEmployerstate = ReplaceText("'", formEmployerstate, "''") formEmployerzip = ReplaceText("'", formEmployerzip, "''") formWorkphone = ReplaceText("'", formWorkphone, "''") formMonthlyincome = ReplaceText("'", formMonthlyincome, "''") formOnjobyears = ReplaceText("'", formOnjobyears, "''") formOnjobmonths = ReplaceText("'", formOnjobmonths, "''") formAdditionalincome = ReplaceText("'", formAdditionalincome, "''") formEmail = ReplaceText("'", formEmail, "''") formResidence = ReplaceText("'", formResidence, "''") formLandlord = ReplaceText("'", formLandlord, "''") formLandlordphone = ReplaceText("'", formLandlordphone, "''") formLandlordpayment = ReplaceText("'", formLandlordpayment, "''") formTradein = ReplaceText("'", formTradein, "''") formTradeinyear = ReplaceText("'", formTradeinyear, "''") formTradeinmake = ReplaceText("'", formTradeinmake, "''") formTradeinmodel = ReplaceText("'", formTradeinmodel, "''") formTradeinpayoff = ReplaceText("'", formTradeinpayoff, "''") formLender = ReplaceText("'", formLender, "''") formLenderaddr1 = ReplaceText("'", formLenderaddr1, "''") formLenderaddr2 = ReplaceText("'", formLenderaddr2, "''") formLendercity = ReplaceText("'", formLendercity, "''") formLenderstate = ReplaceText("'", formLenderstate, "''") formLenderzip = ReplaceText("'", formLenderzip, "''") formLenderphone = ReplaceText("'", formLenderphone, "''") formLenderaccountnum = ReplaceText("'", formLenderaccountnum, "''") formPayoffbalance = ReplaceText("'", formPayoffbalance, "''") formPayoffdate = ReplaceText("'", formPayoffdate, "''") ' formVehicletype = ReplaceText("'", formVehicletype, "''") formVehiclepreference = ReplaceText("'", formVehiclepreference, "''") ' formVehiclepurchasetimeframe = ReplaceText("'", formVehiclepurchasetimeframe, "''") formVehiclestocknumber = ReplaceText("'", formVehiclestocknumber, "''") formVehicleofferprice = ReplaceText("'", formVehicleofferprice, "''") formJointapplication = ReplaceText("'", formJointapplication, "''") formCoapplicantname = ReplaceText("'", formCoapplicantname, "''") formCoapplicantssn = ReplaceText("'", formCoapplicantssn, "''") formCoapplicantdob = ReplaceText("'", formCoapplicantdob, "''") sql = "INSERT INTO creditapplication (" _ & "Salesperson, Firstname, Lastname, Middleinitial, Address1, Address2, " _ & "City, State, Zip, Homephone, Ssn, Dateofbirth, Employer, Employeraddr1, " _ & "Employeraddr2, Employercity, Employerstate, Employerzip, Workphone, " _ & "Monthlyincome, Onjobyears, Onjobmonths, Additionalincome, Email, " _ & "Residence, Landlord, Landlordphone, Landlordpayment, Tradein, " _ & "Tradeinyear, Tradeinmake, Tradeinmodel, Tradeinpayoff, Lender, " _ & "Lenderaddr1, Lenderaddr2, Lendercity, Lenderstate, Lenderzip, Lenderphone, " _ & "Lenderaccountnum, Payoffbalance, Payoffdate, Vehicletype, Vehiclepreference, " _ & "Vehiclepurchasetimeframe, Vehiclestocknumber, Vehicleofferprice, Jointapplication, " _ & "Coapplicantname, Coapplicantssn, Coapplicantdob, datesubmitted) VALUES (" _ & "'" & formSalesperson & "', " _ & "'" & formFirstname & "', " _ & "'" & formLastname & "', " _ & "'" & formMiddleinitial & "', " _ & "'" & formAddress1 & "', " _ & "'" & formAddress2 & "', " _ & "'" & formCity & "', " _ & "'" & formState & "', " _ & "'" & formZip & "', " _ & "'" & formHomephone & "', " _ & "'" & formSsn & "', " _ & "'" & formDateofbirth & "', " _ & "'" & formEmployer & "', " _ & "'" & formEmployeraddr1 & "', " _ & "'" & formEmployeraddr2 & "', " _ & "'" & formEmployercity & "', " _ & "'" & formEmployerstate & "', " _ & "'" & formEmployerzip & "', " _ & "'" & formWorkphone & "', " _ & "'" & formMonthlyincome & "', " _ & "" & formOnjobyears & ", " _ & "" & formOnjobmonths & ", " _ & "'" & formAdditionalincome & "', " _ & "'" & formEmail & "', " _ & "'" & formResidence & "', " _ & "'" & formLandlord & "', " _ & "'" & formLandlordphone & "', " _ & "'" & formLandlordpayment & "', " _ & "'" & formTradein & "', " _ & "" & formTradeinyear & ", " _ & "'" & formTradeinmake & "', " _ & "'" & formTradeinmodel & "', " _ & "'" & formTradeinpayoff & "', " _ & "'" & formLender & "', " _ & "'" & formLenderaddr1 & "', " _ & "'" & formLenderaddr2 & "', " _ & "'" & formLendercity & "', " _ & "'" & formLenderstate & "', " _ & "'" & formLenderzip & "', " _ & "'" & formLenderphone & "', " _ & "'" & formLenderaccountnum & "', " _ & "'" & formPayoffbalance & "', " _ & "'" & formPayoffdate & "', " _ & "'" & formVehicletype & "', " _ & "'" & formVehiclepreference & "', " _ & "'" & formVehiclepurchasetimeframe & "', " _ & "'" & formVehiclestocknumber & "', " _ & "'" & formVehicleofferprice & "', " _ & "'" & formJointapplication & "', " _ & "'" & formCoapplicantname & "', " _ & "'" & formCoapplicantssn & "', " _ & "'" & formCoapplicantdob & "', " _ & "'" & date & "'" _ & ")" ' response.write "sql: " & sql & "

" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "writeCreditapplication(): " & sql & "
" response.write "----------------
" else ' Execute SQL statement conn.execute(sql) end if '----- End debugging code ------ dim dbcontent sql = "SELECT Email FROM networker_members WHERE Email='" & formEmail & "'" 'response.write "sql: " & sql set dbcontent = conn.execute(sql) if dbcontent.eof then sql="INSERT INTO networker_members(First_Name,Last_Name,Address,City,State,Zip," _ & "Phone,Email,Problem_Emailing,Newsletter,CreditApplication,Batch_number) VALUES ('" _ & formFirstname & "','" _ & formLastname & "','" _ & Trim(formAddress1 & " " & formAddress2) & "','" _ & formCity & "','" _ & formState & "','" _ & formZip & "','" _ & formHomephone & "','" _ & formEmail & "'," _ & "'no','yes','yes',0)" conn.execute(sql) else sql="UPDATE networker_members SET " _ & "CreditApplication = 'yes', " _ & "First_Name = '" & formFirstname & "', " _ & "Last_Name = '" & formLastname & "', " _ & "Address = '" & Trim(formAddress1 & " " & formAddress2) & "', " _ & "City = '" & formCity & "', " _ & "State = '" & formState & "', " _ & "Zip = '" & formZip & "', " _ & "Phone = '" & formHomephone & "' " _ & "WHERE Email = '" & formEmail & "'" conn.execute(sql) end if end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void sendCreditapplicationemail() ' ' Sends e-Mail concerning new Credit Application ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub sendCreditapplicationemail() dim mailBody dim mailer mailBody = "### New Credit Application: " & formFirstname & " " & formLastname & " ###" & vbcrlf _ & "____________________________________________________________" & vbcrlf & vbcrlf _ & " Contact information" & vbcrlf _ & "____________________________________________________________" & vbcrlf & vbcrlf if formSalesperson <> "" Then mailBody = mailBody & " Salesperson: " & formSalesperson & vbcrlf end if mailBody = mailBody & " First Name: " & formFirstname & vbcrlf _ & " Last Name: " & formLastname & vbcrlf _ & " Address 1: " & formAddress1 & vbcrlf _ & " Address 2: " & formAddress2 & vbcrlf _ & " City: " & formCity & vbcrlf _ & " State: " & formState & vbcrlf _ & " Zip: " & formZip & vbcrlf _ & " Phone: " & formHomephone & vbcrlf _ & " Email: " & formEmail & vbcrlf _ & "____________________________________________________________" & vbcrlf & vbcrlf _ & " Admin Login: http://www.fallonautomall.com/admin" & vbcrlf _ & "____________________________________________________________" Set mailer = Server.CreateObject ("CDO.Message") mailer.From = chr(34) & formFirstname & " " & formLastname & chr(34) & " <" & formEmail & ">" mailer.Bcc = """info"" " mailer.To = """Art Place"" " mailer.Subject = "[ New Credit Application: " & formFirstname & " " & formLastname & " ]" mailer.TextBody = mailBody mailer.Send response.write "" set mailer = nothing end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getPartsandservicelist() ' ' Returns the employee list from the search page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getPartsandservicelist() dim sql dim result gNum = 0 ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE employeelocation = 'partsandservice'" ' response.write sql ' response.write "
----------------
" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getPartsandservicelist(): " & sql & "
" response.write "----------------
" else ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable end if '----- End debugging code ------ if gNum > 0 then ' Select number of records sql = "SELECT * " _ & "FROM employee WHERE employeelocation = 'partsandservice' ORDER BY priority" ' response.write sql ' Execute SQL statement set result = conn.execute(sql) set getPartsandservicelist = result else ' Return error code as no records were found set getPartsandservicelist = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getPartsandservicefull(partsandserviceid) ' ' Returns employee full listing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getPartsandservicefull(partsandserviceid) dim sql dim result ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE ID = " & partsandserviceid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getPartsandservicefull() [num]: " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable if gNum then ' Pull selected event information sql = "SELECT * " _ & "FROM employee " _ & "WHERE ID = " & partsandserviceid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getPartsandservicefull(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) set getPartsandservicefull = result else ' Return error code as no records were found set getPartsandservicefull = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getMeetourpeoplelist() ' ' Returns the employee list from the search page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getMeetourpeoplelist() dim sql dim result gNum = 0 ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE employeelocation = 'meetourpeople'" ' response.write sql ' response.write "
----------------
" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMeetourpeoplelist(): " & sql & "
" response.write "----------------
" else ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable end if '----- End debugging code ------ if gNum > 0 then ' Select number of records sql = "SELECT * " _ & "FROM employee WHERE employeelocation = 'meetourpeople' ORDER BY priority" ' response.write sql ' Execute SQL statement set result = conn.execute(sql) set getMeetourpeoplelist = result else ' Return error code as no records were found set getMeetourpeoplelist = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getMeetourpeoplefull(meetourpeopleid) ' ' Returns employee full listing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getMeetourpeoplefull(meetourpeopleid) dim sql dim result ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE ID = " & meetourpeopleid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMeetourpeoplefull() [num]: " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable if gNum then ' Pull selected event information sql = "SELECT * " _ & "FROM employee " _ & "WHERE ID = " & meetourpeopleid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMeetourpeoplefull(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) set getMeetourpeoplefull = result else ' Return error code as no records were found set getMeetourpeoplefull = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getMaintenancelist() ' ' Returns the employee list from the search page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getMaintenancelist() dim sql dim result gNum = 0 ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE employeelocation = 'maintenance'" ' response.write sql ' response.write "
----------------
" '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMaintenancelist(): " & sql & "
" response.write "----------------
" else ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable end if '----- End debugging code ------ if gNum > 0 then ' Select number of records sql = "SELECT * " _ & "FROM employee WHERE employeelocation = 'maintenance' ORDER BY priority" ' response.write sql ' Execute SQL statement set result = conn.execute(sql) set getMaintenancelist = result else ' Return error code as no records were found set getMaintenancelist = nothing end if end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' getMaintenancefull(maintenanceid) ' ' Returns employee full listing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function getMaintenancefull(maintenanceid) dim sql dim result ' Select number of records sql = "SELECT COUNT(ID) AS num " _ & "FROM employee WHERE ID = " & maintenanceid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMaintenancefull() [num]: " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) ' Check if there are at least one found gNum = result("num") ' Save number of found records in global variable if gNum then ' Pull selected event information sql = "SELECT * " _ & "FROM employee " _ & "WHERE ID = " & maintenanceid '----- Begin debugging code ------ if DEBUG_SQL then ' Output SQL statement response.write "getMaintenancefull(): " & sql & "
" response.write "----------------
" end if '----- End debugging code ------ ' Execute SQL statement set result = conn.execute(sql) set getMaintenancefull = result else ' Return error code as no records were found set getMaintenancefull = nothing end if end function %> <% '############################################################################## ' ' inc.output.asp - include unit to output data to browser ' ' drawHeader() - draws the appropriate header image for the page ' ' drawUsedcarsearch() ' drawUsedcarsearchlist() ' drawUsedcarsearchfull() ' ' drawCreditapplication() ' ' drawPartsandservicelist() ' drawPartsandservicefull() ' ' drawMeetourpeoplelist() ' drawMeetourpeoplefull() ' '############################################################################## ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawHeader() ' ' Selects the appropriate header image for the page ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawHeader() '------------------------------------------------------- '-----------------------Begin HTML---------------------- If area = "usedcarsearch" or area = "usedcarsearchlist" or area = "usedcarsearchfull" Then %><% ElseIf area = "creditapplication" or area = "creditapplicationsubmission" Then %><% ElseIf area = "partsandservice" or area = "partsandservicefull" Then %><% ElseIf area = "meetourpeople" or area = "meetourpeoplefull" Then %><% ElseIf area = "maintenance" or area = "maintenancefull" Then %><% End If '---------------------END HTML-------------------------- '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawUsedcarsearch() ' ' Outputs the search form for Used Cars ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawUsedcarsearch() '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>

Welcome to the Fallon Auto Mall Pre-Owned Auto Search Engine.

(Note: All Fields are optional. If left unchanged all autos will be shown.)

  Please select from the following criteria:

From Year:

To Year:

Make:

Model:

Mileage:

Sort By:


<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawUsedcarsearchlist(content) ' ' Outputs the dynamic page with a list of Used Cars available for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawUsedcarsearchlist(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>
<% dim recordcounter recordcounter = 1 Do Until content.eof %> <% content.movenext if not content.eof then %> <% end if recordcounter = recordcounter + 1 Loop %>

<< Back To Search Page

Your search has returned <%= gNum %> Pre-Owned Autos.

Year

Make

Model

Mileage

Stock #

<%= content("vehicleyear") %>

<%= content("make") %>

<%= content("model") %>

<%= content("mileage") %>

<%= content("stock#") %>

 

<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawUsedcarsearchfull(content) ' ' Outputs the full Used Car for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawUsedcarsearchfull(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- 'Creating temp variables to be used so as not to lose data because the data 'is used in the wrong order dim tempstocknumber dim tempstored dim tempvehicleyear dim tempmake dim tempmodel dim tempengine dim temptransmission dim tempcolor dim tempmileage dim tempvin dim temppriceadjust dim tempretail dim tempimage tempstocknumber = Trim(content("stock#")) tempstored = Trim(content("stored")) tempvehicleyear = Trim(content("vehicleyear")) tempmake = Trim(content("make")) tempmodel = Trim(content("model")) tempengine = Trim(content("engine")) temptransmission = Trim(content("transmission")) tempcolor = Trim(content("color")) tempmileage = Trim(content("mileage")) tempvin = Trim(content("vin")) temppriceadjust = Trim(content("priceadjust")) tempretail = Trim(content("retail")) tempimage = Trim(content("image")) %>

<%= tempvehicleyear %> <%= tempcolor %> <%= tempmake %>
<%= tempmodel %>

Stock # <%= tempstocknumber %>

Mileage: <%= FormatNumber(tempmileage,0) %>

<% if tempimage <> "" then %> <% end if %> Description: <% dim temploopcounter for temploopcounter = 1 to 24 if Trim(content("equipment" & temploopcounter)) <> "" then if temploopcounter = 1 then response.write tempengine & ", " & temptransmission & ", " & Trim(content("equipment" & temploopcounter)) else response.write ", " & Trim(content("equipment" & temploopcounter)) end if end if next %>

Contact Us About This Vehicle >>


<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawCreditapplication(errorID) ' ' Display the Credit Application Form ' ' errorID Codes: ' 0 - Initial Credit Application ' 1 - Successful submission of the Credit Application ' 2 - Failed submission of the Credit Application ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawCreditapplication(errorID) '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>
Information submitted is secured by Microsoft SSL encryption and GeoTrust Inc.
<% If errorID = 1 Then %>

Thank you for submitting your Credit Application to the Fallon Auto Mall.

We will contact you with the results of your credit inquiry within 2 business days. Please Click Here if you have any further questions.

<% Else %>

Please complete one inquiry form for each person you wish to have listed on the Title of your vehicle.

The information you provide will be used in good faith and in accordance with State and Federal disclosure laws to assist you in purchasing a new or used vehicle. Your submission of this form clearly signifies that you, the customer, understand that the information provided will be used to poll credit bureau services and that you are showing a definite interest in purchasing or leasing a vehicle. This information will not be disclosed to any lending source(s) or outside entitie(s) except the Fallon Auto Mall. This form is not a requirement to conduct business, however, it does assist us to eliminate time and effort on your part when arriving at the Fallon Auto Mall.

All fields marked with }• at the end of the field must be completed.

<% If errorID = 2 Then %>

An Error has occurred. Please check the following to be sure each field has been filled in correctly:
<% Dim temperrorloopcounter For temperrorloopcounter = 0 to (creditapperrorscount - 1) response.write creditapperrors(temperrorloopcounter) & "
" Next %>

<% End If %>

Is Someone Already Assisting You?

Salesperson you wish to contact

Personal

First Name

}•

Last Name

}•

Middle Initial

Address

}•

City/State/Zip

}•}•}•

Home Phone

}•

Social Sec. #

}• (###-##-####)

Date Of Birth

}• (MM/DD/YYYY)

Employment

Employer

}•

Address

}•

City/State/Zip

}•}•}•

Work Phone

Monthly
Income

" class="formgeneral" type="text" name="Monthlyincome" size="24" maxlength="50">}• (gross)

Time On Job

}• Years   }• Months

Additional
Income

" class="formgeneral" type="text" name="Additionalincome" size="14" maxlength="50">

e–Mail Address

}•

Residence

Own or Rent?

>I own my residence. > I rent my residence.

Mortgage Co.
or Landlord

Phone

Monthly
Payment

" class="formgeneral" type="text" name="Landlordpayment" size="24" maxlength="50">

Trade–In

Do You Have
A Trade-In?

> Yes > No

Year/Make/
Model

" class="formgeneral" type="text" name="Tradeinyear" size="5" maxlength="4">//

Is there a
Pay Off?

> Yes > No

If so, please include the following information about your Lender:

Lender

Address


City/State/Zip

//

Phone

Account #

Pay–Off
Balance

" class="formgeneral" type="text" name="Payoffbalance" size="42" maxlength="50">

Pay–Off
Date

(MM/DD/YYYY)

Vehicle Interest

Type Of Vehicle

Preference

> New > Pre–Owned > Either

How Soon
Would You Like
To Buy?

Stock Number (if known)

Make an Offer

" class="formgeneral" type="text" name="Vehicleofferprice" size="24" maxlength="50">

Joint Application

Will This Be A
Joint Application?

> Yes > No

Co–Applicant
Name

Co–Applicant
Social Sec. #

(###-##-####)

Co–Applicant
Date of Birth

(MM/DD/YYYY)


<% End If %>
<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawPartsandservicelist(content) ' ' Outputs the dynamic page with a list of employees available for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawPartsandservicelist(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>

At Fallon Auto Mall you'll find highly trained and qualified service people that have had the factory training to service your Ford, Ford Truck, Mercury, Toyota, Chrysler, Jeep, Dodge and Dodge Truck.

And with this many models, you can imagine our extensive parts department. Of course it is impossible to carry every part. Thanks to our size, we can usually special order any part not in stock and have delivery within a few days.

Call us at 1-800-CAR-MALL to schedule your service or email us at service@fallonautomall.com and we'll call you to schedule your appointment.

Quality parts and service you can trust!

<% dim tempID dim tempemployee dim tempsummary dim tempfullstory dim tempimagecaption dim tempimagename Do Until content.eof 'Using temp variables in case data is lost cause pulled in the wrong order as the table in the db tempID = content("ID") tempemployee = content("employee") tempsummary = content("summary") tempfullstory = Trim(content("fullstory")) tempimagecaption = content("imagecaption") tempimagename = content("imagename") %> <% If tempimagecaption <> "" Then %> <% If tempimagecaption <> "" Then %> <% End If %>
<%= tempemployee %>

<%= tempsummary %>

<% Else %> <% End If %>

<% If tempfullstory <> "" Then %> Complete Story >> <% ElseIf tempimagecaption <> "" Then %>   <% End If %>

<%= tempimagecaption %>


<% content.movenext Loop %>
<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawPartsandservicefull(content) ' ' Outputs the full Used Car for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawPartsandservicefull(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- 'Creating temp variables to be used so as not to lose data because the data 'is used in the wrong order dim tempemployee dim tempfullstory dim tempimagecaption dim tempimagename tempemployee = content("employee") tempfullstory = Trim(content("fullstory")) tempimagecaption = Trim(content("imagecaption")) tempimagename = content("imagename") %>
<%= tempemployee %>
<% If tempimagecaption <> "" Then %> <% End If %>

<%= tempimagecaption %>

<%= ReplaceText (vbcrlf, tempfullstory, "
") %>

<<Back

<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawMeetourpeoplelist(content) ' ' Outputs the dynamic page with a list of employees available for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawMeetourpeoplelist(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>
<% dim pageID pageID = 25 dim result set result=conn.execute("SELECT * FROM tbl_Pages WHERE ID = " & pageID) if not result.eof then %>

<% if result("smallimage") <> "" then %> " align="right"> <% end if %> <%= result("opt1") %>

<% end if %>
<% dim tempID dim tempemployee dim tempsummary dim tempfullstory dim tempimagecaption dim tempimagename Do Until content.eof 'Using temp variables in case data is lost cause pulled in the wrong order as the table in the db tempID = content("ID") tempemployee = content("employee") tempsummary = content("summary") tempfullstory = Trim(content("fullstory")) tempimagecaption = Trim(content("imagecaption")) tempimagename = content("imagename") %> <% If tempimagecaption <> "" Then %> <% If tempimagecaption <> "" Then %> <% End If %>
<%= tempemployee %>

<%= tempsummary %>

<% Else %> <% End If %>

<% If tempfullstory <> "" Then %> Complete Story >> <% ElseIf tempimagecaption <> "" Then %>   <% End If %>

<%= replace(tempimagecaption, "@", "@ ") %>


<% content.movenext Loop %>
<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawMeetourpeoplefull(content) ' ' Outputs the full Used Car for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawMeetourpeoplefull(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- 'Creating temp variables to be used so as not to lose data because the data 'is used in the wrong order dim tempemployee dim tempfullstory dim tempimagecaption dim tempimagename tempemployee = content("employee") tempfullstory = Trim(content("fullstory")) tempimagecaption = Trim(content("imagecaption")) tempimagename = content("imagename") %>
<%= tempemployee %>
<% If tempimagecaption <> "" Then %> <% End If %>

<%= tempimagecaption %>

<%= ReplaceText (vbcrlf, tempfullstory, "
") %>

<<Back

<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawMaintenancelist(content) ' ' Outputs the dynamic page with a list of employees available for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawMaintenancelist(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- %>
<% dim tempID dim tempemployee dim tempsummary dim tempfullstory dim tempimagecaption dim tempimagename dim x x = 0 %> <% Do Until content.eof 'Using temp variables in case data is lost cause pulled in the wrong order as the table in the db tempID = content("ID") tempemployee = content("employee") tempsummary = content("summary") tempfullstory = Trim(content("fullstory")) tempimagecaption = Trim(content("imagecaption")) tempimagename = content("imagename") if x mod 3 = 0 then response.write "" end if %> <% content.movenext x = x + 1 Loop %>


<%= tempemployee %>
 

<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' void drawMaintenancefull(content) ' ' Outputs the full Used Car for viewing ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sub drawMaintenancefull(content) '------------------------------------------------------- '-----------------------Begin HTML---------------------- 'Creating temp variables to be used so as not to lose data because the data 'is used in the wrong order dim tempemployee dim tempfullstory dim tempimagecaption dim tempimagename tempemployee = content("employee") tempfullstory = Trim(content("fullstory")) tempimagecaption = Trim(content("imagecaption")) tempimagename = content("imagename") %>
<%= tempemployee %>
<% If tempimagecaption <> "" Then %> <% End If %>

<%= tempimagecaption %>

<%= ReplaceText (vbcrlf, tempfullstory, "
") %>

<<Back

<% '---------------------END HTML------------------------ '------------------------------------------------------- end sub %> <% dim salespdf set salespdf = conn.execute("SELECT document FROM tbl_Pages WHERE ID = 23") %>
About Us Country Advantage Fallon Events History Meet Our People Testimonials Employment Map
" target="_blank" ONMOUSEOVER="changeImages('Top_18', 'images/Top_18-over.gif'); return true;" ONMOUSEOUT="changeImages('Top_18', 'images/Top_18.gif'); return true;">

Welcome to Fallon Nevada's Premiere Toyota Dealership!

Welcome to Fallon Toyota. As a Toyota dealership, we are proud to offer you the highest quality in sales and service. Come on in and browse the complete services we offer. If you have any questions, feel free to call or e-mail us to speak to one of our friendly staff. We'd love to meet with you in person too, so stop on by to see our complete inventory of vehicles and to learn more about our special offers and service.

CURRENT TOYOTA MODELS

 

Click the make of a vehicle above for more information on this year's model.

Toyota has long believed that vehicles must be developed to meet the special needs of the people who drive them: local people. That's why, for more than two decades, Toyota has designed and tested many vehicles in the U.S.

In 1997, Toyota set a new manufacturing record of 838,069 vehicles produced in North America. In fact, since 1986, we have produced more than five million vehicles here. Last year, over 60% of the Toyota vehicles sold in the U.S. were built in North America. Four-cylinder and V-6 engine production also reached an all-time high with more than 435,000 units built in Kentucky.

Fallon Auto Mall is proud to be your choice for Toyota cars and vehicles! We look forward to meeting you and helping you find the car or truck you need at a price you can afford. Thank you



<% dbCloseConnection() %>


Current Sales Ad | Country Roads Newsletter
View All Inventory | Search Inventory | Ford | Chrysler | Mercury | Toyota | Dodge | Jeep
About Us | Country Advantage | Fallon Events | History | Staff | Testimonials
Employment | Map | Parts And Service | Maintenance Schedule | Corporate Sales
Credit Application | Appt/Contact | Home


Copyright 2002 by Fallon Auto Mall
Web Design by Global Studio, an Advertising Agency
Send technical questions to info@globalstudio.com