Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/07/2008, 14:57
ric18
 
Fecha de Ingreso: marzo-2007
Mensajes: 49
Antigüedad: 18 años, 1 mes
Puntos: 0
Respuesta: pregunta de para paginación

Bien ya quedó solucionado el asunto, tuve que quitar las variables y dejar el código como sigue, pego todo el código por si hay alguien que lo quiera ocupar, principalmente lo pensé para colocar un sistema de noticias en la página inicial.

Código PHP:
<%@LANGUAGE='VBScript'%>

<!--
#INCLUDE File="conecta.asp" -->

 
<%

Set rs=Server.CreateObject("adodb.recordset")
    
rsnews"SELECT ID,TITULO,SUMARIO FROM EWS"

    
rs.pagesize=1
    rs
.CursorLocation=3
    rs
.CursorType=1

rs
.Open rsnews,dbConn


Pagina 
Request.QueryString("pagina")
if 
pagina "1" or pagina "" then
      pagina 
"1"
end if
if 
not rs.eof then
      
'Indicamos que pagina debe de mostrar
      rs.AbsolutePage = pagina
end if
%>
<Table width=100%>
      <TR>
            <TD>ID Noticia</TD>
            <TD>Titulo</TD>
            <TD>Resumen</TD>
      </TR>
<%

For i = 1 to 1
      '
      
if not rs.eof then
            
</TD><TD>"&rs("titulo")&"</TD><TD>"&rs("sumario")&"</TD></TR>")
            Response.write("
<table>")
            Response.write("
<td>")
            Response.write("
<tr><a href=MMX_NewsD.asp?id="&rs("id")&">"&rs("titulo")& "</a></tr>" ) 
            Response.Write("
<tr>"&rs("sumario")& "</tr>")
            'Response.Write"
<tr>" &imagen& "</tr>"
            Response.Write("
</td>")
            Response.Write("
</table>")


            rs.MoveNext
      end if
next
%>
</Table>

<Table  Width="
600" border="0" align="center">
      <TR>
            
            <%if pagina = "
1" then%>
                  <TD width="
25%" align="center"> << </TD>
                  <TD width="
25%" align="center"> < </TD>
            <%else%>
                  <TD width="
25%" align= "center"><a href="paginador.asp?pagina=0"> << </a></TD>
                  <TD width="
25%" align= "center"><a href="paginador.asp?pagina=<%=pagina-1%>"> < </a></TD>
            <%end if%>
            <!--navegacion hacia paginas posteriores-->
            <%if int(pagina) => rs.PageCount then%>
                  <TD width="
25%" align="center"> > </TD>
                  <TD width="
25%" align="center"> >> </TD>
            <%else%>
                  <TD width="
25%" align= "center"><a href="paginador.asp?pagina=<%=pagina+1%>"> > </a></TD>
                  <TD width="
25%" align= "center"><a href="paginador.asp?pagina=<%=rs.PageCount%>"> < </a></TD>
            <%end if%>
      </TR>
</Table>