Source code of Windows XP (NT5)
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.

136 lines
4.0 KiB

  1. <%
  2. Response.Expires = 0
  3. %>
  4. <!--
  5. display bug list based on filter expression created by raid1.asp
  6. QueryString : as necessary for updcnfg.asp invocation
  7. if configuration is to be updated and window refreshed
  8. ( e.g. when raid1.asp window updates configuration )
  9. -->
  10. <html>
  11. <head>
  12. <style type="text/css">
  13. .st1 {color:red}
  14. .act {color:menutext; background:menu; cursor:default}
  15. .fldn {background:menu}
  16. .resl {position:relative; left:-12pt; top:-13pt;}
  17. </style>
  18. <SCRIPT language="JavaScript" defer>
  19. function tableClick() {
  20. if( event.srcElement.tagName == "IMG")
  21. el = event.srcElement.parentElement.parentElement;
  22. else
  23. el = event.srcElement.parentElement;
  24. if ( el.rowIndex > 0 ) {
  25. window.open( "raid3.asp?BugID=" + el.cells[0].innerText, "ntbug", "toolbar=no, menubar=no, location=no, directories=no, resizeable=yes, scrollbars=yes");
  26. //window.open( "raid3.asp?BugID=" + el.cells[0].innerText, "ntbug", "" );
  27. }
  28. }
  29. function nameClick() {
  30. s = window.showModalDialog( "/scripts/raid/raid4.asp?type=list", "list", "dialogWidth:300pt; dialogHeight:200pt" );
  31. if ( s != null ) {
  32. document.all.fieldlist.value = s;
  33. document.all.save.target = "raid1";
  34. document.all.save.action = "/scripts/raid/raid1.asp?upd=list";
  35. document.all.save.method = "POST";
  36. document.all.save.submit();
  37. location.replace("raid2.asp");
  38. }
  39. }
  40. </SCRIPT>
  41. </head>
  42. <body>
  43. <!--#include virtual="/scripts/raid/updcnfg.asp"-->
  44. <%
  45. Set Conn = Server.CreateObject("ADODB.Connection")
  46. Set Comm = Server.CreateObject("ADODB.Command")
  47. Set RS = Server.CreateObject("ADODB.Recordset")
  48. rcolist = "BugID,Status," & Session("FieldList")
  49. if Session("FieldSort") <> "" then
  50. rcosort = " ORDER BY " & Session("FieldSort")
  51. else
  52. rcosort = ""
  53. end if
  54. rem Response.Write Session("FieldList") & Session("FieldSort")
  55. rfilt = Session("Filter")
  56. rem Response.Write Request.QueryString
  57. Conn.Open Session("DSN")
  58. if rfilt = "" then
  59. rfilt = "Status = 'x'"
  60. end if
  61. Comm.CommandText = "Select "+rcolist+" from bugs where "+rfilt+rcosort
  62. Set Comm.ActiveConnection = Conn
  63. Set RS.Source = Comm
  64. Response.Write "<table border=0 class=" & chr(34) & "resl" & chr(34) & " NOWRAP id=" & chr(34) & "reslist" & chr(34) & " ondblclick=" & chr(34) & "tableClick();" & chr(34) & ">"
  65. Response.Write "<thead><tr>"
  66. RS.Open
  67. of = 0
  68. for each n in RS.Fields
  69. if of < 2 then
  70. if of = 1 then
  71. Response.Write "<th class=" & chr(34) & "fldn" & chr(34) & "></th>"
  72. else
  73. Response.Write "<th></th>"
  74. end if
  75. else
  76. Response.Write "<th ondblclick=" & chr(34) & "nameClick();" & chr(34) & " class=" & chr(34) & "fldn" & chr(34) & " align=left>" & n.Name & "</th>"
  77. end if
  78. of = of + 1
  79. next
  80. Response.Write "</tr></thead><tbody>"
  81. r = 0
  82. do until RS.EOF
  83. Response.Write "<tr id=" & chr(34) & r & chr(34) & ">"
  84. fSt = TRUE
  85. of = 0
  86. for each n in RS.Fields
  87. if of = 0 then
  88. Response.Write "<td><div style=" & chr(34) & "display:none" & chr(34) & ">" & n.Value & "</div></td>"
  89. ElseIf of = 1 then
  90. Select Case n.Value
  91. Case "Closed"
  92. s = "clo.gif"
  93. Case "Resolved"
  94. s = "res.gif"
  95. Case else
  96. s = "act.gif"
  97. End Select
  98. Response.Write "<td><img width=13 height=9 src=" & chr(34) & s & chr(34) & "></td>"
  99. else
  100. Response.Write "<td>" & n.Value & "</td>"
  101. end if
  102. of = of + 1
  103. next
  104. Response.Write "</tr>"
  105. RS.MoveNext
  106. r = r + 1
  107. loop
  108. RS.close
  109. Response.Write "</tbody></table>"
  110. conn.close
  111. %>
  112. <form id="save" action="/scripts/raid/raid2.asp" method=GET>
  113. <input type=hidden name = "fieldlist" id="fieldlist" value="<%=Session("FieldList")%>"></input>
  114. <input type=hidden name = "fieldsort" id="fieldsort" value="<%=Session("FieldSort")%>"></input>
  115. </form>
  116. <script FOR=window EVENT=onload() language="JavaScript">
  117. </script>
  118. </body>
  119. </html>