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.

88 lines
2.7 KiB

  1. <%@Language='JScript' CODEPAGE=1252%>
  2. <!--METADATA TYPE="TypeLib" File="C:\Program Files\Common Files\System\ADO\msado15.dll"-->
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift-jis" />
  4. <!-- #INCLUDE file='include/SiteLang.asp' -->
  5. <!-- #INCLUDE file="../include/constants.asp" -->
  6. <!-- #INCLUDE file="../include/DataUtil.asp" -->
  7. <!-- #INCLUDE file="../include/DBUtil.asp" -->
  8. <!-- #INCLUDE File="../include/ServerUtil.asp" -->
  9. <%
  10. //Verify that were coming in from the response page, if not, redirect to the welcome page
  11. var regCheckFromResponse = /response\.asp/gi
  12. if ( !regCheckFromResponse.test( Request.ServerVariables("HTTP_REFERER") ) )
  13. Response.Redirect( "welcome.asp" )
  14. var bUnderstand = new Number( Request.Form( "rUnderstand" ) )
  15. var bHelped = new Number( Request.Form( "rHelped" ) )
  16. var szComments = new String( Request.Form( "taComments" ))
  17. var sSolutionID = new String( Request.Cookies("OCAV3")("SID") )
  18. var bType = new Number( Request.QueryString( "Type" ) )
  19. var Query = false;
  20. //trim additional spaces off the comment
  21. szComments = fnTrim( szComments );
  22. if ( !fnVerifyNumber ( bUnderstand, 0, 1 ) )
  23. bUnderstand = "NULL";
  24. if ( !fnVerifyNumber ( bHelped, 0, 1 ) )
  25. bHelped = "NULL";
  26. if ( szComments.length > 0 || !isNaN( bUnderstand ) || !isNaN( bHelped ) )
  27. {
  28. //This will change all single quotes (') to doubles for insertion into the db.
  29. Response.Write("szComment: " + szComments )
  30. //szComments = fnMakeDBText( szComments );
  31. //Response.End()
  32. if ( fnVerifyNumber( bType, 0, 1 ) )
  33. {
  34. if ( 0 == bType )
  35. {
  36. Query = "OCAV3_SetUserComments " + sSolutionID + "," + bUnderstand + "," + bHelped + ", N'" + szComments + "'";
  37. //set it to a state that is undefined so that it won't display the survey or tacking info
  38. Response.Cookies("OCAV3")("State") = STATE_SOLVED_ADDEDCOMMENT
  39. }
  40. else if ( 1 == bType )
  41. {
  42. Query = "OCAV3_SetUserReproSteps " + sSolutionID + ",N'" + szComments + "'"
  43. //Set the state so we can still track but no repro box
  44. Response.Cookies("OCAV3")("State") = STATE_GENERIC_ADDEDREPRO
  45. }
  46. }
  47. if ( Query )
  48. {
  49. try
  50. {
  51. dbConn = GetDBConnection ( Application("L_OCA3_CUSTOMERDB_RW"), false );
  52. dbConn.execute( Query );
  53. }
  54. catch ( err )
  55. {
  56. //don't really care if it failed, oh well, no comments for this guy.
  57. //throw ( err )
  58. }
  59. if ( adStateOpen == dbConn )
  60. dbConn.close()
  61. }
  62. }
  63. else
  64. {
  65. //we fall through to here if the customer didn't fill out any of the fields.
  66. if ( 0 == bType )
  67. Response.Cookies("OCAV3")("State") = STATE_SOLVED_ADDEDCOMMENT
  68. else if ( 1 == bType )
  69. Response.Cookies("OCAV3")("State") = STATE_GENERIC_ADDEDREPRO
  70. }
  71. Response.Redirect( "Response.asp?SID=" + sSolutionID )
  72. %>