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.

172 lines
5.2 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 RS
  6. Dim rContact
  7. Dim rEMail
  8. Dim rPhone
  9. Dim Conn
  10. Call CCreateConnection
  11. %>
  12. <% If (oPassMgrObj.IsAuthenticated(TimeWindow, ForceLogin)) Then %>
  13. <SCRIPT Language=JavaScript>
  14. function CheckEMail(str) {
  15. OK = 1;
  16. High = str.indexOf('.');
  17. if (High == -1) OK = 0;
  18. Prev = High;
  19. while (Prev != -1) {
  20. Prev = str.indexOf('.', Prev + 1);
  21. if (Prev != -1) High = Prev;
  22. }
  23. if (str.length == (High + 1)) OK = 0;
  24. Prev = str.indexOf('@');
  25. if ((Prev == -1) || (Prev > High)) OK = 0;
  26. Prev = str.indexOf('@', Prev + 1);
  27. if (Prev != -1) OK = 0;
  28. return OK;
  29. }
  30. function GoForm() {
  31. s = 1
  32. msg = '';
  33. str = document.ContactForm.Description.value
  34. OK = 0
  35. for (x=0; x<str.length; x++)
  36. if (str.charCodeAt(x) != 32)
  37. OK = 1
  38. if ((document.ContactForm.Description.value == "") || (OK == 0)) {
  39. msg = msg + '<%=L_CERCUST_CHECK_DESC_ALERT%>\n';
  40. s = 0;
  41. }
  42. if (document.ContactForm.EMail.value != "")
  43. if (CheckEMail(document.ContactForm.EMail.value) == 0) {
  44. msg = msg + '<%=L_CERCUST_CHECK_EMAIL_ALERT%>\n';
  45. s = 0;
  46. }
  47. if (s == 1)
  48. document.ContactForm.submit();
  49. else
  50. alert(msg);
  51. }
  52. </SCRIPT>
  53. <%
  54. Set RS = Conn.Execute("GetCustomer(" & oPassMgrObj.Profile("MemberIdHigh") & "," & oPassMgrObj.Profile("MemberIdlow") & ")")
  55. If (Err.Number <> 0) Then
  56. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  57. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  58. %><!-- #INCLUDE VIRTUAL = "include/asp/foot.asp" --><%
  59. Call CDestroyObjects
  60. Response.End
  61. End If
  62. If (Not RS.EOF) Then
  63. rContact = RS("Contact")
  64. rEMail = RS("EMail")
  65. rPhone = RS("Phone")
  66. if IsNull(RS("PremierID")) = false then
  67. if RS("PremierID") <> "" then
  68. Response.Cookies("intCustomerPremierID") = RS("PremierID")
  69. else
  70. Response.Cookies("intCustomerPremierID") = 0
  71. end if
  72. end if
  73. RS.Close
  74. Else
  75. rPhone = ""
  76. rContact = oPassMgrObj.Profile("MemberName")
  77. rEMail = oPassMgrObj.Profile("PreferredEMail")
  78. Response.Cookies("intCustomerPremierID") = 0
  79. End If
  80. Set RS = Nothing
  81. Private Sub CCreateConnection
  82. Set Conn = Server.CreateObject("ADODB.Connection")
  83. With Conn
  84. .ConnectionString = strCustomer
  85. .CursorLocation = adUseClient
  86. .ConnectionTimeout = strGlobalConnectionTimeout
  87. .Open
  88. End With
  89. If Conn.Errors.Count > 0 Then
  90. Response.Write "Connection Error: [" & Conn.Errors(0).Number & "]" & Conn.Errors(0).Description
  91. Call CDestroyObjects
  92. Response.End
  93. End If
  94. End Sub
  95. Private Sub CDestroyObjects
  96. Conn.Close
  97. Set Conn = Nothing
  98. End Sub
  99. %>
  100. <BR>
  101. <div class="clsDiv">
  102. <FORM NAME=ContactForm METHOD=POST ACTION="https://<%=Request.ServerVariables("SERVER_NAME")%>/secure/cerpreup.asp" ID="Form1">
  103. <BR>
  104. <P CLASS="clsPTitle">
  105. <%=L_CERCUST_CONTACT_HEAD_TEXT%>
  106. </P>
  107. <P CLASS="clsPBody">
  108. <%=L_CERCUST_CONTACT_INFO_TEXT%>
  109. <BR>
  110. </P>
  111. <P CLASS="clsPBody">
  112. <%=L_CERCUST_CONTACT_TEXT_TEXT%>
  113. </P>
  114. <P CLASS="clsPBody">
  115. <Label for=txtContact><%=L_CERCUST_INPUT_CONTACT_TEXT%></Label><BR>
  116. <INPUT CLASS="clsTextBox" TYPE=TEXT id="txtContact" NAME=Contact MAXLENGTH=32 SIZE=32 VALUE="<%=Server.HTMLEncode(rContact)%>" ID="Text1">
  117. </P>
  118. <P CLASS="clsPBody">
  119. <Label for=txtEmail><%=L_CERCUST_INPUT_EMAIL_TEXT%></Label><BR>
  120. <INPUT CLASS="clsTextBox" TYPE=TEXT id="txtEmail" NAME=EMail MAXLENGTH=128 SIZE=32 VALUE="<%=Server.HTMLEncode(rEMail)%>" ID="Text2">
  121. </P>
  122. <P CLASS="clsPBody">
  123. <Label for=txtPhone><%=L_CERCUST_INPUT_PHONE_TEXT%></Label><BR>
  124. <INPUT CLASS="clsTextBox" TYPE=TEXT id="txtPhone" NAME=Phone MAXLENGTH=16 SIZE=32 VALUE="<%=Server.HTMLEncode(rPhone)%>" ID="Text3">
  125. </P>
  126. <P CLASS="clsPSubTitle">
  127. <%=L_CERCUST_TRANS_HEAD_TEXT%>
  128. </P>
  129. <P CLASS="clsPBody">
  130. <%=L_CERCUST_TRANS_INFO_TEXT%>
  131. </P>
  132. <P CLASS="clsPBody">
  133. <Label for=txtDescription><%=L_CERCUST_INPUT_TRANS_TEXT%></Label><BR>
  134. <INPUT CLASS="clsTextBox" TYPE=TEXT id=txtDescription NAME=Description MAXLENGTH=64 SIZE=32 ID="Text4">
  135. </P>
  136. <BR><BR>
  137. <P CLASS="clsPBody">
  138. <a class="clsALink" HREF="/cerintro.asp"><%=L_CERCUST_CAN_CEL_LINK%></a>
  139. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  140. <a class="clsALink" HREF="/cerpriv.asp"><%=L_LOCATE_PREVIOUS_LINK_TEXT%></a>
  141. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  142. <a class="clsALink" HREF="" onClick="GoForm(); return false;"><%=L_CERCUST_CON_TINUE_LINK%></a>
  143. </P>
  144. <BR><BR>
  145. </FORM>
  146. </div>
  147. <% Else %>
  148. <br><br><div class='clsDiv'>
  149. <P CLASS="clsPTitle">
  150. <%=L_CERCUST_PASSPORT_TITLE_TEXT%>
  151. </P>
  152. <P CLASS="clsPBody">
  153. <%=L_CERCUST_PASS_PORT_TEXT%>&nbsp;<A CLASS="clsALinkNormal" HREF="<%=L_FAQ_PASSPORT_LINK_TEXT%>"><%=L_WELCOME_PASSPORT_LINK_TEXT%>
  154. <BR><BR>
  155. <%=oPassMgrObj.LogoTag2(Server.URLEncode(ThisPageURL),TimeWindow,ForceLogin,CoBrandArgs,strLCID,Secure)%>
  156. </P>
  157. </div>
  158. <% End If %>
  159. <!-- #INCLUDE VIRTUAL = "include/asp/foot.asp" -->
  160. <%
  161. Call CDestroyObjects
  162. %>