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.

124 lines
4.4 KiB

  1. <%@Language='JScript' CODEPAGE=1252%>
  2. <!--METADATA TYPE="TypeLib" File="C:\Program Files\Common Files\System\ADO\msado15.dll"-->
  3. <!-- #INCLUDE file='../include/SiteLang.asp' -->
  4. <!--#INCLUDE file="../../include/Constants.asp" -->
  5. <!--#INCLUDE file="../../include/dbutil.asp" -->
  6. <!--#INCLUDE file="../../include/DataUtil.asp" -->
  7. <!-- #INCLUDE file="../../include/ServerUtil.asp" -->
  8. <%
  9. //Verify that were coming in from the track page page, if not, redirect to the welcome page
  10. var regCheckFromResponse = /track\.asp/gi
  11. if ( !regCheckFromResponse.test( Request.ServerVariables("HTTP_REFERER") ) )
  12. Response.Redirect( "http://" + g_ThisServer + "/welcome.asp" )
  13. try
  14. {
  15. var objPassportManager = Server.CreateObject("Passport.Manager");
  16. if ( objPassportManager.IsAuthenticated() || objPassportManager.HasTicket )
  17. {
  18. var ppMemberHighID = new String( objPassportManager.Profile("MemberIDHigh" ));
  19. var ppMemberLowID = new String ( objPassportManager.Profile("MemberIDLow" ) );
  20. var ppCustomerEmail = new String( objPassportManager.Profile( "PreferredEmail" ));
  21. var ppCustomerLang = new String( objPassportManager.Profile( "Lang_Preference" ));
  22. var ppMemberID = "0x" + fnHex( ppMemberHighID ) + fnHex( ppMemberLowID );
  23. }
  24. else
  25. {
  26. fnWriteCookie( "PPIN", "" )
  27. Response.Redirect ( "https://" + g_ThisServer + "/secure/Track.asp" )
  28. Response.End()
  29. }
  30. }
  31. catch ( err )
  32. {
  33. //If we can't get the passport ID then were in bad shape,
  34. //we can send them back to the response page and they can try again
  35. Response.Redirect ( "http://" + g_ThisServer + "/Response.asp" )
  36. }
  37. var GUID = new String( fnGetCookie( "GUID" ) );
  38. var szDescription = Request.Form( "tbDescription" );
  39. var State = new Number( fnGetCookie( "State" ) );
  40. var SolutionID = new Number( fnGetCookie( "SID" ) );
  41. //If they get here without a guid, they shouldn't be here . . .
  42. if ( GUID == "undefined" || GUID == "" )
  43. {
  44. Response.Redirect( "http://" + g_ThisServer + "/welcome.asp" )
  45. fnClearCookies();
  46. }
  47. //Clean up and check the email address
  48. ppCustomerEmail = fnTrim( ppCustomerEmail );
  49. ppCustomerEmail = fnMakeDBText( ppCustomerEmail ); //just in case.
  50. szDescription = fnMakeDBText ( szDescription )
  51. var rsCustomerID = "";
  52. try
  53. {
  54. var cnCustomerDB = GetDBConnection( Application("L_OCA3_CUSTOMERDB_RW" ) );
  55. var spQuery = "OCAV3_SetUserData " + ppMemberID + ",'" + fnGetBrowserLang() + "','" + ppCustomerEmail + "','" + GUID + "',N'" + szDescription + "'"
  56. var rsCustomerID = cnCustomerDB.Execute( spQuery );
  57. var nCustomerID = new String( rsCustomerID ("CustomerID") )
  58. cnCustomerDB.Close();
  59. if ( ERR_CRASHDB_NO_GUID == nCustomerID )
  60. {
  61. //TODO: This case we might want to do a retry attempt, just in case
  62. // the crash data hasn't made it to the crashdb yet.
  63. //fnWriteCookie( "SID", ERR_CRASHDB_NO_GUID );
  64. fnWriteCookie( "State", STATE_UNABLE_TO_TRACK );
  65. fnWriteCookie( "GUID", "" );
  66. Response.Redirect ( "http://" + g_ThisServer + "/Response.asp?C=-2&SID=" + SolutionID );
  67. }
  68. else if ( ERR_DUPLICATE_GUID == nCustomerID )
  69. {
  70. //fnWriteCookie( "SID", ERR_DUPLICATE_GUID );
  71. fnWriteCookie( "State", STATE_UNABLE_TO_TRACK );
  72. fnWriteCookie( "GUID", "" );
  73. Response.Redirect ( "http://" + g_ThisServer + "/Response.asp?C=-1&SID=" + SolutionID );
  74. /*TODO: debug code, remove it!
  75. Response.Write("<BR><BR>Should fail silent: For testing only Trying to submit a dupe:<BR> <h2>This is debug code, take it out!!!</h2><BR>")
  76. Response.Write("<BR>" )
  77. DumpCookies();
  78. Response.Write("Query: " + spQuery + "<BR>" );
  79. Response.Write("<BR>If you don't believe me, run this query: <BR>select * from incident where guid = '" + GUID + "'" )
  80. Response.Write("<BR><BR><A HREF='javascript:history.back()'>Back to Track</A>" )
  81. */
  82. }
  83. else
  84. {
  85. fnClearCookies();
  86. //fnWriteCookie( "CID", String( nCustomerID ) );
  87. Response.Redirect( "Status.asp" );
  88. }
  89. }
  90. catch ( err )
  91. {
  92. //Response.Write("<h1>This is the fallover in the exception handling for this page.</h1>" )
  93. //DumpCookies();
  94. //Response.Write ("<BR> Description: " + err.description );
  95. //throw ( err )
  96. //fnWriteCookie( "SID", L_UNABLETOTRACKSOLUTIONID_TEXT );
  97. fnWriteCookie( "State", STATE_UNABLE_TO_TRACK );
  98. Response.Redirect ( "http://" + g_ThisServer + "/Response.asp?C=-3&SID=" + SolutionID );
  99. }
  100. %>