%
Dim strCatVals 'Because add to cart sub needs it to be dimentionalized.
If Request("PageNo") <> "" Then
If Request("PageNo") = 0 Then
Response.Redirect "error.asp?Error=You entered page number 0" &_
"
Please go back and enter a valid page number."
End IF
End If
Const adOpenKeyset = 1
Const adLockOptimistic = 3
DIM mySQL, objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT * FROM Products Where Featured = 'Yes' And Hide = 'No' Order By ItemNumber"
objRS.Open mySQL, objConn, 1, 3
DIM mySQL2, objRS2, strCount
Set objRS2= Server.CreateObject("ADODB.Recordset")
mySQL2 = "SELECT Count(ItemNumber) AS Total FROM Products Where Featured = 'Yes' And Hide = 'No'"
objRS2.Open mySQL2, objConn, 1, 3
strCount = objRS2("Total")
Dim strOpt1Id
Dim strOpt2Id
Dim strOpt3Id
Dim oRs2
Dim Sql2
Dim oRs3
Dim Sql3
Dim oRs4
Dim Sql4
Call AddToCart()
If objRS.EOF Then
Else
Dim PageNo
' Setup Recordset
Dim strPageSize
If Request("PageSize") = "" Then
strPageSize = Session("PageSize")
If (strPageSize = "") Then
strPageSize = 5
End If
Else
strPageSize = Request("PageSize")
Session("PageSize") = Request("PageSize")
End If
objRS.PageSize = strPageSize
Dim strPageCount
strPageCount = objRS.PageCount
' Adjust PageNumber as Appropriate
If Request("PageNo") = "" Then
PageNo = 1
Else
PageNo = Request("PageNo")
End If
objRS.AbsolutePage = PageNo
'Make sure page number entered by user is not larger than the last page.
If Request("PageNo") <> "" Then
Dim strCheckTotal
strCheckTotal = Abs(objRS.PageCount)
Dim strPageNum
strPageNum = Abs(Request("PageNo"))
If (strPageNum > strCheckTotal) Then
Response.Redirect "error.asp?Error=You entered page number " & PageNo &_
".
There are only " & strPageCount & " pages of entries." &_
"
Please go back and enter a page number between 1 and " & strPageCount & "."
Else
End If
Else
End If
' End Check page number.
End If
%>
|
<% If objRS.EOF Then Response.Write " Sorry, there are no featured items at this time.
<% If Abs(strPageCount) > 1 Then %>
|
||||||||||||||||||||||||||||||||||||