tengo este script
Código HTML:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/sumer_con.asp" --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin título</title> </head> <% '----- definir cadena sql sql = "SELECT * FROM CURRICULUMS" %> <% cantidadregistros=40 %> <% if request.querystring("paginaactual")<>"" then mostrarpagina=request.querystring("paginaactual") else mostrarpagina=1 end if %> <% set rs=Server.CreateObject("ADODB.Recordset") rs.cachesize=60 rs.open sql, MM_sumer_con_STRING, 3, 3 %> <% rs.pagesize=cantidadregistros maxpagina=cint(rs.pagecount) maxregistros=cint(rs.pagesize) rs.absolutepage=mostrarpagina contreg=0 %> <% '--Si en lugar de cinco registros quiere mostrar diez, sólo cambie los "5" por "10" y los "4" por "9". if int(mostrarpagina)<>int(maxpagina) then '-- Si no es la última página. hasta=mostrarpagina*40 desde=hasta-39 else hasta=rs.recordcount desde=(maxpagina*40)-39 end if %> <body> Resultados : <% response.write desde & " a " & hasta & " de " & rs.recordcount & " encontrados.<BR><BR>" %> Pagina: <%=mostrarpagina%> <br /><br /> <% do while not rs.eof and contreg < maxregistros response.write rs.fields("CODI") & "<br>" rs.movenext contreg=contreg+1 loop %> <% cero="0" nombrescript=request.servervariables("script_name") if int(mostrarpagina)<>1 then '--si no es la primer página mostrar botón atrás ref="<a href='" & nombrescript & "?buscar=" &_ Server.Urlencode(request.querystring("buscar")) ref=ref & "&paginaactual=" & mostrarpagina-1 ref=ref & "'>[<< Anterior]</a> " end if for contador=1 to maxpagina If contador>9 then cero="" end if ref=ref & " <a href='" & nombrescript ref=ref & "?buscar=" & Server.Urlencode(request.querystring("buscar")) ref=ref & "&paginaactual=" & contador if int(contador)=int(mostrarpagina) then '-- pone en negrita pagina actual ref=ref & "'><strong>" & cero & contador & "</strong></a>" else ref=ref & "'>" & cero & contador & "</a>" end if next if int(mostrarpagina)<>int(maxpagina) then '-- si no es la última página ' mostrar botón siguiente ref=ref & " <a href='" & nombrescript & "?buscar=" ref=ref & Server.Urlencode(request.querystring("buscar")) ref=ref & "&paginaactual=" & mostrarpagina+1 ref=ref & "'>[Siguiente >>]</a>" end if response.write ref %> </body> </html>
lo que me pasa es que me sale
[<< Anterior] 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 [Siguiente >>]
lo que no se es como hacer que me salga
<<Primera <<Anterior 01 02 03 04 05 06 07... Siguiente>> Ultima >>
y que cuando cliara en el 5 se me fueran sumando paginas (como hace el google)
... 04 05 06 07 08 09 10 11 ...