%
'on error goto 0
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 strCompanyName
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 iInstance
Dim ModuleID
Dim bolSearchgBucket
dim SolutionID
strAbb = Request.QueryString( "Language" )
SolutionID = Request.QueryString("SolutionID")
bolSearchgBucket = false
Call CVerifyEntry
Dim strSolutions2
'strSolutions = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=dumpfiles;pwd=dumpfiles;Initial Catalog=Solutions;Data Source=BSOD_DB1"
if Request.QueryString( "Debug" ) <> "" then
Response.Write("Utilizing Debug Connection
")
strSolutions2 = "Driver=SQL Server;Server=bsod_db1;uid=sa;pwd=BSODdb1!;DATABASE=Solutions"
else
strSolutions2 = "Driver=SQL Server;Server=tkwucdsqla02;uid=dbgportal;pwd=GoWin;DATABASE=Solutions"
end if
Call CCreateObjects
'added for the preview test solution pages
Dim TemplateID
'****************************************Completed**********************************************************
'sClass = Replace(sClass, "[plus]", "+")
'Response.Write unescape(sClass) & "
" & iInstance
'Response.Write "
Message:" & intMessage
if intMessage = 6 then
intMessage = 2
bolSearchgBucket = true
end if
if intMessage = 2 then
Call CCreateConnection
'Response.Write("SolutiolnID: [" & SolutionID & "]
" )
if SolutionID <> "" then
dim rsSolData
on error goto 0
set rsSolData = cnState.Execute("SEP_GetSolutionData " & SolutionID & ",'USA'" )
strDescription = rsSolData("Description")
strTemp = ""
''strKBLists = rsState("Description")
strKBLists = strDescription
strTemp = strDescription
ContactID = rsSolData("ContactID")
ModuleID = rsSolData("ModuleID")
TemplateID = rsSolData("TemplateID")
else
strDescription = Request.QueryString("Description")
'if IsNull(rsState("Description")) = true then
if strDescription = "" then
strKBLists = ""
strTemp = ""
strDescription = ""
else
'strDescription = rsState("Description")
strTemp = ""
''strKBLists = rsState("Description")
strKBLists = Request.QueryString("Description")
strTemp = Request.QueryString("Description")
end if
ContactID = Request.QueryString("ContactID" )
ModuleID = Request.QueryString("ModuleID")
TemplateID = Request.QueryString("TemplateID")
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 IsNull(TemplateID) = false or TemplateID <> "" then
if TemplateID > 0 then
Set rsTemplate = cnState.Execute("exec GetTemplate " & 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
'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
'Response.Write intMessage
' if rsState.State = adStateOpen or rsMoreInfo.State = adStateOpen then
'if rsState.RecordCount > 0 or rsMoreInfo.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 & ", '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
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 = strSolutions2
.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 & "