FichierImage; $ImageAAfficher=$U->FichierImage; $NumImagePremier=$U->NumImage; } else {$ImagePrincipale=ScriptPath."/".$ImageVide; $ImageAAfficher=$ImageVide; $NumImagePremier=0;} mysql_free_result($Requete); }//fin on a pu chercher l'image if ($Fidelite=="Oui") {//alors le taux promotionnel est de 100% car produit gratuit! $TypePromo=PROMO_GRATUIT; $TauxPromo="100"; } else {//on cherche de quelle promo il s'agit, ou s'il n'y en a pas //maintenant on stocke dans la variable $Promo la promotion sur ce produit si elle existe $SQL="SELECT TauxPromo,TypePromotion,DateFinPromotion "; $SQL.=" FROM Produits LEFT JOIN Lien_Prod_Promo ON Produits.NumProd=Lien_Prod_Promo.NumProduit "; //sin une promo déterminée est demandée $SQL.=",Promotions"; $SQL.=" WHERE NumUtilisateurProduit='".NUM_UTILISATEUR."' "; $SQL.=" AND Promotions.NumPromotion=Lien_Prod_Promo.NumPromo "; $SQL.=" AND NumProd='".$NumProd."' AND TypePromotion='".$TypePromo."'"; $SQL.=" AND DateDepPromotion<=NOW('') AND DateFinPromotion>=NOW('')"; $Requete=mysql_query($SQL,CONNECTION); $TypePromo=0; if ($Requete) {if (mysql_num_rows($Requete)>0) {$Promo=mysql_fetch_object($Requete); $TypePromo=$Promo->TypePromotion; } mysql_free_result($Requete); } }//fin de la recherche de l'existence d'une promotion autre que gratuit }//fin on a pu faire la liste des produits else {//on ne peut pas lancer la requete $ErreurNo=ERR_SELECT; }//fin on ne peut pas lancer la requete //gestion de l'affichage des liste déroulantes pour les options du produit //création en même temps du javascript nécessaire pour les contrôles $LibelleOptionAncien=""; $TexteOptions=""; $SQL="SELECT NumCatOption, LibelCatOption".$Langue." As LibelleOption FROM CatOptions WHERE NumProdCatOption=$NumProd ORDER BY LibelCatOption".$Langue; $Requete3=mysql_query($SQL,CONNECTION); if ($Requete3) {if (mysql_num_rows($Requete3)>0) {$TexteOptions=""; } $TabOptions=""; //stocke le nom des différentes listes déroulantes d'option $TabTexteOptions=""; //stocke le nom des différentes options pour le produit for ($i=0;$iLibelleOption; $TexteOptions.="\n"; $TexteOptions.="\n"; $TexteOptions.="\n"; //On cherche ensuite les différentes options }// fin tant que d'options if (mysql_num_rows($Requete3)>0) {$TexteOptions.= "
\n"; //on cherche maintenant les modalités pour cette option $SQL="SELECT NumValeurOption, PrixValeur, LibelValeur".$Langue." AS LibelleValeurOption FROM ValeurOptions WHERE NumOption=$V->NumCatOption"; $Requete4=mysql_query($SQL,CONNECTION); if ($Requete4) {//on crée la liste déroulante des options possibles $NbreValeurs=mysql_num_rows($Requete4); if ($NbreValeurs>0) { $VariableTemp="Option".$V->NumCatOption; $TexteOptions.="\n"; }// } //on a fini de chercher les sous modalités $TexteOptions.="
\n";} mysql_free_result($Requete3); } if ($TabTexteOptions!="") { ?>

 
&Taille_Police=&Police=&Couleur=">

  "> <? echo $Libel_Precedent; ?>
 

 
