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.

103 lines
3.2 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\resourcestrings.inc"-->
  5. <%
  6. Dim cnResources
  7. Dim rsResources
  8. Dim cmResources
  9. Dim x
  10. Dim lngRecordCount
  11. Dim strCategory
  12. Dim bolPTag
  13. bolPTag = false
  14. set cnResources = CreateObject("ADODB.Connection")'Create Connection Object
  15. set rsResources = CreateObject("ADODB.Recordset")'Create Recordset Object
  16. set cmResources = CreateObject("ADODB.Command")
  17. 'Open Connection object the constants for connections is located in dataconnections.inc file
  18. with cnResources
  19. .ConnectionString = strCustomer
  20. .CursorLocation = adUseClient
  21. .ConnectionTimeout = strGlobalConnectionTimeout
  22. .Open
  23. end with 'Catch errors and display to user
  24. if cnResources.State = adStateClosed then
  25. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  26. Response.Write "<p class='clsPBody'>" & L_COMMENTS_CONNECTION_FAILED_TEXT & "</p></div>"
  27. %>
  28. <!--#include file="include\asp\foot.asp"-->
  29. <%
  30. Response.End
  31. end if
  32. with cmResources
  33. .ActiveConnection = cnResources
  34. .CommandText = "GetResourceLink"
  35. .CommandType = adCmdStoredProc
  36. .CommandTimeout = strGlobalCommandTimeout
  37. .Parameters.Append .CreateParameter("@Lang", adVarWChar, adParamInput, 4, strAbb)
  38. set rsResources = .Execute
  39. end with
  40. if cnResources.Errors.Count > 0 then
  41. Response.Write "<br><div class='divLoad'><p class='clsPTitle'>" & L_COMMENTS_UNABLE_TOCONNECT_ERRORMESSAGE & "</p>"
  42. Response.Write "<p class='clsPBody'>" & L_COMMENTS_DATABASE_FAILED_TEXT & "</p></div>"
  43. %>
  44. <!--#include file="include\asp\foot.asp"-->
  45. <%
  46. Response.End
  47. end if
  48. set rsResources.ActiveConnection = nothing
  49. if cnResources.State = adStateOpen then cnResources.Close
  50. set cnResources = nothing
  51. set cmREsources = nothing
  52. Dim strPreviousPage
  53. strPreviousPage = Request.ServerVariables("SCRIPT_NAME")
  54. strPreviousPage = Right(strPreviousPage, len(strPreviousPage) - Instrrev(strPreviousPage, "/"))
  55. Response.Cookies("Misc")("PreviousPage") = strPreviousPage
  56. %>
  57. <div class="clsDiv">
  58. <p class="clsPTitle">
  59. <% = L_RESOURCESTITLE_TEXT %>
  60. </p>
  61. <%
  62. if rsResources.State = adStateOpen then
  63. if rsResources.RecordCount > 0 then
  64. rsResources.MoveFirst
  65. do while rsResources.EOF = false
  66. if len(strCategory) < 1 or trim(strCategory) <> trim(rsResources("Category")) then
  67. 'if bolPTag then Response.Write "</p>"
  68. strCategory = rsResources("Category")
  69. Response.Write "<p class='clsPSubTitle'>" & rsResources("Category") & "</p>"
  70. bolPTag = false
  71. else
  72. 'Response.Write "<p class='clsPBody'>"
  73. end if
  74. Response.Write "&nbsp;&nbsp;&nbsp;<a class='clsALinkNormal' href='" & rsResources("URL") & "'>" & rsREsources("LinkTitle") & "</a><br>"
  75. 'if trim(strCategory) <> trim(rsResources("Category")) and len(strCategory) > 0 then
  76. bolPTag = true
  77. 'end if
  78. rsResources.MoveNext
  79. loop
  80. end if
  81. end if
  82. %>
  83. </div>
  84. <!--#include file="include\asp\foot.asp"-->
  85. <%
  86. if rsResources.State = adSTateOpen then rsResources.Close
  87. set rsResources = nothing
  88. %>