<%
'*****************************************************************
' Get recordset and set paging information
'*****************************************************************
set ContentRs = Server.CreateObject("ADODB.Recordset")
ContentSql = "SELECT PK_CONTENT, SUBJECT, DATE_WRITTEN FROM CONTENT WHERE TYPE = '" & UCASE(CONTENT) & "' ORDER BY DATE_WRITTEN DESC"
ContentRs.PageSize = PAGE_SIZE
ContentRs.Open ContentSql, Conn, 1, 1
RecordCount = ContentRs.recordcount
TotalPages = ContentRs.pagecount
RecordNumber = (PAGE * IntPageSize) - (IntPageSize)
intPrev = PAGE - 1
intNext = PAGE + 1
Function FormatMediumDate(DateValue)
Dim strYYYY
Dim strMM
strYYYY = CStr(DatePart("yyyy", DateValue))
strMM = CStr(DatePart("m", DateValue))
If Len(strMM) = 1 Then strMM = "0" & strMM
FormatMediumDate = strMM & "/" & strYYYY
End Function
if RecordCount <> 0 then
ContentRs.AbsolutePage = PAGE
i = 1
For RECORD = 1 To ContentRs.PageSize
response.write " " & ContentRs("SUBJECT") & "" & " " & FormatMediumDate(ContentRs("DATE_WRITTEN")) & ""
ContentRs.MoveNext
If ContentRs.EOF Then Exit For
Next
response.write " "
call BuildNav2 (intPrev,IntNext,TotalPages)
Set ContentRs = nothing
end if
%> <%=strText%> |