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.

1045 lines
29 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\submitstrings.inc"-->
  5. <%
  6. Dim sFileName
  7. Dim iPos
  8. dim cnConnection
  9. dim cmHash
  10. dim rsHash
  11. Dim bolHashExists
  12. Dim strPreviousPage
  13. Dim strIncidentID
  14. Dim rs
  15. Dim strHexIncidentID
  16. Dim strEventName
  17. Dim strNotes
  18. Dim strComments
  19. Dim strPrevLoadedFiles
  20. Dim bolHighExists
  21. Dim sPrevFileName
  22. bolHighExists = false
  23. Call CVerifyEntry
  24. Call CSetPreviousPage
  25. Call CCreateObjects
  26. sFileName = unescape(Request.Cookies("ocaFileName"))
  27. iPos = Instr(1, sFileName, ",")
  28. if iPos <> 0 then
  29. sFileName = Left(sFileName, iPos - 1)
  30. end if
  31. If oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin) = false then
  32. Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
  33. Response.End
  34. end if
  35. Call CCreateConnection
  36. bolHashExists = false
  37. if Request.Cookies("Misc")("unassoc") = "false" then
  38. if Request.Cookies("Misc")("auto") <> "True" then
  39. Call CGetHash
  40. Call CCheckValidate
  41. 'Response.Write "<br>" & bolHashExists
  42. if bolHashExists = false then
  43. if Request.Cookies("Misc")("txtIncidentID") = "" or (Len(Request.Cookies("Misc")("txtIncidentID")) = 4 and Request.Cookies("Misc")("txtIncidentID") = "~|~|") then
  44. Call CGetIncidentID
  45. if strIncidentID = "" or len(strIncidentID) = 0 then
  46. Call CGetIncidentID
  47. if strIncidentID = "" or len(trim(strIncidentID)) = 0 then
  48. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  49. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  50. Response.Write "<BR>" & cnConnection.Errors(0).Description & "<BR>" & Err.Description
  51. cnConnection.Errors.Clear
  52. Call CDestroyObjects
  53. %>
  54. <!--#include file="..\include\asp\foot.asp"-->
  55. <%
  56. Response.End
  57. End if
  58. end if
  59. else
  60. strIncidentID = Request.Cookies("Misc")("txtIncidentID")
  61. strHexIncidentID = hex(strIncidentID)
  62. end if
  63. else
  64. Response.Cookies("Misc")("unassoc") = "true"
  65. strIncidentID = rsHash.Fields(0).Value
  66. end if
  67. Response.Cookies("Misc")("txtIncidentID") = strIncidentID
  68. end if
  69. end if
  70. 'Response.Write Request.Cookies("Misc")("unassoc") & "<BR>" & Request.Cookies("Misc")("txtIncidentID")
  71. Call CDestroyObjects
  72. dim strFile
  73. dim x
  74. dim iLen
  75. dim strSearchVariable
  76. if Instr(1, sFileName, "/") > 0 then
  77. strSearchVariable = "/"
  78. else
  79. strSearchVariable = "\"
  80. end if
  81. if Len(sFileName) > 0 then
  82. iLen = 1
  83. do while iLen > 0
  84. iLen = Instr(iLen, sFileName, strSearchVariable)
  85. if iLen = 0 then exit do
  86. iPos = iLen
  87. iLen = iLen + 1
  88. loop
  89. strFile = Right(sFileName, (Len(sFileName) - iPos))
  90. end if
  91. Call CGetFileName
  92. '_____________________________________________________________________________________________________________________
  93. 'Sub Procedures
  94. Private Sub CGetFileName
  95. on error resume next
  96. sPrevFileName = Request.Cookies("ocaFileName")
  97. iPos = Instr(1, sPrevFileName, ",")
  98. sPrevFileName = Left(sPrevFileName, iPos - 1)
  99. if InstrRev(sPrevFileName, "/") <> 0 then
  100. sPrevFileName = Right(sPrevFileName, len(sPrevFileName) - InStrRev(sPrevFileName, "/"))
  101. elseif InstrRev(sFileName, "\") <> 0 then
  102. sPrevFileName = Right(sPrevFileName, len(sPrevFileName) - InStrRev(sPrevFileName, "\"))
  103. end if
  104. End Sub
  105. Private Sub CGetIncidentID
  106. on error resume next
  107. set rs = cnConnection.Execute("GetIncident " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow"))
  108. if cnConnection.Errors.Count > 0 then
  109. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  110. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  111. Response.Write "<BR>" & cnConnection.Errors(0).Description & "<BR>" & Err.Description
  112. cnConnection.Errors.Clear
  113. Call CDestroyObjects
  114. %>
  115. <!--#include file="..\include\asp\foot.asp"-->
  116. <%
  117. Response.End
  118. end if
  119. strIncidentID = rs.fields(0).value
  120. strHexIncidentID = hex(strIncidentID)
  121. End Sub
  122. Private Sub CCheckValidate
  123. on error resume next
  124. if instr(1, LCase(Request.Cookies("ocaFileName")), "validate") > 0 then
  125. bolHashExists = false
  126. end if
  127. if instr(1, LCase(Request.Cookies("ocaFileName")), "pss") > 0 then
  128. bolHashExists = false
  129. end if
  130. End Sub
  131. Private Sub CGetHash
  132. on error goto 0
  133. on error resume next
  134. with cmHash
  135. .ActiveConnection = cnConnection
  136. .CommandText = "GetHash"
  137. .CommandType = adCmdStoredProc
  138. .CommandTimeout = strGlobalCommandTimeout
  139. .Parameters.Append .CreateParameter("@DumpHash",adVarWChar, adParamInput, 33, Request.Cookies("strHash"))
  140. set rsHash = .Execute
  141. end with
  142. 'Response.Write "<BR>Conn Err:" & cnConnection.Errors.Count & "<BR>Err:" & Err.Description
  143. 'Response.Write "<BR>RecordState:" & rsHash.State & "<BR>Conn State:" & cnConnection.State
  144. 'Response.write "<BR>Hash:" & Request.Cookies("strHash")
  145. if cnConnection.Errors.Count > 0 then
  146. Response.Write "<BR>CN Errors:" & cnConnection.Errors(0).Description
  147. end if
  148. 'Response.Write "<BR>State:" & rs.State & "<BR>" & Request.Cookies("strHash")
  149. if rsHash.State = adStateOpen then
  150. if rsHash.RecordCount > 0 then
  151. bolHashExists = true
  152. if IsNull(rsHash.Fields(1).Value) = true then
  153. bolHighExists = false
  154. elseif rsHash.Fields(1).Value = 0 then
  155. bolHighExists = false
  156. else
  157. bolHighExists = true
  158. end if
  159. end if
  160. else
  161. bolHashExists = false
  162. end if
  163. End Sub
  164. Private Sub CCreateConnection
  165. on error resume next
  166. 'Open the connection to the database the constant is located in the dataconnections.inc
  167. with cnConnection
  168. .ConnectionString = strCustomer
  169. .CursorLocation = adUseClient
  170. .ConnectionTimeout = strGlobalConnectionTimeout
  171. .Open
  172. end with
  173. 'If unable to conect with the database then display message
  174. if cnConnection.State = adStateClosed then
  175. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  176. Response.Write "<p class='clsPBody'>" & L_COMMENTS_CONNECTION_FAILED_TEXT & "</p></div>"
  177. cnConnection.Errors.Clear
  178. Call CDestroyObjects
  179. %>
  180. <!--#include file="..\include\asp\foot.asp"-->
  181. <%
  182. Response.End
  183. end if
  184. End Sub
  185. Private Sub CVerifyEntry
  186. on error resume next
  187. if Request.Cookies("Misc")("auto") = "True" then
  188. if Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "view.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "customer.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then
  189. Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
  190. Response.End
  191. end if
  192. else
  193. if Trim(Request.Cookies("Misc")("PreviousPage")) <> "locate.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "view.asp" and Trim(Request.Cookies("Misc")("PreviousPage")) <> "submit.asp" then
  194. Response.Redirect("http://" & Request.ServerVariables("SERVER_NAME") & "/welcome.asp")
  195. Response.End
  196. end if
  197. End if
  198. End Sub
  199. Private Sub CSetPreviousPage
  200. on error resume next
  201. strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
  202. strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
  203. Response.Cookies("Misc")("PreviousPage") = strPreviousPage
  204. End Sub
  205. Private Sub CCreateObjects
  206. on error resume next
  207. set rsHash = CreateObject("ADODB.Recordset")
  208. set cmHash = CreateObject("ADODB.Command")
  209. set cnConnection = CreateObject("ADODB.Connection")
  210. set rs = CreateObject("ADODB.Recordset")
  211. End Sub
  212. Private Sub CDestroyObjects
  213. on error resume next
  214. if rsHash.State = adStateOpen then rsHash.Close
  215. if cnConnection.State = adStateOpen then cnConnection.Close
  216. set cmHash = nothing
  217. set rsHash = nothing
  218. set cnConnection = nothing
  219. End Sub
  220. '_____________________________________________________________________________________________________________________
  221. %>
  222. <form id="frmMain" name="frmMain">
  223. <div id="divMain" name="divMain" class="clsDiv">
  224. <%
  225. if bolHashExists = true and bolHighExists = true then
  226. Response.Write "<p class='clsPTitle'>" & L_SUBMIT_HASH_EXIST_MESSAGE & "</p>"
  227. Response.Write "<p class='clsPBody'>" & L_SUBMIT_HASHEXIST_CHOOSEFILE_MESSAGE & "</p>"
  228. Response.Write "<p class='clsPBody'>" & L_SUBMIT_HASHEXIST_CHOOSEFILE2_MESSAGE & "</p>"
  229. Response.Write "<p class='clsPBody'>" & L_SUBMIT_HASHEXIST_CHOOSEFILE4_MESSAGE & "</p>"
  230. %>
  231. <A class="clsALink" href="http://<% =Request.ServerVariables("SERVER_NAME") %>/welcome.asp"><% = L_LOCATE_CANCEL_LINK_TEXT %></a>
  232. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  233. <A class="clsALink" href="https://<% =Request.ServerVariables("SERVER_NAME") %>/secure/status.asp"><% = L_RECEIVED_STATUS_LINK_TEXT %></a>
  234. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  235. <A class="clsALink" href="https://<% =Request.ServerVariables("SERVER_NAME") %>/secure/locate.asp"><% = L_LOCATE_PREVIOUS_LINK_TEXT %></a>
  236. <%
  237. elseif bolHashExists = true and bolHighExists = false then
  238. %>
  239. <p class="clsPTitle">
  240. <% = L_SUBMIT_HASH_EXIST_MESSAGE %>
  241. </p>
  242. <p class="clsPBody">
  243. <% = L_SUBMIT_HASHEXIST_CHOOSEFILE_MESSAGE %>
  244. </p>
  245. <p class="clsPBody">
  246. <% = L_SUBMIT_HASHEXIST_CHOOSEFILE2_MESSAGE %>
  247. </p>
  248. <p class="clsPBody">
  249. <% = L_SUBMIT_HASHEXIST_CHOOSEFILE3_MESSAGE %>
  250. </p>
  251. <A class="clsALink" href="https://<% =Request.ServerVariables("SERVER_NAME") %>/secure/locate.asp"><% = L_SUBMIT_ASSOCIATE_NO_TEXT %></a>
  252. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  253. <A class="clsALink" href="https://<% =Request.ServerVariables("SERVER_NAME") %>/secure/submit.asp"><% = L_SUBMIT_ASSOCIATE_YES_TEXT%></a>
  254. <%
  255. else
  256. %>
  257. <p class="clsPTitle">
  258. <% = L_SUBMIT_EVENT_MAINTITLE_TEXT %>
  259. </P>
  260. <%
  261. if Request.Cookies("Misc")("auto") = "True" then
  262. %>
  263. <p class="clsPBody" style='word-wrap:break;word-break:break-all'> <% = L_SUBMIT_UPLOAD_FILEAUTO_TEXT%>&nbsp;<pre class="clsPreBody"><%Response.Write sFileName%><% = L_SUBMIT_FOR_PROCESSINGAUTO_TEXT %></p></pre>
  264. <%
  265. else
  266. %>
  267. <p class="clsPBody" style='word-wrap:break;word-break:break-all'> <% = L_SUBMIT_UPLOAD_FILE_TEXT%>&nbsp;<pre class="clsPreBody"><%Response.Write sFileName%><% = L_SUBMIT_FOR_PROCESSING_TEXT %></p></pre>
  268. <%
  269. end if
  270. %>
  271. <p class="clsPSubTitle">
  272. <% = L_SUBMIT_EVENT_DESCRIPTION_TEXT %>
  273. </P>
  274. <p class="clsPBody">
  275. <%
  276. if Request.Cookies("Misc")("auto") = "True" then
  277. %>
  278. <% = L_SUBMIT_EVENTDESCRIPTIONAUTO_BODY_TEXT %>
  279. <%
  280. else
  281. %>
  282. <% = L_SUBMIT_EVENTDESCRIPTION_BODY_TEXT %>
  283. <%
  284. end if
  285. %>
  286. </p>
  287. <p class="clsPBody">
  288. <Label for=txtEventName><% = L_COMMENTS_EVENT_NAME_TEXT%></Label>
  289. <br>
  290. <%
  291. strEventName = Request.Cookies("txtEventName")
  292. strNotes = Request.Cookies("txtNotes")
  293. strComments = Request.Cookies("txtComments")
  294. if Len(strNotes) = 4 and strNotes = "~|~|" then
  295. strNotes = ""
  296. end if
  297. if Len(strComments) = 4 and strComments = "~|~|" then
  298. strComments = ""
  299. end if
  300. if Len(strEventName) = 4 and strEventName = "~|~|" then
  301. %>
  302. <Input name="txtEventName" id="txtEventName" onkeypress="testkey();" maxlength=512 type="text" class="clsTextBox">
  303. <%
  304. else
  305. if Session.CodePage = 932 then
  306. %>
  307. <Input name="txtEventName" id="txtEventName" onkeypress="testkey();" maxlength=512 type="text" class="clsTextBox" value="<%Response.Write strEventName%>">
  308. <%
  309. else
  310. %>
  311. <Input name="txtEventName" id="txtEventName" onkeypress="testkey();" maxlength=512 type="text" class="clsTextBox" value="<%Response.Write Server.HTMLEncode(strEventName)%>">
  312. <%
  313. end if
  314. end if
  315. %>
  316. </p>
  317. <%
  318. if Request.Cookies("Misc")("auto") <> "True" then
  319. %>
  320. <p class="clsPBody">
  321. <Label for=selSystem><% = L_SUBMIT_OPERATING_SYSTEM_TEXT %></Label>
  322. <br>
  323. <Select name="selSystem" id="selSystem" selected class="clsSelect">
  324. <Option value=0><% = L_SUBMIT_SELECT_OPERATINGSYSTEM_GROUPBOX %>
  325. <Option value=1><% = L_SUBMIT_SELECT_WINDOWS2000_PROFESSIONAL_GROUPBOX %>
  326. <Option value=2><% = L_SUBMIT_SELECT_WINDOWS2000_SERVER_GROUPBOX %>
  327. <Option value=3><% = L_SUBMIT_SELECT_WINDOWS2000_ADVANCEDSERVER_GROUPBOX %>
  328. <Option value=4><% = L_SUBMIT_SELECT_WINDOWS2000_DATACENTER_GROUPBOX %>
  329. <Option value=5><% = L_SUBMIT_SELECT_WINDOWSXP_PERSONAL_GROUPBOX %>
  330. <Option value=6><% = L_SUBMIT_SELECT_WINDOWSXP_PROFESSIONAL_GROUPBOX %>
  331. <Option value=7><% = L_SUBMIT_SELECT_WINDOWSXP_SERVER_GROUPBOX %>
  332. <Option value=8><% = L_SUBMIT_SELECT_WINDOWSXP_64BIT_GROUPBOX %>
  333. </Select>
  334. </p>
  335. <% '<Option value=8> = L_SUBMIT_SELECT_WINDOWSXP_ADVANCEDSERVER_GROUPBOX
  336. '<Option value=9> = L_SUBMIT_SELECT_WINDOWSXP_DATACENTER_GROUPBOX
  337. end if
  338. %>
  339. <p class="clsPBody">
  340. <Label for=txtNotes><% = L_SUBMIT_RE_PRODUCE_EDITBOX %></Label>
  341. <br>
  342. <%
  343. if Session.CodePage = 932 then
  344. %>
  345. <TextArea class="clsNormalTextArea" name="txtNotes" id="txtNotes" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 name=txtComments rows=5><%Response.Write strNotes%></TextArea>
  346. <%
  347. else
  348. %>
  349. <TextArea class="clsNormalTextArea" name="txtNotes" id="txtNotes" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 name=txtComments rows=5><%Response.Write Server.HTMLEncode(strNotes)%></TextArea>
  350. <%
  351. end if
  352. %>
  353. </p>
  354. <p class="clsPBody">
  355. <Label for=txtComments><% = L_SUBMIT_COMMENTS_INFO_EDITBOX %></Label>
  356. <br>
  357. <%
  358. if Session.CodePage = 932 then
  359. %>
  360. <TextArea class="clsNormalTextArea" name="txtComments" id="txtComments" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 name=txtComments rows=5><%Response.Write strComments%></TextArea>
  361. <%
  362. else
  363. %>
  364. <TextArea class="clsNormalTextArea" name="txtComments" id="txtComments" onkeydown="checklength();" onpaste="checklengthpaste();" cols=75 name=txtComments rows=5><%Response.Write Server.HTMLEncode(strComments)%></TextArea>
  365. <%
  366. end if
  367. %>
  368. </p>
  369. <%
  370. if Request.Cookies("Misc")("auto") = "True" then
  371. %>
  372. <br>
  373. <div>
  374. <Table class="clstblLinks">
  375. <thead>
  376. <tr>
  377. <td>
  378. </td>
  379. <td>
  380. </td>
  381. </tr>
  382. </thead>
  383. <tbody>
  384. <tr>
  385. <td nowrap class="clsTDLinks">
  386. <A class="clsALink" href="http://<% =Request.ServerVariables("SERVER_NAME") %>/welcome.asp"><% = L_LOCATE_CANCEL_LINK_TEXT %></a>
  387. </td>
  388. <td nowrap class="clsTDLinks">
  389. <A class="clsALink" href="JAVASCRIPT:autosubmit_onclick();" ><% = L_SUBMIT_FINSIH_INFO_TEXT %></a>
  390. </td>
  391. </tr>
  392. </tbody>
  393. </table>
  394. </div>
  395. <br>
  396. <%
  397. else
  398. %>
  399. <Table>
  400. <thead>
  401. <tr>
  402. <td>
  403. </td>
  404. </tr>
  405. </thead>
  406. <tbody class="clstblLinks">
  407. <tr>
  408. <td nowrap class="clsTDLinks">
  409. <A class="clsALink" href="http://<% =Request.ServerVariables("SERVER_NAME") %>/welcome.asp"><% = L_LOCATE_CANCEL_LINK_TEXT %></a>
  410. </td>
  411. <td nowrap class="clsTDLinks">
  412. <A class="clsALink" href="JAVASCRIPT:PreviousPage();"><% = L_LOCATE_PREVIOUS_LINK_TEXT %></a>
  413. </td>
  414. <td nowrap class="clsTDLinks">
  415. <A class="clsALink" href="JAVASCRIPT:submit_onclick();" ><% = L_SUBMIT_FINSIH_INFO_TEXT %></a>
  416. </td>
  417. </tr>
  418. </tbody>
  419. </table>
  420. <%
  421. End if
  422. %>
  423. </div>
  424. <%
  425. End if
  426. if Session.CodePage <> 932 then
  427. sFileName = unescape(sFileName)
  428. end if
  429. %>
  430. <Input name="txtFile" id="txtFile" Lang="ja" type="hidden" value="<%Response.Write sFileName%>">
  431. <Input name="txtHexIncidentID" id="txtHexIncidentID" type="hidden" value="<%= strHexIncidentID %>">
  432. <Input name="txtGlobalLanguage" id="txtGlobalLanguage" type="hidden" value="<%=strGlobalLanguage%>">
  433. <Input name="txtGlobalOptionCode" id="txtGlobalOptionCode" type="hidden" value="<%=strGlobalOptionCode%>">
  434. <Input name="txtFileExists" id="txtFileExists" type="hidden" value="<% = bolHashExists %>">
  435. <Input name="txtFileName" id="txtFileName" type="hidden" value="<% Response.Write strFile %>">
  436. <Input type="hidden" id="txtPrevFileName" name="txtPrevFileName" value="<% = sPrevFileName & ", " & Date & ", "%>">
  437. <Input name="txtSelSystem" id="txtSelSystem" type="hidden" value="<% = Request.Cookies("selSystem") %>">
  438. <br>
  439. <%
  440. if Request.Cookies("Misc")("auto") <> "True" then
  441. %>
  442. <OBJECT id="win2kdmp" name="win2kdmp" viewastext UNSELECTABLE="on" style="display:none"
  443. CLASSID="clsid:D68DAEED-C2A6-4C6F-9365-4676B173D8EF"
  444. codebase="https://<%=Request.ServerVariables("SERVER_NAME")%>/secure/OCARPT.CAB#version=<%= strGlobalVersion %>" height=0 width=0>
  445. <br>
  446. <br>
  447. <div class="clsDiv">
  448. <P class="clsPWarning">
  449. <% = L_LOCATE_WARN_ING_ERRORMESSAGE %>
  450. </P>
  451. <p class="clsPBody">
  452. <% = L_LOCATE_WARNING_MESSAGE_ERRORMESSAGE %>
  453. </P>
  454. <P class="clsPBody">
  455. <A class="clsALink" href="http://<% =Request.ServerVariables("SERVER_NAME") %>/submit.asp" ><% = L_LOCATE_REFRESH_LINK_TEXT %></a>
  456. </p>
  457. </div>
  458. </OBJECT>
  459. <%
  460. end if
  461. %>
  462. <script language="javascript">
  463. <!--
  464. var iResults;
  465. var oTimer;
  466. var bolUploading;
  467. bolUploading = false;
  468. document.body.onload = BodyLoad;
  469. function LoadData(intAttribute)
  470. {
  471. var Attribute;
  472. spnUserData.load("OCADataStore");
  473. switch(intAttribute)
  474. {
  475. case 0:
  476. {
  477. if(spnUserData.getAttribute("selSystem") != null && spnUserData.getAttribute("selSystem") != "")
  478. {
  479. Attribute = spnUserData.getAttribute("selSystem");
  480. return Attribute;
  481. }
  482. else
  483. {
  484. return 0;
  485. }
  486. }
  487. break;
  488. }
  489. }
  490. function SaveData(intAttribute, strData)
  491. {
  492. var oTimeNow = new Date(); // Start Time
  493. var sExpirationDate;
  494. switch(intAttribute)
  495. {
  496. case 0:
  497. spnUserData.setAttribute("selSystem", strData);
  498. break;
  499. }
  500. oTimeNow.setYear(oTimeNow.getYear() + 2);
  501. sExpirationDate = oTimeNow.toUTCString();
  502. spnUserData.expires = sExpirationDate;
  503. spnUserData.save("OCADataStore");
  504. }
  505. function PreviousPage()
  506. {
  507. //SaveData(0, frmMain.selSystem.selectedIndex);
  508. if(frmMain.txtEventName.value == "")
  509. {
  510. document.cookie = "txtEventName = ~|~|";
  511. }
  512. else
  513. {
  514. document.cookie = "txtEventName = " + escape(frmMain.txtEventName.value);
  515. }
  516. if(frmMain.txtNotes.value == "")
  517. {
  518. document.cookie = "txtNotes = ~|~|";
  519. }
  520. else
  521. {
  522. document.cookie = "txtNotes = " + escape(frmMain.txtNotes.value);
  523. }
  524. if(frmMain.txtComments.value == "")
  525. {
  526. document.cookie = "txtComments = ~|~|";
  527. }
  528. else
  529. {
  530. document.cookie = "txtComments = " + escape(frmMain.txtComments.value);
  531. }
  532. document.cookie = "selSystem = " + frmMain.selSystem.selectedIndex;
  533. window.navigate("locate.asp");
  534. }
  535. function testkey()
  536. {
  537. if(window.event.keyCode == 13)
  538. {
  539. window.event.returnValue = 0;
  540. window.event.cancelBubble = true;
  541. submit_onclick();
  542. }
  543. }
  544. function checklengthpaste()
  545. {
  546. var iLength;
  547. var strTemp;
  548. var sNewString;
  549. sNewString = window.clipboardData.getData("Text")
  550. strTemp = window.event.srcElement.value + sNewString;
  551. iLength = strTemp.length;
  552. if(iLength > 1023)
  553. {
  554. alert("<% = L_SUBMIT_MAX_LENGTH_MESSAGE %>");
  555. window.event.returnValue=false;
  556. }
  557. }
  558. function checklength()
  559. {
  560. var iLength;
  561. var strTemp;
  562. var iKeyCode;
  563. strTemp = window.event.srcElement.value;
  564. iLength = strTemp.length;
  565. iKeyCode = window.event.keyCode;
  566. if(iKeyCode != 8 && iKeyCode!=9 && iKeyCode !=16 && iKeyCode != 35 && iKeyCode != 36 && iKeyCode != 17 && iKeyCode != 46)
  567. {
  568. if(iLength > 1023)
  569. {
  570. alert("<% = L_SUBMIT_MAX_LENGTH_MESSAGE %>");
  571. window.event.returnValue=false;
  572. }
  573. }
  574. }
  575. function BodyLoad()
  576. {
  577. var oTimeNow = new Date(); // Start Time
  578. var sExpirationDate;
  579. var strUploadedFiles;
  580. var strCookies;
  581. var bolResults = false;
  582. var y;
  583. var strFileName;
  584. var strFile;
  585. var oTimeExpiresNow = new Date();
  586. try
  587. {
  588. //frmMain.selSystem.selectedIndex = LoadData(0);
  589. if(frmMain.txtSelSystem.value=="")
  590. {
  591. frmMain.selSystem.selectedIndex = 0;
  592. }
  593. else
  594. {
  595. frmMain.selSystem.selectedIndex = frmMain.txtSelSystem.value;
  596. }
  597. }
  598. catch(e)
  599. {
  600. }
  601. if(frmMain.txtFileExists.value=="True")
  602. {
  603. strUploadedFiles = LoadPreviousFileData();
  604. if(strUploadedFiles==null)
  605. {
  606. spnUserData.setAttribute("UploadedFiles", frmMain.txtPrevFileName.value);
  607. }
  608. else
  609. {
  610. strCookies = strUploadedFiles.split(",");
  611. strFile = frmMain.txtFileName.value;
  612. for(y=0;y < strCookies.length-1;y++)
  613. {
  614. if(strCookies[y] == strFile)
  615. {
  616. bolResults = true;
  617. }
  618. }
  619. if(bolResults==false)
  620. {
  621. spnUserData.setAttribute("UploadedFiles", strUploadedFiles + frmMain.txtPrevFileName.value);
  622. }
  623. }
  624. oTimeNow.setYear(oTimeNow.getYear() + 2);
  625. sExpirationDate = oTimeNow.toUTCString();
  626. spnUserData.expires = sExpirationDate;
  627. spnUserData.save("OCADataStore");
  628. }
  629. }
  630. function LoadPreviousFileData()
  631. {
  632. var Attribute;
  633. spnUserData.load("OCADataStore");
  634. Attribute = spnUserData.getAttribute("UploadedFiles");
  635. return Attribute;
  636. }
  637. function autosubmit_onclick()
  638. {
  639. var bolSpaces=false;
  640. var strEventName;
  641. var bolCharFound = false;
  642. strEventName = frmMain.txtEventName.value;
  643. for(x=0;x<strEventName.length;x++)
  644. {
  645. if(strEventName.charAt(x) != " ")
  646. {
  647. bolSpaces = false;
  648. bolCharFound = true;
  649. }
  650. else
  651. {
  652. if(bolCharFound == false)
  653. {
  654. bolSpaces = true;
  655. }
  656. }
  657. }
  658. if(strEventName == "" || bolSpaces == true)
  659. {
  660. alert("<% = L_SUBMIT_ALERTEVENT_NAME_ERRORMESSAGE %>");
  661. frmMain.txtEventName.focus();
  662. return;
  663. }
  664. strEventName = frmMain.txtEventName.value;
  665. if(frmMain.txtEventName.value == "")
  666. {
  667. document.cookie = "txtEventName = ~|~|";
  668. }
  669. else
  670. {
  671. document.cookie = "txtEventName = " + escape(frmMain.txtEventName.value);
  672. }
  673. if(frmMain.txtNotes.value == "")
  674. {
  675. document.cookie = "txtNotes = ~|~|";
  676. }
  677. else
  678. {
  679. document.cookie = "txtNotes = " + escape(frmMain.txtNotes.value);
  680. }
  681. if(frmMain.txtComments.value == "")
  682. {
  683. document.cookie = "txtComments = ~|~|";
  684. }
  685. else
  686. {
  687. document.cookie = "txtComments = " + escape(frmMain.txtComments.value);
  688. }
  689. window.navigate("received.asp");
  690. }
  691. function submit_onclick()
  692. {
  693. var bolQuotes;
  694. var strEventName;
  695. var iLength;
  696. var x;
  697. var bolSpaces=false;
  698. var iCount;
  699. var bolCharFound = false;
  700. if(bolUploading==false)
  701. {
  702. bolQuotes = false;
  703. strEventName = frmMain.txtEventName.value;
  704. for(x=0;x<strEventName.length;x++)
  705. {
  706. if(strEventName.charAt(x) != " ")
  707. {
  708. bolSpaces = false;
  709. bolCharFound = true;
  710. }
  711. else
  712. {
  713. if(bolCharFound == false)
  714. {
  715. bolSpaces = true;
  716. }
  717. }
  718. }
  719. if(strEventName == "" || bolSpaces == true)
  720. {
  721. alert("<% = L_SUBMIT_ALERTEVENT_NAME_ERRORMESSAGE %>");
  722. frmMain.txtEventName.focus();
  723. bolUploading = false;
  724. return;
  725. }
  726. strEventName = frmMain.txtEventName.value;
  727. iLength = strEventName.length;
  728. for(x=0;x < iLength;x++)
  729. {
  730. if(strEventName.charCodeAt(x) == 34)
  731. {
  732. bolQuotes = true;
  733. }
  734. }
  735. if(bolQuotes == true)
  736. {
  737. alert("<% = L_SUBMIT_ALERTQUOTE_QUOTE_ERRORMESSAGE %>");
  738. frmMain.txtEventName.focus();
  739. bolUploading = false;
  740. return;
  741. }
  742. var iHeight = window.screen.availHeight;
  743. var iWidth = window.screen.availWidth;
  744. iWidth = iWidth / 2;
  745. iHeight = iHeight / 3.8;
  746. var iTop = (window.screen.width / 2) - (iWidth / 2);
  747. var iLeft = (window.screen.height / 2) - (iHeight / 2);
  748. iResults = window.open("wait.asp?msg=2", "", "top=" + iTop + ",left=" + iLeft + ",height=" + iHeight + ",width=" + iWidth + ",status=yes,toolbar=no,menubar=no");
  749. oTimer = window.setInterval("fnRecycle()",1000);
  750. }
  751. else
  752. {
  753. try
  754. {
  755. iResults.focus();
  756. }
  757. catch(e)
  758. {
  759. }
  760. }
  761. bolUploading = true;
  762. }
  763. function fnRecycle()
  764. {
  765. var strMisc;
  766. if(iResults.document.readyState == "complete")
  767. {
  768. window.clearInterval(oTimer);
  769. if(frmMain.txtEventName.value == "")
  770. {
  771. document.cookie = "txtEventName = ~|~|";
  772. }
  773. else
  774. {
  775. document.cookie = "txtEventName = " + escape(frmMain.txtEventName.value);
  776. }
  777. if(frmMain.txtNotes.value == "")
  778. {
  779. document.cookie = "txtNotes = ~|~|";
  780. }
  781. else
  782. {
  783. document.cookie = "txtNotes = " + escape(frmMain.txtNotes.value);
  784. }
  785. if(frmMain.txtComments.value == "")
  786. {
  787. document.cookie = "txtComments = ~|~|";
  788. }
  789. else
  790. {
  791. document.cookie = "txtComments = " + escape(frmMain.txtComments.value);
  792. }
  793. strMisc = GetCookie2("Misc");
  794. document.cookie = "selSystem = " + frmMain.selSystem.selectedIndex;
  795. //SaveData(0, frmMain.selSystem.selectedIndex);
  796. var bolResults;
  797. var bolIsEncrypted;
  798. var sHexIncident;
  799. var strFile = frmMain.txtFile.value;
  800. //bolIsEncrypted = GetCookie("intCustomerPremierID");
  801. //if(bolIsEncrypted==0 || bolIsEncrypted=="" || bolIsEncrypted==null)
  802. //{
  803. //bolIsEncrypted = 0;
  804. //}
  805. //else
  806. //{
  807. bolIsEncrypted = 1;
  808. //}
  809. strTempName = strFile;
  810. var bolValidate = frmMain.win2kdmp.validatedump(bolIsEncrypted, strFile);
  811. if(bolValidate != 0 && bolValidate != 4)
  812. {
  813. alert("<% = L_SUBMIT_FILE_INVALID_ERRORMESSAGE %>");
  814. iResults.close();
  815. bolUploading = false;
  816. return;
  817. }
  818. sHexIncident = frmMain.txtHexIncidentID.value;
  819. if(sHexIncident.length < 1 || sHexIncident < 0 || sHexIncident == "")
  820. {
  821. alert("<% = L_SUBMIT_FILE_INVALID_ERRORMESSAGE %>");
  822. iResults.close();
  823. bolUploading = false;
  824. return;
  825. }
  826. var x = "U_" + frmMain.txtHexIncidentID.value + "@";
  827. var y = frmMain.txtGlobalLanguage.value;
  828. var z = frmMain.txtGlobalOptionCode.value;
  829. try
  830. {
  831. bolResults = frmMain.win2kdmp.upload(strFile, x, y, z);
  832. }
  833. catch(e)
  834. {
  835. bolResults = 4;
  836. }
  837. iResults.close();
  838. //DisplayCookies();
  839. switch(bolValidate)
  840. {
  841. case 0:
  842. window.navigate("received.asp");
  843. break;
  844. case 1:
  845. iResults.close();
  846. alert("<% = L_SUBMIT_FILENOT_FOUND_ERRORMESSAGE %>");
  847. bolUploading = false;
  848. break;
  849. case 2:
  850. iResults.close();
  851. alert("<% = L_SUBMIT_FILENOTUP_LOADED_ERRORMESSAGE %>");
  852. bolUploading = false;
  853. break;
  854. case 3:
  855. iResults.close();
  856. alert("<% = L_SUBMIT_CONVERSION_FAILED_ERRORMESSAGE %>");
  857. bolUploading = false;
  858. break;
  859. case 4:
  860. window.navigate("received.asp?Bit=1");
  861. break;
  862. case 5:
  863. iResults.close();
  864. alert("<% = L_SUBMIT_CONVERSION_FAILED_ERRORMESSAGE %>");
  865. bolUploading = false;
  866. break;
  867. default:
  868. iResults.close();
  869. alert("<% = L_SUBMIT_UNKNOWN_ERROR_ERRORMESSAGE %>");
  870. bolUploading = false;
  871. break;
  872. }
  873. }
  874. }
  875. /*function fnRecycle()
  876. {
  877. window.clearInterval(iInterval);
  878. var bolResults;
  879. var bolIsEncrypted;
  880. var strFile = frmMain.txtFile.value;
  881. bolIsEncrypted = GetCookie("intCustomerPremierID");
  882. if(bolIsEncrypted==0 || bolIsEncrypted=="" || bolIsEncrypted==null)
  883. {
  884. bolIsEncrypted = 0;
  885. }
  886. else
  887. {
  888. bolIsEncrypted = 1;
  889. }
  890. strTempName = strFile;
  891. var bolValidate = frmMain.win2kdmp.validatedump(bolIsEncrypted, strFile);
  892. if(bolValidate != 0 && bolValidate != 4)
  893. {
  894. alert("<% = L_SUBMIT_FILE_INVALID_ERRORMESSAGE %>");
  895. iResults.close();
  896. return;
  897. }
  898. var x = "U_" + frmMain.txtHexIncidentID.value + "@";
  899. var y = frmMain.txtGlobalLanguage.value;
  900. var z = frmMain.txtGlobalOptionCode.value;
  901. try
  902. {
  903. bolResults = frmMain.win2kdmp.upload(strFile, x, y, z);
  904. }
  905. catch(e)
  906. {
  907. bolResults = 4;
  908. }
  909. iResults.close();
  910. switch(bolResults)
  911. {
  912. case 0:
  913. window.navigate("received.asp");
  914. break;
  915. case 1:
  916. iResults.close();
  917. alert("<% = L_SUBMIT_FILENOT_FOUND_ERRORMESSAGE %>");
  918. break;
  919. case 2:
  920. iResults.close();
  921. alert("<% = L_SUBMIT_FILENOTUP_LOADED_ERRORMESSAGE %>");
  922. break;
  923. case 3:
  924. iResults.close();
  925. alert("<% = L_SUBMIT_CONVERSION_FAILED_ERRORMESSAGE %>");
  926. break;
  927. case 4:
  928. window.navigate("received.asp?Bit=1");
  929. break;
  930. case 5:
  931. iResults.close();
  932. alert("<% = L_SUBMIT_CONVERSION_FAILED_ERRORMESSAGE %>");
  933. break;
  934. default:
  935. iResults.close();
  936. alert("<% = L_SUBMIT_UNKNOWN_ERROR_ERRORMESSAGE %>");
  937. break;
  938. }
  939. }*/
  940. function DisplayCookies()
  941. {
  942. // cookies are separated by semicolons
  943. var aCookie = document.cookie.split("; ");
  944. var aCrumb = "";
  945. for (var i=0; i < aCookie.length; i++)
  946. {
  947. aCrumb = aCrumb + aCookie[i] + "\r";
  948. }
  949. alert(aCrumb);
  950. }
  951. function GetCookie(sName)
  952. {
  953. var aCookie = document.cookie.split("; ");
  954. for (var i=0; i < aCookie.length; i++)
  955. {
  956. var aCrumb = aCookie[i].split("=");
  957. if (sName == aCrumb[0])
  958. return unescape(aCrumb[1]);
  959. }
  960. return null;
  961. }
  962. function GetCookie2(sName)
  963. {
  964. var aCookie = document.cookie.split("; ");
  965. aCrumb="";
  966. for (var i=0; i < aCookie.length; i++)
  967. {
  968. var aCrumb = aCookie[i].split("=");
  969. if (sName == aCrumb[0])
  970. return unescape(aCookie[i]);
  971. }
  972. return null;
  973. }
  974. //-->
  975. </script>
  976. </form>
  977. <!--#include file="..\include\asp\foot.asp"-->