|
|
|
<%
Set rsCase = Server.CreateObject("ADODB.Recordset")
sql = "SELECT csID, csTitle, csImg, csImgLG, csDesc1, csDesc2, csDesc3, csHref, csSyn FROM CaseStudies;"
rsCase.CursorLocation = adUseClient
rsCase.Open sql, db, adOpenStatic, adLockReadOnly, adCmdText
Const PAGE_SIZE = 1 ' The size of our pages.
Dim I ' Standard looping variable
Dim intCurr ' The page we're currently on
Dim iPageCnt ' Number of pages of records
Dim iRcrdCnt ' Count of the records returned
Dim strURL ' The URL of current page so the form will work
' regardless what the file is named.
' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL")
iRcrdCnt = rsCase.RecordCount ' Number of records returned by query
iPageCnt = rsCase.PageCount ' Retrieve page to show or default to the first
If Not rsCase.EOF Then
If rsCase.RecordCount > PAGE_SIZE Then
Dim iRem
iRem = rsCase.RecordCount mod PAGE_SIZE
If iRem > 0 And iRem < 3 Then
iPageCnt = CInt(rsCase.RecordCount / PAGE_SIZE) + 1
Else
iPageCnt = CInt(rsCase.RecordCount / PAGE_SIZE)
End If
Else
iPageCnt = 1
End If
If Request.QueryString("which") <> "" Then
rsCase.Move CInt(Request.QueryString("which"))
intCurr = CInt(CInt(Request.QueryString("which"))/PAGE_SIZE)
Else
intCurr = 1
End If
rsCase.PageSize = PAGE_SIZE
rsCase.CacheSize = PAGE_SIZE
' Move to the page we need to show.
rsCase.AbsolutePage = intCurr
End If
%>
|
SAMPLES OF OUR WORK « Case Studies
|
<%If intCurr > 1 Then%>« Prev<%End If%>
<%
Dim iCnt
iCnt = 1
rsCase.MoveFirst
Do While Not rsCase.EOF
If iCnt <> intCurr Then
%>
"> <%=iCnt%>
<%
Else %>
<%=iCnt%>
<%
End If
rsCase.MoveNext
iCnt = iCnt + 1
Loop
%>
<%If iPageCnt > intCurr Then%>Next »<%End If%>
|
<%
rsCase.MoveFirst
If Request.QueryString("which") <> "" Then
rsCase.Move CInt(Request.QueryString("which"))
intCurr = CInt(CInt(Request.QueryString("which"))/PAGE_SIZE)
Else
intCurr = 1
End If
rsCase.PageSize = PAGE_SIZE
rsCase.CacheSize = PAGE_SIZE
' Move to the page we need to show.
rsCase.AbsolutePage = intCurr
%>
|
|
" target="_pacinfo1" onClick="javascript:window.blur();">" border="0"> |
<%If intCurr > 1 Then%>« Prev<%End If%>
<%
iCnt = 1
rsCase.MoveFirst
Do While Not rsCase.EOF
If iCnt <> intCurr Then
%>
"> <%=iCnt%>
<%
Else %>
<%=iCnt%>
<%
End If
rsCase.MoveNext
iCnt = iCnt + 1
Loop
%>
<%If iPageCnt > intCurr Then%>Next »<%End If%>
|
|
|
|
|
|
|
Serving Lane County since 1980 |
|
|