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.

592 lines
20 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <%
  4. '-------------------------------------------------------------------------
  5. ' quota_volumes.asp: lists the volumes on the system
  6. '
  7. ' Copyright (c) Microsoft Corporation. All rights reserved.
  8. '
  9. ' Date Description
  10. ' 17-Jan-01 Creation date
  11. ' 15-Mar-01 Ported to 2.0
  12. '-------------------------------------------------------------------------
  13. %>
  14. <!-- #include virtual ="/admin/inc_framework.asp" -->
  15. <!-- #include virtual ="/admin/ots_main.asp" -->
  16. <!-- #include file="loc_quotas.asp" -->
  17. <!-- #include file="inc_quotas.asp" -->
  18. <%
  19. '-------------------------------------------------------------------------
  20. ' Global Constants
  21. '-------------------------------------------------------------------------
  22. ' number of rows contained in a single page of the OTS table
  23. Const ROWS_PER_PAGE = 100
  24. ' the column numbers. Used to compare the SearchColumn value
  25. Const VOLUMENAME_COLUMN = 0
  26. Const TOTALSIZE_COLUMN = 1
  27. Const FREESPACE_COLUMN = 2
  28. '-------------------------------------------------------------------------
  29. ' Global Variables
  30. '-------------------------------------------------------------------------
  31. Dim SOURCE_FILE
  32. SOURCE_FILE = SA_GetScriptFileName()
  33. Dim g_bSearchChanged
  34. Dim g_iSearchCol
  35. Dim g_sSearchColValue
  36. Dim g_bPagingInitialized
  37. Dim g_sPageAction
  38. Dim g_iPageMin
  39. Dim g_iPageMax
  40. Dim g_iPageCurrent
  41. Dim g_iSortCol
  42. Dim g_sSortSequence
  43. Dim nReturnValue
  44. Dim g_strReturnURL
  45. '======================================================
  46. ' Entry point
  47. '======================================================
  48. Dim page
  49. ' the Page Title is obtained from localization content
  50. Dim aPageTitle(2)
  51. aPageTitle(0) = L_BROWSERCAPTION_DISKQUOTA_TEXT
  52. aPageTitle(1) = L_QUOTASVOLUMES_PAGETITLE_TEXT
  53. '
  54. ' Create Page
  55. Call SA_CreatePage( aPageTitle, "", PT_AREA, page )
  56. '
  57. ' Show page
  58. Call SA_ShowPage( page )
  59. '======================================================
  60. ' Web Framework Event Handlers
  61. '======================================================
  62. '---------------------------------------------------------------------
  63. ' Function name: OnInitPage
  64. ' Description: Called to signal first time processing for this page
  65. ' Input Variables: Out: oPageIn
  66. ' Out: oEventArg
  67. ' Output Variables: None
  68. ' Return Values: TRUE to indicate initialization was successful.
  69. ' FALSE to indicate errors. Returning FALSE will
  70. ' cause the page to be abandoned.
  71. ' Global Variables: Out: g_(*)
  72. '
  73. ' Used to do first time initialization tasks.
  74. '---------------------------------------------------------------------
  75. Public Function OnInitPage(ByRef oPageIn, ByRef oEventArg)
  76. Call SA_TraceOut(SOURCE_FILE, "OnInitPage")
  77. '
  78. ' Set default values
  79. '
  80. ' Sort first column in ascending sequence
  81. g_iSortCol = 0
  82. g_sSortSequence = "A"
  83. '
  84. ' Paging needs to be initialized
  85. g_bPagingInitialized = FALSE
  86. '
  87. ' Start on page #1
  88. g_iPageCurrent = 1
  89. 'Assigning the return URL
  90. g_strReturnURL = m_VirtualRoot & mstrReturnURL
  91. OnInitPage = TRUE
  92. End Function
  93. '---------------------------------------------------------------------
  94. ' Function name: OnServeAreaPage
  95. ' Description: Called when the page needs to be served
  96. ' Input Variables: Out: oPageIn
  97. ' Out: oEventArg
  98. ' Output Variables: None
  99. ' Return Values: TRUE to indicate no problems occured. FALSE to
  100. ' indicate errors. Returning FALSE will cause the
  101. ' page to be abandoned.
  102. ' Global Variables: In: g_(*)
  103. ' In: L_(*)
  104. '
  105. ' The UI is served here.
  106. '---------------------------------------------------------------------
  107. Public Function OnServeAreaPage(ByRef oPageIn, ByRef oEventArg)
  108. Call SA_TraceOut(SOURCE_FILE, "OnServeAreaPage")
  109. Dim table ' the OTS table
  110. Dim colFlags ' the column flags to be set
  111. Dim sTaskURL ' holds URL for the task
  112. Dim iVolumeCountTotal ' the total volumes count
  113. Dim iVolumeCountSelected ' the selected volumes (search satisfied)
  114. '
  115. ' Create the table
  116. table = OTS_CreateTable("", L_DESCRIPTION_HEADING_TEXT)
  117. '
  118. ' If the search criteria changed then we need to recompute the paging range
  119. If ( TRUE = g_bSearchChanged ) Then
  120. '
  121. ' Need to recalculate the paging range
  122. g_bPagingInitialized = FALSE
  123. '
  124. ' Restarting on page #1
  125. g_iPageCurrent = 1
  126. End If
  127. '
  128. ' Create Volume Name column
  129. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  130. nReturnValue = OTS_AddTableColumn(table, OTS_CreateColumnEx( L_COLUMN_VOLUMENAME_TEXT, "left", colFlags, 25 ))
  131. If nReturnValue <> OTS_ERR_SUCCESS Then
  132. Call SA_ServeFailurePageEx(L_ADDCOLUMN_FAIL_ERRORMESSAGE, g_strReturnURL)
  133. End If
  134. '
  135. ' Create Total Size column
  136. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  137. nReturnValue = OTS_AddTableColumn(table, OTS_CreateColumnEx( L_COLUMN_TOTALSIZE_TEXT, "left", colFlags, 15))
  138. If nReturnValue <> OTS_ERR_SUCCESS Then
  139. Call SA_ServeFailurePageEx(L_ADDCOLUMN_FAIL_ERRORMESSAGE, g_strReturnURL)
  140. End If
  141. '
  142. ' Create Free Space column
  143. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  144. nReturnValue = OTS_AddTableColumn(table, OTS_CreateColumnEx(L_COLUMN_FREESPACE_TEXT, "left", colFlags, 15))
  145. If nReturnValue <> OTS_ERR_SUCCESS Then
  146. Call SA_ServeFailurePageEx(L_ADDCOLUMN_FAIL_ERRORMESSAGE, g_strReturnURL)
  147. End If
  148. '
  149. ' Create Volume Label column
  150. colFlags = (OTS_COL_KEY OR OTS_COL_HIDDEN)
  151. nReturnValue = OTS_AddTableColumn(table, OTS_CreateColumnEx( L_COLUMN_HIDDEN_VOLUMELABEL_TEXT, "left", colFlags, 20 ))
  152. If nReturnValue <> OTS_ERR_SUCCESS Then
  153. Call SA_ServeFailurePageEx(L_ADDCOLUMN_FAIL_ERRORMESSAGE, g_strReturnURL)
  154. End If
  155. '
  156. ' Add Volumes to the table
  157. Call AddItemsToTable(table, iVolumeCountTotal, iVolumeCountSelected)
  158. '
  159. ' Set Tasks section title
  160. Call OTS_SetTableTasksTitle(table, L_COLUMN_TASK_TEXT)
  161. '
  162. ' Add the tasks associated with Volumes displayed
  163. '
  164. '
  165. ' Quota properties can be seen for one volume at a time (OTS_TaskOne)
  166. sTaskURL = "quotas/quota_quota.asp"
  167. nReturnValue = OTS_AddTableTask( table, OTS_CreateTask(L_TASK_QUOTA_TEXT, _
  168. L_TASK_QUOTA_ROLLOVER_TEXT, _
  169. sTaskURL,_
  170. OTS_PT_PROPERTY) )
  171. If nReturnValue <> OTS_ERR_SUCCESS Then
  172. Call SA_ServeFailurePageEx(L_ADDTASK_FAIL_ERRORMESSAGE, g_strReturnURL)
  173. End If
  174. ' Quota entries will be displayed for one volume at a time (OTS_TaskOne)
  175. sTaskURL = "quotas/quota_quotaentries.asp"
  176. nReturnValue = OTS_AddTableTask( table, OTS_CreateTask(L_TASK_QUOTAENTRIES_TEXT, _
  177. L_TASK_QUOTAENTRIES_ROLLOVER_TEXT, _
  178. sTaskURL,_
  179. OTS_PT_AREA) )
  180. If nReturnValue <> OTS_ERR_SUCCESS Then
  181. Call SA_ServeFailurePageEx(L_ADDTASK_FAIL_ERRORMESSAGE, g_strReturnURL)
  182. End If
  183. Call OTS_EnablePaging(table, TRUE)
  184. ' If paging range needs to be initialised then
  185. ' we need to figure out how many pages we are going to display
  186. If ( FALSE = g_bPagingInitialized ) Then
  187. g_iPageMin = 1
  188. g_iPageMax = Int(iVolumeCountTotal / ROWS_PER_PAGE )
  189. If ( (iVolumeCountTotal MOD ROWS_PER_PAGE) >= 0 ) Then
  190. g_iPageMax = g_iPageMax + 1
  191. End If
  192. g_iPageCurrent = 1
  193. Call OTS_SetPagingRange(table, g_iPageMin, g_iPageMax, g_iPageCurrent)
  194. End If
  195. '
  196. ' Disable table multiselection
  197. Call OTS_SetTableMultiSelection(table, FALSE)
  198. '
  199. ' Sort the table
  200. Call OTS_SortTable(table, g_iSortCol, g_sSortSequence, SA_RESERVED)
  201. '
  202. ' Send table to the Response stream
  203. nReturnValue = OTS_ServeTable(table)
  204. If nReturnValue <> OTS_ERR_SUCCESS Then
  205. Call SA_ServeFailurePageEx(L_SERVETABLE_FAIL_ERRORMESSAGE, g_strReturnURL)
  206. End If
  207. '
  208. ' All done...
  209. OnServeAreaPage = TRUE
  210. End Function
  211. '---------------------------------------------------------------------
  212. ' Function: OnSearchNotify()
  213. '
  214. ' Synopsis: Search notification event handler. When one or more columns are
  215. ' marked with the OTS_COL_SEARCH flag, the Web Framework fires
  216. ' this event in the following scenarios:
  217. '
  218. ' 1) The user presses the search Go button.
  219. ' 2) The user requests a table column sort
  220. ' 3) The user presses either the page next or page previous buttons
  221. '
  222. ' The oEventArg indicates the source of this notification event which can
  223. ' be either a search change event (scenario 1) or a post back event
  224. ' (scenarios 2 or 3)
  225. '
  226. ' Arguments: [in] oPageIn Page on which this event has been fired.
  227. ' [in] oEventArg Event argument for this event.
  228. ' [in] iColumnNo Column number of the column that was selected.
  229. ' [in] sValue Search value that the user typed into the search box.
  230. ' Returns: Always returns TRUE
  231. '
  232. '---------------------------------------------------------------------
  233. Public Function OnSearchNotify(ByRef oPageIn, _
  234. ByRef oEventArg, _
  235. ByVal iColumnNo, _
  236. ByVal sValue )
  237. OnSearchNotify = TRUE
  238. Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify")
  239. '
  240. ' User pressed the search GO button
  241. '
  242. If SA_IsChangeEvent(oEventArg) Then
  243. Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Change Event Fired")
  244. g_bSearchChanged = TRUE
  245. g_iSearchCol = iColumnNo
  246. g_sSearchColValue = CStr(sValue)
  247. '
  248. ' User clicked a column sort, OR clicked either the page next or page prev button
  249. ElseIf SA_IsPostBackEvent(oEventArg) Then
  250. Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Postback Event Fired")
  251. g_bSearchChanged = FALSE
  252. g_iSearchCol = iColumnNo
  253. g_sSearchColValue = CStr(sValue)
  254. '
  255. ' Unknown event source
  256. Else
  257. Call SA_TraceErrorOut(SOURCE_FILE, "Unrecognized Event in OnSearchNotify()")
  258. End IF
  259. End Function
  260. '---------------------------------------------------------------------
  261. ' Function: OnPagingNotify()
  262. '
  263. ' Synopsis: Paging notification event handler. This event is triggered in one of
  264. ' the following scenarios:
  265. '
  266. ' 1) The user presses either the page next or page previous buttons
  267. ' 2) The user presses the search Go button.
  268. ' 3) The user requests a table column sort
  269. '
  270. ' The oEventArg indicates the source of this notification event which can
  271. ' be either a paging change event (scenario 1) or a post back event
  272. ' (scenarios 2 or 3)
  273. '
  274. ' The iPageCurrent argument indicates which page the user has requested.
  275. ' This is an integer value between iPageMin and iPageMax.
  276. '
  277. ' Arguments: [in] oPageIn Page on which this event has been fired.
  278. ' [in] oEventArg Event argument for this event.
  279. ' [in] sPageAction Page navigation action which will be a string value
  280. ' of either: "next", or "prev"
  281. ' [in] iPageMin Minimum page number
  282. ' [in] iPageMax Maximum page number
  283. ' [in] iPageCurrent Current page
  284. '
  285. ' Returns: Always returns TRUE
  286. '
  287. '---------------------------------------------------------------------
  288. Public Function OnPagingNotify(ByRef oPageIn, _
  289. ByRef oEventArg, _
  290. ByVal sPageAction, _
  291. ByVal iPageMin, _
  292. ByVal iPageMax, _
  293. ByVal iPageCurrent )
  294. OnPagingNotify = TRUE
  295. Call SA_TraceOut(SOURCE_FILE, "OnPagingNotify")
  296. g_bPagingInitialized = TRUE
  297. g_iPageMin = iPageMin
  298. g_iPageMax = iPageMax
  299. g_iPageCurrent = iPageCurrent
  300. End Function
  301. '---------------------------------------------------------------------
  302. ' Function: OnSortNotify()
  303. '
  304. ' Synopsis: Sorting notification event handler. This event is triggered in one of
  305. ' the following scenarios:
  306. '
  307. ' 1) The user presses the search Go button.
  308. ' 2) The user presses either the page next or page previous buttons
  309. ' 3) The user requests a table column sort
  310. '
  311. ' The oEventArg indicates the source of this notification event which can
  312. ' be either a sorting change event (scenario 1) or a post back event
  313. ' (scenarios 2 or 3)
  314. '
  315. ' The sortCol argument indicated which column the user would like to sort
  316. ' and the sortSeq argument indicates the desired sort sequence which can
  317. ' be either ascending or descending.
  318. '
  319. ' Arguments: [in] oPageIn Page on which this event has been fired.
  320. ' [in] oEventArg Event argument for this event.
  321. ' [in] iSortCol Column number of the column that is to be sorted.
  322. ' [in] sSortSeq Sequence that the column is to be sorted. "A" for ascending,
  323. ' "D" for descending.
  324. '
  325. ' Returns: Always returns TRUE
  326. '
  327. '---------------------------------------------------------------------
  328. Public Function OnSortNotify(ByRef oPageIn, _
  329. ByRef oEventArg, _
  330. ByVal iSortCol, _
  331. ByVal sSortSeq )
  332. OnSortNotify = TRUE
  333. Call SA_TraceOut(SOURCE_FILE, "OnSortNotify")
  334. g_iSortCol = iSortCol
  335. g_sSortSequence = sSortSeq
  336. End Function
  337. '---------------------------------------------------------------------
  338. ' Function name: AddItemsToTable
  339. ' Description: Called to add rows to the table
  340. ' Input Variables: Out: Table
  341. ' Out: iVolumeCount
  342. ' Out: iSelectedVolumeCount
  343. ' Output Variables: None
  344. ' Return Values: None
  345. ' Global Variables: In: g_(*)
  346. ' In: L_(*)
  347. '---------------------------------------------------------------------
  348. Private Function AddItemsToTable(ByRef Table, ByRef iVolumeCount, ByRef iSelectedVolumeCount)
  349. Call SA_TraceOut(SOURCE_FILE, "AddItemsToTable")
  350. On Error Resume Next
  351. Err.clear
  352. Dim objService ' service object to access wmi
  353. Dim objCollection ' collection of disks
  354. Dim objInstance ' instance of the disk
  355. Dim strQuery ' to query the WMI
  356. Dim strVolName ' Drive letter
  357. Dim nTotalSize ' size of disk (numeric)
  358. Dim nUsed ' used space on the disk
  359. Dim nFree ' available space on the disk
  360. Dim strTotalSize ' size of disk (string, Example:1024 MB)
  361. Dim strFree ' available space on the disk (string, Example:1024 MB)
  362. Dim strDisplayVolumeLabel ' the volume name to be displayed along with label
  363. ' initialize the values
  364. iVolumeCount = 0
  365. iSelectedVolumeCount = 0
  366. ' get the wmi connection to query for the required volumes
  367. Set objService = GetWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  368. ' prepare the query.
  369. ' DriveType = 3 means "Local Disk" and NOT a Mapped Networked Drive.
  370. ' FileSystem MUST be NTFS.
  371. strQuery = "Select * From Win32_LogicalDisk Where DriveType = 3 " & _
  372. "AND FileSystem = " & Chr(34) & "NTFS" & Chr(34)
  373. ' execute the query and get the collection of volumes
  374. Set objCollection = objService.ExecQuery(strQuery)
  375. If Err.number <> 0 Then
  376. Set objCollection = Nothing
  377. Set objService = Nothing
  378. Call SA_ServeFailurePageEx(L_VALUES_NOT_RETRIEVED_ERRORMESSAGE, g_strReturnURL)
  379. End If
  380. ' loop for each volume in the collection
  381. For each objInstance in objCollection
  382. '
  383. ' Store the column display values in the variables.
  384. ' Then add to the OTS rows if search criteria satisfies
  385. ' get the volume name
  386. strVolName = objInstance.DeviceID
  387. ' get the volume label to be displayed
  388. strDisplayVolumeLabel = ""
  389. strDisplayVolumeLabel = objInstance.VolumeName
  390. If Len(Trim(strDisplayVolumeLabel)) = 0 Then
  391. strDisplayVolumeLabel = L_LOCAL_DISK_TEXT & " (" & strVolName & ")"
  392. Else
  393. strDisplayVolumeLabel = strDisplayVolumeLabel & " (" & strVolName & ")"
  394. End If
  395. ' calculate the total size and free space columns in MB
  396. nTotalSize = Clng( objInstance.Size / 1024 / 1024 )
  397. nUsed = nTotalSize - Clng( objInstance.FreeSpace / 1024 / 1024 )
  398. nFree = nTotalSize - nUsed
  399. ' concatenate the units "MB"
  400. strTotalSize = CStr(nTotalSize) + " " + L_MB_TEXT
  401. strFree = CStr(nFree) + " " + L_MB_TEXT
  402. '
  403. ' All the column values for the Row are collected.
  404. ' Display the row depending on the search criteria.
  405. '
  406. If ( Len( g_sSearchColValue ) <= 0 ) Then
  407. '
  408. ' Search criteria blank, select all rows
  409. '
  410. iVolumeCount = iVolumeCount + 1
  411. '
  412. ' Verify that the current volume part of the current page
  413. If ( IsItemOnPage( iVolumeCount, g_iPageCurrent, ROWS_PER_PAGE) ) Then
  414. nReturnValue = OTS_AddTableRow( Table, Array(strDisplayVolumeLabel, strTotalSize, strFree, strVolName ))
  415. If nReturnValue <> OTS_ERR_SUCCESS Then
  416. Call SA_ServeFailurePageEx(L_ADDROW_FAIL_ERRORMESSAGE, g_strReturnURL)
  417. End If
  418. iSelectedVolumeCount = iSelectedVolumeCount + 1
  419. End If
  420. Else
  421. '
  422. ' Check the search criteria
  423. '
  424. Select Case (g_iSearchCol)
  425. Case VOLUMENAME_COLUMN
  426. If ( InStr(1, strDisplayVolumeLabel, Trim(g_sSearchColValue), 1) ) Then
  427. iVolumeCount = iVolumeCount + 1
  428. '
  429. ' Verify that the current volume is part of the current page
  430. If ( IsItemOnPage( iVolumeCount, g_iPageCurrent, ROWS_PER_PAGE) ) Then
  431. nReturnValue = OTS_AddTableRow( Table, Array(strDisplayVolumeLabel, strTotalSize, strFree,strVolName ))
  432. If nReturnValue <> OTS_ERR_SUCCESS Then
  433. Call SA_ServeFailurePageEx(L_ADDROW_FAIL_ERRORMESSAGE, g_strReturnURL)
  434. End If
  435. iSelectedVolumeCount = iSelectedVolumeCount + 1
  436. End If
  437. End If
  438. Case TOTALSIZE_COLUMN
  439. If (UCase(Trim(Left(strTotalSize, Len(Trim(g_sSearchColValue))))) = Ucase(Trim(g_sSearchColValue))) Then
  440. iVolumeCount = iVolumeCount + 1
  441. '
  442. ' Verify that the current volume is part of the current page
  443. If ( IsItemOnPage( iVolumeCount, g_iPageCurrent, ROWS_PER_PAGE) ) Then
  444. nReturnValue = OTS_AddTableRow( Table, Array(strDisplayVolumeLabel, strTotalSize, strFree,strVolName ))
  445. If nReturnValue <> OTS_ERR_SUCCESS Then
  446. Call SA_ServeFailurePageEx(L_ADDROW_FAIL_ERRORMESSAGE, g_strReturnURL)
  447. End If
  448. iSelectedVolumeCount = iSelectedVolumeCount + 1
  449. End If
  450. End If
  451. Case FREESPACE_COLUMN
  452. If (UCase(Trim(Left(strFree, Len(Trim(g_sSearchColValue))))) = Ucase(Trim(g_sSearchColValue))) Then
  453. iVolumeCount = iVolumeCount + 1
  454. '
  455. ' Verify that the current volume is part of the current page
  456. If ( IsItemOnPage( iVolumeCount, g_iPageCurrent, ROWS_PER_PAGE) ) Then
  457. nReturnValue = OTS_AddTableRow( Table, Array(strDisplayVolumeLabel, strTotalSize, strFree,strVolName ))
  458. If nReturnValue <> OTS_ERR_SUCCESS Then
  459. Call SA_ServeFailurePageEx(L_ADDROW_FAIL_ERRORMESSAGE, g_strReturnURL)
  460. End If
  461. iSelectedVolumeCount = iSelectedVolumeCount + 1
  462. End If
  463. End If
  464. Case Else
  465. Call SA_TraceOut(SOURCE_FILE, "Unrecognized search column: " + CStr(g_iSearchCol))
  466. iVolumeCount = iVolumeCount + 1
  467. '
  468. ' Verify that the current volume is part of the current page
  469. If ( IsItemOnPage( iVolumeCount, g_iPageCurrent, ROWS_PER_PAGE) ) Then
  470. nReturnValue = OTS_AddTableRow( Table, Array(strDisplayVolumeLabel, strTotalSize, strFree, strVolName ))
  471. If nReturnValue <> OTS_ERR_SUCCESS Then
  472. Call SA_ServeFailurePageEx(L_ADDROW_FAIL_ERRORMESSAGE, g_strReturnURL)
  473. End If
  474. iSelectedVolumeCount = iSelectedVolumeCount + 1
  475. End If
  476. End Select ' Select Case (g_iSearchCol)
  477. End If ' If ( Len( g_sSearchColValue ) <= 0 ) Then
  478. Next ' objInstance (volume obtained through wmi query)
  479. Set objCollection = Nothing ' clean up
  480. Set objService = Nothing
  481. End Function
  482. '---------------------------------------------------------------------
  483. ' Function name: IsItemOnPage
  484. ' Description: to verify if the current selection belongs to current page
  485. ' Input Variables: In: iCurrentItem
  486. ' In: iItemsPerPage
  487. ' In: iCurrentPage
  488. ' Output Variables: None
  489. ' Return Values: True , if current selection belongs to the page, Else False
  490. ' Global Variables: None
  491. '---------------------------------------------------------------------
  492. Private Function IsItemOnPage(ByVal iCurrentItem, iCurrentPage, iItemsPerPage)
  493. Dim iLowerLimit
  494. Dim iUpperLimit
  495. iLowerLimit = ((iCurrentPage - 1) * iItemsPerPage )
  496. iUpperLimit = iLowerLimit + iItemsPerPage + 1
  497. If ( iCurrentItem > iLowerLimit AND iCurrentItem < iUpperLimit ) Then
  498. IsItemOnPage = TRUE
  499. Else
  500. IsItemOnPage = FALSE
  501. End If
  502. End Function
  503. %>