0) { if($_SESSION['utilisateur_options']['uo_favoris_type'] == 0) $hide_but_fav = $_SESSION['user_class']->productIsFavPerso($_GET['id']); if($_SESSION['utilisateur_options']['uo_favoris_type'] == 1) $hide_but_fav = $_SESSION['user_class']->productIsFavComp($_GET['id']); if($_SESSION['utilisateur_options']['uo_favoris_type'] == 2) { $test_fav_perso = $_SESSION['user_class']->productIsFavPerso($_GET['id']); $test_fav_comp = $_SESSION['user_class']->productIsFavComp($_GET['id']); if($test_fav_perso && $test_fav_comp) $hide_but_fav = true; } } } $DOC_TITLE = "[CHAPIER SARL] - Le service gagnant"; include("$repertoire_modele/haut.php"); include("modeles/produit_details.php"); include("$repertoire_modele/bas.php"); /****************************************************************************** * FONCTIONS *****************************************************************************/ function charge_produit($id) { global $wwwroot; /* Charge les infos du produit d'id $id */ $qid = mysql_query(" SELECT p.id ,p.reference ,p.nom ,p.descriptif ,p.description ,p.prix ,p.promotion ,p.image1 ,p.unite_vente ,p.conditionnement ,p.marque ,p.on_special ,p.art_grp ,p.departement ,p.family ,p.Q56 ,p.Q57 ,p.stock ,p.nom_de ,p.remplace ,p.remplacant ,p.description_de ,pc.categorie_id FROM peel_produits p ,peel_produits_categories pc WHERE p.id = pc.produit_id AND p.id = '".$_GET['id']."' AND p.etat = 1 "); if ($qid){ if (mysql_num_rows($qid)) { return mysql_fetch_array($qid); } else { return false; } } else { return false; } } function charge_prix($reference,$code_client) { $id_tarif = $code_client."#".$reference; $req_tarifs = "SELECT TAR_PRIX FROM peel_tarifs WHERE TAR_ID='$id_tarif'"; $result_tarifs=mysql_query($req_tarifs); if (mysql_num_rows($result_tarifs) != 0) { while($array_tarifs=mysql_fetch_array($result_tarifs)) { $prix = $array_tarifs['TAR_PRIX']; return $prix; } } } function charge_produit_other($id,$match,$prod_grp,$nbre_prod) { if(!isset($match) || $match =='') { //echo "je selectionne juste le groupe"; $qid = mysql_query("SELECT * FROM peel_produits WHERE art_grp = '".$prod_grp."' AND etat = 1 AND Q56 = '' AND id !='".$id."' ORDER BY Rand() LIMIT ".$nbre_prod.""); } else { //echo "je selectionne la page et le groupe"; $qid = mysql_query("SELECT * FROM peel_produits WHERE Q57 = '".$match."' AND art_grp = '".$prod_grp."' AND etat = 1 AND Q56 = '' AND id !='".$id."' ORDER BY Rand() LIMIT ".$nbre_prod.""); } return $qid; } ?>