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.

377 lines
12 KiB

  1. <%@Language='JScript' CODEPAGE=1252%>
  2. <!--#INCLUDE file="../../include/Constants.asp" -->
  3. <!--#INCLUDE file="../../include/dbutil.asp" -->
  4. <!--#INCLUDE file="../../include/DataUtil.asp" -->
  5. <!--#INCLUDE file="../include/header.asp"-->
  6. <!--#INCLUDE file="../include/body.inc"-->
  7. <!--#INCLUDE file="../usetest.asp" -->
  8. <%
  9. //clear out the cookies, they should be cleared at this point. This is just
  10. //to be sure.
  11. fnClearCookies();
  12. if ( !fnIsBrowserValid() )
  13. {
  14. Response.Redirect( "http://" + g_ThisServer + "/browserinfo.asp" )
  15. Response.End()
  16. }
  17. var L_NORECORDS_TEXT = "No records to display.";
  18. var L_STATUSCOMPLETE_TEXT = "We have discovered the cause of this Stop error. To review the resources click on this link";
  19. var L_STATUSMOREINFO_TEXT = "This error report has been processed and analyzed. We are unable to offer a solution at this time, but we will continue to research this error report. We have identified the following Knowledge Base articles which may help you troubleshoot your issue. We will contact you with any solutions we discover by using the e-mail address you provided.";
  20. //this is the old status in progress text
  21. //var L_STATUSINPROGRESS_TEXT = "We are currently processing this error report. When the error report is processed and the analysis is complete, we will contact you by using the e-mail address you provided.";
  22. var L_STATUSINPROGRESS_TEXT = "We are currently processing this error report. For additional assistance see Product Support Services on the Microsoft Web site. For more information, see Frequently asked questions.";
  23. var L_STATUSERRORMSGTITLE_TEXT = "Unable to complete action";
  24. var L_STATUSERRORMSG_TEXT = "Windows Online Crash Analysis was unable to complete the requested action. Please try this task again.";
  25. var L_INPROGRESS_TEXT = "Researching";
  26. var L_SOLVED_TEXT = "Resolution found";
  27. var L_MOREINFO_TEXT = "Information";
  28. // the return codes from the sproc are as follows: 0 = Solved -1 = More information -2 = No solution period.
  29. var ImageList = { "0" : "<img class='Arrow' align='absMiddle' src='../../include/images/icon_complete_16x.gif' border='0' alt='" + L_STATUSCOMPLETE_TEXT + "'>",
  30. "-1" : "<img class='Arrow' align='absMiddle' src='../../include/images/icon_moreinfo_16x.gif' border='0' alt='" + L_STATUSMOREINFO_TEXT + "'>",
  31. "-2" : "<img class='Arrow' align='absMiddle' src='../../include/images/icon_inprogress_16x.gif' border='0' alt='" + L_STATUSINPROGRESS_TEXT + "'>"
  32. };
  33. var ImageText = { "0" : L_SOLVED_TEXT,
  34. "-1" : L_MOREINFO_TEXT,
  35. "-2" : L_INPROGRESS_TEXT
  36. };
  37. //var g_nCustomerID = new String( fnGetCookie( "CID" ) ); //customer ID value stored in the cookie
  38. var g_nCustomerID = ""
  39. var g_bSignedIn = new Number( fnGetCookie ( "PPIN" ) ); //Signed into passport flag (T|F)
  40. var g_RemoveRecords = new String( Request.QueryString("R") );
  41. var g_bDoRedirect = false;
  42. var g_bError = false;
  43. /******************************************************************************************
  44. Begin Functions
  45. ******************************************************************************************/
  46. function fnBuildViewString( szRecords, bFilterValue )
  47. {
  48. var regPattern = /^(\d{5,}:)+$/g;
  49. try
  50. {
  51. if ( regPattern.test( szRecords ) )
  52. {
  53. szRecords = szRecords.replace( /:/g , "," );
  54. //todo: this is a stupid hack, basically, I need to get rid of the extra ',' at the end of the string
  55. szRecords += "0";
  56. var Query = "OCAV3_RemoveCustomerIncident " + g_nCustomerID + ",'" + szRecords + "'";
  57. g_cnCustomerDB.Execute( Query );
  58. return true;
  59. }
  60. }
  61. catch ( err )
  62. {
  63. return false;
  64. }
  65. return false;
  66. }
  67. function fnPrintCell ( szString, szTitleText, bEncode, szAlignment )
  68. {
  69. szString = new String( szString )
  70. if ( szString == "null" || String(fnTrim(szString)).length==0 || szString=="undefined" )
  71. szString = ""
  72. //This may be a problem.. . there is an issue with HTMLEncode corrupting Unicode
  73. // input, I don't know if were going to run into this problem or not.
  74. if ( bEncode )
  75. szString = Server.HTMLEncode( szString );
  76. if ( szTitleText != "" )
  77. szTitleText = " title='" + szTitleText + "'";
  78. Response.Write("<td class='" + altColor + "' align=" + szAlignment + szTitleText + ">&nbsp;" + szString + "</td>\n" );
  79. }
  80. function fnTrimDescription( szDescription )
  81. {
  82. var strSize = 24; //this is the size of each line of text
  83. var szDescription = new String( szDescription );
  84. var szFinalString = new String();
  85. var nLoopSize = String( szDescription).length / strSize;
  86. for ( var i = 0 ; i < nLoopSize ; i++ )
  87. {
  88. var nFirstSpace = String(szDescription).indexOf( " " )
  89. if ( nFirstSpace > strSize || nFirstSpace == -1 )
  90. {
  91. szFinalString += szDescription.substr( 0, strSize ) + "\n\r";
  92. szDescription = szDescription.substr( strSize , szDescription.length )
  93. }
  94. else
  95. {
  96. szFinalString += szDescription.substr( 0, strSize );
  97. szDescription = szDescription.substr( strSize , szDescription.length )
  98. }
  99. }
  100. return szFinalString
  101. }
  102. /******************************************************************************************
  103. End Functions
  104. ******************************************************************************************/
  105. try
  106. {
  107. if ( g_bSignedIn == "0" || isNaN( g_bSignedIn ))
  108. {
  109. var g_bSignedIn = fnDisplayPassportPrompt( true );
  110. if ( g_bSignedIn )
  111. {
  112. fnWriteCookie( "PPIN", "1" );
  113. var g_nCustomerID = fnGetCustomerID( g_bSignedIn );
  114. }
  115. else
  116. {
  117. //hit this case, if we are not logged in. Unless we want to display more, kill it here.
  118. %> <!-- #include file="../include/foot.asp" --><%
  119. Response.End ();
  120. }
  121. }
  122. if ( g_nCustomerID == "undefined" || g_nCustomerID == "" || g_nCustomerID == "null" || g_nCustomerID == "0" )
  123. {
  124. var g_nCustomerID = fnGetCustomerID( g_bSignedIn );
  125. }
  126. var g_szCustomerName = fnGetCustomerName();
  127. //Create the pages customer db connection - gonna need it anyhow, do it early
  128. var g_cnCustomerDB = GetDBConnection( Application("L_OCA3_CUSTOMERDB_RW" ), true );
  129. if ( g_cnCustomerDB )
  130. {
  131. if ( g_RemoveRecords != "undefined" )
  132. {
  133. if ( fnBuildViewString( g_RemoveRecords, 1 ) )
  134. {
  135. g_cnCustomerDB.Close();
  136. Response.Redirect( "Status.asp" );
  137. Response.End()
  138. }
  139. }
  140. }
  141. var Query = "OCAV3_GetCustomerIssues " + g_nCustomerID
  142. try
  143. {
  144. var rsCustomerIssues = g_cnCustomerDB.Execute ( Query );
  145. }
  146. catch ( err )
  147. {
  148. //Response.Write("<BR>" + g_nCustomerID )
  149. throw (err)
  150. }
  151. }
  152. catch ( err )
  153. {
  154. Response.Write( "<P CLASS=clsPTitle>" + L_STATUSERRORMSGTITLE_TEXT + "</P>" )
  155. Response.Write( "<P>" + L_STATUSERRORMSG_TEXT + "</P>")
  156. %> <!-- #include file="../include/foot.asp" --><%
  157. Response.End ();
  158. }
  159. %>
  160. <form name='ctable' id='ctable' method='get' action='status.asp'>
  161. <p class='clsPTitle'>
  162. Error reports
  163. </p>
  164. <p><!>Welcome<!><%=g_szCustomerName%>,</p>
  165. <p class='clsPBody'>
  166. The following error reports were found. To view the analysis status, click the image in the Analysis column. To remove your tracking information from the error report, select the associated check box and click the Delete link.
  167. </p>
  168. <br>
  169. <table id="tblStatus" class="clsTableInfo" border="0" cellpadding="0" cellspacing="1">
  170. <thead>
  171. <tr>
  172. <td align="center" nowrap class="clsTDInfo">
  173. <center>
  174. <a name="aCheckAll" id="aCheckAll" href="JAVASCRIPT:fnCheckAllBoxes();" STYLE="text-decoration:none" Title="Check or uncheck all check boxes">
  175. <img alt='' border="0" src="../../include/images/checkmark.gif" WIDTH="13" HEIGHT="13">
  176. </a>
  177. </center>
  178. </td>
  179. <td style="BORDER-LEFT: white 1px solid" id="cSort4" align="left" nowrap class="clsTDInfo">
  180. Description
  181. </td>
  182. <td style="BORDER-LEFT: white 1px solid" id="cSort5" align="left" nowrap class="clsTDInfo">
  183. Analysis
  184. </td>
  185. <td style="BORDER-LEFT: white 1px solid" id="cSort1" align="left" nowrap class="clsTDInfo">
  186. Submitted
  187. </td>
  188. <td style="BORDER-LEFT: white 1px solid" id="cSort3" align="left" nowrap class="clsTDInfo">
  189. Type
  190. </td>
  191. </tr>
  192. </thead>
  193. <tbody>
  194. <%
  195. try
  196. {
  197. if( rsCustomerIssues.EOF )
  198. {
  199. Response.Write("<tr><td class='clsTDBodyCell' COLSPAN='5'><p>" + L_NORECORDS_TEXT + "</p></td></tr>" )
  200. }
  201. var altColor = "sys-table-cell-bgcolor2";
  202. var nCounter = 0;
  203. while ( !rsCustomerIssues.EOF )
  204. {
  205. var AnalysisImage = ImageList[ rsCustomerIssues("State") ]
  206. var AnalysisText = ImageText[ rsCustomerIssues("State") ]
  207. var dRecordDate = new Date( rsCustomerIssues("Created" ) )
  208. nCounter++;
  209. dRecordDate = (dRecordDate.getMonth()+1) + "/" + dRecordDate.getDate() + "/" + dRecordDate.getYear()
  210. var TrackID = "<input type='hidden' name='TrackID' value='" + rsCustomerIssues("TrackID") + "'>";
  211. if ( altColor == "sys-table-cell-bgcolor2")
  212. altColor="sys-table-cell-bgcolor1";
  213. else
  214. altColor="sys-table-cell-bgcolor2";
  215. Response.Write("<tr>");
  216. fnPrintCell( TrackID + "<input type='CheckBox' id='Check' name='Check' value='0'>", "", false, "'center'" );
  217. fnPrintCell( fnTrimDescription( rsCustomerIssues("Description" ) ), "", true, "'left'" );
  218. fnPrintCell( "<a id='aAnalysis" + nCounter + "' class='clsALinkNormal' href='../Response.asp?SID=" + rsCustomerIssues("SolutionID") + "'>" + AnalysisImage + AnalysisText + "</a>", "", false, "'left' nowrap" )
  219. fnPrintCell( dRecordDate, rsCustomerIssues("TrackID") , true, "'left'" );
  220. fnPrintCell( rsCustomerIssues("sBucket" ), "", true, "'left'" );
  221. Response.Write("</tr>" );
  222. rsCustomerIssues.MoveNext();
  223. }
  224. }
  225. catch( err )
  226. {
  227. //TODO:: What to do if there is an error while building the customer issues table.
  228. }
  229. %>
  230. </tbody>
  231. </table>
  232. </form>
  233. <table class="clstblLinks">
  234. <tbody>
  235. <tr>
  236. <td nowrap>
  237. <p>
  238. <!>To stop tracking a report, or to remove a resolved issue, check a report and <!>
  239. <a id='aRemoveReport' name='aRemoveReport' class="clsALinkNormal" href="Javascript:fnRemoveReports()" accesskey='q'><img alt='' class='Arrow' align='absMiddle' SRC='../../include/images/icon_delete_16x.gif' border='0'><!>Delete<!></a>.
  240. </p>
  241. </td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. <form name='tremove' id='tremove' method='get' action='status.asp'>
  246. <input type='hidden' value='' name="R">
  247. </form>
  248. <BR>
  249. <BR>
  250. <script language='javascript' type='text/javascript'>
  251. <!--
  252. var g_bCheckBoxState = true;
  253. function fnCheckAllBoxes()
  254. {
  255. if ( typeof ( document.forms[0].Check ) != "undefined" )
  256. {
  257. if ( String( document.forms[0].Check.length ) == "undefined" )
  258. {
  259. document.forms[0].Check.checked = g_bCheckBoxState;
  260. }
  261. else
  262. {
  263. for( var i=0 ; i< document.forms[0].Check.length ; i++ )
  264. {
  265. document.forms[0].Check[i].checked = g_bCheckBoxState;
  266. }
  267. }
  268. g_bCheckBoxState = !g_bCheckBoxState;
  269. }
  270. }
  271. function fnRemoveReports()
  272. {
  273. var szRemove = "";
  274. if ( typeof ( document.forms[0].Check ) != "undefined" )
  275. {
  276. if ( typeof ( document.forms[0].Check.length ) != "undefined" )
  277. {
  278. for( var i=0 ; i< document.forms[0].Check.length ; i++ )
  279. {
  280. if ( document.forms[0].Check[i].checked )
  281. szRemove += document.forms[0].TrackID[i].value + ":";
  282. }
  283. }
  284. else
  285. {
  286. if ( document.forms[0].Check.checked )
  287. szRemove += document.forms[0].TrackID.value + ":";
  288. }
  289. if ( szRemove != "" )
  290. {
  291. document.forms[1].R.value = szRemove;
  292. document.forms[1].submit();
  293. }
  294. }
  295. }
  296. //-->
  297. </script>
  298. <!-- #include file="../include/foot.asp" -->