%
option explicit
Dim strConnect
Dim online
online = true
%>
<%
Dim db, rec, SQL, Fs,img,photoPath,promo
Set db=Server.CreateObject("ADODB.Connection")
Set rec=Server.CreateObject("ADODB.Recordset")
Set Fs=Server.CreateObject("Scripting.FileSystemObject")
photoPath="../imgs/thumb/" ' "c:\Serveur\wwwroot\novajack\www\imgs\thumb\"
promo=false
db.Open strConnect
SQL="SELECT TItems.Titre, TItems.Descriptione, TItems.PhotoMenu AS Photo, " & _
"TPromotion.TitreE AS TitrePromo, TPromotion.DescrE AS DescrPromo " & _
"FROM TItems INNER JOIN TPromotion ON TItems.NoItem = TPromotion.Produit " & _
"WHERE TPromotion.enLigneE=True"
rec.open SQL,db
if not(rec.bof=true and rec.eof=true) then
promo=true
if len(rec("Photo"))>0 then
if Fs.FileExists(photoPath & rec("Photo")) then
img = ""
end if
end if
end if
%>
![]() |
![]() |
![]() |
![]() |
|||||||
|
||||||||||
|
|
|
<% db.close set db = nothing set rec = nothing set Fs=nothing %>