<% option explicit Dim strConnect Dim online online = true %> <% Dim db, rec, rec2, SQL, Fs,img,photoPath,promo Set db=Server.CreateObject("ADODB.Connection") Set rec=Server.CreateObject("ADODB.Recordset") Set rec2=Server.CreateObject("ADODB.Recordset") Set Fs=Server.CreateObject("Scripting.FileSystemObject") photoPath="../imgs/fiche/" promo=false db.Open strConnect SQL="SELECT TItems.NoItem, TItems.Titre, TItems.Description, TItems.Explication, TItems.Texte, " & _ "TItems.PhotoMenu AS Photo, TPromotion.TitreF AS TitrePromo, TPromotion.DescrF AS DescrPromo " & _ "FROM TItems INNER JOIN TPromotion ON TItems.NoItem = TPromotion.Produit " & _ "WHERE TPromotion.enLigneF=True" rec.open SQL,db if not(rec.bof=true and rec.eof=true) then promo=true SQL="SELECT Description FROM STCaracteristiques WHERE NoItem=" & rec("NoItem") rec2.open SQL,db if len(rec("Photo"))>0 then if Fs.FileExists(photoPath & rec("Photo")) then img = "" end if end if end if %> NovaJack
<% if promo then %> <% else %> <% end if %>
<%=img%>
<%=rec("Description")%>
<%=rec("Explication")%>

<%=replace(rec("Texte"),vbcrlf,"
")%>

<% do While Not rec2.EOF Response.Write rec2("Description") & "
" rec2.MoveNext loop %>

<%=rec("TitrePromo")%>

<%=rec("DescrPromo")%>

Désolé! Aucune promotion n'est en vigueur pour l'instant.

 

 

<% if promo then rec2.close db.close set db = nothing set rec = nothing set rec2=nothing %>