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.

253 lines
7.5 KiB

  1. <%@Language='JScript' CODEPAGE=1252%>
  2. <!--#INCLUDE file="../include/header.asp"-->
  3. <!--#INCLUDE file="../include/body.inc"-->
  4. <!--#INCLUDE file="../usetest.asp" -->
  5. <%
  6. var szFileName = new String( Request.Cookies("szCurrentFile") )
  7. var sDisplayName = "";
  8. var nBreakLength = 65;
  9. //we wanna redirect if the browser is not a version of IE
  10. if ( !fnIsBrowserIE() )
  11. Response.Redirect( "http://" + g_ThisServer + "/welcome.asp" )
  12. if ( szFileName.length > nBreakLength )
  13. {
  14. try
  15. {
  16. for ( var i = 0 ; i< (szFileName.length/nBreakLength ) ; i++ )
  17. sDisplayName += szFileName.substr( i*nBreakLength, nBreakLength ) + "<BR>";
  18. }
  19. catch ( err )
  20. {
  21. //if an error occurs trying to break up the substring, just set the name to the
  22. //unparsed value.
  23. sDisplayName = szFileName;
  24. }
  25. }
  26. else
  27. sDisplayName = szFileName;
  28. //for some reason, the cookie doesn't want to hang around after pressing the previous
  29. //link, so rewrite it just to be safe.
  30. Response.Cookies( "szCurrentFile") = szFileName;
  31. %>
  32. <DIV ID="divNoActiveX" NAME="divNoActiveX" STYLE="display:none" >
  33. <TABLE CELLPADDING="3" CELLSPACING="0" BORDER="0" WIDTH="100%">
  34. <TR>
  35. <TD ALIGN=RIGHT WIDTH=1%>
  36. <IMG SRC="/include/images/info_icon.gif" ALIGN="RIGHT" HEIGHT="32" WIDTH="32" ALT="Important information.">
  37. </TD>
  38. <TD>
  39. <P CLASS=clsPTitle VALIGN=center ALIGN=LEFT>
  40. Internet Explorer security settings must be changed
  41. </P>
  42. </TD>
  43. </TR>
  44. <TR>
  45. <TD CLASS="clsTDWarning" COLSPAN=2>
  46. <p>Windows Online Crash Anlysis uses an ActiveX control to display content correctly and to upload your error report.</P>
  47. <p CLASS=clsPSubTitle>To view and upload your error report, your Internet Explorer security settings must meet the following requirements:</P>
  48. <UL>
  49. <LI>Security must be set to medium or lower.</LI>
  50. <LI>Active scripting must be set to enabled.</LI>
  51. <LI>The download and initialization of ActiveX controls must be set to enabled.</LI>
  52. </UL>
  53. <P><B>NOTE:</B> These are the default settings for Internet Explorer.</p>
  54. <P CLASS="clsPSubTitle">To check your Internet Explorer security settings</P>
  55. <OL>
  56. <LI>On the <B>Tools</B> menu in Internet Explorer, click <B>Internet Options</B>.
  57. <LI>Click the <B>Security</B> tab.
  58. <LI>Click the internet icon, and then click <b>Custom Level</B>.
  59. <LI>Make sure the following settings are set to Enable or Prompt:<BR>
  60. -Download signed ActiveX Controls.<BR>
  61. -Run ActiveX Controls and plug-ins.<BR>
  62. -Script ActiveX Controls marked safe for scripting.<BR>
  63. -Active scripting<BR>
  64. </OL>
  65. </TD>
  66. </TR>
  67. </TABLE>
  68. </DIV>
  69. <OBJECT id="objOCARpt" name="objOCARpt" UNSELECTABLE="on" style="display:none"
  70. CLASSID="clsid:D68DAEED-C2A6-4C6F-9365-4676B173D8EF"
  71. codebase="https://<%=g_ThisServerBase%>/SECURE/OCARPT.CAB#version=3,3,0,0" height="0" Vspace="0" VIEWASTEXT>
  72. </OBJECT>
  73. <div class="clsDiv" NAME="divLoadingReport" ID="divLoadingReport">
  74. <p class="clsPWait">
  75. <img src="/include/images/icon2.gif" WIDTH="55" HEIGHT="55">
  76. <span id="spnMessage" name="spnMessage">Loading the Selected Error Report</span>
  77. <p ID=pLoad NAME=pLoad>Please wait while we load the contents of the selected error report. This information is not sent to Windows Online Crash Analysis. This might take several seconds.</p>
  78. </p>
  79. </div>
  80. <div class="clsDiv" NAME="divSubmitReport" ID="divSubmitReport" STYLE='display:none'>
  81. <p class="clsPWait">
  82. <img src="/include/images/icon2.gif" WIDTH="55" HEIGHT="55">
  83. <span id="spnMessage" name="spnMessage">Uploading File</span>
  84. <p ID=pUpload NAME=pUpload>Please wait while we upload the selected error report. This might take several seconds.</p>
  85. </p>
  86. </div>
  87. <div class="clsDiv" STYLE="visibility:hidden" NAME="divViewBody" ID="divViewBody">
  88. <p class="clsPTitle">
  89. Error report contents
  90. </P>
  91. <p class="clsPBody">
  92. The contents of the selected error report are displayed below. This is done without sending any information to Windows Online Crash Analysis.
  93. </p>
  94. <p class="clsPBody" style='word-wrap:break;word-break:break-all'>
  95. Contents of error report:
  96. </P>
  97. <p><%=sDisplayName%></p>
  98. <p>
  99. <TextArea cols=60 rows=15 class=clsTextarea name="txtContents" id="txtContents" style="font-size:100%;font-family:courier" READONLY></TextArea>
  100. </p>
  101. <br>
  102. <Table class="clstblLinks">
  103. <tbody>
  104. <tr>
  105. <td nowrap class="clsTDLinks">
  106. <A name='aLocate' id='aLocate' ACCESSKEY='p' class="clsALink" href="https://<%=g_ThisServer%>/secure/locate.asp"><!>Previous<!></a>
  107. </td>
  108. <td nowrap class="clsTDLinks">
  109. <A ACCESSKEY='s' id="submitlink" name="submitlink" class="clsALink" href="JAVASCRIPT:fnSubmit();"><!>Submit<!></a>
  110. </td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. </div>
  115. <Input name="txtFile" id="txtFile" type="hidden" value="<%Response.Write(szFileName)%>">
  116. <script language="javascript">
  117. <!--
  118. var iInterval;
  119. var nAction = 0;
  120. var L_INVALIDDUMPFILE_TEXT = "The selected error report contains an error and cannot be processed. Select another error report.";
  121. var L_COULDNOTUPLOAD_TEXT = "Could not upload dump file . . . Please try again later.";
  122. function fnSubmit()
  123. {
  124. document.all.divViewBody.style.visibility="hidden";
  125. document.all.divSubmitReport.style.display="block";
  126. nAction = 1;
  127. iInterval = window.setInterval("fnBodyLoad()",500);
  128. }
  129. function fnBodyLoad()
  130. {
  131. window.clearInterval( iInterval );
  132. do
  133. {
  134. window.focus();
  135. }while (window.document.readyState != "complete")
  136. document.body.style.cursor = "wait";
  137. iInterval = window.setInterval("fnDoAction()",500);
  138. }
  139. function fnDoAction()
  140. {
  141. var strFile = txtFile.value;
  142. window.clearInterval( iInterval );
  143. try
  144. {
  145. var bValidate = objOCARpt.validatedump( strFile);
  146. if(bValidate != 0 && bValidate != 4)
  147. {
  148. alert( L_INVALIDDUMPFILE_TEXT);
  149. nAction = 2;
  150. }
  151. else
  152. {
  153. try
  154. {
  155. if ( 0 == nAction )
  156. {
  157. var retVal = objOCARpt.retrievefilecontents(strFile);
  158. if ( retVal == "" )
  159. {
  160. alert( L_INVALIDDUMPFILE_TEXT);
  161. window.navigate( "https://<%=g_ThisServer%>/secure/locate.asp" );
  162. }
  163. }
  164. else if ( 1 == nAction )
  165. {
  166. var retVal = objOCARpt.upload( strFile, "1234", "USA", "914" );
  167. }
  168. }
  169. catch(e)
  170. {
  171. alert( L_INVALIDDUMPFILE_TEXT );
  172. nAction = 2;
  173. }
  174. }
  175. if ( 0 == nAction )
  176. {
  177. txtContents.value = retVal;
  178. document.all.divViewBody.style.visibility="visible";
  179. document.all.divLoadingReport.style.display="none";
  180. }
  181. else if ( 1 == nAction )
  182. {
  183. if ( isNaN( retVal ) )
  184. {
  185. document.cookie = "szCurrentFile=";
  186. window.navigate( retVal );
  187. }
  188. else
  189. {
  190. alert( L_COULDNOTUPLOAD_TEXT );
  191. document.all.divViewBody.style.visibility="visible";
  192. document.all.divSubmitReport.style.display="none";
  193. }
  194. }
  195. else if ( 2 == nAction )
  196. window.navigate( "locate.asp" )
  197. }
  198. catch( err )
  199. {
  200. document.all.divNoActiveX.style.display = "block";
  201. divLoadingReport.style.display = "none";
  202. divSubmitReport.style.display = "none";
  203. }
  204. document.body.style.cursor = "default";
  205. }
  206. //-->
  207. </script>
  208. <!-- #include file="../include/foot.asp" -->