<% Idioma=request.querystring("idioma") If IsEmpty(Idioma) then Idioma=1 end if 'Variables dim Entradas(10,40,5) 'sección, entrada, datos dim Imagenes(100,200) 'entrada, imagenes dim Imagenes_Galeria(100,200) 'Galería, imagenes Dim Secciones(10,6) Dim Idiomas(6,3) Set bdatos = Server.CreateObject("ADODB.Connection") bdatos.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("base/Base.mdb")) set rs = Server.CreateObject("ADODB.Recordset") set rs2 = Server.CreateObject("ADODB.Recordset") txt = "SELECT * FROM Idiomas WHERE Activo=true ORDER BY Orden" rs.open txt, bdatos, 3, 1 i=0 while (not rs.Eof) i=i+1 Idiomas(i,0)=rs("Id_Idioma") Idiomas(i,1)=rs("Idioma") Idiomas(i,2)=rs("Archivo") rs.movenext wend Idiomas(0,0)=i rs.close txt = "SELECT * FROM Secciones WHERE Activa=true and Idioma=" & Idioma & " ORDER BY Orden" rs.open txt, bdatos, 3, 1 i=0 while (not rs.Eof) i=i+1 Secciones(i,0)=rs("Id_Seccion") Secciones(i,1)=rs("Nombre") Secciones(i,2)=rs("Titulo") Secciones(i,3)=rs("Entrada_Tipo") Secciones(i,4)=rs("Galeria") 'Galería de imágenes Secciones(i,5)=rs("Presentacion") rs.movenext wend Secciones(0,0)=i rs.close txt = "SELECT * FROM Entradas WHERE Activa=true and Idioma=" & Idioma & " ORDER BY Id_Entrada" rs.open txt, bdatos, 3, 1 for i=1 to Secciones(0,0) Entradas(i,0,0)=0 next while (not rs.Eof) aux=cint(rs("Seccion")) num=Entradas(aux,0,0) + 1 Entradas(aux,0,0)= num 'Número de entradas en la sección id=rs("Id_Entrada") Entradas(aux,num,0)=id Entradas(aux,num,1)=rs("Nombre") texto=rs("Texto") txt = "SELECT * FROM Imagenes WHERE Activa=true and Entrada=" & id & " ORDER BY Id_Imagen" rs2.open txt, bdatos, 3, 1 j=0 'if j=7 then while (not rs2.Eof) imagen=rs2("Archivo") j=j+1 'alt=rs2("Texto") txt="imagen" & j & "d" txt2="
" txt2="hola" texto=replace(texto,txt,txt2) txt="imagen" & j & "i" txt2="
" texto=replace(texto,txt,txt2) txt="imagen" & j & "c" txt2="
" texto=replace(texto,txt,txt2) rs2.movenext wend 'end if rs2.close Entradas(aux,num,2)=texto rs.movenext wend rs.close for i=0 to 99 Imagenes(i,0)=0 next txt = "SELECT * FROM Imagenes WHERE Activa=true" rs.open txt, bdatos, 3, 1 while (not rs.Eof) archivo=rs("Archivo") num=rs("Entrada") num2=Imagenes(num,0)+1 Imagenes(num,num2)=archivo Imagenes(num,0)=num2 rs.movenext wend rs.close for i=0 to 99 Imagenes_Galeria(i,0)=0 next txt = "SELECT * FROM Imagenes_Galerias WHERE Activa=true" rs.open txt, bdatos, 3, 1 while (not rs.Eof) archivo=rs("Archivo") num=rs("Galeria") num2=Imagenes_Galeria(num,0)+1 Imagenes_Galeria(num,num2)=archivo Imagenes_Galeria(num,0)=num2 rs.movenext wend rs.close '%> <% response.write("
") response.write("") 'response.write("") response.write("") response.write("
") if Idiomas(0,0)>1 then for i=1 to Idiomas(0,0) response.write("") response.write("" & Idiomas(i,1) & "") next end if response.write("
") response.write("
") set rs=nothing set rs2=nothing bdatos.close set bdatos=nothing %>