Ver Mensaje Individual
  #23 (permalink)  
Antiguo 20/07/2010, 10:30
Avatar de Cameron_2006
Cameron_2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 248
Antigüedad: 17 años, 5 meses
Puntos: 0
Respuesta: Varios paginadores en una misma página

paginador 1:

<%
' PAGINADOR 1
if Request.QueryString("IrA") = "" then

pagina = 1
pag2 = 1
pag3 = 1

else

cual = Request.Querystring("irA")

pagYancla = Split(cual, "-")

Select Case pagYancla(1)
Case 1
pagina = CInt(pagYancla(0))
pag2 = 1
pag3 = 1
Case 2
pagina = 1
pag2 = CInt(pagYancla(0))
pag3 = 1
Case 3
pagina = 1
pag2 = 1
pag3 = CInt(pagYancla(0))
Case Else
pagina = 1
pag2 = 1
pag3 = 1
End Select
end if


Set prodRS = Server.CreateObject( "ADODB.Recordset" )

prodRS.CursorLocation = 3
prodRS.LockType=1

prodRS.PageSize = 1

sql = "select b.cod_anuncio, "
sql=sql & "h.txt_provincia, "
sql=sql & "i.txt_zona, "
sql=sql & "b.cod_usuario, "
sql=sql & "a.txt_nombre_inmo, "
sql=sql & "d.txt_clase, "
sql=sql & "c.cod_tipo, "
sql=sql & "c.txt_tipo, "
sql=sql & "b.cod_anuncio, "
sql=sql & "b.fecha_modificacion, "
sql=sql & "b.nro_precio_desde "
sql=sql & "from m_usuarios a, m_anuncios b, m_provincias h, m_zonas i, m_clases d, m_tipos c "
sql=sql & "where b.cod_provincia=h.cod_provincia "
sql=sql & "and a.cod_usuario=b.cod_usuario "
sql=sql & "and b.cod_zona=i.cod_zona "
sql=sql & "and b.cod_clase=d.cod_clase "
sql=sql & "and b.cod_tipo=c.cod_tipo "
sql=sql & "and c.cod_tipo=1 "
sql=sql & "order by b.cod_anuncio desc;"
prodRS.Open SQL, conexion,3,1



if prodRS.eof and prodRS.bof then
response.write "Actualmente no hay inmuebles"

else
prodRS.AbsolutePage =pagina
WHILE NOT prodRS.EOF AND rowCount < prodRS.PageSize
rowCount = rowCount + 1

%>
<tr>
<td colspan="4"><table width="84%" border="0" cellspacing="0">
<tr>
<td colspan="2" align="left"><a href=info_inmueble.asp?cod_anuncio=<%=prodRS("cod_ anuncio")%>><%=prodRS("txt_clase")%> / <%=prodRS("txt_tipo")%></a>




</td>
<td width="124">Ref. e-viviendas</td>
</tr>
<tr>
<td colspan="2" align="left"><%=prodRS("txt_zona")%> - <%=prodRS("txt_provincia")%></td>
<td><%=prodRS("cod_anuncio")%></td>
</tr>
<tr>
<td width="188" align="left"><%


if prodRS.Fields("nro_precio_desde")= 0 then
Response.Write "Consultar"
else
Response.Write FormatNumber(prodRS("nro_precio_desde"))
end if
%>
&euro;</td>
<td width="111" align="left">&nbsp;

</td>
<td>
<%
if prodRS.Fields("txt_nombre_inmo")= "0" then
Response.Write ""
else
response.write "<a href=info-inmobiliaria.asp?cod_usuario="&prodRS("cod_usuario ")&">"&prodRS("txt_nombre_inmo")&"</a>"
end if
%></td>
</tr>
</table>
</td>

<%
cod_anuncio=prodRS("cod_anuncio")


ssql = "select imagenthumb, (SELECT MIN(a.cod_foto) FROM m_fotosinmuebles a WHERE a.cod_anuncio=m_fotosinmuebles.cod_anuncio) from m_fotosinmuebles where cod_anuncio ="&cod_anuncio
'response.write("ssql")
'response.end
set mima=conexion.Execute(ssql)

if mima.eof and mima.bof then%>

<td width="39" valign="top"><a href=info_inmueble.asp?cod_anuncio=<%=prodRS("cod_ anuncio")%>><% response.write ("<img src='imagenes/iconos/foto-no-disponible.png' alt='no disponible' border='0'/>")%></a></td> <tr><td colspan="6"><hr size="1" color="#FF9900" /></td></tr>


<%
else

%>

<td width="72" valign="top">

<a href="info_inmueble.asp?cod_anuncio=<%=prodRS("cod _anuncio")%>"><img src="documentos/inmuebles/fotos/<%=mima("imagenthumb")%>" target="_blak" width="72" height="72" border="0" ></a>
</td>
</tr>
<tr><td colspan="6"> <table width="200" border="0" cellspacing="0">
<tr>
<td> <%


if prodRS.Fields("cod_anuncio")= "" then
Response.Write ""
else
response.write ("<a href=info-inmueble.asp?cod_anuncio="&prodRS("cod_anuncio")&" ><img src='imagenes/icono-fotos.png' alt='inmueble con fotos' border='0'/></a>")
end if
%>

&nbsp;</td>
<td><%

sqlp = "select imagenthumb, (SELECT MIN(a.cod_plano) FROM m_planos a WHERE a.cod_anuncio=m_planos.cod_anuncio) from m_planos where cod_anuncio ="&cod_anuncio
'response.write(sqlp)
'response.end
set plano=conexion.Execute(sqlp)

if plano.eof and plano.bof then

Response.Write ""

else

response.write ("<a href=info-inmueble.asp?cod_anuncio="&prodRS("cod_anuncio")&" ><img src='imagenes/icono-planos.png' alt='inmueble con fotos' border='0'/></a>")
end if



plano.Close
set plano=nothing
%>&nbsp;</td>
<td><%

sqlv = "select cod_video, cod_anuncio from m_videos where cod_anuncio ="&cod_anuncio
'response.write(sqlp)
'response.end
set video=conexion.Execute(sqlv)

if video.eof and video.bof then

Response.Write ""

else



response.write ("<a href=info-inmueble.asp?cod_anuncio="&prodRS("cod_anuncio")&" ><img src='imagenes/icono-video.png' alt='inmueble con fotos' border='0'/></a>")
end if



video.Close
set video=nothing
%> &nbsp;</td>
</tr>
</table>
</td></tr>
<tr><td colspan="6"><hr size="1" color="#FF9900" /></td></tr>

<%
end if
mima.Close
set mima=nothing

prodRS.MoveNext
WEND
'loop
%>
</table>
<%

IF prodRS.PageCount > 1 THEN
%>
<b>P&aacute;ginas de inmuebles: </b>
<%
FOR i = 1 to prodRS.PageCount
IF i <> cINT( pagina ) THEN
%>
<a href="index.asp?irA=<%=i%>-1"><%=i%></a>


<% ELSE %>
<b><%=i%></b>&nbsp;
<% END IF %>
<%
NEXT
%>
</font>
<%
END IF
end if
prodRS.close
'conexion.close
Set prodRS=nothing
'Set conexion=nothing

%>
</table>

</div>
<div class="TabbedPanelsContent"><table width="100%" border="0" cellspacing="0">
<tr>
<td width="72">&nbsp;</td>
<td width="21">&nbsp;</td>
<td width="95">&nbsp;</td>
<td width="40">&nbsp;</td>
<td width="39">&nbsp;</td>
<td width="10" colspan="2">&nbsp;</td>
</tr>