<% dim blognum, blogpage, sparecount, lastdate %> <% sub showblogs(newblogfir,blogonpage,allblog) %> <% if blogtable.RecordCount>0 then blogonpage=iif(blogonpage="all", blogtable.RecordCount-1, blogonpage) ' Calculates how many blogs there should be on the page. if VarType(newblogfir)=2 then ' If newblogfir is an integer. blognum=newblogfir blogonpage=1 allblog=false else ' Else if newblogfir isn't an integer. blognum=iif(newblogfir, CInt(blogtable.RecordCount)-1, 1) ' Calculates the initial blog number. if allblog then blogpage=iif(InStr(1, request.ServerVariables("QUERY_STRING"), "blogpage=", 1)>0, iif(VarType(CInt(request.queryString("blogpage")))=2, CInt(request.queryString("blogpage")), 1), 1)-1 ' Find the current page number. blognum=blognum+(iif(blogpage*blogonpage>blogtable.RecordCount-1, blogtable.RecordCount-1, blogpage*blogonpage)*iif(newblogfir, (-1), 1)) ' Finds the actual blognumber to start at from the page number. end if end if ' End to "if newblogfir is an integer". %> <% blogtable.movefirst ' Moves to first record in the database. blogtable.move blognum ' Moves to the desired first blog number. %> <% if not VarType(newblogfir)=2 then response.write vbcrlf&"
    "&vbcrlf ' If the blog is not on the comment page this opens a
" ' If the blog is not on the comment page this closes the