%
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
%>