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.

645 lines
20 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <%
  4. '-------------------------------------------------------------------------
  5. ' Multiple_Log_Details.asp: Serves in listing all the Multiple logs
  6. ' Copyright (c) Microsoft Corporation. All rights reserved.
  7. '-------------------------------------------------------------------------
  8. %>
  9. <!-- #include virtual="/admin/inc_framework.asp" -->
  10. <!-- #include virtual="/admin/ots_main.asp" -->
  11. <!-- #include file="loc_Log.asp" -->
  12. <!-- #include file="inc_Log.asp" -->
  13. <%
  14. '-------------------------------------------------------------------------
  15. ' Global Constants
  16. '-------------------------------------------------------------------------
  17. Const NAME_COLUMN = 0
  18. Const TYPE_COLUMN = 1
  19. Const DATE_COLUMN = 2
  20. Const SIZE_COLUMN = 3
  21. Const LOGS_PER_PAGE = 100
  22. Dim SOURCE_FILE
  23. Const ENABLE_TRACING = TRUE
  24. SOURCE_FILE = SA_GetScriptFileName()
  25. '-------------------------------------------------------------------------
  26. ' Global Variables
  27. '-------------------------------------------------------------------------
  28. Dim page 'Variable for page creation
  29. Dim rc 'Return value for CreatePage
  30. 'frame work variables
  31. Dim g_Type
  32. Dim g_bSearchChanged
  33. Dim g_bSearchRequested
  34. Dim g_iSearchCol
  35. Dim g_sSearchColValue
  36. Dim g_bPageChangeRequested
  37. Dim g_sPageAction
  38. Dim g_bPagingInitialized
  39. Dim g_iPageMin
  40. Dim g_iPageMax
  41. Dim g_iPageCurrent
  42. Dim g_iSortCol
  43. Dim g_sSortSequence
  44. Dim G_PageTitle 'To get the title accordingly
  45. Dim G_strLogFilePath 'FilePath
  46. '-------------------------------------------------------------------------
  47. ' Form Variables
  48. '-------------------------------------------------------------------------
  49. Dim F_strevent_title 'to get the log name.
  50. Dim L_PAGETITLE_LOGS_TEXT
  51. Dim L_TABLETITLE_TEXT
  52. 'Getting the inputs from the earliear form
  53. L_PAGETITLE_LOGS_TEXT= Request.QueryString("title")
  54. L_TABLETITLE_TEXT=Request.QueryString("title")
  55. G_PageTitle = GetTitle(Request.QueryString("Title"))
  56. '-------------------------------------------------------------------------
  57. ' Entry Point
  58. '-------------------------------------------------------------------------
  59. ' Create Page
  60. Call SA_CreatePage(G_PageTitle ,"",PT_AREA, page )
  61. Call SA_ShowPage( page )
  62. '---------------------------------------------------------------------
  63. ' Function name: OnInitPage
  64. ' Description: Called to signal first time processing for this page.
  65. ' Input Variables: PageIn and EventArg
  66. ' Output Variables: PageIn and EventArg
  67. ' Return Values: True/False
  68. ' Global Variables: None
  69. ' Called to signal first time processing for this page. Use this method
  70. ' to do first time initialization tasks.
  71. '---------------------------------------------------------------------
  72. Public Function OnInitPage(ByRef PageIn, ByRef EventArg)
  73. g_Type=Request.QueryString("type")
  74. OnInitPage = TRUE
  75. If ( ENABLE_TRACING ) Then
  76. Call SA_TraceOut(SOURCE_FILE, "OnInitPage")
  77. End If
  78. F_strevent_title = Request.QueryString("Title")
  79. ' Set default values
  80. '
  81. ' Sort first column in ascending sequence
  82. g_iSortCol = 0
  83. g_sSortSequence = "A"
  84. '
  85. ' Paging needs to be initialized
  86. g_bPagingInitialized = FALSE
  87. '
  88. ' Start on page #1
  89. g_iPageCurrent = 1
  90. End Function
  91. '---------------------------------------------------------------------
  92. ' Function name: OnServeAreaPage
  93. ' Description: Called when the page needs to be served.
  94. ' Input Variables: PageIn, EventArg
  95. ' Output Variables: PageIn and EventArg
  96. ' Return Values: TRUE to indicate no problems occured. FALSE to indicate errors.
  97. ' Returning FALSE will cause the page to be abandoned.
  98. ' Global Variables: None
  99. 'Called when the page needs to be served. Use this method to serve content.
  100. '---------------------------------------------------------------------
  101. Public Function OnServeAreaPage(ByRef PageIn, ByRef EventArg)
  102. Call ServeCommonJavaScript()
  103. If ( ENABLE_TRACING ) Then
  104. Call SA_TraceOut(SOURCE_FILE, "OnServeAreaPage")
  105. End If
  106. Dim table
  107. Dim iColumnFleName
  108. Dim iColumnFleType
  109. Dim iColumnDatecreated
  110. Dim iColumnSizeinKB
  111. Dim nReturn
  112. Dim nRowsAdded
  113. Dim iLogCount
  114. Dim objFso
  115. Dim objDir
  116. Dim objFile
  117. Dim strFileType
  118. Dim strLogFileDir
  119. Dim colFlags
  120. Dim oEncoder
  121. Set oEncoder = new CSAEncoder
  122. 'Getting the dir path from the registry
  123. strLogFileDir=GetPath(L_TABLETITLE_TEXT)
  124. table = OTS_CreateTable("","")
  125. 'Getting the FilePath of the selected log file
  126. G_strLogFilePath=GetPath(F_strevent_title)
  127. G_strLogFilePath = Server.URLEncode(G_strLogFilePath)
  128. '
  129. ' If the search criteria changed then we need to recompute the paging range
  130. If ( TRUE = g_bSearchChanged ) Then
  131. '
  132. ' Need to recalculate the paging range
  133. g_bPagingInitialized = FALSE
  134. '
  135. ' Restarting on page #1
  136. g_iPageCurrent = 1
  137. End If
  138. '
  139. ' Create columns and add them to the table
  140. colFlags = (OTS_COL_SEARCH OR OTS_COL_KEY OR OTS_COL_SORT)
  141. Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_FILENAME_TEXT, "left",colFlags, 15))
  142. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  143. Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_FILETYPE_TEXT, "left",colFlags, 36))
  144. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  145. Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_DATE_TEXT, "left",colFlags, 30))
  146. colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  147. Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_SIZE_TEXT, "left",colFlags, 15))
  148. '
  149. ' Set Tasks section title
  150. Call OTS_SetTableTasksTitle(table, L_TASKS_TEXT)
  151. '
  152. ' Add the tasks associated with User objects
  153. Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_VIEW_TEXT, _
  154. L_VIEW_TEXT, _
  155. "logs/Single_Log_Details.asp?" & "logtitle=" & L_PAGETITLE_LOGS_TEXT & "&tab1=" & GetTab1() & "&tab2=" & GetTab2() ,_
  156. OTS_PT_AREA,_
  157. "OTS_TaskOne") )
  158. Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_CLEAR_TEXT, _
  159. L_CLEAR_TEXT, _
  160. "logs/Text_Log_clear.asp?FilePath="& G_strLogFilePath & "&tab1=" & GetTab1() & "&tab2=" & GetTab2(),_
  161. OTS_PT_PROPERTY,"OTS_TaskAny") )
  162. Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_DOWNLOAD_DETAILS_TEXT, _
  163. L_DOWNLOAD_DETAILS_TEXT, _
  164. "logs/Text_MultiLog_download.asp?FilePath=" & G_strLogFilePath,_
  165. OTS_PT_AREA,"OTS_TaskOne") )
  166. 'Logic for getting the files in the requested directory
  167. set objFso = CreateObject("Scripting.FileSystemObject")
  168. 'Checking for the file existence
  169. If objFso.FolderExists(strLogFileDir)=TRUE Then
  170. set objDir = objFso.GetFolder(strLogFileDir).Files
  171. 'Initializing the rows added
  172. nRowsAdded = 0
  173. iLogCount = 0
  174. For Each objFile in objDir
  175. 'Get the description of the file type
  176. strFileType = GetFileTypeDescription(mid(objFile.Name,1,2))
  177. If ( Len( g_sSearchColValue ) <= 0 ) Then
  178. ' Search criteria blank, select all rows
  179. '
  180. iLogCount = iLogCount + 1
  181. ' Verify that the current user part of the current page
  182. If ( IsItemOnPage( iLogCount,g_iPageCurrent, LOGS_PER_PAGE) ) Then
  183. Call OTS_AddTableRow( table,Array(objFile.Name,strFileType, _
  184. FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  185. End If
  186. '
  187. Else
  188. '
  189. ' Check the Search criteria
  190. '
  191. Select Case (g_iSearchCol)
  192. Case NAME_COLUMN
  193. '( ucase(left( arrServices(intCount,1) , len(g_sSearchColValue) )) = ucase(g_sSearchColValue) )
  194. If ( ucase(left( objFile.Name , len(g_sSearchColValue) )) = ucase(g_sSearchColValue) )then
  195. iLogCount = iLogCount + 1
  196. '
  197. ' Verify that the current user part of the current page
  198. If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  199. Call OTS_AddTableRow( table,Array(objFile.Name, _
  200. strFileType, FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  201. End If
  202. End If
  203. Case TYPE_COLUMN
  204. If ( ucase(left( strFileType, len(g_sSearchColValue) )) = ucase(g_sSearchColValue) ) Then
  205. iLogCount = iLogCount + 1
  206. '
  207. ' Verify that the current user part of the current page
  208. If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  209. Call OTS_AddTableRow( table,Array(objFile.Name, _
  210. strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  211. End If
  212. End If
  213. Case DATE_COLUMN
  214. If ( InStr(1, objFile.DateCreated, g_sSearchColValue, 1) ) Then
  215. iLogCount = iLogCount + 1
  216. '
  217. ' Verify that the current user part of the current page
  218. If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  219. Call OTS_AddTableRow( table,Array(objFile.Name, _
  220. strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  221. End If
  222. End If
  223. Case SIZE_COLUMN
  224. If ( InStr(1, clng(objFile.Size/1024), g_sSearchColValue, 1) ) Then
  225. iLogCount = iLogCount + 1
  226. '
  227. ' Verify that the current user part of the current page
  228. If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  229. Call OTS_AddTableRow( table,Array(objFile.Name, _
  230. strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  231. End If
  232. End If
  233. Case Else
  234. Call SA_TraceOut(SOURCE_FILE, "Unrecognized search column: " + CStr(g_iSearchCol))
  235. iLogCount = iLogCount + 1
  236. '
  237. ' Verify that the current user part of the current page
  238. If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  239. Call OTS_AddTableRow( table,Array(objFile.Name, _
  240. strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  241. End If
  242. End Select
  243. End If ' end of If ( g_bSearchRequested ) Then
  244. Next ' end of For Each objFile in objDir
  245. End IF 'end of If objFso.FolderExists(strLogFileDir)=TRUE
  246. ' Enable paging feature
  247. '
  248. Call OTS_EnablePaging(table, TRUE)
  249. '
  250. ' If paging range needs to be initialised then
  251. ' we need to figure out how many pages we are going to display
  252. If ( FALSE = g_bPagingInitialized ) Then
  253. g_iPageMin = 1
  254. g_iPageMax = Int(iLogCount / LOGS_PER_PAGE )
  255. If ( (iLogCount MOD LOGS_PER_PAGE) > 0 ) Then
  256. g_iPageMax = g_iPageMax + 1
  257. End If
  258. g_iPageCurrent = 1
  259. Call OTS_SetPagingRange(table, g_iPageMin, g_iPageMax, g_iPageCurrent)
  260. End If
  261. '
  262. ' If multiselection was requested then use multiselect OTS table
  263. If ( CInt(Request.QueryString("MultiSelect")) = 1 ) Then
  264. Call OTS_SetTableMultiSelection(Table, TRUE)
  265. End If
  266. '
  267. ' Sort the table
  268. '
  269. Call OTS_SortTable(table, g_iSortCol, g_sSortSequence, SA_RESERVED)
  270. '
  271. ' Send table to the response stream
  272. '
  273. Call OTS_ServeTable(table)
  274. 'Display no log entries message if there are no logs
  275. If iLogCount = 0 then
  276. Response.Write "<Br>" & "&nbsp;&nbsp;&nbsp;" & oEncoder.EncodeElement(L_NOLOGSAVAILABLE_TEXT)
  277. End if
  278. 'clean the objects
  279. set objDir = nothing
  280. set objFso = nothing
  281. OnServeAreaPage = TRUE
  282. End Function
  283. '---------------------------------------------------------------------
  284. ' Function: OnSearchNotify()
  285. '
  286. ' Synopsis: Search notification event handler. When one or more columns are
  287. ' marked with the OTS_COL_SEARCH flag, the Web Framework fires
  288. ' this event in the following scenarios:
  289. '
  290. ' 1) The user presses the search Go button.
  291. ' 2) The user requests a table column sort
  292. ' 3) The user presses either the page next or page previous buttons
  293. '
  294. ' The EventArg indicates the source of this notification event which can
  295. ' be either a search change event (scenario 1) or a post back event
  296. ' (scenarios 2 or 3)
  297. '
  298. ' Returns: Always returns TRUE
  299. '
  300. '---------------------------------------------------------------------
  301. Public Function OnSearchNotify(ByRef PageIn, _
  302. ByRef EventArg, _
  303. ByVal sItem, _
  304. ByVal sValue )
  305. OnSearchNotify = TRUE
  306. '
  307. ' User pressed the search GO button
  308. '
  309. If SA_IsChangeEvent(EventArg) Then
  310. If ( ENABLE_TRACING ) Then
  311. Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Change Event Fired")
  312. End If
  313. g_bSearchChanged = TRUE
  314. g_iSearchCol = Int(sItem)
  315. g_sSearchColValue = CStr(sValue)
  316. '
  317. ' User clicked a column sort, OR clicked either the page next or page prev button
  318. ElseIf SA_IsPostBackEvent(EventArg) Then
  319. If ( ENABLE_TRACING ) Then
  320. Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Postback Event Fired")
  321. End If
  322. g_bSearchChanged = FALSE
  323. g_iSearchCol = Int(sItem)
  324. g_sSearchColValue = CStr(sValue)
  325. '
  326. ' Unknown event source
  327. Else
  328. If ( ENABLE_TRACING ) Then
  329. Call SA_TraceOut(SOURCE_FILE, "Unrecognized Event in OnSearchNotify()")
  330. End If
  331. End IF
  332. End Function
  333. '---------------------------------------------------------------------
  334. ' Function: OnPagingNotify()
  335. '
  336. ' Synopsis: Paging notification event handler. This event is triggered in one of
  337. ' the following scenarios:
  338. '
  339. ' 1) The user presses either the page next or page previous buttons
  340. ' 2) The user presses the search Go button.
  341. ' 3) The user requests a table column sort
  342. '
  343. ' The EventArg indicates the source of this notification event which can
  344. ' be either a paging change event (scenario 1) or a post back event
  345. ' (scenarios 2 or 3)
  346. '
  347. ' The iPageCurrent argument indicates which page the user has requested.
  348. ' This is an integer value between iPageMin and iPageMax.
  349. '
  350. ' Returns: Always returns TRUE
  351. '
  352. '---------------------------------------------------------------------
  353. Public Function OnPagingNotify(ByRef PageIn, _
  354. ByRef EventArg, _
  355. ByVal sPageAction, _
  356. ByVal iPageMin, _
  357. ByVal iPageMax, _
  358. ByVal iPageCurrent )
  359. OnPagingNotify = TRUE
  360. g_bPagingInitialized = TRUE
  361. '
  362. ' User pressed either page next or page previous
  363. '
  364. If SA_IsChangeEvent(EventArg) Then
  365. If ( ENABLE_TRACING ) Then
  366. Call SA_TraceOut(SOURCE_FILE, "OnPagingNotify() Change Event Fired")
  367. End If
  368. g_bPageChangeRequested = TRUE
  369. g_sPageAction = CStr(sPageAction)
  370. g_iPageMin = iPageMin
  371. g_iPageMax = iPageMax
  372. g_iPageCurrent = iPageCurrent
  373. '
  374. ' User clicked a column sort OR the search GO button
  375. ElseIf SA_IsPostBackEvent(EventArg) Then
  376. If ( ENABLE_TRACING ) Then
  377. Call SA_TraceOut(SOURCE_FILE, "OnPagingNotify() Postback Event Fired")
  378. End If
  379. g_bPageChangeRequested = FALSE
  380. g_sPageAction = CStr(sPageAction)
  381. g_iPageMin = iPageMin
  382. g_iPageMax = iPageMax
  383. g_iPageCurrent = iPageCurrent
  384. '
  385. ' Unknown event source
  386. Else
  387. If ( ENABLE_TRACING ) Then
  388. Call SA_TraceOut(SOURCE_FILE, "Unrecognized Event in OnPagingNotify()")
  389. End If
  390. End IF
  391. End Function
  392. '---------------------------------------------------------------------
  393. ' Function name: OnSearchNotify()
  394. ' Description: Search notification event handler. When one or more columns are
  395. ' marked with the OTS_COL_SEARCH flag, the Web Framework fires
  396. ' this event
  397. ' Input Variables: PageIn,EventArg,sItem,sValue
  398. ' Output Variables: PageIn,EventArg,sItem,sValue
  399. ' Returns: Always returns TRUE
  400. '---------------------------------------------------------------------
  401. Public Function OnSearchNotify(ByRef PageIn, _
  402. ByRef EventArg, _
  403. ByRef sItem, _
  404. ByRef sValue )
  405. OnSearchNotify = TRUE
  406. '
  407. ' User pressed the search GO button
  408. '
  409. If SA_IsChangeEvent(EventArg) Then
  410. g_bSearchRequested = TRUE
  411. g_iSearchCol = Int(sItem)
  412. g_sSearchColValue = CStr(sValue)
  413. '
  414. ' User clicked a column sort, OR clicked either the page next or page prev button
  415. ElseIf SA_IsPostBackEvent(EventArg) Then
  416. g_bSearchRequested = FALSE
  417. g_iSearchCol = Int(sItem)
  418. g_sSearchColValue = CStr(sValue)
  419. '
  420. ' Unknown event source
  421. Else
  422. 'Call SA_TraceOut("LOGS_AREA", "Unrecognized Event in OnSearchNotify()")
  423. End IF
  424. End Function
  425. '---------------------------------------------------------------------
  426. ' Function: OnPagingNotify()
  427. ' Function name: OnPagingNotify()
  428. ' Description: Paging notification event handler.
  429. ' Input Variables: PageIn,EventArg,sPageAction,iPageMin,iPageMax,iPageCurrent
  430. ' Output Variables: PageIn,EventArg
  431. ' Return Values: Always returns TRUE
  432. ' Global Variables: G_*
  433. '---------------------------------------------------------------------
  434. Public Function OnPagingNotify(ByRef PageIn, _
  435. ByRef EventArg, _
  436. ByVal sPageAction, _
  437. ByVal iPageMin, _
  438. ByVal iPageMax, _
  439. ByVal iPageCurrent )
  440. OnPagingNotify = TRUE
  441. g_bPagingInitialized = TRUE
  442. '
  443. ' User pressed either page next or page previous
  444. '
  445. If SA_IsChangeEvent(EventArg) Then
  446. g_bPageChangeRequested = TRUE
  447. g_sPageAction = CStr(sPageAction)
  448. g_iPageMin = iPageMin
  449. g_iPageMax = iPageMax
  450. g_iPageCurrent = iPageCurrent
  451. '
  452. ' User clicked a column sort OR the search GO button
  453. ElseIf SA_IsPostBackEvent(EventArg) Then
  454. g_bPageChangeRequested = FALSE
  455. g_sPageAction = CStr(sPageAction)
  456. g_iPageMin = iPageMin
  457. g_iPageMax = iPageMax
  458. g_iPageCurrent = iPageCurrent
  459. '
  460. ' Unknown event source
  461. Else
  462. 'Call SA_TraceOut("LOGS_AREA", "Unrecognized Event in OnPagingNotify()")
  463. End IF
  464. End Function
  465. '---------------------------------------------------------------------
  466. ' Function: OnSortNotify()
  467. ' Function name: GetServices
  468. ' Description: Sorting notification event handler.
  469. ' Input Variables: PageIn,EventArg,sortCol,sortSeq
  470. ' Output Variables: PageIn,EventArg
  471. ' Return Values: Always returns TRUE
  472. ' Global Variables: G_*
  473. '---------------------------------------------------------------------
  474. Public Function OnSortNotify(ByRef PageIn, _
  475. ByRef EventArg, _
  476. ByVal sortCol, _
  477. ByVal sortSeq )
  478. OnSortNotify = TRUE
  479. g_iSortCol = sortCol
  480. g_sSortSequence = sortSeq
  481. End Function
  482. '-------------------------------------------------------------------------
  483. ' Function name: GetFileTypeDescription
  484. ' Description: gives the description of the type of file
  485. ' Input Variables: Filetype
  486. ' Output Variables: None
  487. ' Return Values: String
  488. ' Global Variables: None
  489. '-------------------------------------------------------------------------
  490. Function GetFileTypeDescription( strFileType )
  491. Dim strTemp
  492. 'constants used for the description of the type of file
  493. Const CONST_EX = "ex"
  494. Const CONST_IN = "in"
  495. Const CONST_NC = "nc"
  496. select case strFileType
  497. case CONST_EX
  498. strTemp = L_LOGFORMATW3C_TEXT
  499. case CONST_IN
  500. strTemp = L_LOGFORMATIIS_TEXT
  501. case CONST_NC
  502. strTemp = L_LOGFORMATNCSA_TEXT
  503. case else
  504. strTemp = L_LOGFORMATUNKNOWN_TEXT
  505. end select
  506. GetFileTypeDescription=strTemp
  507. End Function
  508. '---------------------------------------------------------------------
  509. ' Function: ServeCommonJavaScript
  510. '
  511. ' Synopsis: Serve common javascript that is required for this page type.
  512. '
  513. '---------------------------------------------------------------------
  514. Function ServeCommonJavaScript()
  515. %>
  516. <script>
  517. function Init()
  518. {
  519. }
  520. </script>
  521. <%
  522. End Function
  523. '-------------------------------------------------------------------------
  524. ' Function name: IsItemOnPage
  525. ' Description: Serves in Verifying that the current user part of the current page
  526. ' Input Variables: iCurrentItem, iCurrentPage, iItemsPerPage- current item
  527. ' Output Variables: None
  528. ' Return Values: TRUE/FALSE
  529. ' Global Variables: None
  530. ' Serves in Verifying that the current user part of the current page
  531. '-------------------------------------------------------------------------
  532. Private Function IsItemOnPage(ByVal iCurrentItem, iCurrentPage, iItemsPerPage)
  533. Dim iLowerLimit
  534. Dim iUpperLimit
  535. iLowerLimit = ((iCurrentPage - 1) * iItemsPerPage )
  536. iUpperLimit = iLowerLimit + iItemsPerPage + 1
  537. If ( iCurrentItem > iLowerLimit AND iCurrentItem < iUpperLimit ) Then
  538. IsItemOnPage = TRUE
  539. Else
  540. IsItemOnPage = FALSE
  541. End If
  542. End Function
  543. %>