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.

432 lines
13 KiB

  1. <!--#INCLUDE file="..\include\asp\top.asp"-->
  2. <!--#INCLUDE file="..\include\inc\browserTest.inc"-->
  3. <!--#include file="..\include\asp\head.asp"-->
  4. <!--#INCLUDE file="..\include\inc\commentstrings.inc"-->
  5. <%
  6. dim cnConnection
  7. dim rsComments
  8. dim cmComments
  9. Dim strFileName
  10. dim strOptions
  11. dim strDescription
  12. Dim strPreviousPage
  13. Dim strOSVersion
  14. Dim strTrackID
  15. Dim strComments
  16. dim strSystems
  17. Dim strNotes
  18. Dim strOS
  19. dim x
  20. dim iIncidentID
  21. Dim iPos
  22. Dim iLen
  23. Dim bolUpdate
  24. strComments = Request.Cookies("txtComments")
  25. strNotes = Request.Cookies("txtNotes")
  26. Call CVerifyEntry
  27. Call CCreateObjects
  28. Call CCreateConnection
  29. bolUpdate = false
  30. If oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin) = false then
  31. Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
  32. Response.End
  33. end if
  34. if Request.QueryString("ud") = "1" then
  35. Call CUpdateData
  36. Call CWriteUpdateComplete
  37. bolUpdate = true
  38. end if
  39. if bolUpdate = false then
  40. Set rsComments = cnConnection.execute("Exec GetIncidentInfo " & iIncidentID)
  41. if rsComments.State = adStateClosed then
  42. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_NO_RECORDS_MESSAGE & "</p>"
  43. Response.Write "</div>"
  44. Call CDestroyObjects
  45. %>
  46. <!--#include file="..\include\asp\foot.asp"-->
  47. <%
  48. Response.End
  49. elseif rsComments.RecordCount < 1 then
  50. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_NO_RECORDS_MESSAGE & "</p>"
  51. Response.Write "</div>"
  52. Call CDestroyObjects
  53. %>
  54. <!--#include file="..\include\asp\foot.asp"-->
  55. <%
  56. Response.End
  57. else
  58. Set rsComments.ActiveConnection = nothing
  59. if cnConnection.State = adStateOpen then cnConnection.Close
  60. if rsComments("TrackID") = "" then
  61. Response.Cookies("TrackID") = "~|~|"
  62. else
  63. Response.Cookies("TrackID") = rsComments("TrackID")
  64. end if
  65. Call CFormOption
  66. Call CSetPreviousPage
  67. strFileName = unescape(Request.Cookies("status")("FileName"))
  68. strDescription = rsComments("Description")
  69. 'if strDescription = "" then
  70. 'Response.Cookies("status")("txtDescription") = "~|~|"
  71. 'else
  72. 'Response.Cookies("status")("txtDescription") = strDescription
  73. 'end if
  74. end if
  75. '_____________________________________________________________________________________________________________________
  76. 'Sub Procedures
  77. Private Sub CFormOption
  78. on error resume next
  79. strOS = L_SUBMIT_SELECT_OPERATINGSYSTEM_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWS2000_PROFESSIONAL_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWS2000_SERVER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWS2000_ADVANCEDSERVER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWS2000_DATACENTER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_PERSONAL_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_PROFESSIONAL_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_SERVER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_ADVANCEDSERVER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_DATACENTER_GROUPBOX & ";" & L_SUBMIT_SELECT_WINDOWSXP_64BIT_GROUPBOX
  80. strOptions = split(strOS, ";")
  81. if rsComments.State = adStateOpen then
  82. if rsComments.RecordCount > 0 then
  83. if IsNull(rsComments("OSName")) = false then
  84. strOSVersion = rsComments("OSName")
  85. if rsComments("OSName") <> "" then
  86. for x = 0 to UBound(strOptions) - 1
  87. if strOptions(x) = rsComments("OSName") then
  88. strSystems = strSystems & "<Option Selected value=" & x & ">" & strOptions(x)
  89. else
  90. strSystems = strSystems & "<Option value=" & x & ">" & strOptions(x)
  91. end if
  92. next
  93. else
  94. Call CDefaultOption
  95. end if
  96. else
  97. Call CDefaultOption
  98. end if
  99. else
  100. Call CDefaultOption
  101. end if
  102. else
  103. Call CDefaultOption
  104. end if
  105. End Sub
  106. Private Sub CDefaultOption
  107. on error resume next
  108. for x = 0 to UBound(strOptions) - 1
  109. strSystems = strSystems & "<Option value=" & x & ">" & strOptions(x)
  110. next
  111. End Sub
  112. Private Sub CWriteUpdateComplete
  113. on error resume next
  114. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_REPORTSAVE_TITLE_TEXT & "</p>"
  115. strFileName = unescape(Request.Cookies("FileName"))
  116. Response.Write "<p class='clsPBody'>" & L_COMMENTS_REPORTSAVE_BODY_TEXT
  117. Response.Write unescape(strFileName)
  118. Response.write L_COMMENTS_REPORTSAVE_BODYTWO_TEXT & "</p>"
  119. Response.Write "<img border='0' src='../include/images/go.gif' width='24' height='24'><a class='clsALink' href='https://" & Request.ServerVariables("SERVER_NAME") & "/secure/status.asp'>" & L_RECEIVED_STATUS_LINK_TEXT & "</a>"
  120. Response.Write "<br><img border='0' src='../include/images/go.gif' width='24' height='24'><a class='clsALink' href='https://" & Request.ServerVariables("SERVER_NAME") & "/secure/sprivacy.asp'>" & L_RECEIVED_NEWFILE_LINK_TEXT & "</a>"
  121. Response.Write "</div>"
  122. Response.Write "<SCRIPT LANGUAGE=javascript><!--" & Chr(13)
  123. 'Response.Write "document.cookie = 'UpdateComments = false';" & Chr(13)
  124. Response.Write "//--></SCRIPT>"
  125. End Sub
  126. Private Sub CUpdateData
  127. on error resume next
  128. if Request.Cookies("status")("txtDescription") = "~|~|" then
  129. strDescription = ""
  130. else
  131. strDescription = Request.Cookies("status")("txtDescription")
  132. End if
  133. if len(strDescription) > 512 then
  134. strDescription = left(strDescription, 512)
  135. end if
  136. strTrackID = Request.Cookies("TrackID")
  137. if strTrackID = "~|~|" then strTrackID = ""
  138. 'Response.Cookies("txtDescription") = "0"
  139. Response.Cookies("TrackID") = "0"
  140. 'Response.Cookies("txtDescription").expires = now
  141. 'Response.Cookies("TrackID").expires = now
  142. with cmComments
  143. .ActiveConnection = cnConnection
  144. .CommandText = "UpdateIncident"
  145. .CommandType = adCmdStoredProc
  146. .CommandTimeout = strGlobalCommandTimeout
  147. .Parameters.Append .CreateParameter("@IncidentID", adInteger, adParamInput, , clng(iIncidentID))
  148. .Parameters.Append .CreateParameter("@Repro", adVarWChar, adParamInput, 1024, trim(left(strNotes, 1024)))
  149. .Parameters.Append .CreateParameter("@Comments", adVarWChar, adParamInput, 1024, trim(left(strComments, 1024)))
  150. .Execute
  151. end with
  152. if cnConnection.Errors.Count > 0 then
  153. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  154. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  155. cnConnection.Errors.Clear
  156. Response.Write "<SCRIPT LANGUAGE=javascript><!--" & Chr(13)
  157. 'Response.Write "document.cookie = 'UpdateComments = false';" & Chr(13)
  158. Response.Write "//--></SCRIPT>"
  159. Call CDestroyObjects
  160. %>
  161. <!--#include file="..\include\asp\foot.asp"-->
  162. <%
  163. Response.end
  164. end if
  165. Call CDestroyObjects
  166. Response.Cookies("selSystem") = "~|~|"
  167. 'Response.Cookies("selSystem").expires = Now()
  168. Response.Cookies("txtComments") = "~|~|"
  169. 'Response.Cookies("txtComments").expires = Now()
  170. Response.Cookies("txtNotes") = "~|~|"
  171. 'Response.Cookies("txtNotes").expires = Now()
  172. End Sub
  173. Private Sub CSetPreviousPage
  174. on error resume next
  175. strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
  176. strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
  177. Response.Cookies("Misc")("PreviousPage") = strPreviousPage
  178. End Sub
  179. Private Sub CCreateConnection
  180. on error resume next
  181. with cnConnection
  182. .ConnectionString = strCustomer
  183. .CursorLocation = adUseClient
  184. .ConnectionTimeout = strGlobalConnectionTimeout
  185. .Open
  186. end with
  187. if cnConnection.State = adStateClosed then
  188. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  189. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  190. cnConnection.Errors.Clear
  191. Call CDestroyObjects
  192. %>
  193. <!--#include file="..\include\asp\foot.asp"-->
  194. <%
  195. Response.End
  196. end if
  197. End Sub
  198. Private Sub CVerifyEntry
  199. on error resume next
  200. if Trim(Request.Cookies("Misc")("PreviousPage")) <> "status.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "comments.asp" then
  201. Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
  202. Response.End
  203. end if
  204. End Sub
  205. Private Sub CCreateObjects
  206. on error resume next
  207. set cnConnection = CreateObject("ADODB.Connection")
  208. set rsComments = CreateObject("ADODB.Recordset")
  209. set cmComments = CreateObject("ADODB.Command")
  210. iIncidentID = Request.Cookies("status")("txtIncidentID")
  211. End Sub
  212. Private Sub CDestroyObjects
  213. on error resume next
  214. if rsComments.State = adStateOpen then rsComments.Close
  215. if cnConnection.State = adStateOpen then cnConnection.Close
  216. set rsComments = nothing
  217. set cnConnection = nothing
  218. set cmComments = nothing
  219. End Sub
  220. '_____________________________________________________________________________________________________________________
  221. if bolUpdate = false then
  222. strComments = rsComments("Comments")
  223. strNotes = rsComments("Repro")
  224. %>
  225. <br>
  226. <div id="divMain" name="divMain" class="clsDiv">
  227. <p class="clsPTitle">
  228. <% = L_SUBMIT_EVENT_MAINTITLE_TEXT%>
  229. </P>
  230. <p class="clsPBody" style='word-wrap:break;word-break:break-all'>
  231. <% = L_COMMENTS_FILE_NAME_TEXT %>&nbsp;<pre class="clsPreBody"><%Response.Write strFileName%></pre>
  232. </p>
  233. <p class="clsPBody">
  234. <% = L_COMMENTS_NOCHANGE_DESCRIPTION_TEXT %>
  235. </p>
  236. <p class="clsPSubTitle">
  237. <% = L_SUBMIT_EVENT_DESCRIPTION_TEXT %>
  238. </P>
  239. <p class="clsPBody" style='word-wrap:break;word-break:break-all'>
  240. <% = L_COMMENTS_EVENT_NAME_TEXT %>&nbsp;
  241. <%
  242. if Session.CodePage = 932 then
  243. Response.Write strDescription
  244. else
  245. Response.Write Server.HTMLEncode(strDescription)
  246. end if
  247. %>
  248. </p>
  249. <%
  250. 'if instr(1, strOSVersion, ".") = 0 then
  251. if true = false then
  252. %>
  253. <p class="clsPBody">
  254. <% = L_SUBMIT_OPERATING_SYSTEM_TEXT %>
  255. <br>
  256. <Select selected class="clsSelect" id="selSystem" name="selSystem">
  257. <%
  258. Response.Write strSystems
  259. %>
  260. </Select>
  261. <%
  262. End if
  263. %>
  264. </p>
  265. <p class="clsPBody">
  266. <Label for=txtNotes><% = L_SUBMIT_RE_PRODUCE_EDITBOX %></Label>
  267. <br>
  268. <%
  269. If Session.CodePage = 932 then
  270. %>
  271. <TextArea lang="ja" class="clsNormalTextArea" name="txtNotes" id="txtNotes" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 wrap="hard" rows=5 style="font-family:Tahoma"><% Response.Write strNotes%></TextArea>
  272. <%
  273. else
  274. %>
  275. <TextArea lang="ja" class="clsNormalTextArea" name="txtNotes" id="txtNotes" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 wrap="hard" rows=5 style="font-family:Tahoma"><% Response.Write Server.HTMLEncode(strNotes)%></TextArea>
  276. <%
  277. end if
  278. %>
  279. </p>
  280. <p class="clsPBody">
  281. <Label for=txtComments><% = L_SUBMIT_COMMENTS_INFO_EDITBOX %></Label>
  282. <br>
  283. <%
  284. If Session.CodePage = 932 then
  285. %>
  286. <TextArea lang="ja" class="clsNormalTextArea" name="txtComments" id="txtComments" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 wrap="hard" rows=5 style="font-family:Tahoma"><% Response.Write strComments%></TextArea>
  287. <%
  288. else
  289. %>
  290. <TextArea lang="ja" class="clsNormalTextArea" name="txtComments" id="txtComments" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 wrap="hard" rows=5 style="font-family:Tahoma"><% Response.Write Server.HTMLEncode(strComments)%></TextArea>
  291. <%
  292. end if
  293. %>
  294. </p>
  295. </div>
  296. <%
  297. end if
  298. %>
  299. <br>
  300. <div id="divSubMain" name="divSubMain" class="clsDiv">
  301. <P>
  302. <Table class="clstblLinks">
  303. <thead>
  304. <tr>
  305. <td>
  306. </td>
  307. <td>
  308. </td>
  309. </tr>
  310. </thead>
  311. <tbody>
  312. <tr>
  313. <td nowrap class="clsTDLinks">
  314. <A class="clsALink" href="JAVASCRIPT:window.navigate('status.asp');"><% = L_DETAILS_STATUS_BODY_TEXT %></a>
  315. </td>
  316. <td nowrap class="clsTDLinks">
  317. <%
  318. if rsComments.State = adStateOpen then
  319. if rsComments.RecordCount > 0 then
  320. %>
  321. <A class="clsALink" href="JAVASCRIPT:save_onclick();"><% = L_COMMENTS_SAVE_INFO_TEXT %></a>
  322. <%
  323. end if
  324. end if
  325. %>
  326. </td>
  327. </tr>
  328. </tbody>
  329. </table>
  330. </P>
  331. </div>
  332. <SCRIPT Lang=ja LANGUAGE=javascript>
  333. <!--
  334. //window.onload = DisplayCookies();
  335. function checklengthpaste()
  336. {
  337. var iLength;
  338. var strTemp;
  339. var sNewString;
  340. sNewString = window.clipboardData.getData("Text")
  341. strTemp = window.event.srcElement.value + sNewString;
  342. iLength = strTemp.length;
  343. if(iLength >= 1024)
  344. {
  345. alert("<% = L_SUBMIT_MAX_LENGTH_MESSAGE %>");
  346. window.event.returnValue=false;
  347. }
  348. }
  349. function checklength()
  350. {
  351. var iLength;
  352. var strTemp;
  353. var iKeyCode;
  354. strTemp = window.event.srcElement.value;
  355. iLength = strTemp.length;
  356. iKeyCode = window.event.keyCode;
  357. if(iKeyCode != 8 && iKeyCode !=16 && iKeyCode != 35 && iKeyCode != 36 && iKeyCode != 17 && iKeyCode != 46)
  358. {
  359. if(iLength >= 1024)
  360. {
  361. alert("<% = L_SUBMIT_MAX_LENGTH_MESSAGE %>");
  362. window.event.returnValue=false;
  363. }
  364. }
  365. }
  366. function save_onclick()
  367. {
  368. try
  369. {
  370. document.cookie = "selSystem = " + selSystem.selectedIndex;
  371. }
  372. catch(e)
  373. {
  374. }
  375. document.cookie = "txtNotes = " + escape(txtNotes.value);
  376. document.cookie = "txtComments = " + escape(txtComments.value);
  377. //document.cookie = "UpdateComments = true";
  378. //DisplayCookies();
  379. //alert(document.cookie);
  380. window.navigate("comments.asp?ud=1");
  381. }
  382. function DisplayCookies()
  383. {
  384. // cookies are separated by semicolons
  385. var aCookie = document.cookie.split("; ");
  386. var aCrumb = "";
  387. for (var i=0; i < aCookie.length; i++)
  388. {
  389. aCrumb = aCrumb + aCookie[i] + "\r";
  390. }
  391. alert(aCrumb);
  392. }
  393. //-->
  394. </SCRIPT>
  395. <%
  396. Call CDestroyObjects
  397. End if
  398. %>
  399. <!--#include file="..\include\asp\foot.asp"-->