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.

132 lines
4.5 KiB

  1. <%@Language = JScript %>
  2. <%
  3. /**********************************************************************************
  4. Debug Portal - Version 2
  5. PAGE : DBGPortal_ViewBucket.asp
  6. DESCRIPTION : Entry point to the debug portal site.
  7. MODIFICATION HISTORY: 11/13/2001 - Created
  8. ***********************************************************************************/
  9. %>
  10. <!--#INCLUDE FILE='Global_DBUtils.asp'-->
  11. <!--#INCLUDE FILE='Global_ServerUtils.asp'-->
  12. <%
  13. var BucketID = Request("BucketID")
  14. var iBucket = Request("iBucket")
  15. var Alias = GetShortUserAlias()
  16. var Action = Request("Action")
  17. var Comment = new String( Request("Comment") )
  18. var FrameID = Request("FrameID" )
  19. //var rep = /"/g
  20. var rep2= /'/g
  21. //Comment = Comment.replace( rep, "\"\"" )
  22. Comment = Comment.replace( rep2, "''" )
  23. var g_DBConn = GetDBConnection( Application("CRASHDB3" ) )
  24. var Query = "DBGPortal_SetComment '" + Alias + "','" + Action + "','" + Comment + "','" + BucketID + "'," + iBucket
  25. g_DBConn.Execute( Query )
  26. //SendMail( "[email protected];[email protected]", "This is a test", "Just checking to see if this thing actually works, probably not" )
  27. //Action values:
  28. // ACTION = 8 -means a solution request.
  29. // Action = 12 -Flag pool corruption
  30. // Action = 13 -Mean clear pool corruption flag
  31. // deafult is to just add a plain old comment for everything else.
  32. var tmp = new String( Comment )
  33. tmp = tmp.replace( regexp, "\n" )
  34. if ( Action == "8" )
  35. {
  36. var regexp=new RegExp( "<BR>" , "g" )
  37. var MessageSubject = new String( "Solution Requested for bucket: " + BucketID )
  38. var MessageBody = new String()
  39. MessageBody = "Solution Request Information: \n\n"
  40. MessageBody += "Requested By: " + Alias + "\n"
  41. MessageBody += "Bucket URL : http://" + g_ServerName + "/bluescreen/debug/v2/DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode( BucketID ) + "\n\n"
  42. MessageBody += "Additional Information:\n " + tmp + "\n"
  43. if ( Application("DebugBuild") == 1 )
  44. SendMail( "[email protected]", MessageSubject , MessageBody )
  45. else
  46. SendMail( "[email protected];[email protected];[email protected]", MessageSubject , MessageBody )
  47. /*
  48. [QueueIndex] [int] IDENTITY (1, 1) NOT NULL ,
  49. [Status] [int] NULL ,
  50. [ResponseType] [int] NULL ,
  51. [DateRequested] [smalldatetime] NULL ,
  52. [DateCreated] [smalldatetime] NULL ,
  53. [requestedBy] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  54. [CreatedBy] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  55. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  56. [Description] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  57. */
  58. var Query = "DBGPortal_CreateResponseRequest 0, 1, '" + Alias + "','" + BucketID + "','" + Comment + "'"
  59. g_DBConn.Execute( Query )
  60. }
  61. else if ( Action == "3" )
  62. {
  63. var Query = "DBGPortal_CreateResponseRequest 0, 2, '" + Alias + "','" + BucketID + "','" + Comment + "'"
  64. g_DBConn.Execute( Query )
  65. }
  66. else if ( Action == "12" )
  67. {
  68. var MessageSubject = new String( BucketID + " - Flagging pool corruption" )
  69. var MessageBody = new String( "This bucket has been flagged for pool corruption" )
  70. Query = "DBGPortal_SetPoolCorruption '" + BucketID + "'"
  71. ExecuteSP( Query, "DBGPortal_SetPoolCorruption" )
  72. SendMail( "[email protected]", MessageSubject , MessageBody )
  73. }
  74. else if ( Action == "13" )
  75. {
  76. var MessageSubject = new String( BucketID + " - Clear pool corruption" )
  77. var MessageBody = new String( "This bucket has been cleared pool corruption" )
  78. Query = "DBGPortal_ClearPoolCorruption '" + BucketID + "'"
  79. ExecuteSP( Query, "DBGPortal_ClearPoolCorruption" )
  80. SendMail( "[email protected]", MessageSubject , MessageBody )
  81. }
  82. else
  83. {
  84. var MessageSubject = new String( "Addcomment.asp" )
  85. var MessageBody = new String()
  86. MessageBody = "Added comment"
  87. MessageBody += "Requested By: " + Alias + "\n"
  88. MessageBody += "Bucket URL : http://" + g_ServerName + "/bluescreen/debug/v2/DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode( BucketID ) + "\n\n"
  89. MessageBody += "Additional Information:\n " + tmp + "\n"
  90. SendMail( "[email protected]", MessageSubject , MessageBody )
  91. }
  92. g_DBConn.Close()
  93. Response.Redirect ("DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode(BucketID)+ "&FrameID=" + FrameID )
  94. //Response.Write ("DBGPortal_ViewBucket.asp?BucketID=" + Server.URLEncode(BucketID) )
  95. %>