%
Dim strPreviousPage
Dim strCookies
Dim strEmail
Dim strPhone
Dim strName
Dim cmComments
Dim cnConnection
if Trim(Request.Cookies("Misc")("PreviousPage")) <> "customer.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "view.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "received.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then
Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
Response.End
end if
strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
Response.Cookies("Misc")("PreviousPage") = strPreviousPage
If oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin) = false then
Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
Response.End
end if
Response.Buffer = true
if Request.Cookies("Misc")("unassoc") = "true" then
Response.Cookies("Misc")("txtIncidentID") = "~|~|"
end if
Response.Cookies("Misc")("unassoc") = "false"
Call CCreateObjects
Call CCreateConnection
Call CSetCustomer
Call CDestroyObjects
Private Sub CSetCustomer
on error resume next
strName = unescape(Request.Cookies("Customer")("txtCustomerName"))
strPhone = unescape(Request.Cookies("Customer")("txtCustomerPhone"))
strEmail = unescape(Request.Cookies("Customer")("txtCustomerEmail"))
if Len(strName)=4 and strName="~|~|" then
strName = ""
end if
if Len(strPhone)=4 and strPhone="~|~|" then
strPhone = ""
end if
if Len(strEmail)=4 and strEmail="~|~|" then
strEmail = ""
end if
with cmComments
.ActiveConnection = cnConnection
.CommandText = "SetCustomer"
.CommandType = adCmdStoredProc
.CommandTimeout = strGlobalCommandTimeout
.Parameters.Append .CreateParameter("@HighID", adInteger, adParamInput, , clng(oPassMgrObj.Profile("MemberIdHigh")))
.Parameters.Append .CreateParameter("@LowID", adInteger, adParamInput, , clng(oPassMgrObj.Profile("MemberIdLow")))
.Parameters.Append .CreateParameter("@EMail", adVarWChar, adParamInput, 128, trim(left(strEmail, 128)))
.Parameters.Append .CreateParameter("@Contact", adVarWChar, adParamInput, 32, trim(left(strName, 32)))
.Parameters.Append .CreateParameter("@Phone", adVarWChar, adParamInput, 16, trim(left(strPhone, 16)))
.Parameters.Append .CreateParameter("@PremierID", adVarWChar, adParamInput, 16, cstr(Request.Cookies("intCustomerPremierID")))
.Parameters.Append .CreateParameter("@Lang", adVarWChar, adParamInput, 4, strAbb)
.Execute
end with'Verify no errors
if cnConnection.Errors.Count > 0 then
Response.Write "
" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "
" Response.Write "" & L_COMMENTS_DATABASE_FAILED_TEXT & "
" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "
" Response.Write "" & L_COMMENTS_CONNECTION_FAILED_TEXT & "
Error Number:" & cnConnection.Errors(0).Number & "
" Response.Write "Error Description:" & cnConnection.Errors(0).Description & "
" cnConnection.Errors.Clear Call CDestroyObjects %> <% Response.End end if End Sub Private Sub CCreateObjects on error resume next set cnConnection = CreateObject("ADODB.Connection") set cmComments = CreateObject("ADODB.Command") End Sub Private Sub CDestroyObjects on error resume next 'Close connection object and set ado objects to nothing if cnConnection.State = adStateOpen then cnConnection.Close set cmComments = nothing set cnConnection = nothing End Sub 'Session.LCID = strLCID %><% = L_LOCATE_DUMP_FILES_MESSAGE%>
<% = L_LOCATE_DUMP_FILESBODY_MESSAGE%>
<% = L_LOCATE_EVENT_REPORTS_TEXT%>
<% = L_LOCATE_EVENT_DETAILS_TEXT%>
<% = L_LOCATE_SEARCH_RESULTS_TEXT%>
/welcome.asp" ><% = L_LOCATE_CANCEL_LINK_TEXT%> | <% = L_LOCATE_PREVIOUS_LINK_TEXT%> | <% = L_SUBMIT_VIEW_CONTENTS_TEXT %> | <% = L_CUSTOMER_NEXT_LINK_TEXT %> |