<%@ language="vbscript" codepage="1252"%> <% 'Get Page Meta Information Page_Content_Meta_Query = "Page_Content_ID_Get 8" %> <% Dim Page_Num Page_Num= Request.QueryString("Page_Num") if (Page_Num = null) or (Page_Num = 0) or Page_Num = "" then Page_Num = 1 end if numResults = 7 Set Link_SQL = Server.CreateObject("ADODB.Command") Link_SQL.CommandType = adCmdStoredProc set Link_SQL.ActiveConnection = objConn Link_SQL.ActiveConnection.CursorLocation = adUseClient Link_SQL.CommandText ="Category_List_Links" Set paramId = Link_SQL.CreateParameter("@Page_Num", adInteger, adParamInput) paramId.Value = Page_Num Link_SQL.Parameters.Append paramId Set paramId = Link_SQL.CreateParameter("@numResults", adInteger, adParamInput) paramId.Value = numResults Link_SQL.Parameters.Append paramId Link_SQL.Parameters.Append Link_SQL.CreateParameter("@Count", adInteger, adParamOutput) set Link_SQL_Result = Link_SQL.execute() Total_Records = Link_SQL.Parameters("@Count").Value mouseovercolor = "#B45F04" %>
<% count = 1 Dim Tr_Count, Count_Link_SQL, Count_Link_SQL_Result, Link_Count, Page_Numbers Tr_Count = 0 ButtonCount = 0 Do While not Link_SQL_Result.eof ButtonCount = ButtonCount + 1 if (count >= 1) AND (count <= numResults) then CategoryID = Link_SQL_Result("Category_ID") %> <% if TR_Count = 1 then TR_Count = 0 else TR_Count = Tr_Count + 1 end if end if count = count + 1 Link_SQL_Result.Movenext Loop Link_SQL_Result.Close set Link_SQL_Result = Nothing Total_Pages = Total_Records \ numResults if Total_Records mod numResults > 0 then Total_Pages = Total_Pages + 1 end if if cint(page_num) > cint(Total_Pages) then page_num = Total_Pages end if %>
page
<% For PageNumber = 1 to Total_Pages %>
<% if clng(Page_Num) = clng(PageNumber) then %>
<%=PageNumber%>
<% else %>
<%=PageNumber%>
<% end if%>
<%Next %>