<% '----ouverture de connexion 'set conn = server.createobject("ADODB.Connection") 'conn.open(Application("gien_connectstring")) Set Connect = Server.CreateObject("ADODB.Connection") ConnectDBQ="DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ="&Server.MapPath("../../basedonnee/Catalogue_Gien.mdb") Connect.Open ConnectDBQ 'response.write ConnectDBQ 'response.end sql = "SELECT Produit.product_id, Produit.designation as designation, Produit.image_mea, Produit_EN.designation as designation_EN FROM Produit LEFT JOIN Produit_EN ON Produit.product_id = Produit_EN.product_id where produit.nouveaute=true" sql_count = "select count(*) From Produit where nouveaute=true" Set Rs_count = Server.CreateObject ("ADODB.Recordset") Rs_count.Open sql_count, Connect nbprdt = Rs_count(0) Rs_count.close '----ouverture du recordset de produits Set Rs = Server.CreateObject ("ADODB.Recordset") Rs.Open sql, Connect MyValue1="" MyValue2="" MyValue3="" MyValue4="" If nbprdt>=1 then Randomize MyValue1 = Int((nbprdt * Rnd) + 1) -1 end if if nbprdt>=2 then stopvar=false Do while stopvar=false Randomize MyValue2 = Int((nbprdt * Rnd) + 1) -1 if Myvalue1<>Myvalue2 Then stopvar=true end if Loop end if if nbprdt>=3 then stopvar=false Do while stopvar=false Randomize MyValue3 = Int((nbprdt * Rnd) + 1) -1 if MyValue1<>MyValue3 and MyValue2<>MyValue3 then stopvar=true end if Loop end if if nbprdt>=4 then stopvar=false Do while stopvar=false Randomize MyValue4 = Int((nbprdt * Rnd) + 1) -1 if MyValue1<>MyValue4 and MyValue2<>MyValue4 and MyValue3<>MyValue4 then stopvar=true end if Loop end if 'response.write "MyValue1 : "& MyValue1 &"
" 'response.write "MyValue2 : "& MyValue2 &"
" 'response.write "MyValue3 : "& MyValue3 &"
" 'response.write "MyValue4 : "& MyValue4 &"
" 'response.write "nbprdt : "& nbprdt &"
" 'response.end %> Gien Earthenware Factory





 
 
 
 
 
 




   
<%if Myvalue1<>"" then%> <%rs.movefirst%> <%rs.move Myvalue1%> ','produit','width=409,height=510,scrollbars=yes')">" width="165" height="120" border="0">
<%if trim(rs("designation_EN"))<>"" then%> <% designation=rs("designation_EN")%> <%else%> <% designation=rs("designation")%> <%end if%> <%=designation%>
','produit','width=409,height=510,scrollbars=yes')" class="bleu">Find out more



<%end if%> <%if Myvalue2<>"" then%> <%rs.movefirst%> <%rs.move Myvalue2%> ','produit','width=409,height=510,scrollbars=yes')">" width="165" height="120" border="0">
<%if trim(rs("designation_EN"))<>"" then%> <% designation=rs("designation_EN")%> <%else%> <% designation=rs("designation")%> <%end if%> <%=designation%>
','produit','width=409,height=510,scrollbars=yes')" class="bleu">Find out more <%end if%>
<%if Myvalue3<>"" then%> <%rs.movefirst%> <%rs.move Myvalue3%> ','produit','width=409,height=510,scrollbars=yes')">" width="165" height="120" border="0">
<%if trim(rs("designation_EN"))<>"" then%> <% designation=rs("designation_EN")%> <%else%> <% designation=rs("designation")%> <%end if%> <%=designation%>
','produit','width=409,height=510,scrollbars=yes')" class="bleu">Find out more



<%end if%> <%if Myvalue4<>"" then%> <%rs.movefirst%> <%rs.move Myvalue4%> ','produit','width=409,height=510,scrollbars=yes')">" width="165" height="120" border="0">
<%if trim(rs("designation_EN"))<>"" then%> <% designation=rs("designation_EN")%> <%else%> <% designation=rs("designation")%> <%end if%> <%=designation%>
','produit','width=409,height=510,scrollbars=yes')" class="bleu">Find out more <%end if%>