<% Dim sFileName Dim iPos dim cnConnection dim cmHash dim rsHash Dim bolHashExists Dim strPreviousPage Dim strIncidentID Dim rs Dim strHexIncidentID Dim strEventName Dim strNotes Dim strComments Dim strPrevLoadedFiles Dim bolHighExists Dim sPrevFileName bolHighExists = false Call CVerifyEntry Call CSetPreviousPage Call CCreateObjects sFileName = unescape(Request.Cookies("ocaFileName")) iPos = Instr(1, sFileName, ",") if iPos <> 0 then sFileName = Left(sFileName, iPos - 1) end if If oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin) = false then Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp") Response.End end if Call CCreateConnection bolHashExists = false if Request.Cookies("Misc")("unassoc") = "false" then if Request.Cookies("Misc")("auto") <> "True" then Call CGetHash Call CCheckValidate 'Response.Write "
" & bolHashExists if bolHashExists = false then if Request.Cookies("Misc")("txtIncidentID") = "" or (Len(Request.Cookies("Misc")("txtIncidentID")) = 4 and Request.Cookies("Misc")("txtIncidentID") = "~|~|") then Call CGetIncidentID if strIncidentID = "" or len(strIncidentID) = 0 then Call CGetIncidentID if strIncidentID = "" or len(trim(strIncidentID)) = 0 then Response.Write "

" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "

" Response.Write "

" & L_COMMENTS_DATABASE_FAILED_TEXT & "

" Response.Write "
" & cnConnection.Errors(0).Description & "
" & Err.Description cnConnection.Errors.Clear Call CDestroyObjects %> <% Response.End End if end if else strIncidentID = Request.Cookies("Misc")("txtIncidentID") strHexIncidentID = hex(strIncidentID) end if else Response.Cookies("Misc")("unassoc") = "true" strIncidentID = rsHash.Fields(0).Value end if Response.Cookies("Misc")("txtIncidentID") = strIncidentID end if end if 'Response.Write Request.Cookies("Misc")("unassoc") & "
" & Request.Cookies("Misc")("txtIncidentID") Call CDestroyObjects dim strFile dim x dim iLen dim strSearchVariable if Instr(1, sFileName, "/") > 0 then strSearchVariable = "/" else strSearchVariable = "\" end if if Len(sFileName) > 0 then iLen = 1 do while iLen > 0 iLen = Instr(iLen, sFileName, strSearchVariable) if iLen = 0 then exit do iPos = iLen iLen = iLen + 1 loop strFile = Right(sFileName, (Len(sFileName) - iPos)) end if Call CGetFileName '_____________________________________________________________________________________________________________________ 'Sub Procedures Private Sub CGetFileName on error resume next sPrevFileName = Request.Cookies("ocaFileName") iPos = Instr(1, sPrevFileName, ",") sPrevFileName = Left(sPrevFileName, iPos - 1) if InstrRev(sPrevFileName, "/") <> 0 then sPrevFileName = Right(sPrevFileName, len(sPrevFileName) - InStrRev(sPrevFileName, "/")) elseif InstrRev(sFileName, "\") <> 0 then sPrevFileName = Right(sPrevFileName, len(sPrevFileName) - InStrRev(sPrevFileName, "\")) end if End Sub Private Sub CGetIncidentID on error resume next set rs = cnConnection.Execute("GetIncident " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow")) if cnConnection.Errors.Count > 0 then Response.Write "

" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "

" Response.Write "

" & L_COMMENTS_DATABASE_FAILED_TEXT & "

" Response.Write "
" & cnConnection.Errors(0).Description & "
" & Err.Description cnConnection.Errors.Clear Call CDestroyObjects %> <% Response.End end if strIncidentID = rs.fields(0).value strHexIncidentID = hex(strIncidentID) End Sub Private Sub CCheckValidate on error resume next if instr(1, LCase(Request.Cookies("ocaFileName")), "validate") > 0 then bolHashExists = false end if if instr(1, LCase(Request.Cookies("ocaFileName")), "pss") > 0 then bolHashExists = false end if End Sub Private Sub CGetHash on error goto 0 on error resume next with cmHash .ActiveConnection = cnConnection .CommandText = "GetHash" .CommandType = adCmdStoredProc .CommandTimeout = strGlobalCommandTimeout .Parameters.Append .CreateParameter("@DumpHash",adVarWChar, adParamInput, 33, Request.Cookies("strHash")) set rsHash = .Execute end with 'Response.Write "
Conn Err:" & cnConnection.Errors.Count & "
Err:" & Err.Description 'Response.Write "
RecordState:" & rsHash.State & "
Conn State:" & cnConnection.State 'Response.write "
Hash:" & Request.Cookies("strHash") if cnConnection.Errors.Count > 0 then Response.Write "
CN Errors:" & cnConnection.Errors(0).Description end if 'Response.Write "
State:" & rs.State & "
" & Request.Cookies("strHash") if rsHash.State = adStateOpen then if rsHash.RecordCount > 0 then bolHashExists = true if IsNull(rsHash.Fields(1).Value) = true then bolHighExists = false elseif rsHash.Fields(1).Value = 0 then bolHighExists = false else bolHighExists = true end if end if else bolHashExists = false end if End Sub Private Sub CCreateConnection on error resume next 'Open the connection to the database the constant is located in the dataconnections.inc with cnConnection .ConnectionString = strCustomer .CursorLocation = adUseClient .ConnectionTimeout = strGlobalConnectionTimeout .Open end with 'If unable to conect with the database then display message if cnConnection.State = adStateClosed then Response.Write "

" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "

" Response.Write "

" & L_COMMENTS_CONNECTION_FAILED_TEXT & "

" cnConnection.Errors.Clear Call CDestroyObjects %> <% Response.End end if End Sub Private Sub CVerifyEntry on error resume next if Request.Cookies("Misc")("auto") = "True" then if Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "view.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "customer.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp") Response.End end if else if Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "view.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp") Response.End end if End if End Sub 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 CCreateObjects on error resume next set rsHash = CreateObject("ADODB.Recordset") set cmHash = CreateObject("ADODB.Command") set cnConnection = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") End Sub Private Sub CDestroyObjects on error resume next if rsHash.State = adStateOpen then rsHash.Close if cnConnection.State = adStateOpen then cnConnection.Close set cmHash = nothing set rsHash = nothing set cnConnection = nothing End Sub '_____________________________________________________________________________________________________________________ %>
<% if bolHashExists = true and bolHighExists = true then Response.Write "

" & L_SUBMIT_HASH_EXIST_MESSAGE & "

" Response.Write "

" & L_SUBMIT_HASHEXIST_CHOOSEFILE_MESSAGE & "

" Response.Write "

" & L_SUBMIT_HASHEXIST_CHOOSEFILE2_MESSAGE & "

" Response.Write "

" & L_SUBMIT_HASHEXIST_CHOOSEFILE4_MESSAGE & "

" %> /welcome.asp"><% = L_LOCATE_CANCEL_LINK_TEXT %>                 /secure/status.asp"><% = L_RECEIVED_STATUS_LINK_TEXT %>                 /secure/locate.asp"><% = L_LOCATE_PREVIOUS_LINK_TEXT %> <% elseif bolHashExists = true and bolHighExists = false then %>

<% = L_SUBMIT_HASH_EXIST_MESSAGE %>

<% = L_SUBMIT_HASHEXIST_CHOOSEFILE_MESSAGE %>

<% = L_SUBMIT_HASHEXIST_CHOOSEFILE2_MESSAGE %>

<% = L_SUBMIT_HASHEXIST_CHOOSEFILE3_MESSAGE %>

/secure/locate.asp"><% = L_SUBMIT_ASSOCIATE_NO_TEXT %>                 /secure/submit.asp"><% = L_SUBMIT_ASSOCIATE_YES_TEXT%> <% else %>

<% = L_SUBMIT_EVENT_MAINTITLE_TEXT %>

<% if Request.Cookies("Misc")("auto") = "True" then %>

<% = L_SUBMIT_UPLOAD_FILEAUTO_TEXT%> 

<%Response.Write sFileName%><% = L_SUBMIT_FOR_PROCESSINGAUTO_TEXT %>

<% else %>

<% = L_SUBMIT_UPLOAD_FILE_TEXT%> 

<%Response.Write sFileName%><% = L_SUBMIT_FOR_PROCESSING_TEXT %>

<% end if %>

<% = L_SUBMIT_EVENT_DESCRIPTION_TEXT %>

<% if Request.Cookies("Misc")("auto") = "True" then %> <% = L_SUBMIT_EVENTDESCRIPTIONAUTO_BODY_TEXT %> <% else %> <% = L_SUBMIT_EVENTDESCRIPTION_BODY_TEXT %> <% end if %>


<% strEventName = Request.Cookies("txtEventName") strNotes = Request.Cookies("txtNotes") strComments = Request.Cookies("txtComments") if Len(strNotes) = 4 and strNotes = "~|~|" then strNotes = "" end if if Len(strComments) = 4 and strComments = "~|~|" then strComments = "" end if if Len(strEventName) = 4 and strEventName = "~|~|" then %> <% else if Session.CodePage = 932 then %> <% else %> <% end if end if %>

<% if Request.Cookies("Misc")("auto") <> "True" then %>


<% '
<% End if if Session.CodePage <> 932 then sFileName = unescape(sFileName) end if %> "> ">
<% if Request.Cookies("Misc")("auto") <> "True" then %> <% end if %>