<% set base=server.createobject("ADODB.Connection") set rs=server.createobject("ADODB.Recordset") 'rs.CursorLocation = adUseServer 'rs.CursorType=adOpenForwardOnly 'rs.LockType=adLockReadOnly base.Open Conecta 'sql server 'Tabla hoteles de la CR cs="SELECT Establecimientos.CodigoEsta, Establecimientos.Nombre, Establecimientos.Estado, DatosHotel.poblacion, DatosHotel.Zona, DatosHotel.TipoAlojamiento, DatosHotel.Categoria, PresentacionHotel.Foto1, Establecimientos.Orde" cs=cs&" FROM (Establecimientos INNER JOIN DatosHotel ON Establecimientos.CodigoEsta = DatosHotel.CodigoEsta) INNER JOIN PresentacionHotel ON Establecimientos.CodigoEsta = PresentacionHotel.CodigoEsta" cs=cs & " ORDER BY Establecimientos.Orde" rs.open cs,base hayhoteles=false if not rs.eof then RegHoteles=rs.getrows HCodi=0 HNombre=1 HEstado=2 HPobla=3 HZona=4 HTipoA=5 HCate=6 HFoto=7 hayhoteles=true end if rs.close 'tipos Servicios cs="SELECT Id,Foto"&sqltail;&",Nombre_es " cs=cs & "FROM TiposServicio WHERE Home<>0 " cs=cs & "ORDER BY Orden" rs.Open cs, base hayTServi=false if not rs.eof then RegTServi=rs.GetRows RSId=0 RSFoto=1 RSNombre=2 hayTServi=true end if rs.close 'Zonas cs="SELECT Id,Zona_" & lng cs=cs & " FROM Zonas " cs=cs & "ORDER BY Zona_" & lng rs.Open cs, base hayZonas=false if not rs.eof then RegZonas=rs.GetRows RZId=0 RZNombre=1 hayZonas=true end if rs.close 'Tabla de categorias cs="SELECT Id,Nombre_" & lng & ",IdTipo FROM Categorias" hayCate=false rs.open cs,base if not rs.eof then RegCate=rs.getrows CaCodi=0 CaNombre=1 CaTipo=2 haycate=true end if rs.close 'Ofertas Home cs="SELECT Ofertas.CodigoEsta,Ofertas.Dto,Ofertas.Precio,DatosHotel.Zona,Ofertas.Titulo_" & lng & ",Ofertas.Texto1_" & lng & ",Ofertas.Id " cs=cs & "FROM Ofertas INNER JOIN DatosHotel " cs=cs & "ON Ofertas.CodigoEsta=DatosHotel.CodigoEsta " cs=cs & "WHERE Activa<>0 and Destacada<>0" rs.open cs,base hayofertas=false if not rs.eof then RegOfertas=rs.getrows OHotel=0 ODto=1 OPrecio=2 OZona=3 Otitulo=4 OTexto=5 hayofertas=true end if rs.close base.close 'Abrir conexion con la MDB base.Open ConectaMDB cs="SELECT Flash_" & lng & " FROM FlashHome WHERE Activa<>0" rs.open cs,base elflash="" if not rs.eof then elflash=rs("flash_" & lng) end if rs.close 'Destacadas cs="SELECT Titulo_" & lng & ",IdHotel,Precio FROM Destacadas " cs=cs & "WHERE Activa<>0 ORDER BY Orden" rs.open cs,base haydesta=false if not rs.eof then RegDesta=rs.getrows RDTitu=0 RDHotel=1 RDPrecio=2 hayDesta=true end if rs.close 'Buscar primera foto de cada hotel cs="SELECT DISTINCT IdHotel,Foto,Id FROM FotosHotel ORDER BY Id" rs.open cs,base haylfotos=false if not rs.eof then RegLFotos=rs.getrows RLFHotel=0 RLFFoto=1 hayLFotos=true end if rs.close set rs=nothing base.close set base=nothing %>

