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
2.6 KiB

  1. <% '==================================================
  2. ' Module: ots_task.asp
  3. '
  4. ' Synopsis: Object Task Selector Task Formatting Functions
  5. '
  6. ' Copyright (c) Microsoft Corporation. All rights reserved.
  7. '================================================== %>
  8. <%
  9. '
  10. ' --------------------------------------------------------------
  11. ' T A S K O B J E C T
  12. ' --------------------------------------------------------------
  13. '
  14. Const OTS_TASK_DIM = 5
  15. Const OTS_TASK_TASK = 0
  16. Const OTS_TASK_DESC = 1
  17. Const OTS_TASK_LINK = 2
  18. Const OTS_TASK_PAGE_TYPE = 3
  19. Const OTS_TASK_FUNCTION = 4
  20. '
  21. ' Task Page types
  22. '
  23. Const OTS_PAGE_TYPE_NEW_PAGE = 0
  24. Const OTS_PT_NEW_WINDOW = 0
  25. Const OTS_PAGE_TYPE_STANDARD_PAGE = 1
  26. Const OTS_PT_AREA = 1
  27. Const OTS_PAGE_TYPE_SIMPLE_PROPERTY = 2
  28. Const OTS_PT_PROPERTY = 2
  29. Const OTS_PAGE_TYPE_TABBED_PROPERTY = 3
  30. Const OTS_PT_TABBED_PROPERTY = 3
  31. Const OTS_PAGE_TYPE_WIZARD_PROPERTY = 4
  32. Const OTS_PT_WIZARD = 4
  33. Const OTS_PAGE_TYPE_RAW = 5
  34. Const OTS_PT_RAW = 5
  35. ' --------------------------------------------------------------
  36. '
  37. ' Function: OTS_CreateTaskEx
  38. '
  39. ' Synopsis: Create a new task
  40. '
  41. ' Arguments: [in] Task text
  42. ' [in] Description of what the task contains
  43. ' [in] Task link
  44. ' [in] Page Type
  45. ' [in] Task Function
  46. '
  47. ' Returns: The Table object
  48. '
  49. ' --------------------------------------------------------------
  50. Public Function OTS_CreateTaskEx(ByVal Task, ByVal TaskDescription, ByVal TaskHLink, ByVal PageType, ByVal TaskFn)
  51. Dim TaskItem()
  52. ReDim TaskItem(OTS_TASK_DIM)
  53. SA_ClearError()
  54. TaskItem(OTS_TASK_TASK) = Task
  55. TaskItem(OTS_TASK_DESC) = TaskDescription
  56. TaskItem(OTS_TASK_LINK) = TaskHLink
  57. TaskItem(OTS_TASK_PAGE_TYPE) = PageType
  58. TaskItem(OTS_TASK_FUNCTION) = TaskFn
  59. OTS_CreateTaskEx = TaskItem
  60. End Function
  61. Public Function OTS_CreateTask(ByVal Task, ByVal TaskDescription, ByVal TaskHLink, ByVal PageType)
  62. OTS_CreateTask = OTS_CreateTaskEx(Task, TaskDescription, TaskHLink, PageType, "OTS_TaskAlways")
  63. End Function
  64. ' --------------------------------------------------------------
  65. '
  66. ' Function: OTS_IsValidTask
  67. '
  68. ' Synopsis: Check to see if the supplied object is a valid task
  69. ' object
  70. '
  71. ' Arguments: [in] Task text
  72. '
  73. ' Returns: True if Task is valid, false otherwise.
  74. '
  75. ' --------------------------------------------------------------
  76. Public Function OTS_IsValidTask(ByRef Task)
  77. OTS_IsValidTask = false
  78. If (IsArray(Task)) Then
  79. If (UBound(Task) = OTS_TASK_DIM) Then
  80. OTS_IsValidTask = true
  81. End If
  82. End If
  83. End Function
  84. %>