
17/05/2004, 06:48
|
| | Fecha de Ingreso: enero-2003 Ubicación: Barcelona
Mensajes: 124
Antigüedad: 22 años, 4 meses Puntos: 0 | |
ahi va!
Y muchisimas gracias!
--------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../connections/bikes_connection.asp" -->
<%
Response.Buffer = True
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Monty Bicycles. Photo Album.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0">
<%picno=0%>
<table width="495" border="0" cellspacing="0" cellpadding="0">
<%
'Get the Current page
Page = Request.QueryString("Page")
'If there is no page set it to page 1
If Page = "" then Page = 1
RowCount = 0
Set RS = Server.CreateObject( "ADODB.Recordset" )
strSQLQuery = "SELECT * FROM bikes order by bikeID asc"
'Need a rich cursor type to support paging
rs.CursorType = 3 'adOpenStatic
'Set the number of records in each page to 10
rs.PageSize = 12
rs.Open strSQLQuery, con
'Set the current page based on the QueryString value
'Must cast it as an integer or else it will have problems.
rs.AbsolutePage = cInt(Page)
If Response.IsClientConnected = true then
Do while not rs.eof and RowCount < rs.PageSize
%>
<tr>
<td valign="middle" align="left" width="100" rowspan="2"><a href="show_bike.asp?bike_id=<%=rs("bikeID")%>"> <img src="images/thumb/<%=rs("img_sm")%>" border="0"></a></td></tr>
<% rs.Movenext
RowCount = RowCount + 1
Loop %>
</table>
<p><span class="maintext">Page: </span>
<% For PageCounter = 1 to rs.PageCount %>
<a href="index.asp?Page=<%=pageCounter%>" class="maintext"><%=pageCounter%></a>
<% Next
end if
%>
</body>
</html>
<%con.close%>
---------------------------------------
A ver si ves alguna anomalia... |