%@LANGUAGE="VBSCRIPT"%> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsoccassion_total Dim rsoccassion_first Dim rsoccassion_last ' set the record count rsoccassion_total = rsoccassion.RecordCount ' set the number of rows displayed on this page If (rsoccassion_numRows < 0) Then rsoccassion_numRows = rsoccassion_total Elseif (rsoccassion_numRows = 0) Then rsoccassion_numRows = 1 End If ' set the first and last displayed record rsoccassion_first = 1 rsoccassion_last = rsoccassion_first + rsoccassion_numRows - 1 ' if we have the correct record count, check the other stats If (rsoccassion_total <> -1) Then If (rsoccassion_first > rsoccassion_total) Then rsoccassion_first = rsoccassion_total End If If (rsoccassion_last > rsoccassion_total) Then rsoccassion_last = rsoccassion_total End If If (rsoccassion_numRows > rsoccassion_total) Then rsoccassion_numRows = rsoccassion_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsoccassion_total = -1) Then ' count the total records by iterating through the recordset rsoccassion_total=0 While (Not rsoccassion.EOF) rsoccassion_total = rsoccassion_total + 1 rsoccassion.MoveNext Wend ' reset the cursor to the beginning If (rsoccassion.CursorType > 0) Then rsoccassion.MoveFirst Else rsoccassion.Requery End If ' set the number of rows displayed on this page If (rsoccassion_numRows < 0 Or rsoccassion_numRows > rsoccassion_total) Then rsoccassion_numRows = rsoccassion_total End If ' set the first and last displayed record rsoccassion_first = 1 rsoccassion_last = rsoccassion_first + rsoccassion_numRows - 1 If (rsoccassion_first > rsoccassion_total) Then rsoccassion_first = rsoccassion_total End If If (rsoccassion_last > rsoccassion_total) Then rsoccassion_last = rsoccassion_total End If End If %> <% Dim MM_paramName %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
![]() |
![]() |
|
| |
Interesse of verdere vragen bel snel met Ben Goossens Telefoon 045-533 10 18 Mobiel 06-533 255 77 Hosted by: tensoft.nl |