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.

464 lines
14 KiB

  1. <%@Language = JAVASCRIPT%>
  2. <head>
  3. <link rel="stylesheet" TYPE="text/css" HREF="/main.css">
  4. <link rel="stylesheet" TYPE="text/css" HREF="/CustomStyles.css">
  5. <meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1" />
  6. </head>
  7. <body bgcolor='#ffffff' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' tabindex='0'>
  8. <!-- #INCLUDE FILE='Global_DBUtils.asp' -->
  9. <!-- #INCLUDE FILE='Global_ServerUtils.asp' -->
  10. <%
  11. //Response.Write( Request.QueryString() + "<BR>" )
  12. //Response.Write( "form: " + Request.form() + "<BR>" )
  13. var SolutionID = new String( Request( "SolutionID" ) )
  14. var ReturnURL = new String( Request("ReturnURL" ) )
  15. var Page = new String( Request("Page") )
  16. var PageSize = new String ( Request("PageSize") )
  17. var iIndex = new String( Request("iIndex") )
  18. var StoredProc = new String( Request("SP" ) ) //stored proc to execute
  19. var Param0 = new String( Request("Param0") )
  20. var Param1 = new String( Request("Param1") ) //SP Param1-6
  21. var Param2 = new String( Request("Param2") )
  22. var Param3 = new String( Request("Param3") )
  23. var Param4 = new String( Request("Param4") )
  24. var Param5 = new String( Request("Param5") )
  25. var Param6 = new String( Request("Param6") )
  26. if ( Page == "undefined" )
  27. Page=1
  28. if ( PageSize == "undefined" )
  29. PageSize = 100
  30. if ( ReturnURL == "undefined" )
  31. ReturnURL="SEP.asp"
  32. if( iIndex == "undefined" )
  33. iIndex = 0
  34. if ( SolutionID == "undefined" )
  35. {
  36. Response.Write("Invalid SolutionID, please select a valid solution ID<BR>")
  37. Response.End
  38. }
  39. if( SolutionID == "0" )
  40. {
  41. Response.Write("<table><tr><td><p>You can't link buckets to a solution that hasn't been created, silly . . .geesh</p></td></tr></table>")
  42. Response.End()
  43. }
  44. %>
  45. <BODY>
  46. <FORM NAME=frmAddBucket ACTION="SEP_LinkBucketsToSolution.asp" METHOD=GET CLASS=ContentArea>
  47. <INPUT TYPE=HIDDEN VALUE="<%=SolutionID%>" ID=SolutionID NAME=SolutionID>
  48. <INPUT TYPE=HIDDEN VALUE="<%=Page%>" ID=Page NAME=Page>
  49. <INPUT TYPE=HIDDEN VALUE="<%=PageSize%>" ID=PageSize NAME=PageSize>
  50. <input type=hidden value="" name=working id=working>
  51. <table width=100%>
  52. <tr>
  53. <td colspan=4 >
  54. <p class='clsPTitle'>Link Buckets to SolutionID <%=SolutionID%></p>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td colspan=4>
  59. <p>Please select the type of solution/response this will be. If you choose response, the user will be allowed to track this incident. An item marked as a solution, will not be tracked and will be added to the bucketcounts as a solved bucket.</p>
  60. <select style='margin-left:16px' class='clsSEPSelect' id='SolutionType' name='SolutionType'>
  61. <option value='1'>Solution</option>
  62. <option value='0'>Response</option>
  63. </select>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>
  68. <INPUT TYPE=BUTTON VALUE="go" STYLE='margin-left:16px;width:50px' OnClick="OpenNewEditWindow( 'SEP_GoLinkSolutionToBucket.asp', tblBuckets)" id=BUTTON1 name=BUTTON1>
  69. </td>
  70. <td>
  71. <p>
  72. <%
  73. if ( StoredProc == "CUSTOM" )
  74. Response.Write("Custom Query - No paging" )
  75. else
  76. {
  77. %>
  78. <A class='clsALinkNormal' OnClick="window.history.back()" HREF="#here">Prev Page</A>
  79. &nbsp
  80. Page:&nbsp<%=Page%>
  81. &nbsp
  82. <A class='clsALinkNormal' onclick='Page.value++;frmAddBucket.submit()' href="#here">Next page </a>
  83. <%
  84. }
  85. %>
  86. </p>
  87. </td>
  88. <td>
  89. <INPUT style='margin-left:16px' TYPE=Button Value="Remove" OnClick="OpenNewEditWindow( 'SEP_GoRemoveSolutionFromBucket.asp', tblSolvedBuckets )" id=Button2 name=Button2>
  90. </td>
  91. <td>
  92. <p>
  93. Current Buckets Linked to this Solution:
  94. </p>
  95. </td>
  96. </tr>
  97. <tr>
  98. <td colspan='2'>
  99. <div style="height:30;margin-right:10px;margin-left:16px;padding-right:0" >
  100. <table class="clsTableInfo2" border="0" cellpadding="0" cellspacing="1">
  101. <tr>
  102. <td style="width:64px;padding-left:0;padding-right:0" align="left" nowrap class="clsTDInfo">
  103. <INPUT class='none' style='width:25px;padding-left:0;padding-right:0;margin-right:0;margin-left:0;margin:0' TYPE=CheckBox OnClick="javascript:SelectAllBuckets( document.all.tblBuckets, this.checked )">All
  104. </td>
  105. <td style="BORDER-LEFT: white 1px solid" align="left" nowrap class="clsTDInfo">
  106. Bucket ID
  107. </td>
  108. <td style="width:80px;BORDER-LEFT: white 1px solid" align="left" nowrap class="clsTDInfo">
  109. Solution ID
  110. </td>
  111. </tr>
  112. </table>
  113. </div>
  114. <div id='divFollowupList' style="height:200px;overflow:auto;border-bottom:thin groove;border-right:none;margin-right:10px;margin-left:16px;padding-right:0">
  115. <table id="tblBuckets" name="tblBuckets" class="clsTableInfo2" border="0" cellpadding="0" cellspacing="1" style="margin-left:0;margin-right:0;padding-right:30" >
  116. <%
  117. if ( StoredProc == "CUSTOM" )
  118. {
  119. if ( Param0.toString() == "BUCKETDATA" )
  120. {
  121. var query = "SELECT TOP " + Param1 + " bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM "
  122. query += "DBGPortal_BucketDataV3 " + Param2 + " ORDER BY " + Param3 + " " + Param4
  123. }
  124. else
  125. {
  126. var query = "SELECT TOP " + Param1
  127. query += " bFullDump, SKU, Source, BucketID, FilePath, BuildNo, EntryDate, Email, Description from dbgportal_crashdatav3 "
  128. query += Param2
  129. query += " order by " + Param3 + " " + Param4
  130. }
  131. }
  132. else
  133. {
  134. if ( Param0.toString() != "undefined" )
  135. {
  136. Param0 = ",'" + Param0 + "'"
  137. }
  138. else
  139. {
  140. Param0 = ""
  141. }
  142. //var query = SP + " '" + Page + "'" + Param0
  143. var query = "DBGPortal_GetAllBuckets " + iIndex
  144. }
  145. //try
  146. {
  147. var g_DBConn = GetDBConnection ( Application("CRASHDB3") )
  148. //var rsResults = g_DBConn.Execute( "SEP_GetSolutionSolvedBuckets " + SolutionID )
  149. //Response.Write("Query: " + query )
  150. var rsResults = g_DBConn.Execute( query )
  151. var altColor = 'sys-table-cell-bgcolor2'
  152. while ( !rsResults.EOF )
  153. {
  154. if ( altColor == 'sys-table-cell-bgcolor2' )
  155. altColor = 'sys-table-cell-bgcolor1'
  156. else
  157. altColor = 'sys-table-cell-bgcolor2'
  158. var BucketID = rsResults("BucketID")
  159. //Response.Write("<tr style='padding-right:0;margin-right:0'><td style='width:60px' class='sys-table-cell-bgcolor2'><input type='checkbox' name='AliasList' value='" + rsFollowUp("FollowUP") + "' Checked>")
  160. Response.Write("<tr><td style='width:64px' class='" + altColor + "' align='center'><INPUT style='width:30px' TYPE=CheckBox></td>\n" )
  161. Response.Write("<td class='" + altColor + "'><A HREF='DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode(BucketID) + "'>" + BucketID + "</a></td>\n" )
  162. if ( String(rsResults("SolutionID")).toString() != "null" )
  163. Response.Write("<td style='width:80px' class='" + altColor + "'>" + rsResults("SolutionID") + "</td></tr>\n" )
  164. else
  165. Response.Write("<td style='width:80px' class='" + altColor + "'>&nbsp;</td></tr>\n" )
  166. var iIndex = new String( rsResults("iIndex" ) )
  167. rsResults.MoveNext()
  168. }
  169. }
  170. //catch( err )
  171. {
  172. //Response.Write("err: " + err.description +)
  173. }
  174. %>
  175. </table>
  176. </div>
  177. </td>
  178. <td colspan='2'>
  179. <div style="height:30;margin-right:10px;margin-left:16px;padding-right:0" >
  180. <table class="clsTableInfo2" border="0" cellpadding="0" cellspacing="1">
  181. <tr>
  182. <td style="width:64px" align="left" nowrap class="clsTDInfo">
  183. <INPUT style='width:25px' TYPE=CheckBox OnClick="SelectAllBuckets( document.all.tblSolvedBuckets, this.checked )">All
  184. </td>
  185. <td style="BORDER-LEFT: white 1px solid" align="left" nowrap class="clsTDInfo">
  186. Bucket ID
  187. </td>
  188. <!--<td style="BORDER-LEFT: white 1px solid" align="left" nowrap class="clsTDInfo">
  189. Solution ID
  190. </td>-->
  191. <td style="BORDER-LEFT: white 1px solid" align="left" nowrap class="clsTDInfo">
  192. Type
  193. </td>
  194. </tr>
  195. </table>
  196. </div>
  197. <div id='divFollowupList' style="height:200px;overflow:auto;border-bottom:thin groove;border-right:none;margin-right:10px;margin-left:16px;padding-right:0">
  198. <table id="tblSolvedBuckets" name="tblSolvedBuckets" class="clsTableInfo2" border="0" cellpadding="0" cellspacing="1" style="margin-left:0;margin-right:0;padding-right:30" >
  199. <%
  200. var query = "SEP_GetSolutionSolvedBuckets " + SolutionID
  201. //try
  202. {
  203. var g_DBConn = GetDBConnection ( Application("SOLUTIONS3") )
  204. var rsResults = g_DBConn.Execute( query )
  205. var altColor = 'sys-table-cell-bgcolor2'
  206. while ( !rsResults.EOF )
  207. {
  208. if ( altColor == 'sys-table-cell-bgcolor2' )
  209. altColor = 'sys-table-cell-bgcolor1'
  210. else
  211. altColor = 'sys-table-cell-bgcolor2'
  212. var BucketID = rsResults("BucketID")
  213. Response.Write("<tr><td class='" + altColor + "'><INPUT TYPE=CheckBox></td>\n" )
  214. Response.Write("<td class='" + altColor + "'><A HREF='DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode(BucketID) + "'>" + BucketID + "</a></td>\n" )
  215. if ( rsResults("Type")=="1" )
  216. Response.Write("<td class='" + altColor + "'>Solution</td></tr>\n" )
  217. else
  218. Response.Write("<td class='" + altColor + "'>Response</td></tr>\n" )
  219. //Response.Write("<td class='" + altColor + "'>" + rsResults("Type") + "</td></tr>\n" )
  220. rsResults.MoveNext()
  221. }
  222. }
  223. //catch( err )
  224. {
  225. //Response.Write("err: " + err.description +)
  226. }
  227. %>
  228. </table>
  229. </div>
  230. <input type=hidden value="<%=iIndex%>" ID=iIndex name=iIndex>
  231. </td>
  232. </tr>
  233. </table>
  234. </form>
  235. <script language='javascript' src='Global_ClientSearchUtil.js'></script>
  236. <%
  237. CreateQueryBuilder( "AdvancedQuery", "ExecuteQuery", "SaveQuery", SearchFields, "Search Bucket Data:" , "SEP_LinkBucketsToSolution.asp", "Param0=BUCKETDATA&SolutionID=" + SolutionID )
  238. //CreateQueryBuilder( "AdvancedCrashQuery", "ExecuteQuery", CrashSearchFields, "Search Crash Data: ", "DBGPortal_DisplayCrashQuery.ASP" )
  239. %>
  240. <script LANGUAGE="JAVASCRIPT">
  241. function SaveQuery( TableName, Page, Params )
  242. {
  243. alert("Save query functionality is not enabled on the solution entry pages . . sorry. ")
  244. }
  245. function SelectAllBuckets( table, value )
  246. {
  247. try
  248. {
  249. for ( var i=0; i < table.rows.length ; i++ )
  250. {
  251. var chkbox = table.rows(i).cells(0).firstChild
  252. if ( String( value ) != "undefined" )
  253. chkbox.checked = value
  254. else
  255. chkbox.checked = true
  256. }
  257. }
  258. catch( err )
  259. {
  260. alert( table )
  261. alert( value )
  262. }
  263. }
  264. var InEdit = false
  265. var iResults;
  266. var oTimer;
  267. var EditComplete = false
  268. var g_Table = new Object();
  269. function OpenNewEditWindow( Page, table )
  270. {
  271. var iHeight = window.screen.availHeight;
  272. var iWidth = window.screen.availWidth;
  273. iWidth = iWidth / 2;
  274. iHeight = iHeight / 1.5 ;
  275. var iTop = (window.screen.width / 2) - (iWidth / 2);
  276. var iLeft = (window.screen.height / 2) - (iHeight / 2);
  277. if( InEdit == false )
  278. {
  279. //SetCookies()
  280. iResults = window.open( Page, "", "top=" + iTop + ",left=" + iLeft + ",height=" + iHeight + ",width=" + iWidth + ",status=yes,toolbar=no,menubar=no");
  281. //iResults = window.open( "SEP_EditTemplate.asp", "" );
  282. g_Table = new Object( table );
  283. oTimer = window.setInterval( "PollEditWindow()" ,1000);
  284. InEdit = true
  285. }
  286. }
  287. function PollEditWindow()
  288. {
  289. //alert( g_Table );
  290. //alert( table.rows.length )
  291. if ( InEdit == true )
  292. {
  293. window.clearInterval( oTimer )
  294. oTimer = window.setInterval("PollEditWindow()",500);
  295. InEdit=false
  296. }
  297. try
  298. {
  299. if( iResults.document.readyState == "complete" )
  300. {
  301. window.clearInterval( oTimer )
  302. //for ( var i=0 ; i < tblBuckets.rows.length ; i++ )
  303. for ( var i=0 ; i < g_Table.rows.length ; i++ )
  304. {
  305. //var chkbox = tblBuckets.rows(i).cells(0).firstChild
  306. var chkbox = g_Table.rows(i).cells(0).firstChild
  307. //document.all.working.value = "linking " + tblBuckets.rows(i).cells(1).innerText
  308. document.all.working.value = "linking " + g_Table.rows(i).cells(1).innerText
  309. while( iResults.document.readyState != "complete" )
  310. {
  311. document.all.working.value += "."
  312. window.status = document.all.working.value
  313. }
  314. if ( chkbox.checked == true )
  315. {
  316. iResults.document.all.pSolutionID.innerText = "<%=SolutionID%>"
  317. iResults.document.all.SolutionID.value = "<%=SolutionID%>"
  318. iResults.document.all.SolutionType.value = document.all.SolutionType.value
  319. iResults.document.all.pSolutionType.innerText = document.all.SolutionType.value
  320. //iResults.document.all.pBucketID.innerText = tblBuckets.rows(i).cells(1).innerText
  321. //iResults.document.all.BucketID.value = tblBuckets.rows(i).cells(1).innerText
  322. iResults.document.all.pBucketID.innerText = g_Table.rows(i).cells(1).innerText
  323. iResults.document.all.BucketID.value = g_Table.rows(i).cells(1).innerText
  324. iResults.document.frmLinkBuckets.submit()
  325. }
  326. }
  327. document.all.working.value = "Waiting for completion "
  328. while( iResults.document.readyState != "complete" )
  329. {
  330. document.all.working.value += "."
  331. window.status = document.all.working.value
  332. }
  333. iResults.window.close()
  334. InEdit=false
  335. location.reload()
  336. window.status = "done linking buckets to solution!"
  337. }
  338. }
  339. catch ( e )
  340. {
  341. window.clearInterval( oTimer )
  342. InEdit=false
  343. throw( e )
  344. //document.all.tblSolutionSettings.style.display="block"
  345. }
  346. g_Table = null;
  347. }
  348. function fnUpdate()
  349. {
  350. alert("updateing")
  351. }
  352. </SCRIPT>
  353. </BODY>