%@ LANGUAGE="VBSCRIPT" %> <%Session.LCID = 1034%> <%dim pais%> <%pais=request.Form("txtpaises")%> <%cFoto = "todo"%>
www.ofertisima.com
|
| <% 'recorremos las 7 primeras categorias sqlcategoriasgrales = "select * from pe_categoriasgrales where cg_descr in ('Automóviles','Inmobiliaria','Motos','Relaciones / Contactos','Informática')" Set RScategoriasgrales = Server.CreateObject("ADODB.RecordSet") RScategoriasgrales.Open sqlcategoriasgrales, oConn, 1, 1 do while Not RSCategoriasgrales.EOF cCatCodigo = RSCategoriasgrales("cg_codigo") sqlArtFoto = "select top 1 * from pe_articulos where ar_listo = 'S' and ar_foto = 'S' and cg_codigo = " & cCatCodigo & " Order by ar_fecingreso desc" Set RSArtFoto = Server.CreateObject("ADODB.RecordSet") RSArtFoto.Open sqlArtFoto, oConn, 1, 1 If Not RSArtFoto.EOF then cArtFoto = RSArtFoto("ar_codigo") cArtDescr = RSArtFoto("ar_descr") 'cArtIdCat = RScategoriasgrales("cg_codigo") cSubCFoto = RSArtFoto("cg_codigo") cSubCatGral = RSArtFoto("sc_codigo") cArtDes = RScategoriasgrales("cg_descr") sqlFilesFoto = "select top 1 * from pe_files where ar_codigo = " & cArtFoto Set RSFilesFoto = Server.CreateObject("ADODB.RecordSet") RSFilesFoto.Open sqlFilesFoto, oConn, 1, 1 end if If Not RSArtFoto.EOF then if RSArtFoto("ar_local") <> "S" then 'Si es un articulo de otro origen revisamos si contiene fotos y las mostramos if RSArtFoto("ar_fotos") <> "" then texto = RSArtFoto("ar_fotos") 'Convierto los retornos de carro y las tabulaciones en espacios texto = Replace (texto, VbCr, " ") texto = Replace (texto, VbLf, " ") texto = Replace (texto, VbCrLf, " ") texto = Replace (texto, VbTab, " ") 'Elimino el espacio en blanco de antes y después texto = Trim(texto) 'Recorro la cadena y voy reduciendo los múltiples espacios a uno solo while InStr(1, texto, " ", 1) texto = Replace(texto, " ", " ") wend matfoto = Split(texto, " ", -1, 1) lenmat = (UBound(Split(texto, " ", -1, 1)) + 1) dim i 'for i = 0 to lenmat - 1 for i = 0 to 0 nCantCol = 0%> |
<%response.write(" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_moto") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_inmo") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_naut") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_anuncio") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> |
<%'nCantCol = nCantCol + 1
'Loop
i = i + nCantCol
next
end if
else
If Not RSFilesFoto.EOF then%>
"&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_moto") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_inmo") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_naut") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=mid(RSArtFoto("ar_descr"),1,8)&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> <%end if%> <%if RSArtFoto("ar_anuncio") = "S" then%> &cCatGral=<%=RScategoriasgrales("cg_descr")%>" class="Estilo13 Estilo17 Estilo37"><%=Rtrim(mid(RSArtFoto("ar_descr"),1,8))&" "&rtrim(mid(RSArtFoto("ar_precio"),1,12))%> |
<%end if%>
<%end if
end if
END IF
RSCategoriasgrales.MoveNext
Loop%>
|
|
Otros Paises:
<%Select Case pais
case ("py"):
response.redirect("../../py/Paginas/index.asp")
case ("pe"):
response.redirect("../../pe/Paginas/index.asp")
case ("mx"):
response.redirect("../../mx/Paginas/index.asp")
case ("bo"):
response.redirect("../../bo/Paginas/index.asp")
case ("co"):
response.redirect("../../co/Paginas/index.asp")
case ("es"):
response.redirect("../../es/Paginas/index.asp")
case ("ec"):
response.redirect("../../ec/Paginas/index.asp")
case ("ur"):
response.redirect("../../ur/Paginas/index.asp")
case ("gt"):
response.redirect("../../gt/Paginas/index.asp")
case ("sv"):
response.redirect("../../sv/Paginas/index.asp")
case ("hn"):
response.redirect("../../hn/Paginas/index.asp")
End Select
%>
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||