%
Dim cnConnection
Dim rsCustomer
Dim iIncident
Dim strPreviousPage
Dim rsPremier
Dim strHex
Dim strName
Dim strPhone
Dim strEmail
Dim strHigh
Dim strLow
Dim strTemp
Call CVerifyEntry
Call CVerifyPassport
Call CCreateObjects
Call CCreateConnection
if cnConnection.State = adStateOpen then
Call CGetPremierID
if Request.Cookies("Misc")("auto") = "True" then
Call CSetPassport
else
Response.Cookies("Misc")("auto") = "False"
End If
End If
Call CSetPreviousPage
Call CGetCustomerProfile
Call CDestroyObjects
'_____________________________________________________________________________________________________________________
'Sub Procedures
Private Sub CSetPreviousPage
on error resume next
strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
Response.Cookies("Misc")("PreviousPage") = strPreviousPage
End Sub
Private Sub CGetCustomerProfile
on error resume next
if oPassMgrObj.Profile("MemberIdHigh") <> "" and oPassMgrObj.Profile("MemberIdLow")<> "" then
Set rsCustomer = cnConnection.execute("Exec GetCustomer " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow"))
set rsCustomer.ActiveConnection = Nothing
if rsCustomer.State = adStateOpen then
if rsCustomer.RecordCount > 0 then
strEmail = rsCustomer("EMail")
strName = rsCustomer("Contact")
strPhone = rsCustomer("Phone")
if Request.Cookies("intCustomerPremierID") = 0 then
if IsNull(rsCustomer("PremierID")) = false then
Response.Cookies("intCustomerPremierID") = rsCustomer("PremierID")
end if
end if
else
strName = oPassMgrObj.Profile("MemberName")
strPhone = ""
strEmail = oPassMgrObj.Profile("PreferredEmail")
end if
else
strName = oPassMgrObj.Profile("MemberName")
strPhone = ""
strEmail = oPassMgrObj.Profile("PreferredEmail")
end if
end if
End Sub
Private Sub CSetPassport
on error resume next
if Request.Cookies("Misc")("auto") = "True" then
if oPassMgrObj.Profile("MemberIdHigh") <> "" and oPassMgrObj.Profile("MemberIdLow") <> "" then
iIncident = Request.Cookies("Misc")("txtIncidentID")
cnConnection.Execute("Exec SetPassport " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow") & ", " & iIncident)
if cnConnection.Errors.Count > 0 then
cnConnection.Errors.Clear
Exit Sub
End if
end if
end if
End Sub
Private Sub CGetPremierID
on error resume next
Response.Cookies("intCustomerPremierID") = 0
strHigh = CStr(Hex(oPassMgrObj.Profile("MemberIdHigh")))
strLow = Cstr(Hex(oPassMgrObj.Profile("MemberIdLow")))
if Len(strHigh) > 8 then
strHigh = right(strHigh, 8)
end if
if len(strLow) > 8 then
strLow = right(strHigh, 8)
end if
if Len(strHigh) < 8 then
strTemp = String(8 - len(strHigh), "0")
strHigh =strTemp & strHigh
end if
if Len(strLow) < 8 then
strTemp = string(8 - len(strLow), "0")
strLow = strTemp & strLow
end if
strHex = strHigh & strLow
set rsPremier = cnConnection.Execute("Exec GetPremierID '" & strHex & "'")
if cnConnection.Errors.Count > 0 then
Response.Cookies("intCustomerPremierID") = 0
Exit Sub
End if
if rsPremier.State = adStateOpen then
if rsPremier.RecordCount > 0 then
Response.Cookies("intCustomerPremierID") = rsPremier.Fields(0).Value
else
Response.Cookies("intCustomerPremierID") = 0
end if
else
Response.Cookies("intCustomerPremierID") = 0
end if
End Sub
Private Sub CVerifyEntry
on error resume next
if Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then
if Request.Cookies("Misc")("privacy") <> "1" then
Response.Redirect("https://" & Request.ServerVariables("SERVER_NAME") & "/secure/sprivacy.asp")
Response.End
end if
end if
End Sub
Private Sub CVerifyPassport
on error Resume next
If oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin) = false then
Response.Cookies("Misc")("P") = "1"
Response.Write "
" & L_CUSTOMER_PASSPORT_TITLE_TEXT Response.Write "
" & L_CUSTOMER_PASSPORT_INFO_TEXT
Response.Write "" & L_WELCOME_PASSPORT_LINK_TEXT & "
"
Response.write oPassMgrObj.LogoTag2(Server.URLEncode(ThisPageURL), TimeWindow, ForceLogin, CoBrandArgs, strLCID, Secure)
Response.Write "
" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "
" Response.Write "" & L_COMMENTS_CONNECTION_FAILED_TEXT & "
<% = L_CUSTOMER_IN_FORMATION_TEXT %>
<% = L_CUSTOMER_CON_TACT_TEXT %>
<% = L_CUSTOMER_CONTACT_INFORMATION_TEXT %>
<% = Server.HTMLEncode(rsCustomer("Contact")) %>
<%
strName = Replace(strName, Chr(34), """)
if Len(strName) = 4 and strName = "~|~|" then
%>
<%
else
if Session.CodePage = 932 then
%>
<%
else
%>
<%
end if
end if
%>
<%
if Len(strEmail) = 4 and strEmail = "~|~|" then
%>
<%
else
if Session.CodePage = 932 then
%>
<%
else
%>
<%
end if
end if
%>
<%
if Len(strPhone) = 4 and strPhone = "~|~|" then
%>
<%
else
if Session.CodePage = 932 then
%>
<%
else
%>
<%
end if
end if
%>
<% = L_CUSTOMER_LO_CATE_TEXT %>
<% = L_CUSTOMER_LOCATE_INFO_TEXT %>
/welcome.asp"><% = L_LOCATE_CANCEL_LINK_TEXT %> | <% = L_LOCATE_PREVIOUS_LINK_TEXT%> | <% = L_CUSTOMER_NEXT_LINK_TEXT %> |