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.

219 lines
6.8 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\corptransactionsstrings.inc"-->
  5. <%
  6. Dim cnConnection
  7. Dim rsTransactions
  8. Dim strStatus
  9. Dim strType
  10. Dim strFileCount
  11. Dim strDescription
  12. Dim x
  13. Call CVerifyPassport
  14. Call CCreateObjects
  15. Call CCreateConnection
  16. Call CGetTransactions
  17. Private Sub CGetTransactions
  18. set rsTransactions = cnConnection.Execute("GetTransactions " & oPassMgrObj.Profile("MemberIdHigh") & ", " & oPassMgrObj.Profile("MemberIdLow"))
  19. if cnConnection.Errors.Count > 0 then
  20. strTemp = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
  21. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  22. Response.Write "<p class='clsPBody'>" & L_CORPTRANSACTIONS_DATABASE_FAILED_TEXT & "</p></div>"
  23. Call CDestroyObjects
  24. Response.End
  25. %>
  26. <!--#include file="..\include\asp\foot.asp"-->
  27. <%
  28. end if
  29. End Sub
  30. Private Sub CVerifyPassport
  31. on error resume next
  32. If not (oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin)) then
  33. Response.Write "<br><div class='clsDiv'><p class='clsPTitle'>" & L_CUSTOMER_PASSPORT_TITLE_TEXT
  34. Response.Write "</p><p class='clsPBody'>" & L_CUSTOMER_PASSPORT_INFO_TEXT
  35. Response.Write "<A class='clsALinkNormal' href='" & L_FAQ_PASSPORT_LINK_TEXT & "'>" & L_WELCOME_PASSPORT_LINK_TEXT & "</A><BR><BR>"
  36. Response.write oPassMgrObj.LogoTag2(Server.URLEncode(ThisPageURL), TimeWindow, ForceLogin, CoBrandArgs, strLCID, Secure)
  37. Response.Write "</P></div><div id='divHiddenFields' name='divHiddenFields'>"
  38. Response.Write "</div>"
  39. %>
  40. <!--#include file="..\include\asp\foot.asp"-->
  41. <%
  42. Response.End
  43. end if
  44. End Sub
  45. Private Sub CCreateObjects
  46. on error resume next
  47. set cnConnection = CreateObject("ADODB.Connection")'Create Connection Object
  48. set rsTransactions = CreateObject("ADODB.Recordset")'Create Recordset Object
  49. End Sub
  50. Private Sub CDestroyObjects
  51. on error resume next
  52. if rsTransactions.State = adStateOpen then rsTransactions.Close
  53. set rsTransactions = nothing
  54. if cnConnection.State = adStateOpen then cnConnection.Close
  55. set cnConnection = nothing
  56. End Sub
  57. Private Sub CCreateConnection
  58. on error resume next
  59. with cnConnection
  60. .ConnectionString = strCustomer
  61. .CursorLocation = adUseClient
  62. .ConnectionTimeout = strGlobalConnectionTimeout
  63. .Open
  64. end with 'Catch errors and display to user
  65. if cnConnection.State = adStateClosed then
  66. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  67. Response.Write "<p class='clsPBody'>" & L_COMMENTS_CONNECTION_FAILED_TEXT & "</p></div>"
  68. cnConnection.Errors.Clear
  69. Call CDestroyObjects
  70. %>
  71. <!--#include file="..\include\asp\foot.asp"-->
  72. <%
  73. Response.End
  74. end if
  75. End Sub
  76. %>
  77. <br>
  78. <div class="clsDiv">
  79. <P class="clsPTitle">
  80. <% = L_CORPTRANSACTIONS_CORPORATE_TITLE_TEXT %>
  81. </p>
  82. <P class="clsPBody">
  83. <% = L_CORPTRANSAACTIONS_SUBTITLE_CHOOSE_TEXT %>
  84. </p>
  85. <table name="tblStatus" id="tblStatus" class="clsTableCorp" border="1" CELLPADDING="0px" CELLSPACING="0px">
  86. <THead>
  87. <tr>
  88. <td id="td1" nowrap class="clsTDInfo">
  89. &nbsp;<Label for=td1><% = L_CORPTRANSACTIONS_TRANSACTION_NAME_TEXT %></Label>&nbsp;&nbsp;
  90. </td>
  91. <td id="td2" nowrap class="clsTDInfo">
  92. &nbsp;<Label for=td2><% = L_CORPTRANSACTIONS_TRANSACTION_DATE_TEXT %></Label>&nbsp;&nbsp;
  93. </td>
  94. <td id="td3" nowrap class="clsTDInfo">
  95. &nbsp;<Label for=td3><% = L_CORPTRANSACTIONS_STATUS_STATUS_TEXT%></Label>&nbsp;&nbsp;
  96. </td>
  97. <td id="td4" nowrap class="clsTDInfo">
  98. &nbsp;<Label for=td4><% = L_CORPTRANSACTIONS_FILE_COUNT_TEXT %></Label>&nbsp;&nbsp;
  99. </td>
  100. <td id="td5" nowrap class="clsTDInfo">
  101. &nbsp;<Label for=td5><% = L_CORPTRANSACTIONS_VIEW_TRANSACTIONS_TEXT %></Label>&nbsp;&nbsp;
  102. </td>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <%
  107. x = 0
  108. if rsTransactions.State = adStateOpen then
  109. if rsTransactions.RecordCount > 0 then
  110. rsTransactions.MoveFirst
  111. Do while rsTransactions.EOF = false
  112. 'Select case rsTransactions("status")
  113. 'case 0
  114. 'strStatus = L_CORPTRANSACTIONS_COMPLETE_COMPLETE_TEXT
  115. 'case 1
  116. 'strStatus = L_CORPTRANSACTIONS_INCOMPLETE_INCOMPLETE_TEXT
  117. 'End Select
  118. strStatus = rsTransactions("TransactionID")
  119. Select case rsTransactions("type")
  120. case 1
  121. strType = L_CORPTRANSACTIONS_STARTUP_SHUTDOWN_TEXT
  122. case 2
  123. strType = L_CORPTRANSACTIONS_SYSTEM_CRASH_TEXT
  124. end select
  125. if isnull(rsTransactions("Description")) = true then
  126. strDescription = "&nbsp;"
  127. else
  128. strDescription = rsTransactions("Description")
  129. end if
  130. %>
  131. <tr><td nowrap class="clsTDCell" title="<% = strDescription %>">
  132. <%
  133. if Len(strDescription) > 17 then
  134. Response.Write "&nbsp;" & Left(strDescription, 17) & "...&nbsp;&nbsp;"
  135. else
  136. Response.Write "&nbsp;" & strDescription & "&nbsp;&nbsp;"
  137. end if
  138. if isnull(rsTransactions("FileCount")) = true then
  139. strFileCount = "0"
  140. else
  141. strFileCount = rsTransactions("FileCount")
  142. end if
  143. x = x + 1
  144. %>
  145. </td>
  146. <td id="tdA<%=x%>"nowrap class="clsTDCell">&nbsp;
  147. <Label for="tdA<%=x%>"> <% = rsTransactions("TransDate") %></Label>&nbsp;&nbsp;
  148. </td>
  149. <td id="tdB<%=x%>"nowrap class="clsTDCell">&nbsp;
  150. <Label for="tdB<%=x%>"><% = strStatus %></Label>&nbsp;&nbsp;
  151. </td>
  152. <td id="tdC<%=x%>"nowrap class="clsTDCell">&nbsp;
  153. <Label for="tdC<%=x%>"><% = strFileCount %></Label>&nbsp;&nbsp;
  154. </td>
  155. <td id="tdD<%=x%>"nowrap class="clsTDCell">&nbsp;
  156. <A class="clsALink" href="Javascript:ProcessFile(<% = rsTransactions("TransactionID") %>);"><% = L_CORPTRANSACTIONS_VIEW_TRANSACTIONS_TEXT %></a>&nbsp;&nbsp;
  157. </td></tr>
  158. <%
  159. rsTransactions.MoveNext
  160. loop
  161. else
  162. Response.Write "<tr><td class='clsTDCell' align=center colspan=9 nowrap>" & L_STATUS_NO_RECORDS_MESSAGE & "</td></tr>"
  163. end if
  164. else
  165. Response.Write "<tr><td class='clsTDCell' align=center colspan=9 nowrap>" & L_STATUS_NO_RECORDS_MESSAGE & "</td></tr>"
  166. end if
  167. %>
  168. </tbody>
  169. </table>
  170. </div>
  171. <SCRIPT LANGUAGE=javascript>
  172. <!--
  173. function ProcessFile(transid)
  174. {
  175. document.cookie = "CERTransID = " + escape(transid);
  176. window.navigate("corpview.asp");
  177. }
  178. function GetCookie(sName)
  179. {
  180. var aCookie = document.cookie.split("; ");
  181. for (var i=0; i < aCookie.length; i++)
  182. {
  183. var aCrumb = aCookie[i].split("=");
  184. if (sName == aCrumb[0])
  185. return unescape(aCrumb[1]);
  186. }
  187. return null;
  188. }
  189. //-->
  190. </SCRIPT>
  191. <%
  192. Call CDestroyObjects
  193. %>
  194. <!--#include file="..\include\asp\foot.asp"-->