%@LCID = 1033%> <% Dim iIDCategory ' As Integer Dim rsPrograms ' As ADODB.Recordset Dim iPageToDisplay ' As Integer Dim szOrderBy ' As String Dim bOrderDesc ' As Boolean gSessionTitle="Free Video Tools downloads" ' Get parameters iIDCategory = 112 ' Set variable to -1 if empty (all categories list) If iIDCategory = "" Then iIDCategory = -1 iPageToDisplay = Request.QueryString("page") ' Set variable to default value if empty If iPageToDisplay = "" Then iPageToDisplay = 1 szOrderBy = Request.QueryString("sortby") ' Set variable to default value if empty If szOrderBy = "" Then szOrderBy = "Released" bOrderDesc = True End If If bOrderDesc = "" Then bOrderDesc = Request.QueryString("desc") ' Set variable to default value if empty If bOrderDesc = "" Then bOrderDesc = False ' Validate 'If Not IsNumeric(iIDCategory) Then Response.Redirect("index.asp") 'If Not IsNumeric(iPageToDisplay) Then Response.Redirect("index.asp") %>
|
<%
Dim iPage ' As Integer
Dim iStartPage, iEndPage ' As Integer
iStartPage = CInt(iPageToDisplay) - 8
If CInt(iStartPage) < 1 Then iStartPage = 1
iEndPage = CInt(iPageToDisplay) + 8
If iEndPage > CInt(iRowCount / SEARCH_PAGE_SIZE) - 1 Then iEndPage = CInt(iRowCount / SEARCH_PAGE_SIZE) - 1
If CInt(iPageToDisplay) > 1 Then
%>
<< Previous |
<%
End If
For iPage = (iStartPage - 1) * SEARCH_PAGE_SIZE To CInt(iEndPage * SEARCH_PAGE_SIZE) Step SEARCH_PAGE_SIZE
If CInt((iPage \ SEARCH_PAGE_SIZE) + 1) = CInt(iPageToDisplay) Then
%>
[<%=(iPage \ SEARCH_PAGE_SIZE) + 1%>] <%If iPage \ SEARCH_PAGE_SIZE < CInt(iRowCount) \ SEARCH_PAGE_SIZE Then%>|<%End If%>
<%
Else
%>
<%=(iPage \ SEARCH_PAGE_SIZE) + 1%> |
<%
End If
Next
If CInt(iPageToDisplay) < (CInt(iRowCount) / SEARCH_PAGE_SIZE) Then
%>
Next >>
<%
End If
%>
|
||
|
|
||
|
<%
If CInt(iPageToDisplay) > 1 Then
%>
<< Previous |
<%
End If
For iPage = (iStartPage - 1) * SEARCH_PAGE_SIZE To CInt(iEndPage * SEARCH_PAGE_SIZE) Step SEARCH_PAGE_SIZE
If CInt((iPage \ SEARCH_PAGE_SIZE) + 1) = CInt(iPageToDisplay) Then
%>
[<%=(iPage \ SEARCH_PAGE_SIZE) + 1%>] <%If iPage \ SEARCH_PAGE_SIZE < CInt(iRowCount) \ SEARCH_PAGE_SIZE Then%>|<%End If%>
<%
Else
%>
<%=(iPage \ SEARCH_PAGE_SIZE) + 1%> |
<%
End If
Next
If CInt(iPageToDisplay) < (CInt(iRowCount) / SEARCH_PAGE_SIZE) Then
%>
Next >>
<%
End If
%>
|
||
|