0) {//il existe des images //on crée la structure html de la galerie ?>
LibelleProd)," ","+"); if (isset($TypePromo)) {//une promo est en cours pour cet article //on remplit la case avec une animation if ($TypePromo!=PROMO_GRATUIT) {$DateFin=$Promo->DateFinPromotion; //calcul du nombre de jours restants $DateJour=mysql_date(); $NbreJoursRestant=Nbre_Jours_Entre_Dates($DateJour,$DateFin); } switch ($TypePromo) { case PROMO_FLASH : $DateFinTemp=strtr($DateFin," ","-"); $DateFinTemp=strtr($DateFinTemp,":","-"); $DateFinTemp=substr($DateFinTemp,2,strlen($DateFinTemp)); ?>
\n"; echo "disp_clock('rebours".$NumProd."','",$DateFinTemp,"','".GRANDE_TAILLE_POLICE_FLASH."','",POLICE_FLASH,"','",COULEUR_POLICE_FLASH,"');\n"; echo "\n"; ?>
 

&NumProd=&NumImage=&LibelleProduit="> &Largeur=" border=1 width="">
">

&NumProd=&NumImage=&LibelleProduit="> &Largeur=" border=1 width="">
">

&NumProd=&NumImage=&LibelleProduit="> &TypePromo=TypePromotion; ?>&Largeur=" border=1 width="">
">

&NumProd=&NumImage=&LibelleProduit="> &TypePromo=TypePromotion; ?>&Largeur=" border=1 width="">
">
0) { ?> "> <? if ($NumImagePremier>0) {echo $Libel_ClicAgrandir;} ?> 0) { ?>
">
  TauxPromo) && ($Promo->TauxPromo>0)) {$PrixProd=$T->PrixProd*(1-($Promo->TauxPromo/100)); $Economie=AfficheNombre($T->PrixProd*$Promo->TauxPromo/100); } else {if ($TypePromo==PROMO_GRATUIT) {$PrixProd=0; $Economie=$T->PrixProd; } else {$PrixProd=$T->PrixProd; $Economie=0;} } ?>

",$Libelle_Seulement_Fidelite,""; } else {echo $Libelle_Seulement;} ?>

0) //dans le cas d'une reduction/promotion {//affichage de l'économie ?>

Fidelite_Produit;} else {echo intval(COEFF_FIDELITE*$PrixProd*(1-($Promo->TauxPromo/100))*100);} ?>

0) {$Choix=rand(0,1); switch ($Choix) { case 0 : if ($NbreJoursRestant==0) {$TexteRestant=$Libelle_DernierJour."!|".$Libelle_Dernier_Demain."!";} else {$TexteRestant=$Libelle_PlusQue." ".$NbreJoursRestant." ".$Libelle_PlusQue_Fin."!|";} break; case 1 : $TexteRestant=Jour_DateSup($DateFin,$Langue)." ".$Libelle_CFini."!|"; break; } ?> " border=0 align=absmiddle alt="LibelleProd)); ?>">
MarqueProduit) and $T->MarqueProduit!="") { ?>
LibelleProd); ?>
MarqueProduit; ?>
QuantiteProd>0) { if ($T->QuantiteProd<10) {echo $Libelle_PresqueEpuise;} else {echo $Libel_Quantite; } } else {echo $Libelle_Epuise;} ?>
"> "> ">
 
DescriptifProduit; ?>

FichierImage; $tNumImages[]=$T->NumImage; } //----------------------------------------------------- // définition du tableau HTML (plaquette de photos) $NbrePhotosParLigne=NbreImagesLigne; echo "\n"; $ligne=0; while (($ligne*$NbrePhotosParLigne)<(sizeof($tImages))) { print "\n"; echo "\n"; for ($pos = 0; $pos < $NbrePhotosParLigne; $pos++) { $ind=$ligne*$NbrePhotosParLigne+$pos; if (isset($tImages[$ind]) && $tImages[$ind]!="") { $NomImg=substr($tImages[$ind],0,strlen($tImages[$ind])-4); echo "\n"; } else {//affichage vide si pas de photo sur la fin de ligne echo "\n"; } } print "\n"; echo "\n"; for ($pos = 0; $pos < $NbrePhotosParLigne; $pos++) { $ind=$ligne*$NbrePhotosParLigne+$pos; if (isset($tImages[$ind]) && $tImages[$ind]!="") { echo "\n"; } else { echo "\n"; } } print ""; $ligne++; } echo "
\n"; echo "",$Libel_ClicAgrandir,"\n
"; echo "
  
\n"; echo "",$Libel_Agrandir,"
"; echo "
  
\n"; //----------------------------------------------------- //Fin construction du tableau ?>