<%if session("usr")<>0 then%> <%if (request.form<>"") and (request.form("variable")=1) then otro=0 consulta="select * from libros" criterio1=" and" criterio3=" or" criterio2=consulta if request.form("indice")<>"" then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if tcriterio=tcriterio+" numero like '%"&request.form("indice")&"%'" end if if request.form("tema")<>0 then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if ' rscons.open "select * from temas where codtema="&request.form("tema") ,conn ,adOpenKeyset ,adLockOptimistic tcriterio=tcriterio+" codtema="&request.form("tema") ' rscons.close end if if request.form("tipo")<>0 then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if ' rscons.open "select * from tipos where codtipo="&request.form("tipo") ,conn ,adOpenKeyset ,adLockOptimistic tcriterio=tcriterio+" codtipo="&request.form("tipo") ' rscons.close end if if request.form("titulo")<>"" then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if tcriterio=tcriterio+" titulo like '%"&request.form("titulo")&"%'" end if if request.form("autor")<>"" then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if tcriterio=tcriterio+" autor like '%"&request.form("autor")&"%'" end if if request.form("editorial")<>"" then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if tcriterio=tcriterio+" editorial like '%"&request.form("editorial")&"%'" end if if request.form("compra")<>"" then if otro=1 then tcriterio=tcriterio+criterio1 else otro=1 tcriterio=tcriterio+" where" end if tcriterio=tcriterio+" compra="&request.form("compra") end if consulta=consulta+tcriterio consulta=consulta&" order by codtema, codtipo, numero" ' response.write(consulta) %> <% rslibros.open consulta ,conn ,adOpenKeyset ,adLockOptimistic %>
Biblioteca

Búsqueda »  Resultado: <%if rslibros.recordcount=1 then response.write("1 libro encontrado") else%> <%=formatnumber(rslibros.recordcount,0)%> libros encontrados <%end if%>

Resultado de la Búsqueda

<%if request.form("tema")<>0 then rstemas.open "select * from temas where codtema="&request.form("tema") ,conn ,adOpenKeyset ,adLockOptimistic%>

Libros de <%=rstemas("nombretema")%> <%if request.form("tipo")<>0 then rstipos.open "select * from tipos where codtipo="&request.form("tipo") ,conn ,adOpenKeyset ,adLockOptimistic%> , <%=rstipos("nombretipo")%>

<%rstipos.close else response.write("") end if rstemas.close end if if request.form("titulo")<>"" then%>

con el texto "<%=request.form("titulo")%>" en el Título

<%end if if request.form("autor")<>"" then%>

con el texto "<%=request.form("autor")%>" en el Autor

<%end if if request.form("editorial")<>"" then%>

con el texto "<%=request.form("editorial")%>" en la Editorial

<%end if if request.form("compra")<>"" then%>

comprados en <%=request.form("compra")%>

<%end if%>
<%num=1 do until rslibros.eof rstemas.open "select * from temas where codtema="&rslibros("codtema") ,conn ,adOpenKeyset ,adLockOptimistic rstipos.open "select * from tipos where codtipo="&rslibros("codtipo") ,conn ,adOpenKeyset ,adLockOptimistic%> <%rstemas.close rstipos.close rslibros.movenext num=num+1 loop rslibros.close%>
Índice Título Autor Editorial
<%=num%>. ','a','scrollbars=no,height=500,width=500,status=no,toolbar=no,menubar=no,location=no');">Modificar Libro ','a','scrollbars=no,height=150,width=300,status=no,toolbar=no,menubar=no,location=no');">Borrar Libro <%=rstemas("numero")%>.<%if rslibros("codtipo")=0 then response.write("0") else response.write(rstipos("numero")) end if%>.<%=rslibros("numero")%> ><%=rslibros("titulo")%> <%=rslibros("autor")%> <%=rslibros("editorial")%> <% if rslibros("libre")=true then%> ','a','scrollbars=no,height=350,width=300,status=no,toolbar=no,menubar=no,location=no');">Ocupar <%else%> Ocupado <%end if%>


<% end if if (request.form<>"" and request.form("variable")=2) or request.form="" then %>
Biblioteca
" name="librobuscar">

Buscar Libros

Índice: 

Tema: 

<%if request.form("tema")<>0 then rstipos.open "select * from tipos where codtema="&request.form("tema")&" order by nombretipo" ,conn,adOpenKeyset ,adLockOptimistic if not rstipos.eof then%>

Tipo: 

<%else%> <%end if rstipos.close end if%>

Título: 

Autor: 

Editorial: 

Año de compra: 





<%end if else response.redirect("salir.asp") end if%>