<%
if request.QueryString("id")="" then
seccion="hotel"
else
seccion=request.QueryString("id")
end if
Set rs=Server.CreateObject("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db\hotel.mdb")
rs.open "select * from tbl_contenidos where id='" + seccion + "'",conn,1,2
if rs.eof then
seccion="hotel"
rs.close
rs.open "select * from tbl_contenidos where id='" + seccion + "'",conn,1,2
end if
%>
<%
if (rs("titulo1")<>"") then
%>
<% response.Write(rs("titulo1")) %>
<%
end if
%>
<%
if (rs("texto1")<>"") then
%>
<% response.Write(rs("texto1")) %>
<%
end if
%>
<%
if (rs("imagen1")<>"") then
%>
<%
end if
%>
<%
if (rs("texto2")<>"") then
%>
<% response.Write(rs("texto2")) %>
<%
end if
%>
<%
if (rs("imagen2")<>"") then
%>
<%
end if
%>
<%
if (rs("titulo2")<>"") then
%>
<% response.Write(rs("titulo1")) %>
<%
end if
%>
<%
if (rs("texto3")<>"") then
%>
<% response.Write(rs("texto1")) %>
<%
end if
%>
<%
if (rs("imagen3")<>"" or rs("texto4")<>"") then
%>
<%if (rs("imagen3")<>"") then%><% end if %>
<%if (rs("texto4")<>"") then%>
<% response.Write(rs("texto4")) %>
<% end if %>
<%
end if
%>
<%
if (rs("imagen4")<>"" or rs("texto5")<>"") then
%>
<%if (rs("imagen4")<>"") then%><% end if %>
<%if (rs("texto5")<>"") then%>
<% response.Write(rs("texto5")) %>
<% end if %>
<%
end if
%><%
if (rs("imagen5")<>"" or rs("texto6")<>"") then
%>
<%if (rs("imagen5")<>"") then%><% end if %>
<%if (rs("texto6")<>"") then%>
<% response.Write(rs("texto6")) %>
<% end if %>