%@ Language=VBScript %>
<%'****************************************************************************
'* File Name: Registration.asp
'* Author : Ron Tracy
'* Date : November, 2001
'* Purpose : Adds new registrations from ICS web site
'* Comments :
'* Mod #1 : Dot chanmges before implemented - took over for ROn
'* Mod #2 : SPW 4/19/02 corrected link to Blue site
'* Mod #3 : NMF 5/15/02 chd link to store.shtm instead of purchase.shtm
'* Mod #4 : Dot 8/15/02 chg mailer.host to include stmt w/new address
'* Mod #5 : Dot 2/25/03 add carriage return so email formats ok
'* #6 : NMP 7/13/07 chg include statements to CommonPgm folder
'****************************************************************************%>
<%Response.Buffer = True%>
<%
'Read in data entered if this page is calling itself
Function WriteCheckbox(name, value)
If value="on" Then
Response.Write ""
Else
Response.Write ""
End If
End Function
Function ChkStrForDblQuot(StrToChk)
ChkStrForDblQuot = Replace(StrToChk,"'", "''")
End Function
If Request.Form.Count = 0 Then
fRedirect = "F"
Else
stadd1 = Trim(Request.Form("stadd1"))
stadd2 = Trim(Request.Form("stadd2"))
city = Trim(Request.Form("city"))
coname = Trim(Request.Form("coname"))
country = Request.Form("country")
IntCountry = Trim(Request.Form("IntCountry"))
datepurchased1 = Request.Form("Month")
datepurchased2 = Request.Form("Day")
datepurchased3 = Request.Form("Year")
dlraddress = Trim(Request.Form("dlraddress"))
dlrcity = Trim(Request.Form("dlrcity"))
dlrname = Trim(Request.Form("dlrname"))
dlrstate = Request.Form("dlrstate")
dlrzip = Trim(Request.Form("dlrzip"))
proddesc = Trim(Request.Form("proddesc"))
email = Trim(Request.Form("email"))
fax = Trim(Request.Form("fax"))
model = Request.Form("model")
purname = Trim(Request.Form("purname"))
phone = Trim(Request.Form("phone"))
userental = Request.Form("userental")
usecutcont = Request.Form("usecutcont")
usegencont = Request.Form("usegencont")
usedemo = Request.Form("usedemo")
useother = Request.Form("useother")
equipgas = Request.Form("equipgas")
equiphyd = Request.Form("equiphyd")
equipother = Request.Form("equipother")
equipnone = Request.Form("equipnone")
infoopmanual = Request.Form("infoopmanual")
infoinstructions = Request.Form("infoinstructions")
infodemo = Request.Form("infodemo")
infovideo = Request.Form("infovideo")
infwom = Request.Form("infwom")
inflads = Request.Form("inflads")
infldealer = Request.Form("infldealer")
infltradeshow = Request.Form("infltradeshow")
txtOtherInfl = Request.Form("txtOtherInfl")
serialnum = Trim(Request.Form("serialnum"))
state = Trim(Request.Form("state"))
zip = Trim(Request.Form("zip"))
textfield2 = Request.Form("textfield2")
' Find model description
ModelDesc = getModelsD
iUbound= Ubound(ModelDesc,2)
For iCount = 0 to iUbound
If cstr(ModelDesc(0,iCount)) = model Then
moddesc = ModelDesc(1,iCount)
End If
Next
'Check for data in required fields
fShowMsg = "F"
If Len(purname) =0 Then
fpurname = "T": fShowMsg = "T": tPurNameColor = "ff0000"
Else
tPurNameColor = "#000000"
End If
If Len(stadd1) = 0 Then
fstadd1 = "T": fShowMsg = "T": tstadd1Color = "ff0000"
Else
tstadd1Color = "#000000"
End If
If Len(city) = 0 Then
fcity = "T": fShowMsg = "T": tcityColor = "ff0000"
Else
tcityColor = "#000000"
End If
If Len(state) = 0 Then
fstate = "T": fShowMsg = "T": tstateColor = "ff0000"
Else
tstateColor = "#000000"
End If
If Len(zip) = 0 Then
fzip = "T": fShowMsg = "T": tzipColor = "ff0000"
Else
tzipColor = "#000000"
End If
If Len(phone) = 0 Then
fphone = "T": fShowMsg = "T": tphoneColor = "ff0000"
Else
tphonecolor = "#000000"
End If
If Len(email) = 0 Then
femail = "T": fShowMsg = "T": temailColor = "ff0000"
Else
temailColor = "#000000"
End If
If IsDate(datepurchased1 & "/" & datepurchased2 & "/" & datepurchased3) = False Then
fdatepurchased = "T": fShowMsg = "T": tDatePurchasedColor = "ff0000"
Else
tDatePurchasedColor = "#000000"
End If
If Len(model) = 0 Then
fmodel = "T": fShowMsg = "T": tmodelColor = "ff0000"
Else
tmodelColor = "#000000"
End If
If Len(serialnum) = 0 Then
fserialnum = "T": fShowMsg = "T": tserialnumColor = "ff0000"
Else
tserialnumColor = "#000000"
End If
If fShowMsg = "T" Then fRedirect = "F" Else fRedirect = "T" End If
End If
'If Record was verified, save to database
If fRedirect = "T" Then
Set Conn=Server.CreateObject("ADODB.Connection")
%>
<%
'****************************************************************************
'* File Name: Connection String for icsbestwayUUNET website
'* Author : Dot Leppin
'* Date : December, 2001
'* DataBase : icsbestway
'* Purpose : This is an include file that should be used in every asp page
'* requiring connection to the DIGEX database.
'****************************************************************************
Conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=ics_web;Password=dxics82;Initial Catalog=icsbestway;Data Source=(local)"
%>
<%
conn.Open
sql = "EXEC usp_RegistrationInsert '" & ChkStrForDblQuot(stadd1) & "'"
sql = sql & ",'" & ChkStrForDblQuot(stadd2) & "'"
sql = sql & ",'" & ChkStrForDblQuot(city) & "'"
sql = sql & ",'" & ChkStrForDblQuot(coname) & "'"
sql = sql & ",'" & country & "'"
sql = sql & ",'" & IntCountry & "'"
sql = sql & ",'" & datepurchased1 & " " & datepurchased2 & ", " & datepurchased3 & "'"
sql = sql & ",'" & ChkStrForDblQuot(dlraddress) & "'"
sql = sql & ",'" & ChkStrForDblQuot(dlrcity) & "'"
sql = sql & ",'" & ChkStrForDblQuot(dlrname) & "'"
sql = sql & ",'" & ChkStrForDblQuot(dlrstate) & "'"
sql = sql & ",'" & ChkStrForDblQuot(dlrzip) & "'"
sql = sql & ",'" & ChkStrForDblQuot(proddesc) & "'"
sql = sql & ",'" & ChkStrForDblQuot(email) & "'"
sql = sql & ",'" & ChkStrForDblQuot(fax) & "'"
sql = sql & ",'" & ChkStrForDblQuot(model) & "'"
sql = sql & ",'" & ChkStrForDblQuot(moddesc) & "'"
sql = sql & ",'" & ChkStrForDblQuot(purname) & "'"
sql = sql & ",'" & ChkStrForDblQuot(phone) & "'"
sql = sql & ",'" & userental & "'"
sql = sql & ",'" & usecutcont & "'"
sql = sql & ",'" & usegencont & "'"
sql = sql & ",'" & usedemo & "'"
sql = sql & ",'" & useother & "'"
sql = sql & ",'" & equipgas & "'"
sql = sql & ",'" & equiphyd & "'"
sql = sql & ",'" & equipother & "'"
sql = sql & ",'" & equipnone & "'"
sql = sql & ",'" & infoopmanual & "'"
sql = sql & ",'" & infoinstructions & "'"
sql = sql & ",'" & infodemo & "'"
sql = sql & ",'" & infovideo & "'"
sql = sql & ",'" & infwom & "'"
sql = sql & ",'" & inflads & "'"
sql = sql & ",'" & infldealer & "'"
sql = sql & ",'" & infltradeshow & "'"
sql = sql & ",'" & ChkStrForDblQuot(txtOtherInfl) & "'"
sql = sql & ",'" & ChkStrForDblQuot(serialnum) & "'"
sql = sql & ",'" & "Source" & "'"
sql = sql & ",'" & state & "'"
sql = sql & ",'" & ChkStrForDblQuot(zip) & "'"
sql = sql & ",'" & ChkStrForDblQuot(textfield2) & "'"
conn.Execute(sql)
conn.Close
set conn = nothing
'Send email
Body = "The following registration was received:" & vbCrLf & vbCrLf
Body = Body & "Purchaser's Name:....... " & purname & vbCrLf
Body = Body & "Company Name:........... " & coname & vbCrLf
Body = Body & "Street Address:......... " & stadd1 & vbCrLf
If Len(stadd2)>0 Then
Body = Body & "Street Address 1:....... " & stadd2 & vbCrLf
End If
Body = Body & "City, State, ZIP:....... " & city & ", " & state & " " & zip & vbCrLf
Body = Body & vbCrLf
If Len(country)>0 Then
Body = Body & "Country:................ " & country & vbCrLf
End If
If Len(IntCountry)>0 Then
Body = Body & "International Country:.. " & IntCountry & vbCrLf
End If
Body = Body & "Phone:.................. " & phone & vbCrLf
If Len(fax)>0 Then
Body = Body & "Fax:.................... " & fax & vbCrLf
End If
Body = Body & "EMail:.................. " & email & vbCrLf & vbCrLf
Body = Body & "Date Purchased:......... " & datepurchased1 & " " & datepurchased2 & ", " & datepurchased3 & vbCrLf & vbCrLf
Body = Body & "Model:.................. " & moddesc & vbCrLf
Body = Body & "Serial Number:.......... " & serialnum & vbCrLf
If Len(proddesc)>0 Then
Body = Body & "Description:............ " & proddesc & vbCrLf & vbCrLf
End If
If Len(dlrname)>0 Then
Body = Body & "Dealer Name:............ " & dlrname & vbCrLf
End If
If Len(dlraddress)>0 Then
Body = Body & "Dealer Address:......... " & dlraddress & vbCrLf
End If
If Len(dlrcity)>0 Or Len(dlrstate)>0 Or Len(dlrzip)>0 Then
Body = Body & "Dealer City, State, ZIP: "
If len(dlrcity)>0 Then
Body = Body & dlrcity
End If
If Len(dlrstate)>0 Then
Body = Body & ", " & dlrstate
End If
If Len(dlrzip)>0 Then
Body = Body & " " & dlrzip & vbCrLf
End If
End If
Body = Body & vbCrLf & "----Principal Use---- " & vbCrLf
If useRental = "on" Then
Body = Body & " Rental" & vbCrLf
End If
If usegencont = "on" Then
Body = Body & " General Contractor" & vbCrLf
End If
If usecutcont = "on" Then
Body = Body & " Cutting Contractor" & vbCrLf
End If
If usedemo = "on" Then
Body = Body & " Demolition" & vbCrLf
End If
If useother = "on" Then
Body = Body & " Other" & vbCrLf
End If
Body = Body & "----Other types of equipment owned or operated----" & vbCrLf
If equipgas = "on" Then
Body = Body & " Gas cut-off saw" & vbCrLf
End If
If equiphyd = "on" Then
Body = Body & " Hydraulic saw" & vbCrLf
End If
If equipother = "on" Then
Body = Body & " Other concrete saw" & vbCrLf
End If
If equipnone = "on" Then
Body = Body & " None" & vbCrLf
End If
Body = Body & "----Safety/operational information obtained from----" & vbCrLf
If infoopmanual = "on" Then
Body = Body & " Owner's manual" & vbCrLf
End If
If infoinstructions = "on" Then
Body = Body & " Instructions" & vbCrLf
End If
If infodemo = "on" Then
Body = Body & " Demonstration" & vbCrLf
End If
If infovideo = "on" Then
Body = Body & " Video" & vbCrLf
End If
Body = Body & "----What influenced your purchase----" & vbCrLf
If infwom = "on" Then
Body = Body & " Word of Mouth" & vbCrLf
End If
If inflads = "on" Then
Body = Body & " Advertising" & vbCrLf
End If
If infldealer = "on" Then
Body = Body & " Dealer" & vbCrLf
End If
If infltradeshow = "on" Then
Body = Body & " Trade show" & vbCrLf
End If
If Len(txtOtherInfl)>0 Then
Body = Body & "Other:" & txtOtherInfl & vbCrLf
End If
If Len(textfield2)>0 Then
Body = Body & vbCrLf & "Comments:" & vbCrLf
Body = Body & vbCrLf & textfield2
End If
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "ICS Website"
Mailer.FromAddress = "Website@icsbestway.com"
%>
<%
'****************************************************************************
'* File Name: Remote Mailer assignment
'* Author : Dot Leppin
'* Date : August, 2002
'* DataBase : oregonchain
'* Purpose : This is an include file that should be used in every asp page
'* requiring an email to be sent.
'* CHG 2/12/04 Susan Williams - change IP aftr Firewall install at Digex
'****************************************************************************
Mailer.RemoteHost = "10.160.4.16"
'Mailer.RemoteHost = "pdxmail"
%>
<%
Mailer.AddRecipient "Marketing", "marketing@icsbestway.com"
'Mailer.AddRecipient "Nicole Fields", "nicolef@icsbestway.com"
'Mailer.AddRecipient "Susan Williams", "susan.williams@oregonchain.com"
'Mailer.AddRecipient "Nicole Pucci", "nicole.pucci@oregonchain.com"
Mailer.Subject = "ICS Registration"
Mailer.BodyText = Body
if not Mailer.SendMail then
if Mailer.Response <> "" then
strError = Mailer.Response
else
strError = "Unknown"
end if
Response.Write "Mail failure occured. Reason: " & strError
Response.End
End If
Response.Redirect("registration_confirmation.htm")
End If
%>
<%
'****************************************************************************
'* File Name: LookupTable.asp
'* Author : Ron Tracy
'* Date : October 2001
'* DataBase : icsbestway
'* Purpose : This refreshes lookup tables
'* Changes : NMP 7/13/07 Update include statements to CommonPgm folder
'****************************************************************************
sub CacheData(TypeName, sql)
dim rs, Cmd, aData
'Put valid data into application variable
if (not isdate(application(TypeName & "Update"))) then
application.lock
application(TypeName & "Update") = #12/31/1990#
application.unlock
end if
'If last update more than 6 hours old then refresh
'if (abs(datediff("h", application(TypeName & "Update"), now())) > 6) then
Dim Conn
Set Conn=Server.CreateObject("ADODB.Connection")
%>
<%
'****************************************************************************
'* File Name: Connection String for icsbestwayUUNET website
'* Author : Dot Leppin
'* Date : December, 2001
'* DataBase : icsbestway
'* Purpose : This is an include file that should be used in every asp page
'* requiring connection to the DIGEX database.
'****************************************************************************
Conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=ics_web;Password=dxics82;Initial Catalog=icsbestway;Data Source=(local)"
%>
<%
set rs = server.createobject("adodb.recordset")
Conn.Open
With rs
.Source = sql
.ActiveConnection = Conn
.CursorLocation = 3 'adUseClient
.LockType = 1 'adLockReadOnly
.Open
End With
if (not rs.eof) then
aData = rs.getrows()
end if
rs.close
set rs = nothing
Conn.Close
set conn = nothing
'Store in global memory
application.lock
application(TypeName) = aData
application(TypeName & "Update") = now()
application.unlock
Response.Write "Hello" & " "
'end if
end sub
function getStates()
CacheData "States", "SELECT CodeValue FROM CodesTable WHERE CodeID in ('StateCode', 'ProvinceCode') ORDER BY CodeValue"
getStates = application("States")
end function
function getModels()
CacheData "Models", "SELECT ProductAutoId, ProductName FROM Products ORDER BY ProductName"
getModels = application("Models")
end function
function getModelsD()
CacheData "ModelDesc", "SELECT ProductAutoId, ProductName FROM Products ORDER BY ProductName"
getModelsD = application("ModelDesc")
end function
function PageItem(tPageItem, tSellReg, tBusId, tLangId, tItem)
aItem = getPageItems
iFields = ubound(aItem)
iRecords = ubound(aItem,2)
for iCount = 0 to iRecords
if aItem(2,iCount)=tPageItem then
if trim(aItem(0,iCount))=trim(tBusId) then
if aItem(1,iCount)=tLangId then
if aItem(3,iCount)=tSellReg then
select case tItem
case "GraphicLink"
PageItem = aItem(5,iCount)
case "ThumbnailLink"
PageItem = aItem(7,iCount)
case "DataSheetLink"
PageItem = aItem(4,iCount)
case "ItemText"
PageItem = aItem(6,iCount)
case "Alt"
PageItem = aItem(8,iCount)
case else
Err.Raise vbObjectError + 1000, "Lookup Table", "'" & tItem & "' is an invalid PageItem for this function."
end select
exit for
end if
end if
end if
end if
next
end function
%>
ICS Verkauf - Registrierung
Registrierung
Wichtig: jedes Produkt muß registriert werden, um
die Garantie zu erhalten. Klicken Sie hier um die Einzelheiten
der Garantie zu erfahren.
ICS, Blount Europe SA
Rue Buisson Aux Loups 8
B 1400 Nivelles, Belgium