<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%=titulo%> <% call cabecera %>
<% call menu %> <% Const SCRIPT_NAME= "ocasion.asp" Const RECORDS_PER_PAGE = 8 nPage = CLng(Request.QueryString("Page")) cat=request.QueryString("cat") subcat=request.QueryString("subcat") set rs=server.CreateObject("ADODB.Recordset") 'sql="select * from flota where idsubcategoria="&subcat&"" sql="SELECT * FROM flotaocasion order by id desc" RS.CursorLocation = 3 ' adUseClient rs.open sql,Oconn select case session("idioma") case 1 %> <% if not rs.eof then nRecCount = RS.RecordCount ' Tell recordset to split records in the pages of our size RS.PageSize = RECORDS_PER_PAGE ' How many pages we've got nPageCount = RS.PageCount ' Make sure that the Page parameter passed to us is within the range If nPage < 1 Or nPage > nPageCount Then ' Ops - bad page number ' let's fix it nPage = 1 End If RS.AbsolutePage = nPage %> <% end if %>
Vehículos de ocasión
<% do while not (RS.Eof OR RS.AbsolutePage <> nPage) %> <% rs.movenext loop %>
<% if not rs("fotom")="" then %> " width="100px" height="75px"/> <% end if %> &cat=<%=rs("idcategoria")%>&subcat=<%=rs("idsubcategoria")%>" class="enlaceslista2"><%=rs("nombre")%>
 
<% if nRecCount>RECORDS_PER_PAGE then if nPage=1 then Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage>1 AND nPagePrimera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " ' Next Page ' we link to this page with Page parameter Current Page + 1 Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage = nPageCount then Response.Write "Primera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " end if end if %>
<% else %>
No se ha encontrado ningún vehículo
<% case 2 %> <% if not rs.eof then nRecCount = RS.RecordCount ' Tell recordset to split records in the pages of our size RS.PageSize = RECORDS_PER_PAGE ' How many pages we've got nPageCount = RS.PageCount ' Make sure that the Page parameter passed to us is within the range If nPage < 1 Or nPage > nPageCount Then ' Ops - bad page number ' let's fix it nPage = 1 End If RS.AbsolutePage = nPage %> <% end if %>
Vehicles d'ocasió
<% do while not (RS.Eof OR RS.AbsolutePage <> nPage) %> <% rs.movenext loop %>
<% if not rs("fotom")="" then %> " width="100px" height="75px"/> <% end if %> &cat=<%=rs("idcategoria")%>&subcat=<%=rs("idsubcategoria")%>" class="enlaceslista2"><%=rs("nombre")%>
 
<% if nRecCount>RECORDS_PER_PAGE then if nPage=1 then Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage>1 AND nPagePrimera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " ' Next Page ' we link to this page with Page parameter Current Page + 1 Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage = nPageCount then Response.Write "Primera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " end if end if %>
<% else %>
No s'ha trobat cap vehicle
<% case 3 %> <% if not rs.eof then nRecCount = RS.RecordCount ' Tell recordset to split records in the pages of our size RS.PageSize = RECORDS_PER_PAGE ' How many pages we've got nPageCount = RS.PageCount ' Make sure that the Page parameter passed to us is within the range If nPage < 1 Or nPage > nPageCount Then ' Ops - bad page number ' let's fix it nPage = 1 End If RS.AbsolutePage = nPage %> <% end if %>
Vehículos de ocasión
<% do while not (RS.Eof OR RS.AbsolutePage <> nPage) %> <% rs.movenext loop %>
<% if not rs("fotom")="" then %> " width="100px" height="75px"/> <% end if %> &cat=<%=rs("idcategoria")%>&subcat=<%=rs("idsubcategoria")%>" class="enlaceslista2"><%=rs("nombre")%>
 
<% if nRecCount>RECORDS_PER_PAGE then if nPage=1 then Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage>1 AND nPagePrimera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " ' Next Page ' we link to this page with Page parameter Current Page + 1 Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage = nPageCount then Response.Write "Primera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " end if end if %>
<% else %>
No se ha encontrado ningún vehículo
<% case else %> <% if not rs.eof then nRecCount = RS.RecordCount ' Tell recordset to split records in the pages of our size RS.PageSize = RECORDS_PER_PAGE ' How many pages we've got nPageCount = RS.PageCount ' Make sure that the Page parameter passed to us is within the range If nPage < 1 Or nPage > nPageCount Then ' Ops - bad page number ' let's fix it nPage = 1 End If RS.AbsolutePage = nPage %> <% end if %>
Vehículos de ocasión
<% do while not (RS.Eof OR RS.AbsolutePage <> nPage) %> <% rs.movenext loop %>
<% if not rs("fotom")="" then %> " width="100px" height="75px"/> <% end if %> &cat=<%=rs("idcategoria")%>&subcat=<%=rs("idsubcategoria")%>" class="enlaceslista2"><%=rs("nombre")%>
 
<% if nRecCount>RECORDS_PER_PAGE then if nPage=1 then Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage>1 AND nPagePrimera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " ' Next Page ' we link to this page with Page parameter Current Page + 1 Response.Write "Página Siguiente" Response.Write "    " ' Last Page ' we link to this page with Page parameter = nPageCount Response.Write "Ultima Página" end if if nPage = nPageCount then Response.Write "Primera Página" Response.Write "    " ' Previous Page ' we link to this page with Page parameter = Current Page - 1 Response.Write "Página Anterior" Response.Write "    " end if end if %>
<% else %>
No se ha encontrado ningún vehículo
<% end select %>
<% call banners_derecha %>
<% call pie %>