tous // $typeDeRecherche==1 => gondoles // $typeDeRecherche==2 => promos // $typeDeRecherche==3 => nouveautés // $typeDeRecherche==4 => categories ( ancien familles ) // $typeDeRecherche==5 => sous categories // $typeDeRecherche==6 => nomPrd // $typeDeRecherche==7 => references if ($typeDeRecherche==0) {$idCat='';$nomPrd='';$ref='';} if ($typeDeRecherche==1) {$idCat='';$nomPrd='';$ref='';} if ($typeDeRecherche==2) {$idCat='';$nomPrd='';$ref='';} if ($typeDeRecherche==4) {$idCat='';$nomPrd='';$ref='';} if ($typeDeRecherche==5) {$nomPrd='';$ref='';} if ($typeDeRecherche==6) {$idCat='';$ref='';} if ($typeDeRecherche==6 && $nomPrd=='') {$typeDeRecherche=0;$idCat='';$ref='';} if ($typeDeRecherche==7) {$idCat='';$nomPrd='';} echo '
'; // --------------------------------------------------- // Titre de la page // --------------------------------------------------- dynamiqItemImage (0, 0, 'titresCat', 'span', '-action-','menu', 5, 'icones', '-textClass-','-varStyle-'); if ( $affMContext === true ) echo '
'; else echo '
'; dynamiqItemMessage( 0, 0, 'msgCatalogue', '-', 'span', 'msgCatalogue', '-action-', 'catalog', 20, '-'); // --------------------------------------------------- // Champs cachés // --------------------------------------------------- echo ''; echo ''; // --------------------------------------------------- // Liste deroulante catégories // --------------------------------------------------- // if ($_SESSION['afficherSousCat']==1) { dynamiqItemMessage(0, 1, 'libCatalogueCell', '-styleDiv-', 'span', 'libCatalogue', '-action-', 'catalog', 12, '-' ); if ( $affMContext === true ) echo '
'; else echo '
'; $reqSelect="SELECT F.idFam, FL.libelle FROM familles AS F JOIN `familleslibelle` AS FL ON F.idFam = FL.idFam WHERE FL.idLg=:lg AND F.status=1 ORDER by F.idFam;"; $stmt = $idPdo->prepare($reqSelect); $stmt->bindValue(':lg', $lg, PDO::PARAM_STR); $stmt->execute(); $reqDebug = str_replace( [':lg'], [ $idPdo->quote($lg) ], $reqSelect ); if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(1, ['Requête liste déroulante catégories' => $reqDebug ],'recherche.php');} echo ''; if ( $affMContext === true ) echo ''; $o=0; while ($tabResult = $stmt->fetch(PDO::FETCH_ASSOC)) { $idFamTab[$o]=$tabResult['idFam']; $libFamTab[$o]=$tabResult['libelle']; if ($idFam==$tabResult['idFam']) { echo ''; } else { echo ''; } // if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .='
$idFamTab[$o] = ' .$idFamTab[$o]. '';} // if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .=' $libFamTab[$o] = ' .$libFamTab[$o]. '';} $o++; } echo ''; echo '
'; echo '
'; // } // else { // if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(1, ['$_SESSION[afficherSousCat]' => $_SESSION['afficherSousCat'] ],'recherche.php');} // } // --------------------------------------------------- // Liste deroulante / saisie nomPrd // --------------------------------------------------- dynamiqItemMessage(0, 1, 'libCatalogueCell', '-styleDiv-', 'span', 'libCatalogue', '-action-', 'catalog', 13, '-' ); if ( $affMContext === true ) echo '
'; else echo '
'; if (isset($nomPrd) && $nomPrd!='undefined' ) echo ''; else echo ''; echo '
'; // --------------------------------------------------- // Si on veut une liste déroulante produits // --------------------------------------------------- // if (isset($debug[2]) && $debug[2] == '1' ) {echo 'reqSelect = ' .$reqSelect. '
';} // $resConn=$idPdo->query($reqSelect); // if (isset($debug[2]) && $debug[2] == '1' ) {echo 'resConn = ' .$resConn. '
';} // echo ''; // --------------------------------------------------- // Liste deroulante ref // --------------------------------------------------- if ($_SESSION['affRef']==1) { dynamiqItemMessage(0, 1, 'libCatalogueCell', '-styleDiv-', 'span', 'libCatalogue', '-action-', 'catalog', 14, '-' ); if ( $affMContext === true ) echo '
'; else echo '
'; $reqSelect="SELECT refPrd from `produits` where statusPrd=1 order by refPrd;"; if (isset($debug[2]) && $debug[2] == '1' ) {$debugMsg .= monDebug(1, ['reqSelect' => $reqSelect ],'recherche.php');} $tabResult=array(); $resConn=''; $resConn=$idPdo->query($reqSelect); $o=0; if ( $affMContext === true ) echo ''; if ($ref=="-" || $ref=="") echo ''; while ($tabResult=$resConn->fetch(PDO::FETCH_ASSOC)) { $o++; if ($ref===$tabResult['refPrd']) {echo '';} else {echo '';} } if ($ref==='') {echo '';} echo ''; echo '
'; } // --------------------------------------------------- // Bouton valider // --------------------------------------------------- dynamiqItemImage (0, 0, 'boutons', 'span', 'onClick="document.recherche.submit();"', 'bouton', 6, 'icones', '-textClass-','grid-column:1 / span 2;margin:auto; max-width:29%; margin-top:10px;'); echo '
'; //tableCatalogue // echo '
'; //page echo ''; $p=0; $cpt_tr=0; if ($afficheRes=='oui') { include ("./pages/produits/gondole_accueil.php"); } ?>