%@ Language=VBScript CODEPAGE=932%>
<%
Response.Expires = -1
Response.AddHeader "Cache-Control", "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "P3P", "CP=""TST"""
%>
<%
dim cnState
dim rsState
dim rsMoreInfo
dim rsDescription
Dim rsContact
Dim rsTemplate
Dim rsModule
Dim arrMoreInfo
dim iIncidentID
dim x
dim arrCompany
dim ContactID
Dim strTemp 'As String
Dim strMoreInfo
dim sStatus
dim sClass
dim sEventName
dim strSolution
dim strCompany
dim strDescription
dim strMid
Dim strSub 'As String
Dim strFirstHalf 'As String
Dim strSecondHalf 'As String
Dim strLink 'As String
Dim strKB 'As String
Dim strKBI
Dim strLinkI
Dim strINTLKB
Dim strINTLKBURL
Dim strTemplate
Dim strKBLists
Dim strKBArts
Dim strModule
Dim strContact
Dim iPos
Dim intMessage
Dim iLenSub 'As Integer
Dim iStart 'As Integer
Dim iStop 'As Integer
Dim iCurrentPos 'As Integer
Dim iLen 'As Integer
Dim ModuleID
Dim iInstance
'Call CVerifyEntry
Call CCreateObjects
'****************************************Completed**********************************************************
if intMessage = "2" then
Call CCreateConnection
set rsState = cnState.Execute("Exec GetSolution " & sClass & ", '" & strAbb & "'")
if rsState.EOF = true then
'Response.Write "
EOF:" & rsState.EOF
set rsState = cnState.Execute("Exec GetSolution " & sClass & ", 'USA'")
'Response.Write "
Errors:" & cnState.Errors.Count
End if
'*************************************************************************************************************
'Response.Write "
Message 2
State:" & rsState.State
'Response.Write "
RecordCount:" & rsState.RecordCount & "
Bucket:" & sClass
'Response.Write "
Lang:" & strAbb
'Response.End
if rsState.State = adStateOpen then
set rsState.ActiveConnection = nothing
if rsState.RecordCount > 0 then
rsState.Filter = "BucketType = 1"
if rsState.RecordCount < 1 then
rsState.Filter = "BucketType = 2"
end if
'Response.Write rsState.Filter & "
" & rsState.RecordCount
if IsNull(rsState("Description")) = true then
strKBLists = ""
strTemp = ""
strDescription = ""
else
strTemp = ""
strKBLists = rsState("Description")
strTemp = rsState("Description")
strDescription = rsState("Description")
end if
if IsNull(rsState("ContactID")) = true then
ContactID = ""
else
ContactID = rsState("ContactID")
end if
if IsNull(rsState("ModuleID")) = true then
ModuleID = ""
else
ModuleID = rsState("ModuleID")
end if
iLen = Len(strTemp)
iPos = 1
For x = 1 To iLen
iPos = InStr(iPos, strTemp, "
"
strFirstHalf = Mid(strTemp, 1, iStart - 5)
if x = 1 then
if Left(strFirstHalf, 4) = "
" then
strFirstHalf = mid(trim(strFirstHalf), 5, Len(strFirstHalf) - 4)
end if
end if
strSecondHalf = Mid(strTemp, iStop + 5, iLen)
strKBLists = strFirstHalf & " " & " " & strSecondHalf
Next
iLen = Len(strKBLists)
iPos = 1
For x = 1 To iLen
iPos = InStr(iPos, strKBLists, "
" then
strFirstHalf = mid(trim(strFirstHalf), 5, Len(strFirstHalf) - 12)
end if
end if
strSecondHalf = Mid(strKBLists, iStop + 5, iLen)
strKBLists = strFirstHalf & " " & " " & strSecondHalf
iPos = InStr(iPos, strKBLists, "
"
strFirstHalf = Mid(strKBLists, 1, iStart - 5)
if x = 1 then
if Left(strFirstHalf, 12) = "
" then
strFirstHalf = mid(trim(strFirstHalf), 5, Len(strFirstHalf) - 12)
end if
end if
strSecondHalf = Mid(strKBLists, iStop + 5, iLen)
strKBLists = strFirstHalf & " " & " " & strSecondHalf
Next
end if
if rsState.State = adStateOpen then
if rsState.RecordCount > 0 then
strDescription = rsState("Description")
end if
end if
end if
if ContactID <> "" then
set rsContact = cnState.Execute("exec getcontact " & ContactID)
if rsContact.State = adStateOpen then
set rsContact.ActiveConnection = nothing
strContact = rsContact("CompanyName")
end if
end if
if ModuleID <> "" then
set rsModule = cnState.Execute("exec GetModule " & ModuleID)
if rsModule.State = adStateOpen then
set rsModule.ActiveConnection = nothing
strModule = rsModule("ModuleName")
end if
end if
'**********************************Template************************************************
if rsState.State = adStateOpen Then
if rsState.RecordCount > 0 then
if IsNull(rsState("TemplateID")) = false then
if rsState("TemplateID") > 0 then
Set rsTemplate = cnState.Execute("exec GetTemplate " & rsState("TemplateID"))
if rsTemplate.State = adStateOpen then
if rsTemplate.RecordCount > 0 then
strTemplate = rsTemplate("Description")
strTemplate = Replace(strTemplate, "
"
next
end if
rsMoreInfo.MoveNext
loop
end if
end if
elseif rsState.State = adStateOpen Then
if rsState.RecordCount < 1 then
set rsMoreInfo = cnState.Execute("Exec GetMoreInfo " & iInstance & ", 'USA'")
set rsMoreInfo.ActiveConnection = nothing
if rsMoreInfo.State = adStateOpen then
if rsMoreInfo.RecordCount > 0 then
rsMoreInfo.MoveFirst
do while rsMoreInfo.EOF = false
strTemp = rsMoreInfo.Fields(0).Value
if len(strTemp) > 0 then
arrMoreInfo = split(strTemp, ";")
for x=0 to ubound(arrMoreInfo)
strMoreInfo = strMoreInfo & "" & arrMoreInfo(x) & "
"
next
end if
rsMoreInfo.MoveNext
loop
end if
end if
end if
end if
if rsState.State = adStateOpen and rsMoreInfo.State = adStateOpen then
if rsState.RecordCount < 1 and rsMoreInfo.RecordCount < 1 then
intMessage = 1
elseif rsState.RecordCount < 1 and rsMoreInfo.RecordCount > 0 then
intMessage = 5
end if
elseif rsState.State = adStateClosed and rsMoreInfo.State = adStateOpen then
if rsState.RecordCount < 1 and rsMoreInfo.RecordCount > 0 then
intMessage = 5
end if
elseif rsState.State = adStateClosed and rsMoreInfo.State = adStateClosed then
intMessage = 1
end if
if rsState.State = adStateOpen then
if rsState.RecordCount > 0 then
If IsNull(rsState("BucketType")) = false then
if rsState("BucketType") = 2 then
intMessage = 6
elseif rsState("BucketType") = 1 then
intMessage = 2
end if
end if
end if
end if
'******************************************************************************************
if rsDescription.State = adStateOpen then rsDescription.Close
if rsState.State = adStateOpen then rsState.Close
if cnState.State = adStateOpen then cnState.Close
'****************************************Researching More Info**********************************************************
elseif intMessage = "5" then
Call CCreateConnection
set rsMoreInfo = cnState.Execute("Exec GetMoreInfo " & iInstance & ", '" & strAbb & "'")
if rsMoreInfo.EOF = true then
set rsMoreInfo = cnState.Execute("Exec GetMoreInfo " & iInstance & ", 'USA'")
end if
set rsMoreInfo.ActiveConnection = nothing
if rsMoreInfo.State = adStateOpen then
if rsMoreInfo.RecordCount > 0 then
'if trim(strAbb) = "USA" then
rsMoreInfo.MoveFirst
do while rsMoreInfo.EOF = false
strTemp = rsMoreInfo.Fields(0).Value
if len(strTemp) > 0 then
arrMoreInfo = split(strTemp, ";")
'strMoreInfo = ""
for x=0 to ubound(arrMoreInfo)
strMoreInfo = strMoreInfo & "" & arrMoreInfo(x) & "
"
next
'end if
end if
rsMoreInfo.MoveNext
loop
'else
'strMoreinfo = ""
'do while rsMoreInfo.EOF = false
'strMoreInfo = strMoreInfo & "
" & rsMoreInfo.Fields(0).Value
'rsMoreInfo.MoveNext
'loop
'end if
end if
end if
if cnState.State = adStateOpen then cnState.Close
end if
'_____________________________________________________________________________________________________________________
'Sub Procedures
Private Sub CVerifyEntry
on error resume next
if Trim(Request.Cookies("Misc")("PreviousPage")) <> "status.asp" then
Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
Response.End
end if
End Sub
Private Sub CCreateConnection
on error resume next
with cnState
.ConnectionString = strSolutions
.CursorLocation = adUseClient
.ConnectionTimeout = strGlobalConnectionTimeout
.Open
end with
if cnState.State = adStateClosed then
strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
Response.Write "
" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "
" Response.Write "" & L_COMMENTS_CONNECTION_FAILED_TEXT & "