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.

648 lines
22 KiB

  1. <% '==================================================
  2. ' Microsoft Server Appliance
  3. '
  4. ' sh_tasks - Implementation details for Tasks
  5. '
  6. ' Copyright (c) Microsoft Corporation. All rights reserved.
  7. '================================================== %>
  8. <!-- Copyright (c) Microsoft Corporation. All rights reserved.-->
  9. <%
  10. 'Constants that are used in CreateColumnHTML
  11. Const ONE_COLUMN = 1
  12. Const TWO_COLUMNS = 2
  13. Const MAX_COLUMNS = 3
  14. Const TASK_ONE_LEVEL = 0
  15. Const TASK_TWO_LEVEL = 1
  16. Const TASK_MANY_LEVEL = 2
  17. Const TASK_RELATED_LEVEL = 3
  18. Const EMBEDDED_PAGE = "FRAMESET"
  19. Dim g_sMultiTab
  20. Dim g_sMultiTabContainer
  21. Dim g_sReturnURL
  22. '----------------------------------------------------------------------------
  23. '
  24. ' Function : ServeTasks
  25. '
  26. ' Synopsis : Serves the task links
  27. '
  28. ' Arguments: None
  29. '
  30. ' Returns : None
  31. '
  32. '----------------------------------------------------------------------------
  33. Public Function ServeTasks
  34. Dim dwTaskType
  35. Dim strContainer
  36. Dim strContainerItem
  37. Dim strTabsParam
  38. If Len(Trim(Request.QueryString("MultiTab"))) > 0 Then
  39. strContainer = Request.QueryString("MultiTab")
  40. g_sMultiTab = strContainer
  41. strContainerItem = Request.QueryString("Container")
  42. g_sMultiTabContainer = strContainerItem
  43. strTabsParam = "Tab1=" & GetTab1()
  44. If ( Len(Trim(GetTab2())) > 0 ) Then
  45. strTabsParam = strTabsParam & "&Tab2=" & GetTab2()
  46. End If
  47. dwTaskType = TASK_MANY_LEVEL
  48. Else
  49. strContainer = "TABS"
  50. strContainerItem = GetTab1()
  51. strTabsParam = ""
  52. If ( UCase("TabHome") = UCase(Request.QueryString("HOME")) ) Then
  53. dwTaskType = TASK_ONE_LEVEL
  54. Else
  55. dwTaskType = TASK_TWO_LEVEL
  56. End If
  57. End If
  58. g_sReturnURL = Request.QueryString("ReturnURL")
  59. Call SA_ServeTasks(strContainer, strContainerItem, dwTaskType, strTabsParam )
  60. If Len(Trim(g_sReturnURL)) > 0 Then
  61. Call SA_ServeBackButton(True, g_sReturnURL)
  62. End If
  63. End Function
  64. Private Function IsHomeTask(ByVal dwTaskTYpe )
  65. If ( dwTaskType = TASK_ONE_LEVEL ) Then
  66. IsHomeTask = TRUE
  67. Else
  68. IsHomeTask = FALSE
  69. End If
  70. End Function
  71. Private Function IsRelatedTask(ByVal dwTaskTYpe )
  72. If ( dwTaskType = TASK_RELATED_LEVEL) Then
  73. IsRelatedTask = TRUE
  74. Else
  75. IsRelatedTask = FALSE
  76. End If
  77. End Function
  78. Public Function SA_ServeTasks(ByVal strContainerIn, ByVal strSelectedIDIn, ByVal dwTaskType, ByVal strTabParams )
  79. on error resume next
  80. Err.Clear
  81. Dim colTabs
  82. ' the selected tab of interest
  83. Dim sSelectedID
  84. sSelectedID = strSelectedIDIn
  85. ' the element we're currently at
  86. Dim sElementID
  87. ' the IWebElement object
  88. Dim objElement
  89. ' the secondLevelContainer
  90. Dim sContainer
  91. Dim sDescriptionText
  92. Dim sCaptionText
  93. Dim sElementGraphic
  94. Dim sLongDescriptionText
  95. sContainer = ""
  96. ' go through each element and output the tab link for them
  97. Set colTabs = GetElements(strContainerIn)
  98. For Each objElement In colTabs
  99. sElementID = objElement.GetProperty("ElementID")
  100. If IsSameElementID(sElementID, sSelectedID) Then
  101. If ( Len(objElement.GetProperty("DescriptionRID")) > 0 ) Then
  102. sDescriptionText = GetLocalized(objElement.GetProperty("Source"), objElement.GetProperty("DescriptionRID"))
  103. Else
  104. sDescriptionText = ""
  105. End If
  106. If ( Len(objElement.GetProperty("LongDescriptionRID")) > 0 ) Then
  107. sLongDescriptionText = GetLocalized(objElement.GetProperty("Source"), objElement.GetProperty("LongDescriptionRID"))
  108. Else
  109. sLongDescriptionText = ""
  110. End If
  111. sCaptionText = GetLocalized(objElement.GetProperty("Source"), objElement.GetProperty("CaptionRID"))
  112. If ( Err.Number <> 0 ) Then
  113. SA_TraceOut "SA_TASKS", "Invalid/Missing CaptionRID for ElementID: " + sElementID
  114. End If
  115. Call GetBigGraphic( objElement, sElementGraphic, dwTaskType )
  116. Exit For
  117. End If
  118. Next ' objElement
  119. Set colTabs = Nothing
  120. rw("<blockquote>")
  121. rw("<div class=TasksPageTitleText >" & sCaptionText & "</div>")
  122. rw("<div class=TasksPageTitleDescription >" & sLongDescriptionText & "</div><br>")
  123. 'Check to see if the selectedID is a home page.
  124. If ( IsHomeTask(dwTaskType) ) Then
  125. Call ServeColumns( "TABS", False, sElementGraphic, dwTaskType, strTabParams )
  126. Else
  127. Call ServeColumns( sElementID, False, sElementGraphic, dwTaskType, strTabParams )
  128. End If
  129. Call ServeColumns( sElementID&"_RelatedLinks", True, "" , TASK_RELATED_LEVEL, strTabParams )
  130. rw("</blockquote>")
  131. End Function
  132. '----------------------------------------------------------------------------
  133. '
  134. ' Function : ServeColumns
  135. '
  136. ' Synopsis : Generates HTML columns.
  137. '
  138. ' Arguments: strItem(IN) - if strItem is "TABS", it'll display home page with all the TABS
  139. ' - if strItem is "TASKS", it'll display all the tasks in columns.
  140. ' - if strItem is "DISKS_RELATEDLINKS", it'll display all the related links.
  141. ' bInRelated(IN) - True, if this is a table that has related links
  142. ' - False, if this is a table that is rendered for tasks.
  143. ' strElementGraphic(IN) - resource dll for each tab string (array)
  144. ' bInWelcome(IN) - True if we are rendering Welcome page, False otherwise.
  145. '
  146. ' Returns : None
  147. '
  148. '----------------------------------------------------------------------------
  149. Sub ServeColumns( strItem, blnRelated, strElementGraphic, dwTaskType, strTabParams )
  150. On Error Resume Next
  151. Err.Clear
  152. Dim objElements, objItem
  153. Dim intRowCount
  154. Dim strArrTasksImage
  155. Dim strArrTasksCaption
  156. Dim strArrTasksHover
  157. Dim strArrTasksDesc
  158. Dim strArrTasksURL
  159. Dim strArrSource
  160. Dim bArrIsEmbedded
  161. Dim strArrTaskPageType
  162. Dim strArrTaskPageWindowFeatures
  163. Dim intElementCount
  164. Dim sReturnURL
  165. Dim bSmallIcon
  166. Dim i
  167. Dim j
  168. ' the big image on the left side when a tab is selected.
  169. Dim bBigIcon
  170. intElementCount = 0
  171. i = 0
  172. j = 0
  173. Set objElements = GetElements( strItem )
  174. intElementCount = objElements.Count
  175. ReDim strArrTasksImage( intElementCount )
  176. ReDim strArrTasksCaption( intElementCount )
  177. ReDim strArrTasksHover( intElementCount )
  178. ReDim strArrTasksDesc( intElementCount )
  179. ReDim strArrTasksURL( intElementCount )
  180. ReDim strArrSource( intElementCount )
  181. ReDim bArrIsEmbedded( intElementCount )
  182. ReDim strArrTaskPageType( intElementCount )
  183. ReDim strArrTaskPageWindowFeatures( intElementCount )
  184. If strElementGraphic = "" Then
  185. bBigIcon = False
  186. Else
  187. bBigIcon = True
  188. End If
  189. For Each objItem in objElements
  190. 'SA_TraceOut "SA_TASKS", "ServeColumns elementID: " + objItem.GetProperty("ElementID")
  191. strArrTaskPageType(i) = objItem.GetProperty("PageType")
  192. strArrTaskPageWindowFeatures(i) = objItem.GetProperty("WindowFeatures")
  193. j = j + 1
  194. bArrIsEmbedded(i) = false
  195. If objItem.GetProperty("IsEmbedded") = 1 Then
  196. bArrIsEmbedded(i) = true
  197. Else
  198. Dim sPageType
  199. sPageType = objItem.GetProperty("PageType")
  200. If ( UCase(sPageType) = EMBEDDED_PAGE ) Then
  201. bArrIsEmbedded(i) = true
  202. End If
  203. End If
  204. If ( Len(objItem.GetProperty("LongDescriptionRID")) > 0 ) Then
  205. strArrTasksHover(i) = GetLocalized(objItem.GetProperty("Source"), objItem.GetProperty("LongDescriptionRID"))
  206. Else
  207. strArrTasksHover(i) = ""
  208. End If
  209. If (Not IsHomeTask(dwTaskType)) Or ( objItem.GetProperty("ElementID") <> Request.QueryString("HOME") ) Then
  210. strArrSource( i ) = objItem.GetProperty("Source")
  211. Call GetSmallGraphic(objItem, strArrTasksImage(i) )
  212. If IsRawURLPage(sPageType) Then
  213. strArrTasksURL(i) = objItem.GetProperty("URL")
  214. Else
  215. Select Case (dwTaskType)
  216. Case TASK_ONE_LEVEL
  217. strArrTasksURL(i) = objItem.GetProperty("URL")
  218. Call SA_MungeURL(strArrTasksURL(i), "Tab1", objItem.GetProperty("ElementID"))
  219. Case TASK_TWO_LEVEL
  220. strArrTasksURL(i) = objItem.GetProperty("URL")
  221. If (strArrTasksURL(i) <> "") Then
  222. Call SA_MungeURL(strArrTasksURL(i), "Tab1", GetTab1())
  223. Call SA_MungeURL(strArrTasksURL(i), "Tab2", objItem.GetProperty("ElementID"))
  224. If ( true = bArrIsEmbedded(i) ) Then
  225. 'sReturnURL = m_VirtualRoot + "tasks.asp"
  226. Else
  227. If Len(g_sReturnURL) > 0 Then
  228. Call SA_MungeURL(strArrTasksURL(i), "ReturnURL", g_sReturnURL)
  229. Else
  230. sReturnURL = "tasks.asp"
  231. Call SA_MungeURL(sReturnURL, "Tab1", GetTab1())
  232. Call SA_MungeURL(sReturnURL, SAI_FLD_PAGEKEY, SAI_GetPageKey())
  233. 'Call SA_MungeURL(sReturnURL, "Tab2", objItem.GetProperty("ElementID"))
  234. Call SA_MungeURL(strArrTasksURL(i), "ReturnURL", sReturnURL)
  235. End If
  236. End If
  237. End If
  238. Case TASK_MANY_LEVEL
  239. strArrTasksURL(i) = objItem.GetProperty("URL")
  240. If (strArrTasksURL(i) <> "") Then
  241. If InStr(strArrTasksURL(i), "?") Then
  242. strArrTasksURL(i) = strArrTasksURL(i) + "&"+ strTabParams
  243. If ( true = bArrIsEmbedded(i) ) Then
  244. 'sReturnURL = m_VirtualRoot + "tasks.asp"
  245. Else
  246. sReturnURL = "tasks.asp"
  247. Call SA_MungeURL(sReturnURL, "MultiTab", g_sMultiTab)
  248. Call SA_MungeURL(sReturnURL, "Container", g_sMultiTabContainer)
  249. Call SA_MungeURL(sReturnURL, "Tab1", GetTab1())
  250. Call SA_MungeURL(sReturnURL, "Tab2", GetTab2())
  251. Call SA_MungeURL(sReturnURL, "ReturnURL", g_sReturnURL)
  252. Call SA_MungeURL(sReturnURL, SAI_FLD_PAGEKEY, SAI_GetPageKey())
  253. Call SA_MungeURL(strArrTasksURL(i), "ReturnURL", sReturnURL)
  254. End If
  255. Else
  256. strArrTasksURL(i) = strArrTasksURL(i) + "?"+ strTabParams
  257. If ( true = bArrIsEmbedded(i) ) Then
  258. 'sReturnURL = m_VirtualRoot + "tasks.asp"
  259. Else
  260. sReturnURL = "tasks.asp"
  261. Call SA_MungeURL(sReturnURL, "MultiTab", g_sMultiTab)
  262. Call SA_MungeURL(sReturnURL, "Container", g_sMultiTabContainer)
  263. Call SA_MungeURL(sReturnURL, "Tab1", GetTab1())
  264. Call SA_MungeURL(sReturnURL, "Tab2", GetTab2())
  265. Call SA_MungeURL(sReturnURL, "ReturnURL", g_sReturnURL)
  266. Call SA_MungeURL(sReturnURL, SAI_FLD_PAGEKEY, SAI_GetPageKey())
  267. Call SA_MungeURL(strArrTasksURL(i), "ReturnURL", sReturnURL)
  268. End If
  269. End If
  270. End If
  271. Case TASK_RELATED_LEVEL
  272. strArrTasksURL(i) = objItem.GetProperty("URL")
  273. Case Else
  274. SA_TraceOut "SA_TASKS", "Unrecognized Task Option: " +CStr(dwTaskType)
  275. strArrTasksURL(i) = objItem.GetProperty("URL")
  276. End Select
  277. End If
  278. If (0 = InStr(1, strArrTasksURL(i), ":")) Then
  279. Call SA_MungeURL(strArrTasksURL(i), SAI_FLD_PAGEKEY, SAI_GetPageKey())
  280. End If
  281. strArrTasksCaption(i) = GetLocalized( strArrSource(i), objItem.GetProperty("CaptionRID") )
  282. If ( Len(objItem.GetProperty("DescriptionRID")) > 0 ) Then
  283. strArrTasksDesc(i) = GetLocalized( strArrSource(i), objItem.GetProperty("DescriptionRID") )
  284. Else
  285. strArrTasksDesc(i) = ""
  286. End If
  287. i = i + 1
  288. Else
  289. intElementCount = intElementCount - 1
  290. Call GetSmallGraphic(objItem, strArrTasksImage(i) )
  291. End If
  292. Next
  293. 'Check if atleast one icon is represented,
  294. bSmallIcon = CheckIfAtleastOneIconPresent( strArrTasksImage, intElementCount )
  295. If Not IsRelatedTask(dwTaskType) Then
  296. If strElementGraphic = "" Then
  297. rw ("<TABLE class=""TasksPageBodyTable"" WIDTH=""90%"" CELLPADDING=""10"" CELLSPACING=""0"" BORDER=""0""><TR> " )
  298. Call CreateColumnHTML( intElementCount, strArrTasksImage, strArrTasksCaption, strArrTasksDesc, strArrTasksURL, strArrTasksHover, bArrIsEmbedded, bSmallIcon, bBigIcon, strArrTaskPageType, strArrTaskPageWindowFeatures )
  299. rw ("</TABLE>")
  300. Else
  301. rw ("<TABLE WIDTH=""90%"" CELLPADDING=""0"" CELLSPACING=""0"" BORDER=""0"" >" )
  302. 'rw ("<TR><TD ROWSPAN=4 valign=""top""><img src=""" & strElementGraphic & """></TD>")
  303. rw ("<TR><TD width=220px valign=""top""><img src=""" & strElementGraphic & """></TD><td valign=top>")
  304. rw ("<TABLE class=""TasksPageBodyTable"" WIDTH=""100%"" CELLPADDING=""10"" CELLSPACING=""0"" BORDER=""0"" >" )
  305. Call CreateColumnHTML( intElementCount, strArrTasksImage, strArrTasksCaption, strArrTasksDesc, strArrTasksURL, strArrTasksHover, bArrIsEmbedded, bSmallIcon, bBigIcon, strArrTaskPageType, strArrTaskPageWindowFeatures )
  306. rw ("</tr></table></TD></TR></TABLE>")
  307. End If
  308. ElseIf (intElementCount > 0) Then
  309. rw("<br><div class=TasksPageLinkText>Related Links</div>")
  310. rw ("<TABLE WIDTH=""90%"" CELLPADDING=""0"" CELLSPACING=""0"" BORDER=""1""><TR> " )
  311. Call CreateColumnHTML( intElementCount, strArrTasksImage, strArrTasksCaption, strArrTasksDesc, strArrTasksURL, strArrTasksHover, bArrIsEmbedded, bSmallIcon, bBigIcon, strArrTaskPageType, strArrTaskPageWindowFeatures )
  312. rw ("</TD></TR></TABLE>")
  313. End If
  314. End Sub
  315. '----------------------------------------------------------------------------
  316. '
  317. ' Function : CheckIfAtleastOneIconPresent
  318. '
  319. ' Synopsis : Checks if we need to allocate a column for small Icons with the tasks or related links table.
  320. '
  321. ' Arguments: strArrTasksImage(IN) - resource dll for each tab string (array)
  322. ' intNumTasks(IN) - Number of items in the above array.
  323. '
  324. '
  325. ' Returns : None
  326. '
  327. '----------------------------------------------------------------------------
  328. Function CheckIfAtleastOneIconPresent( strArrTasksImage, intNumTasks)
  329. Dim bIcon
  330. Dim intElCount
  331. bIcon = False
  332. 'Check if there is atleast one icon
  333. For intElCount = 0 to intNumTasks-1
  334. If strArrTasksImage(intElCount) <> "" Then
  335. bIcon = True
  336. Exit For
  337. End If
  338. Next
  339. CheckIfAtleastOneIconPresent=bIcon
  340. End Function
  341. '----------------------------------------------------------------------------
  342. '
  343. ' Function : CreateColumnHTML
  344. '
  345. ' Synopsis : Generates HTML to display the Items.
  346. '
  347. ' Arguments: intNumTasks(IN) - number of Tasks to be displayed
  348. ' strArrTasksImage(IN) - resource dll for each tab string (array)
  349. ' strArrTasksCaption(IN) - text on task (array)
  350. ' strArrTasksDesc(IN) - Description for each task(array)
  351. ' strArrTasksURL(IN) - URL for each task ( array )
  352. ' bArrIsEmbedded(IN) - if URL is embedded, use OpenPage() to link to it
  353. ' bSmallIcon - True if there is atleast one image so
  354. ' we can allocate a column for small images, otherwise false.
  355. ' bBigIcon - True if the big image exists that is to be displayed on the left col
  356. ' otherwise false.
  357. '
  358. '
  359. ' Returns : None
  360. '
  361. '----------------------------------------------------------------------------
  362. Sub CreateColumnHTML(intNumTasks, strArrTasksImage, strArrTasksCaption, strArrTasksDesc, strArrTasksURL, strArrTasksHover, bArrIsEmbedded, bSmallIcon, bBigIcon, strArrTaskPageType, strArrTaskPageWindowFeatures )
  363. Dim i
  364. 'URL of the web element
  365. Dim strURL
  366. ' Number of columns
  367. Dim intCols
  368. Dim intWidth
  369. Dim sLongDescriptionText
  370. Dim sTaskTitle
  371. If ( intNumTasks < 4 ) Then
  372. intCols = ONE_COLUMN
  373. intWidth=100
  374. Elseif (intNumTasks <= 6) Then
  375. intCols = TWO_COLUMNS
  376. intWidth=50
  377. Else
  378. ' Since the small icon takes a col, we need to subtract 1 from max cols.
  379. If bBigIcon Then
  380. intCols = MAX_COLUMNS - 1
  381. intWidth=50
  382. Else
  383. intCols = MAX_COLUMNS
  384. intWidth=33
  385. End If
  386. End If
  387. For i = 0 to intNumTasks-1
  388. sLongDescriptionText = strArrTasksHover(i)
  389. ' Close the row and open a new row
  390. If ( i<>0 And i mod intCols = 0 ) Then
  391. rw ("</tr><tr valign=top>")
  392. End If
  393. 'If atleast one icon is represented show the image column otherwise skip this column
  394. sTaskTitle = strArrTasksCaption(i)
  395. If bSmallIcon Then
  396. If bArrIsEmbedded(i) Then
  397. strURL = "javascript:OpenPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', location.href, '" & SA_EncodeQuotes(sTaskTitle) & "');"
  398. ElseIf ( Len(Trim(strArrTaskPageType(i))) > 0 ) Then
  399. Select Case UCase(Trim(strArrTaskPageType(i)))
  400. Case "NORMAL"
  401. strURL = "javascript:OpenNormalPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "');"
  402. Case "FRAMESET"
  403. strURL = "javascript:OpenPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', location.href, '" & SA_EncodeQuotes(sTaskTitle) & "');"
  404. Case "NEW"
  405. strURL = "javascript:OpenNewPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', '" & strArrTaskPageWindowFeatures(i) & "');"
  406. Case "RAW"
  407. strURL = "javascript:OpenRawPageEx('" & strArrTasksURL(i) & "', '" & strArrTaskPageWindowFeatures(i) & "');"
  408. Case Else
  409. SA_TraceOut "SH_TASKS", "Invalid Task PageType: " + strArrTaskPageType(i)
  410. strURL = strArrTasksURL(i)
  411. End Select
  412. Else
  413. strURL = "javascript:OpenNormalPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "');"
  414. End If
  415. If strArrTasksImage(i) <> "" And strArrTasksURL(i) <> "" Then
  416. strURL = " onClick=""" + strURL + """ "
  417. Response.Write("<TD WIDTH=20 valign=top>"+vbCrLf)
  418. Response.Write("<SPAN ID='TaskItemImage_"+CStr(i)+"' "+vbCrLf)
  419. Response.Write( strURL + vbCrLf )
  420. Response.Write(" title="""+Server.HTMLEncode(sLongDescriptionText)+""" ")
  421. Response.Write(" class='TasksPageLinkText' ")
  422. Response.Write(" onmouseover=""this.className='TasksPageLinkTextHover'; return true;"" ")
  423. Response.Write(" onmouseout=""this.className='TasksPageLinkText'; return true;"" ")
  424. Response.Write(" >")
  425. Response.Write("<IMG SRC=" & strArrTasksImage(i))
  426. Response.Write(" BORDER=""0"" ></TD>" +vbCrLf)
  427. Response.Write("</SPAN>"+vbCrLf)
  428. Response.Write("</TD>"+vbCrLf)
  429. Else
  430. rw ( "<TD valign=""top"">")
  431. Response.Write("<SPAN ID='TaskItemImage_"+CStr(i)+"'>"+vbCrLf)
  432. Response.Write("</SPAN>"+vbCrLf)
  433. rw ( "</TD>")
  434. End If
  435. End If
  436. ' If the URL is not empty then the task is clickable otherwise using a DIV tag
  437. sTaskTitle = strArrTasksCaption(i)
  438. If (strArrTasksURL(i) <> "") Then
  439. If bArrIsEmbedded(i) Then
  440. strURL = "javascript:OpenPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', location.href, '" & SA_EncodeQuotes(sTaskTitle) & "');"
  441. strURL = " onClick=""" + strURL + """ "
  442. ElseIf ( Len(Trim(strArrTaskPageType(i))) > 0 ) Then
  443. Select Case UCase(Trim(strArrTaskPageType(i)))
  444. Case "NORMAL"
  445. strURL = "javascript:OpenNormalPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "');"
  446. Case "FRAMESET"
  447. strURL = "javascript:OpenPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', location.href, '" & SA_EncodeQuotes(sTaskTitle) & "');"
  448. Case "NEW"
  449. strURL = "javascript:OpenNewPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "', '" & strArrTaskPageWindowFeatures(i) & "');"
  450. Case "RAW"
  451. strURL = "javascript:OpenRawPageEx('" & strArrTasksURL(i) & "', '" & strArrTaskPageWindowFeatures(i) & "');"
  452. Case Else
  453. SA_TraceOut "SH_TASKS", "Invalid Task PageType: " + strArrTaskPageType(i)
  454. strURL = strArrTasksURL(i)
  455. End Select
  456. strURL = " onClick=""" + strURL + """ "
  457. Else
  458. strURL = "javascript:OpenNormalPage('" & m_VirtualRoot & "', '" & strArrTasksURL(i) & "');"
  459. strURL = " onClick=""" + strURL + """ "
  460. End If
  461. Response.Write("<TD valign=top width='" + CStr(intWidth) + "%'>"+vbCrLf)
  462. Response.Write("<SPAN ID='TaskItemText_"+CStr(i)+"' "+vbCrLf)
  463. Response.Write( strURL + vbCrLf )
  464. Response.Write(" title=""" + Server.HTMLEncode(sLongDescriptionText) + """ ")
  465. Response.Write(" class='TasksPageLinkText' ")
  466. Response.Write(" onmouseover=""this.className='TasksPageLinkTextHover'; return true;"" ")
  467. Response.Write(" onmouseout=""this.className='TasksPageLinkText'; return true;"" ")
  468. Response.Write(" >")
  469. Response.Write( strArrTasksCaption(i) )
  470. Response.Write( "<div class=TasksPageText>" & strArrTasksDesc(i) )
  471. Response.Write( "</div></TD>" +vbCrLf )
  472. Response.Write("</SPAN>"+vbCrLf)
  473. Response.Write("</TD>"+vbCrLf)
  474. Else
  475. Response.Write("<TD valign=top width='"+CStr(intWidth)+"%' >"+vbCrLf)
  476. Response.Write("<SPAN ID='TaskItemText_"+CStr(i)+"' "+vbCrLf)
  477. rw ( " title="""+Server.HTMLEncode(sLongDescriptionText)+""" > " & "<div class=TasksPageLinkText>" &strArrTasksCaption(i) & "</div><div class=TasksPageText>" & strArrTasksDesc(i) & "</div>" )
  478. Response.Write("</SPAN>"+vbCrLf)
  479. Response.Write("</TD>"+vbCrLf)
  480. End If
  481. Next
  482. End Sub
  483. Function GetBigGraphic(ByRef objElement, ByRef strGraphicElement, dwTaskType )
  484. Err.Clear
  485. on error resume next
  486. dim strURL
  487. strURL=objElement.GetProperty("URL")
  488. If ( IsObject(objElement)) Then
  489. strGraphicElement = objElement.GetProperty("BigGraphic")
  490. ' Show the small graphic for two level tabs only
  491. If Err.Number <> 0 Or Instr( 1, strURL, "MultiTab",0 ) > 0 And dwTaskType = TASK_TWO_LEVEL Then
  492. strGraphicElement = objElement.GetProperty("ElementGraphic")
  493. End If
  494. Else
  495. SA_TraceErrorOut "TASKS", "objElement is not an object"
  496. End If
  497. If ( Len(strGraphicElement) > 0 ) Then
  498. strGraphicElement = m_VirtualRoot + strGraphicElement
  499. End If
  500. End Function
  501. Function GetSmallGraphic(ByRef objElement, ByRef strGraphicElement )
  502. Err.Clear
  503. on error resume next
  504. If ( IsObject(objElement)) Then
  505. strGraphicElement = objElement.GetProperty("ElementGraphic")
  506. If (Err.Number<>0) Then
  507. strGraphicElement = ""
  508. End If
  509. Else
  510. SA_TraceErrorOut "TASKS", "objElement is not an object"
  511. End If
  512. If ( Len(strGraphicElement) > 0 ) Then
  513. strGraphicElement = m_VirtualRoot + strGraphicElement
  514. End If
  515. End Function
  516. Function IsRawURLPage(ByVal pageType)
  517. IsRawURLPage = FALSE
  518. If ( UCase(pageType) = "RAW" ) Then
  519. IsRawURLPage = TRUE
  520. End If
  521. End Function
  522. %>