<%if session("usr")<>0 then if (Request.Form <>"") Then if (request.form("variable")=1) then rslibros.open "select * from libros where codlibro="&request.querystring("codlib") ,conn ,adOpenKeyset ,adLockOptimistic if cint(request.form("tema"))<>cint(rslibros("codtema")) or cint(request.form("tipo"))<>cint(rslibros("codtipo")) then rstemas.open "select * from temas where codtema="&request.form("tema") ,conn ,adOpenKeyset ,adLockOptimistic rstipos.open "select * from tipos where codtipo="&request.form("tipo") ,conn ,adOpenKeyset ,adLockOptimistic if rstipos.eof then rscons.open "select * from libros where codtema="&request.form("tema")&" order by numero desc" ,conn ,adOpenKeyset ,adLockOptimistic if rscons.eof then rslibros("numero")=1 else rslibros("numero")=rscons("numero")+1 end if rscons.close rslibros("codtipo")=0 else rscons.open "select * from libros where codtipo="&request.form("tipo")&" order by numero desc" ,conn ,adOpenKeyset ,adLockOptimistic if rscons.eof then rslibros("numero")=1 else rslibros("numero")=rscons("numero")+1 end if rscons.close rslibros("codtipo")=request.form("tipo") end if rstipos.close rstemas.close end if if request.form("numero")<>"" then rslibros("numero")=request.form("numero") if request.form("tema")<>0 then rslibros("codtema")=request.form("tema") ' if request.form("tipo")<>0 then rslibros("codtipo")=request.form("tipo") if request.form("titulo")<>"" then rslibros("titulo")=request.form("titulo") if request.form("autor")<>"" then rslibros("autor")=request.form("autor") if request.form("editorial")<>"" then rslibros("editorial")=request.form("editorial") if request.form("compra")<>"" then rslibros("compra")=request.form("compra") if request.form("libre")<>"" then rslibros("libre")=request.form("libre") rslibros.update rslibros.close conn.close strHtml = "
" & vbCrLf strHtml = strHtml & "" & vbCrLf strHtml = strHtml & "
" & vbCrLf strHtml = strHtml & "" & vbCrLf Response.Write strHTML end if end if rslibros.open "select * from libros where codlibro="&request.querystring("codlib") ,conn ,adOpenKeyset ,adLockOptimistic rstemas.open "select * from temas where codtema="&rslibros("codtema") ,conn ,adOpenKeyset ,adLockOptimistic rstipos.open "select * from tipos where codtipo="&rslibros("codtipo") ,conn ,adOpenKeyset ,adLockOptimistic %>
" action="<%= Request.ServerVariables("SCRIPT_NAME") %>" name="libromod">

Modificar Datos

Índice:  <%=rstemas("numero")%>.<%if rslibros("codtipo")=0 then response.write("0") else response.write(rstipos("numero")) end if%>.

<%rstemas.close rstipos.close%>

Tema: 

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

Tipo: 

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

Título: 

Autor: 

Editorial: 

Año de compra: 

Libre?:  <%if rslibros("libre")=True then%> No

<%else%> No

<%end if%>



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