<%option explicit%> <% sub entete()%> Livres catalogués
index.html POUR LE PLAISIR DE LIRE ET D'APPRENDRE
"> <% end sub Sub AfficherListe(ByVal idLangue, ByVal idCategorie, ByVal sCategorie, ByVal sSignet) Dim livre_rs Dim sSQL ' On va chercher 6 mois en arrière sSQL = "SELECT * FROM livre" & _ " WHERE livre.id_categorie1 = " & idCategorie & _ " AND id_Langue = " & idLangue & _ " AND IsNull(dateCatalogue) = False" & _ " AND dateCatalogue >= #" & Dateadd("m", -6, Date()) & "#" 'Response.Write sSQL Set livre_rs = CreateObject("ADODB.Recordset") livre_rs.CursorLocation = 3 Call livre_rs.Open(sSQL, objConn, 0, 1) %> <%do until livre_rs.EOF%> <%livre_rs.movenext%> <%loop%>


<%Response.Write(sCategorie)%>

Date: <%response.write(livre_rs("dateCatalogue"))%>
No livre: <%response.write(livre_rs("id_livre"))%> Titre: <%response.write(livre_rs("titre_livre"))%>
<%if livre_rs("cote_dewey")<>"" then%> Cote Dewey: <%response.write(livre_rs("cote_dewey"))%> <%end if%> <%if livre_rs("sujet1")<>"" then%> Sujet: <% response.write(livre_rs("sujet1"))%> <%end if%>
Cote auteur: <% auteur_rs.seek livre_rs("id_auteur"), 1 If auteur_rs.eof = False Then response.write(auteur_rs("cote_auteur")) End If %> Auteur: <% If auteur_rs.eof = False Then response.write(auteur_rs("nom_auteur")) End If %>    Édité par: <% maisonedit_rs.seek livre_rs("id_maisonedition"), 1 if maisonedit_rs.eof = False Then response.write(maisonedit_rs("nom_maison")) End If %>
<% livre_rs.close set livre_rs=nothing END SUB %> <% const S_SIGNET = "S1" const S_SIGNET_2 = "S2" dim objConn set objConn = Server.CreateObject("ADODB.Connection") 'objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("/_private/biblio.mdb") & ";" objConn.Provider = "Microsoft.Jet.OLEDB.4.0" objConn.Open Server.Mappath("/_private/biblio.mdb") 'Déclaration des recordsets dim auteur_sql dim auteur_rs dim maisonedit_sql dim maisonedit_rs dim idLangue %> <% call entete() set auteur_rs = CreateObject("ADODB.Recordset") 'auteur_rs.CursorLocation = 3 auteur_rs.Open "auteur", objConn, 1, 1, 512 auteur_rs.index = "PrimaryKey" set maisonedit_rs = CreateObject("ADODB.Recordset") 'maisonedit_rs.CursorLocation = 3 maisonedit_rs.Open "maisonedition", objConn, 1, 1, 512 maisonedit_rs.index = "PrimaryKey" ' Langue par defaut : francais idLangue = 1 If LCase(Request.QueryString("lang")) = "en" Then idLangue = 2 End If if request.form("quoi")="adulte" then %>

Romans Français / Biographies et Documentaires

<% Call AfficherListe(idLangue , 1, "ROMANS FRANÇAIS", S_SIGNET) Call AfficherListe(idLangue , 11, "BIOGRAPHIES et DOCUMENTAIRES", S_SIGNET_2) end if If Request.Form("quoi") = "ado" then %>

Romans Jeunes Français / Biographies et Documentaires Jeunes

<% Call AfficherListe(idLangue , 14, "ROMANS JEUNES FRANÇAIS", S_SIGNET) Call AfficherListe(idLangue , 12, "BIOGRAPHIES et DOCUMENTAIRES JEUNES", S_SIGNET_2) End If If Request.Form("quoi") = "enfant" Then %>

Bandes Dessinées / Albums Enfants

<% Call AfficherListe(idLangue , 13, "BANDES DESSINÉES", S_SIGNET) Call AfficherListe(idLangue , 4, "ALBUMS ENFANTS", S_SIGNET_2) End If %> <% auteur_rs.close set auteur_rs=nothing maisonedit_rs.close set maisonedit_rs=nothing objConn.close set objConn=nothing%>