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.

221 lines
7.8 KiB

  1. <!-- #INCLUDE VIRTUAL = "include/asp/top.asp" -->
  2. <!-- #INCLUDE VIRTUAL = "include/asp/head.asp" -->
  3. <!-- #INCLUDE VIRTUAL = "include/inc/corpcustomerstrings.inc" -->
  4. <%
  5. Dim rType
  6. Dim SP
  7. Dim RS
  8. Dim TransactionID
  9. Dim Conn
  10. Dim rsPremier
  11. Dim strHigh
  12. Dim strLow
  13. Dim strTemp
  14. Dim strHex
  15. Dim strPremierID
  16. strPremierID = 0
  17. Call CCreateConnection
  18. Call CGetPremierID
  19. Err.Clear
  20. Function Clean(What)
  21. dim a
  22. dim NewStr
  23. For a = 1 To Len(What)
  24. If (Mid(What,a,1) = "'") Then
  25. NewStr = NewStr & "''"
  26. ElseIf (asc(Mid(What,a,1)) <> 34) Then
  27. NewStr = NewStr & Mid(What,a,1)
  28. End If
  29. Next
  30. Clean = NewStr
  31. End Function
  32. %>
  33. <% If (oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin)) Then %>
  34. <%
  35. rType = 0
  36. If (Request.Cookies("OCA")("Type") = "bluescreen") Then
  37. rType = 1
  38. ElseIf (Request.Cookies("OCA")("Type") = "appcompat") Then
  39. rType = 2
  40. ElseIf (Request.Cookies("OCA")("Type") = "shutdown") Then
  41. rType = 3
  42. End If
  43. Set SP = CreateObject("ADODB.Command")
  44. Set RS = CreateObject("ADODB.Recordset")
  45. With SP
  46. .ActiveConnection = Conn
  47. .CommandText = "SetCustomer"
  48. .CommandType = &H0004
  49. .CommandTimeout = strGlobalCommandTimeout
  50. .Parameters.Append .CreateParameter("@HighID", 3, &H0001, , oPassMgrObj.Profile("MemberIdHigh"))
  51. .Parameters.Append .CreateParameter("@LowID", 3, &H0001, , oPassMgrObj.Profile("MemberIdLow"))
  52. .Parameters.Append .CreateParameter("@EMail", 202, &H0001, 128, Request.Form("EMail"))
  53. .Parameters.Append .CreateParameter("@Contact", 202, &H0001, 32, Request.Form("Contact"))
  54. .Parameters.Append .CreateParameter("@Phone", 202, &H0001, 16, Request.Form("Phone"))
  55. .Parameters.Append .CreateParameter("@PremierID", 202, &H0001, 16, strPremierID)
  56. .Parameters.Append .CreateParameter("@Lang", 202, &H0001, 4, strAbb)
  57. .Execute
  58. End With
  59. If (Err.Number <> 0) Then
  60. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  61. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  62. %><!-- #INCLUDE VIRTUAL = "include/asp/foot.asp" --><%
  63. Call DestroyObjects
  64. Response.End
  65. End If
  66. Set SP = Nothing
  67. 'Set RS = Conn.Execute("GetTransactionID(" & oPassMgrObj.Profile("MemberIdHigh") & "," & oPassMgrObj.Profile("MemberIdLow") & ",'" & Request.Form("Description") & "'," & rType & ")")
  68. Set SP = CreateObject("ADODB.Command")
  69. With SP
  70. .ActiveConnection = Conn
  71. .CommandText = "GetTransactionID"
  72. .CommandType = adCmdStoredProc
  73. .CommandTimeout = 60
  74. .Parameters.Append .CreateParameter("@HighID", 3, 1, , oPassMgrObj.Profile("MemberIdHigh"))
  75. .Parameters.Append .CreateParameter("@LowID", 3, 1, , oPassMgrObj.Profile("MemberIdLow"))
  76. .Parameters.Append .CreateParameter("@Description", 202, 1, 64, Request.Form("Description"))
  77. .Parameters.Append .CreateParameter("@Type", 16, 1, , rType)
  78. Set RS = .Execute
  79. 'Response.Write "<BR>" & RS.State
  80. End With
  81. If Err.Number <> 0 Then
  82. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  83. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  84. %><!-- #INCLUDE VIRTUAL = "include/asp/foot.asp" --><%
  85. Call DestroyObjects
  86. Response.End
  87. Else
  88. TransactionID = RS.Fields(0).Value
  89. 'Response.Write "<P>Transaction:" & TransactionID & "<BR>Err Desc:" & Err.Description & "<BR>Err Num:" & Err.number
  90. 'Response.Write "<P>State:" & RS.state & "<BR>High:" & oPassMgrObj.Profile("MemberIdHigh")
  91. 'Response.Write "<BR>Low:" & oPassMgrObj.Profile("MemberIdLow") & "<BR>Description:" & Request.Form("Description")
  92. 'Response.Write "<BR>Type:" & rType
  93. 'Response.Write "<br>Conn:" & Conn.state
  94. 'Response.End
  95. RS.Close
  96. End If
  97. Private Sub CGetPremierID
  98. on error resume next
  99. 'Response.Cookies("intCustomerPremierID") = 0
  100. strHigh = CStr(Hex(oPassMgrObj.Profile("MemberIdHigh")))
  101. strLow = Cstr(Hex(oPassMgrObj.Profile("MemberIdLow")))
  102. if Len(strHigh) > 8 then
  103. strHigh = right(strHigh, 8)
  104. end if
  105. if len(strLow) > 8 then
  106. strLow = right(strHigh, 8)
  107. end if
  108. if Len(strHigh) < 8 then
  109. strTemp = String(8 - len(strHigh), "0")
  110. strHigh =strTemp & strHigh
  111. end if
  112. if Len(strLow) < 8 then
  113. strTemp = string(8 - len(strLow), "0")
  114. strLow = strTemp & strLow
  115. end if
  116. 'Response.write "Cookies:" & Request.Cookies("intCustomerPremierID") & "<BR>"
  117. strHex = strHigh & strLow
  118. set rsPremier = Conn.Execute("Exec GetPremierID '" & strHex & "'")
  119. if Conn.Errors.Count > 0 then
  120. strPremierID = 0
  121. Exit Sub
  122. End if
  123. if rsPremier.State = adStateOpen then
  124. if rsPremier.RecordCount > 0 then
  125. strPremierID = rsPremier.Fields(0).Value
  126. else
  127. if Request.Cookies("intCustomerPremierID") = 0 or Request.Cookies("intCustomerPremierID") = "" then
  128. strPremierID = 0
  129. else
  130. strPremierID = CInt(Request.Cookies("intCustomerPremierID") )
  131. end if
  132. end if
  133. else
  134. if Request.Cookies("intCustomerPremierID") = 0 or Request.Cookies("intCustomerPremierID") = "" then
  135. strPremierID = 0
  136. else
  137. strPremierID = Cint(Request.Cookies("intCustomerPremierID") )
  138. end if
  139. end if
  140. End Sub
  141. Private Sub CCreateConnection
  142. Set Conn = Server.CreateObject("ADODB.Connection")
  143. set rsPremier = Server.CreateObject("ADODB.Recordset")
  144. With Conn
  145. .ConnectionString = strCustomer
  146. .CursorLocation = adUseClient
  147. .ConnectionTimeout = strGlobalConnectionTimeout
  148. .Open
  149. End With
  150. If (Err.Number <> 0) Then
  151. Response.Write "ERROR: [" & Err.Number & "]" & Err.Description
  152. Call CDestroyObjects
  153. Response.End
  154. End If
  155. End Sub
  156. Private Sub CDestroyObjects
  157. Conn.Close
  158. Set Conn = Nothing
  159. End Sub
  160. Set SP = Nothing
  161. Set RS = Nothing
  162. %>
  163. <OBJECT id="Cer" name="CerUpload" viewastext UNSELECTABLE="on" style="display:none"
  164. CLASSID="clsid:35D339D5-756E-4948-860E-30B6C3B4494A"
  165. codebase="https://<%=Request.ServerVariables("SERVER_NAME")%>/secure/cerupload.cab#version=<%=strCerVersion%>" height=0 width=0>
  166. <BR>
  167. <div class="clsDiv">
  168. <P class="clsPTitle">
  169. <% = L_LOCATE_WARN_ING_ERRORMESSAGE %>
  170. </P>
  171. <p class="clsPBody">
  172. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSONE_TEXT %><BR>
  173. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSTWO_TEXT %><BR>
  174. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSTHREE_TEXT %><BR><BR>
  175. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSFOUR_TEXT %><BR>
  176. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSFIVE_TEXT %><BR>
  177. <% = L_FAQ_WHYDOIGETAMESSAGEBOX_DETAILSSIX_TEXT %><BR>
  178. </p>
  179. </div>
  180. </OBJECT>
  181. <SCRIPT Language=VBScript>
  182. If (CER <> "") Then
  183. FileCount = CER.GetFileCount("<%=Request.Cookies("OCA")("Path")%>","<%=Hex(TransactionID)%>",1024)
  184. If (FileCount > 0) Then
  185. Window.Location.HREF = "https://<%=Request.ServerVariables("SERVER_NAME")%>/secure/cerup.asp?f=1&b=1&n=" & FileCount & "&t=<%=TransactionID%>&p=<%=Request.Cookies("OCA")("Path")%>"
  186. Else
  187. Document.Write "<P CLASS='clsPTitle'><%=L_CERUP_NO_FILES0_TEXT%></P>"
  188. Document.Write "<P CLASS='clsPBody'><%=L_CERUP_NO_FILES_TEXT%> <%=Request.Cookies("OCA")("Path")%></P>"
  189. Document.Write "<P CLASS='clsPBody'><img Alt='<%= L_WELCOME_GO_IMAGEALT_TEXT %>' border=0 src='../include/images/go.gif' width='24' height='24'><A class='clsALink' href='https://<%= Request.ServerVariables("SERVER_NAME") %>/cerintro.asp'><%= L_RECEIVED_NEWFILE_LINK_TEXT %></a></p>"
  190. 'alert(FileCount)
  191. End If
  192. End If
  193. </SCRIPT>
  194. <% Else %>
  195. <div class='clsDiv'>
  196. <P CLASS="clsPTitle">
  197. <%=L_CERCUST_PASSPORT_TITLE_TEXT%>
  198. </P>
  199. <P CLASS="clsPBody">
  200. <%=L_CERCUST_PASS_PORT_TEXT%>&nbsp;<A HREF="<%=L_FAQ_PASSPORT_LINK_TEXT%>"><%=L_WELCOME_PASSPORT_LINK_TEXT%>
  201. <BR><BR>
  202. <%=oPassMgrObj.LogoTag(Server.URLEncode(ThisPageURL),TimeWindow,ForceLogin,CoBrandArgs,strLCID,Secure)%>
  203. </P>
  204. </div>
  205. <% End If %>
  206. <!-- #INCLUDE VIRTUAL = "include/asp/foot.asp" -->
  207. <%
  208. Call DestroyObjects
  209. %>