Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

831 lines
26 KiB

  1. <!--#INCLUDE file="..\include\asp\top.asp"-->
  2. <!--#INCLUDE file="..\include\inc\browserTest.inc"-->
  3. <!--#include file="..\include\asp\head.asp"-->
  4. <!--#INCLUDE file="..\include\inc\statusstrings.inc"-->
  5. <%
  6. dim cnDetails
  7. dim rsDetails
  8. dim cmDetails
  9. dim strTemp
  10. dim bolFiltered
  11. dim strShow
  12. dim strHide
  13. dim strStatus
  14. Dim strPreviousPage
  15. Dim strsBucket
  16. Dim strDescription
  17. Dim strTitleDetails
  18. Dim sbolFiltered
  19. Dim iSort
  20. Dim iSortAD
  21. Dim strDescriptionTitle
  22. Dim arrShowHideItems
  23. Dim strDisplay
  24. Dim strPrevIncident
  25. Dim bolsBucket
  26. Dim bolgBucket
  27. Dim sBucketType
  28. Dim gBucketType
  29. Dim bolStopCode
  30. Dim bolsbsBucket
  31. Dim bolsbgBucket
  32. Dim isBucketType
  33. Dim igBucketType
  34. Dim iMess
  35. Dim iStopCode
  36. Call CVerifyPassport
  37. Call CCreateObjects
  38. Call CCreateConnection
  39. arrShowHideItems = split(Request.Cookies("ShowHideItems"), ":")
  40. Response.Cookies("Misc")("auto") = "None"
  41. If Ubound(arrShowHideItems) > -1 then
  42. Call CHideShowItems
  43. end if
  44. Call CGetData
  45. Call CSetPreviousPage
  46. if rsDetails.State = adStateOpen then
  47. if rsDetails.RecordCount > 0 then
  48. iSort = Request.QueryString("StatusSort")
  49. iSortAD = Request.QueryString("StatusAD")
  50. Call CSort
  51. end if
  52. End If
  53. '_____________________________________________________________________________________________________________________
  54. 'Sub Procedures
  55. Private Sub CSort
  56. if iSortAD = "" then
  57. iSortAd = "Desc"
  58. end if
  59. if iSort <> "" then
  60. Select Case iSort
  61. Case 1
  62. rsDetails.Sort = "Created " & iSortAd
  63. Case 2
  64. rsDetails.Sort = "TrackID " & iSortAd
  65. Case 3
  66. rsDetails.Sort = "sBucket " & iSortAd
  67. Case 4
  68. rsDetails.Sort = "Description " & iSortAd
  69. Case 5
  70. rsDetails.Sort = "Message " & iSortAd
  71. End Select
  72. else
  73. rsDetails.Sort = "Created " & iSortAd
  74. end if
  75. End Sub
  76. Private Sub CGetData
  77. on error resume next
  78. cnDetails.Errors.Clear
  79. set rsDetails = cnDetails.Execute("Exec GetStatusList " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow"))
  80. if cnDetails.Errors.Count > 0 then
  81. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  82. end if
  83. ' Response.Write oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow")
  84. set rsDetails.ActiveConnection = nothing
  85. End Sub
  86. Private Sub CSetPreviousPage
  87. on error resume next
  88. strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
  89. strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
  90. Response.Cookies("Misc")("PreviousPage") = strPreviousPage
  91. End Sub
  92. Private Sub CHideShowItems
  93. on error resume next
  94. cnDetails.Errors.Clear
  95. with cmDetails
  96. .ActiveConnection = cnDetails
  97. .CommandText = "SetFilterStatus"
  98. .CommandType = adCmdStoredProc
  99. .CommandTimeout = strGlobalCommandTimeout
  100. .Parameters.Append .CreateParameter("@FilterType", adVarChar, adParamInput, 1, "")
  101. .Parameters.Append .CreateParameter("@Incidents", adVarChar, adParamInput, 3250, "")
  102. end with
  103. if cnDetails.Errors.Count > 0 then
  104. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  105. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  106. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  107. %>
  108. <!--#include file="..\include\asp\foot.asp"-->
  109. <%
  110. Response.End
  111. end if
  112. cnDetails.Errors.Clear
  113. if arrShowHideItems(0) <> "" then
  114. if arrShowHideItems(0) <> 0 then
  115. strShow = arrShowHideItems(0)
  116. if instr(1, strShow, ",") > 0 then
  117. strShow = trim(strShow)
  118. strShow = Left(strShow, Len(strShow) - 1)
  119. end if
  120. with cmDetails
  121. .Parameters(0).value = "1"
  122. .Parameters(1).Value = Cstr(strShow)
  123. .Execute
  124. end with
  125. if cnDetails.Errors.Count > 0 then
  126. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  127. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  128. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  129. cnDetails.Errors.Clear
  130. Call CDestroyObjects
  131. %>
  132. <!--#include file="..\include\asp\foot.asp"-->
  133. <%
  134. Response.End
  135. end if
  136. cnDetails.Errors.Clear
  137. end if
  138. end if
  139. if arrShowHideItems(1) <> "" then
  140. if arrShowHideItems(1) <> 0 then
  141. strHide = ""
  142. strHide = arrShowHideItems(1)
  143. if instr(1, strHide, ",") > 0 then
  144. strHide = trim(strHide)
  145. strHide = Left(strHide, Len(strHide) - 1)
  146. end if
  147. with cmDetails
  148. .Parameters(0).value = "0"
  149. .Parameters(1).value = CStr(strHide)
  150. .Execute
  151. end with
  152. if cnDetails.Errors.Count > 0 then
  153. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  154. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  155. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  156. cnDetails.Errors.Clear
  157. Call CDestroyObjects
  158. %>
  159. <!--#include file="..\include\asp\foot.asp"-->
  160. <%
  161. Response.End
  162. end if
  163. cnDetails.Errors.Clear
  164. end if
  165. end if
  166. End Sub
  167. Private Sub CCreateConnection
  168. on error resume next
  169. 'Connection object to KaCustomer database
  170. with cnDetails
  171. .ConnectionString = strCustomer
  172. .CursorLocation = adUseClient
  173. .ConnectionTimeout = strGlobalConnectionTimeout
  174. .Open
  175. end with
  176. 'Display error to user
  177. if cnDetails.State = adStateClosed then
  178. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  179. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  180. Response.Write "<p class='clsPBody'>" & L_COMMENTS_CONNECTION_FAILED_TEXT & "</p></div>"
  181. Call CDestroyObjects
  182. %>
  183. <!--#include file="..\include\asp\foot.asp"-->
  184. <%
  185. Response.End
  186. end if
  187. 'If the user hides or shows items perform the following function
  188. cnDetails.Errors.Clear
  189. End Sub
  190. Private Sub CVerifyPassport
  191. on error resume next
  192. if oPassMgrObj.IsAuthenticated(TimeWindow) = false then
  193. Response.Write "<br><div class='clsDiv'><p class='clsPTitle'>" & L_CUSTOMER_PASSPORT_TITLE_TEXT
  194. Response.Write "</p><p class='clsPBody'>" & L_STATUS_PASSPORT_LOGIN_MESSAGE
  195. Response.Write "<A class='clsALinkNormal' href='" & L_FAQ_PASSPORT_LINK_TEXT & "'>" & L_WELCOME_PASSPORT_LINK_TEXT & "</A><BR><BR>"
  196. Response.write oPassMgrObj.LogoTag2(Server.URLEncode(ThisPageURL), TimeWindow, ForceLogin, CoBrandArgs, strLCID, Secure)
  197. Response.Write "</P></div>"
  198. %>
  199. <!--#include file="..\include\asp\foot.asp"-->
  200. <%
  201. Response.End
  202. end if
  203. End Sub
  204. Private Sub CCreateObjects
  205. on error resume next
  206. sbolFiltered = false
  207. set cnDetails = CreateObject("ADODB.Connection")
  208. set rsDetails = CreateObject("ADODB.Recordset")
  209. set cmDetails = CreateObject("ADODB.Command")
  210. End Sub
  211. Private Sub CDestroyObjects
  212. on error resume next
  213. if rsDetails.State = adStateOpen then rsDetails.Close
  214. if cnDetails.State = adStateOpen then cnDetails.Close
  215. set cmDetails = nothing
  216. set rsDetails = nothing
  217. set cnDetails = nothing
  218. End Sub
  219. Private Sub CSelectMessage
  220. on error resume next
  221. '!gb & !sb then researching
  222. 'GB & !sb then more info
  223. ''if sb then solved
  224. if IsNull(rsDetails("Message")) then
  225. iMess = 16
  226. else
  227. iMess = rsDetails("Message")
  228. end if
  229. if IsNull(rsDetails("sBucket")) then
  230. bolsBucket = false
  231. else
  232. bolsBucket = true
  233. end if
  234. if IsNull(rsDetails("gBucket")) then
  235. bolgBucket = false
  236. else
  237. bolgBucket = true
  238. end if
  239. If IsNull(rsDetails("iStopCode")) then
  240. bolStopCode = false
  241. else
  242. bolStopCode = true
  243. end if
  244. If IsNull(rsDetails("gBucketType")) then
  245. gBucketType = false
  246. igBucketType = -1
  247. else
  248. gBucketType = true
  249. igBucketType = rsDetails("gBucketType")
  250. end if
  251. if IsNull(rsDetails("sBucketType")) then
  252. sBucketType = false
  253. isBucketType = -1
  254. else
  255. sBucketType = true
  256. isBucketType = rsDetails("sBucketType")
  257. end if
  258. if IsNull(rsDetails("sbsBucket")) then
  259. bolsbsBucket = false
  260. else
  261. bolsbsBucket = true
  262. end if
  263. if IsNull(rsDetails("sbgBucket")) then
  264. bolsbgBucket = false
  265. else
  266. bolsbgBucket = true
  267. end if
  268. 'Response.Write "sBucket:" & bolsBucket & "gBucket:" & bolgBucket
  269. 'Response.Write "BucketType:" & sBucketType & "StopCode:" & bolStopCode & "isBucketType:" & isBucketType
  270. if iMess <> 0 then
  271. if bolsBucket = false and bolgBucket = false and bolStopCode = false then
  272. iMess = 0
  273. 'Response.Write "In Work"
  274. elseif bolsBucket = true and bolgBucket = true and bolStopCode = false and sBucketType = false and gBucketType = false then
  275. iMess = 1
  276. 'Response.Write "Researching"
  277. elseif sBucketType = true And bolsBucket = true and isBucketType = 1 and bolsbsBucket = true then
  278. iMess = 2
  279. 'Response.Write "Solved"
  280. elseif bolsBucket = true and bolgBucket = true and igBucketType = 2 and bolsbgBucket = true and gBucketType = true then
  281. iMess = 6
  282. 'Response.Write "More" '& rsDetails("IncidentID")
  283. elseif bolsBucket = true and bolgBucket = true and bolStopCode = true then
  284. iMess = 5
  285. 'Response.Write "StopCode"
  286. 'Response.write "More Info"
  287. else
  288. iMess = 1
  289. end if
  290. End If
  291. 'Response.Write igBucketType & "<BR>" & isBucketType
  292. Select case iMess
  293. case 0
  294. strStatus = "<IMG SRC='../include/images/icon_inprogress_16x.gif'>"
  295. strTitleDetails = L_STATE_INPROGRESS_DETAILS_TEXT
  296. case 1
  297. strStatus = "<IMG SRC='../include/images/icon_researching_16x.gif'>"
  298. strTitleDetails = L_STATE_RESEARCHING_DETAILS_TEXT
  299. case 2
  300. strStatus = "<IMG SRC='../include/images/icon_complete_16x.gif'>"
  301. strTitleDetails = L_STATUS_ANALYSIS_COMPLETEDETAILS_TEXT
  302. case 3
  303. strStatus = "<IMG SRC='../include/images/icon_cannotprocess_16x.gif'>"
  304. strTitleDetails = L_STATE_CANNOTPROCESS_DETAILS_TEXT
  305. case 4
  306. strStatus = "<IMG SRC='../include/images/icon_fulldump_16x.gif'>"
  307. strTitleDetails = L_STATE_FULLDUMP_REQUIREDDETAILS_TEXT
  308. case 5
  309. strStatus = "<IMG SRC='../include/images/icon_moreinfo_16x.gif'>"
  310. strTitleDetails = L_STATE_RESEARCHINGMORE_INFOBODY_TEXT
  311. case 6
  312. strStatus = "<IMG SRC='../include/images/icon_moreinfo_16x.gif'>"
  313. strTitleDetails = L_STATE_RESEARCHINGMOREGBUCKET_INFOBODY_TEXT
  314. case 10
  315. strStatus = "<IMG SRC='../include/images/icon_64bit_16x.gif'>"
  316. strTitleDetails = L_STATE_64BITDUMP_INFOBODY_TEXT
  317. case 16
  318. strStatus = "<IMG SRC='../include/images/icon_unknown_16x.gif'>"
  319. strTitleDetails = L_STATE_STATUS_BODY_TEXT
  320. case else
  321. strStatus = "<IMG SRC='../include/images/icon_unknown_16x.gif'>"
  322. strTitleDetails = L_STATE_STATUS_BODY_TEXT
  323. end select
  324. strTitleDetails = Replace(strTitleDetails, "'", "", 1)
  325. strTitleDetails = Replace(strTitleDetails, Chr(34), "", 1)
  326. End Sub
  327. Private Sub ParseApos(strDescriptionTemp)
  328. Dim iPos, iStart, strTempParse
  329. if instr(1, strDescriptionTemp, "'") > 0 then
  330. server.HTMLEncode(strDescriptionTemp)
  331. End if
  332. iStart = 1
  333. iPos = InStr(iStart, strDescriptionTemp, Chr(34))
  334. Do While iPos <> 0
  335. strTempParse = Mid(strDescriptionTemp, iStart, iPos - iStart)
  336. Response.Write strTempParse & Chr(34) & Chr(34)
  337. iStart = iPos + 1
  338. iPos = InStr(iStart, strDescriptionTemp, Chr(34))
  339. Loop
  340. strTempParse = Mid(strDescriptionTemp, iStart + 1, Len(strDescriptionTemp) - iStart)
  341. End Sub
  342. if oPassMgrObj.IsAuthenticated(TimeWindow) = true then
  343. %>
  344. <div class="clsDiv">
  345. <p class="clsPTitle">
  346. <% = L_STATUS_EVENT_REPORT_TEXT %>
  347. </p>
  348. <p class="clsPBody">
  349. <% = L_STATUS_EVENT_INFO_TEXT %>
  350. </p>
  351. <br>
  352. <table name="tblStatus" id="tblStatus" class="clsTableInfo" border="1" CELLPADDING="0px" CELLSPACING="0px">
  353. <thead>
  354. <tr>
  355. <td align="center" nowrap class="clsTDInfo">
  356. <a href="JAVASCRIPT:chkCheck_onclick();" Title="<% = L_STATUS_CHECK_BOX_TOOLTIP %>">
  357. <center>
  358. <img border="0" src="../include/images/checkmark.gif" WIDTH="13" HEIGHT="13">
  359. </center>
  360. </a>
  361. </td>
  362. <td id="cSort1" name="cSort" align="center" nowrap class="clsTDSort" onclick="SortFiles(this);">
  363. &nbsp;<Label for=cSort1><% = L_STATUS_DATE_DATE_TEXT %></Label>&nbsp;&nbsp;
  364. </td>
  365. <td id="cSort2" name="cSort" align="center" nowrap class="clsTDInfo">
  366. &nbsp;<Label for=cSort2><% = L_STATUS_TITLE_ID_TEXT %></Label>&nbsp;&nbsp;
  367. </td>
  368. <td id="cSort3" name="cSort" align="center" nowrap class="clsTDInfo">
  369. &nbsp;<Label for=cSort3><% = L_STATUS_CLASS_CLASS_TEXT %></Label>&nbsp;&nbsp;
  370. </td>
  371. <td id="cSort4" name="cSort" align="center" nowrap class="clsTDSort" onclick="SortFiles(this);">
  372. &nbsp;<Label for=cSort4><% = L_STATUS_DESCRIPTION_BODY_TEXT %></Label>&nbsp;&nbsp;
  373. </td>
  374. <!--<td id="cSort" name="cSort" align="center" nowrap class="clsTDSort" onclick="SortFiles(this);"> &nbsp;<% = L_STATUS_FILE_NAME_TEXT %>&nbsp;&nbsp; </td>-->
  375. <td id="cSort5" name="cSort" align="center" nowrap class="clsTDSort" onclick="SortFiles(this);">
  376. &nbsp;<Label for=cSort5><% = L_STATUS_STATUS_INFO_TEXT %></Label>&nbsp;&nbsp;
  377. </td>
  378. <!--<td align="center" nowrap class="clsTDInfo">
  379. &nbsp;<% = L_STATUS_DETAILS_INFO_TEXT %>&nbsp;&nbsp;
  380. </td>-->
  381. <td id="cSort6" name="cSort" align="center" nowrap class="clsTDInfo">
  382. &nbsp;<Label for=cSort6><% = L_STATUS_COMMENTS_INFO_TEXT %></Label>&nbsp;&nbsp;
  383. </td>
  384. </tr>
  385. </thead>
  386. <tbody>
  387. <%
  388. '0 is hide 1 is show
  389. if rsDetails.State = adStateOpen then
  390. if Request.QueryString("ShowReports") = "0" then
  391. rsDetails.Filter = "Filter = 1"
  392. elseif Request.QueryString("ShowReports") = "" then
  393. rsDetails.Filter = "Filter = 1"
  394. else
  395. 'rsDetails.Filter = "Filter = 1"
  396. end if
  397. if rsDetails.RecordCount > 0 then
  398. rsDetails.MoveFirst
  399. Do while rsDetails.EOF = false
  400. if strPrevIncident <> rsDetails("IncidentID") then
  401. Response.Write "<tr>" 'td 1
  402. Response.Write "<td nowrap align=center class='clsTDCell'>"
  403. if rsDetails("Filter") = 1 then '*****
  404. Response.Write "<Input type=checkbox name='chkVisible' id='chkVisible' value='" & rsDetails("IncidentID") & "'>"
  405. else
  406. Response.Write "<Input type=checkbox name='chkVisible' checked id='chkVisible' value='" & rsDetails("IncidentID") & "'>"
  407. end if
  408. Response.Write "</td>"
  409. if IsDate(rsDetails("Created")) then 'td 2
  410. Response.Write "<td title='" & FormatDateTime(rsDetails("Created"), vbShortDate) & "' nowrap align=center class='clsTDCell'>&nbsp;" & FormatDateTime(rsDetails("Created"), vbShortDate) & "&nbsp;&nbsp;</td>"
  411. else
  412. Response.Write "<td nowrap align=center class='clsTDCell'>&nbsp;</td>"
  413. end if
  414. if isnull(rsDetails("TrackID")) = false then
  415. Response.Write "<td title='" & rsDetails("TrackID") & "' nowrap align=center class='clsTDCell'>&nbsp;" & rsDetails("TrackID") & "&nbsp;&nbsp;</td>"
  416. else
  417. Response.Write "<td nowrap align=center class='clsTDCell'>&nbsp;</td>"
  418. end if
  419. if isnull(rsDetails("sBucket")) then
  420. Response.Write "<td nowrap align=center class='clsTDCell'>&nbsp;</td>"
  421. else
  422. Response.Write "<td title='" & rsDetails("sBucket") & "' nowrap align=center class='clsTDCell'>&nbsp;" & rsDetails("sBucket") & "&nbsp;&nbsp;</td>"
  423. end if
  424. if isnull(rsDetails("Description")) = false then
  425. strDescription = rsDetails("Description")
  426. strDescriptionTitle = rsDetails("Description")
  427. if len(rsDetails("Description")) > 17 then
  428. if Session.CodePage = 932 then
  429. %>
  430. <td title="<% = strDescriptionTitle %>" nowrap align="center" class="clsTDCell">
  431. <%
  432. Response.Write "&nbsp;" & Left(rsDetails("Description"), 17) & "...&nbsp;&nbsp;</td>"
  433. else
  434. %>
  435. <td title="<% = Server.HTMLEncode(strDescriptionTitle) %>" nowrap align="center" class="clsTDCell">
  436. <%
  437. Response.Write "&nbsp;" & Server.HTMLEncode(Left(rsDetails("Description"), 17)) & "...&nbsp;&nbsp;</td>"
  438. end if
  439. else
  440. if Session.CodePage = 932 then
  441. %>
  442. <td title="<% = strDescriptionTitle %>" nowrap align="center" class="clsTDCell">
  443. <%
  444. Response.Write "&nbsp;" & rsDetails("Description") & "&nbsp;&nbsp;</td>"
  445. else
  446. %>
  447. <td title="<% = Server.HTMLEncode(strDescriptionTitle) %>" nowrap align="center" class="clsTDCell">
  448. <%
  449. Response.Write "&nbsp;" & Server.HTMLEncode(rsDetails("Description")) & "&nbsp;&nbsp;</td>"
  450. end if
  451. end if
  452. else
  453. strDescription = ""
  454. Response.Write "<td nowrap align=center class='clsTDCell'>&nbsp;</td>"
  455. end if
  456. Call CSelectMessage
  457. if isnull(rsDetails("sbsBucket")) then
  458. strsBucket = 0
  459. if IsNull(rsDetails("sbgBucket")) then
  460. strsBucket = 0
  461. else
  462. strsBucket = rsDetails("sbgBucket")
  463. end if
  464. else
  465. strsBucket = rsDetails("sbsBucket")
  466. end if
  467. if isnull(rsDetails("Display")) then
  468. strDisplay = ""
  469. else
  470. strDisplay = rsDetails("Display")
  471. end if
  472. if IsNull(rsDetails("iStopCode")) then
  473. iStopCode = 0
  474. else
  475. iStopCode = rsDetails("iStopCode")
  476. end if
  477. Response.Write "<td nowrap tabIndex=0 title='" & strTitleDetails & "' align=center class='clsTDClick' onkeydown='state_onkeydown(" & Chr(34) & trim(rsDetails("IncidentID")) & Chr(34) & ", " & Chr(34) & iMess & Chr(34) & ", " & Chr(34) & strsBucket & Chr(34) & ", " & Chr(34) & escape(strDescription) & Chr(34) & ", " & Chr(34) & iStopCode& Chr(34) & ");' onclick='state_onclick(" & Chr(34) & trim(rsDetails("IncidentID")) & Chr(34) & ", " & Chr(34) & iMess & Chr(34) & ", " & Chr(34) & strsBucket & Chr(34) & ", " & Chr(34) & escape(strDescription) & Chr(34) & ", " & Chr(34) & iStopCode & Chr(34) & ");'>" & strStatus & "</td>"
  478. 'Response.Write "<td nowrap tabIndex=0 title='" & L_STATUS_DETAILS_TITLE_TOOLTIP & "' align=center class='clsTDClick' onkeydown='details_onkeydown(" & Chr(34) & rsDetails("IncidentID") & Chr(34) & ", " & Chr(34) & rsDetails("InstanceID") & Chr(34) & ", " & Chr(34) & escape(strDisplay) & Chr(34) & ", " & Chr(34) & rsDetails("Message") & Chr(34) & ");' onclick='details_onclick(" & Chr(34) & rsDetails("IncidentID") & Chr(34) & ", " & Chr(34) & rsDetails("InstanceID") & Chr(34) & ", " & Chr(34) & escape(strDisplay) & Chr(34) & ", " & Chr(34) & rsDetails("Message") & Chr(34) & ");'><img border=0 src='../include/images/note.gif'></td>"
  479. Response.Write "<td nowrap tabIndex=0 title='" & L_STATUS_COMMENTS_TITLE_TOOLTIP & "' align=center class='clsTDClick' onkeydown='comments_onkeydown(" & Chr(34) & rsDetails("IncidentID") & Chr(34) & ", " & Chr(34) & escape(strDisplay) & Chr(34) & ");' onclick='comments_onclick(" & Chr(34) & rsDetails("IncidentID") & Chr(34) & ", " & Chr(34) & escape(strDisplay) & Chr(34) & ");'><img border=0 src='../include/images/icon_comments_16x.gif'></td>"
  480. Response.Write "</tr>"
  481. strPrevIncident = rsDetails("IncidentID")
  482. rsDetails.MoveNext
  483. else
  484. strPrevIncident = rsDetails("IncidentID")
  485. rsDetails.MoveNext
  486. end if
  487. loop
  488. else
  489. Response.Write "<tr><td class='clsTDCell' align=center colspan=9 nowrap>" & L_STATUS_NO_RECORDS_MESSAGE & "</td></tr>"
  490. end if
  491. else
  492. Response.Write "<tr><td class='clsTDCell' align=center colspan=9 nowrap>" & L_STATUS_NO_RECORDS_MESSAGE & "</td></tr>"
  493. end if
  494. %>
  495. </tbody>
  496. </table>
  497. <br>
  498. <table class="clstblLinks">
  499. <thead>
  500. <tr>
  501. <td>
  502. </td>
  503. <td>
  504. </td>
  505. </tr>
  506. </thead>
  507. <tbody>
  508. <tr>
  509. <td nowrap class="clsTDLinks">
  510. <%
  511. if rsDetails.State = adStateOpen then
  512. if rsDetails.RecordCount > 0 then
  513. %>
  514. <a class="clsALink" href="JAVASCRIPT:hidereports_onclick();"><% = L_STATUS_HIDE_REPORTS_TEXT %></a>
  515. <%
  516. end if
  517. rsDetails.Filter = ""
  518. %>
  519. </td>
  520. <td nowrap class="clsTDLinks">
  521. <%
  522. if rsDetails.RecordCount > 0 then
  523. %>
  524. <a class="clsALink" href="JAVASCRIPT:showallreports_onclick();"><% = L_STATUS_SHOW_REPORTS_TEXT %></a>
  525. <%
  526. End if
  527. End if
  528. %>
  529. </td>
  530. </tbody>
  531. </table>
  532. <Input type="hidden" name="txtHideShow" id="txtHideShow" value="<% = Request.QueryString("ShowReports") %>">
  533. <input type="hidden" name="txtSort" id="txtSort" value="<% = Request.QueryString("StatusSort") %>">
  534. <input type="hidden" name="txtAD" id="txtAD" value="<% = Request.QueryString("StatusAD") %>">
  535. </div>
  536. <br>
  537. <script LANGUAGE="javascript">
  538. <!--
  539. window.onload = BodyLoad;
  540. function LoadData()
  541. {
  542. spnUserData.load("OCADataStore");
  543. if(spnUserData.getAttribute("Sort") != null && spnUserData.getAttribute("Sort") != "")
  544. {
  545. return spnUserData.getAttribute("Sort");
  546. }
  547. else
  548. {
  549. return "Asc";
  550. }
  551. }
  552. function SaveData(strAD)
  553. {
  554. var oTimeNow = new Date(); // Start Time
  555. var sExpirationDate;
  556. spnUserData.setAttribute("Sort", strAD);
  557. oTimeNow.setMinutes(oTimeNow.getMinutes() + 60);
  558. sExpirationDate = oTimeNow.toUTCString();
  559. spnUserData.expires = sExpirationDate;
  560. spnUserData.save("OCADataStore");
  561. }
  562. function SortFiles(oTD)
  563. {
  564. var iIndex;
  565. var strSort;
  566. iIndex = oTD.cellIndex;
  567. strSort = LoadData();
  568. if(strSort == "Desc")
  569. {
  570. strSort = "Asc";
  571. }
  572. else if(strSort == "Asc")
  573. {
  574. strSort = "Desc";
  575. }
  576. else
  577. {
  578. strSort = "Asc";
  579. }
  580. SaveData(strSort);
  581. window.navigate("status.asp?" + "StatusSort=" + iIndex + "&StatusAD=" + strSort + "&ShowReports=" + txtHideShow.value);
  582. }
  583. function BodyLoad()
  584. {
  585. var oTimeExpiresNow = new Date();
  586. //DisplayCookies();
  587. }
  588. function showallreports_onclick()
  589. {
  590. window.navigate("status.asp?ShowReports=1" + "&StatusSort=" + txtSort.value + "&StatusAD=" + txtAD.value );
  591. }
  592. function comments_onclick(iIncident, sFileName)
  593. {
  594. document.cookie = "status=txtIncidentID=" + iIncident + "&FileName=" + escape(sFileName);
  595. window.navigate("comments.asp");
  596. }
  597. function comments_onkeydown(iIncident, sFileName)
  598. {
  599. if(window.event.keyCode == 13)
  600. {
  601. document.cookie = "status=txtIncidentID=" + iIncident + "&FileName=" + escape(sFileName);
  602. window.navigate("comments.asp");
  603. }
  604. }
  605. function state_onclick(iIncident, sMessage, iClassID, sDescription, igBucket)
  606. {
  607. //iClassID = iClassID.replace("+", "[plus]");
  608. //alert(escape(iClassID));
  609. document.cookie = "status=txtIncidentID=" + iIncident + "&txtEventName=" + sMessage + "&Class=" + escape(iClassID) + "&txtDescription=" + escape(sDescription) + "&iInstance=" + igBucket;
  610. window.navigate("state.asp");
  611. }
  612. function state_onkeydown(iIncident, sMessage, iClassID, sDescription, igBucket)
  613. {
  614. if(window.event.keyCode == 13)
  615. {
  616. document.cookie = "status=txtIncidentID=" + iIncident + "&txtEventName=" + sMessage + "&Class=" + iClassID + "&txtDescription=" + escape(sDescription) + "&iInstance=" + igBucket;
  617. window.navigate("state.asp");
  618. }
  619. }
  620. function details_onkeydown(iIncident, igBucket, sFileName, isBucket)
  621. {
  622. if(window.event.keyCode == 13)
  623. {
  624. if(isBucket == 3 || isBucket == 16)
  625. {
  626. alert("<% = L_STATUS_ALERT_CANNOTPROCESS_MESSAGE %>");
  627. return;
  628. }
  629. if(igBucket == "")
  630. {
  631. alert("<% = L_STATUS_ALERT_ERROR_MESSAGE %>");
  632. return;
  633. }
  634. document.cookie = "status=txtIncidentID=" + iIncident + "&Instance=" + igBucket + "&FileName=" + sFileName;
  635. window.navigate("details.asp");
  636. }
  637. }
  638. function details_onclick(iIncident, igBucket, sFileName, isBucket)
  639. {
  640. if(isBucket == 3 || isBucket == 16)
  641. {
  642. alert("<% = L_STATUS_ALERT_CANNOTPROCESS_MESSAGE %>");
  643. return;
  644. }
  645. if(igBucket == "")
  646. {
  647. alert("<% = L_STATUS_ALERT_ERROR_MESSAGE %>");
  648. return;
  649. }
  650. document.cookie = "status=txtIncidentID=" + iIncident + "&Instance=" + igBucket + "&FileName=" + sFileName;
  651. window.navigate("details.asp");
  652. }
  653. function chkCheck_onclick()
  654. {
  655. var bolChecked;
  656. bolChecked = false;
  657. try
  658. {
  659. var bolTest = chkVisible[0].checked;
  660. for(x=0;x<chkVisible.length;x++)
  661. {
  662. if(chkVisible[x].checked == true)
  663. {
  664. bolChecked = true;
  665. }
  666. }
  667. if(bolChecked==true)
  668. {
  669. for(x=0;x<chkVisible.length;x++)
  670. {
  671. chkVisible[x].checked = false;
  672. }
  673. }
  674. else
  675. {
  676. for(x=0;x<chkVisible.length;x++)
  677. {
  678. chkVisible[x].checked = true;
  679. }
  680. }
  681. }
  682. catch(e)
  683. {
  684. try
  685. {
  686. chkVisible.checked = ! chkVisible.checked;
  687. }
  688. catch(e)
  689. {
  690. return;
  691. }
  692. }
  693. return;
  694. }
  695. function hidereports_onclick()
  696. {
  697. var x;
  698. var strUnChecked;
  699. var strChecked;
  700. var iLen;
  701. var strError;
  702. var strShowHideItems;
  703. strUnChecked = "";
  704. strChecked = "";
  705. try
  706. {
  707. strError = chkVisible[0].checked;
  708. iLen = chkVisible.length;
  709. for(x=0;x<iLen;x++)
  710. {
  711. if(chkVisible[x].checked == false)
  712. {
  713. strUnChecked = strUnChecked + chkVisible[x].value + ", ";
  714. }
  715. else
  716. {
  717. strChecked = strChecked + chkVisible[x].value + ", ";
  718. }
  719. }
  720. }
  721. catch(e)
  722. {
  723. if(chkVisible.checked == false)
  724. {
  725. strUnChecked = chkVisible.value;
  726. }
  727. else
  728. {
  729. strChecked = chkVisible.value;
  730. }
  731. }
  732. if(strUnChecked == "")
  733. {
  734. strShowHideItems = "0 : ";
  735. }
  736. else
  737. {
  738. strShowHideItems = strUnChecked + " : ";
  739. }
  740. if(strChecked=="")
  741. {
  742. strShowHideItems = strShowHideItems + "0";
  743. }
  744. else
  745. {
  746. strShowHideItems = strShowHideItems + strChecked;
  747. }
  748. document.cookie = "ShowHideItems = " + strShowHideItems;
  749. window.navigate("status.asp?ShowReports=0" + "&StatusSort=" + txtSort.value + "&StatusAD=" + txtAD.value );
  750. }
  751. function DisplayCookies()
  752. {
  753. // cookies are separated by semicolons
  754. var aCookie = document.cookie.split("; ");
  755. var aCrumb = "";
  756. for (var i=0; i < aCookie.length; i++)
  757. {
  758. aCrumb = aCrumb + aCookie[i] + "\r";
  759. }
  760. alert(aCrumb);
  761. }
  762. //-->
  763. </script>
  764. <%
  765. Call CDestroyObjects
  766. End if
  767. %>
  768. <!--#include file="..\include\asp\foot.asp"-->