%
Dim SolIDk
Function gurd(What)
Dim a
Dim b
Dim c
Dim d
Dim k
Dim chk
Dim Opp
Dim Pivot
Dim p1
Dim p2
Dim Limit
Dim Pos
Dim Temp
a = Mid(What,1,1)
Opp = Mid(What,2,1)
Pivot = InStr(What,"Z")
p1 = CLng("&h" & Mid(What,3,Pivot-3))
Limit = InStr(What,"X")
p2 = CLng("&h" & Mid(What,Pivot+1,Limit-Pivot-4))
Pos = Mid(What,Limit-3,1)
b = Mid(What,Limit-2,1)
c = Mid(What,Limit-1,1)
d = CLng("&h" & Mid(What,Limit+1,Len(What)-Limit))
p1 = 16777216 - p1
p2 = 16777216 - p2
If (Pos Mod 2 <> 0) Then
Temp = p1
p1 = p2
p2 = Temp
End If
If (Opp Mod 2 = 0) Then
p1 = p1 - p2
Else
p1 = p1 + p2
End If
chk = 0
For k = 1 to Len(p1)
chk = chk + CInt(Mid(p1,k,1))
Next
For k = 1 to Len(p2)
chk = chk + CInt(Mid(p2,k,1))
Next
If (chk = d) Then
gurd = p1
Else
gurd = -1
End If
End Function
If (Request.QueryString("id") <> "") Then
SolIDk = gurd(Request.QueryString("id"))
Else
SolIDk = -1
End If
If (SolIDk <> -1 ) Then
%>
<%
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
Call CCreateObjects
'****************************************Completed**********************************************************
if intMessage = 2 then
Call CCreateConnection
set rsState = cnState.Execute("Exec GetSolution3 " & SolIDk & ", '" & strAbb & "'")
'*************************************************************************************************************
if rsState.State = adStateOpen then
set rsState.ActiveConnection = nothing
if rsState.RecordCount > 0 then
strDescription = rsState("Description")
ContactID = rsState("ContactID")
ModuleID = rsState("ModuleID")
strTemp = ""
strTemp = rsState("Description")
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(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
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 CCreateConnection
on error resume next
with cnState
.ConnectionString = strCustomer
.CursorLocation = adUseClient
.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 & "