error; $db->disconnect(); ?> " . $nom; $menu_nav = "Accueil"; $metadescription=$nom. ", une référence de Dolphin Store, fabricant informatique."; $metakeywords=$nom.", fabricant informatique, dolphin store, fabricant ordinateur, ".$nom.", Dolphin Computers, PC, MAC"; break; } $menu_nav = array(); if($niveau >=1) $menu_nav[1] = "Accueil"; ?> echo "".$title_page.""; /*printf("%s",$title_page);*/ ?>
menu_nav = " . $menu_nav[$niveau] . "
" ; if ($niveau>=1) printf("

%s

",$menu_nav[$niveau]); // ici le titre de la page printf("

%s

",$titre_page); ?> %s / ",$nom_fab,$nom_fab,$nom_fab); //// $tab_fab[$nom_fab]['url'] = str_replace(" ","-",sprintf("/-%s.html",$nom_fab)); } foreach($tab_fab['nom_fab'] as $key => $value) { $total_similitude = 0; //// foreach($tab_fab[$key]['fabricant'] as $cle => $valeur) { if(sizeof($tab_mots_cles) > 0) { $liste_mots_descriptif=preg_replace("/([;:,?.'\/\-_])/"," ",$cle); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
taille mots cles %s , longueur mots_cles %s
",sizeof($tab_mots_cles),strlen($liste_mots_cles)); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) print_r($tab_mots_cles); //$liste_mots_descriptif=strtoupper($liste_mots_descriptif); $tab_mots_descriptif=explode(" ",$liste_mots_descriptif); $communs=array_intersect($tab_mots_descriptif,$tab_mots_cles); $ajout_liste_fab = str_ireplace($tab_mots_cles,$resu_mots_cles,$cle); if(sizeof($communs) > 0) $total_similitude += bcpow("100",sizeof($communs)); //// ON DONNE PLUS DE POIDS AUX NOMS DE FABRICANTS //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
taille communs %s -> Total similitude %s
",sizeof($communs),$total_similitude); } else { $ajout_liste_fab=$cle; } $liste_fab[$key] .= $ajout_liste_fab .", "; } $liste_fab[$key]=substr($liste_fab[$key],0,strlen($liste_fab[$key])-2); foreach($tab_fab[$key]['categorie'] as $kcle => $kvaleur) { if(sizeof($tab_mots_cles) > 0) { $liste_mots_descriptif=preg_replace("/([;:,?.'\/\-_])/"," ",$kvaleur); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
taille mots cles %s , longueur mots_cles %s
",sizeof($tab_mots_cles),strlen($liste_mots_cles)); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) print_r($tab_mots_cles); //$liste_mots_descriptif=strtoupper($liste_mots_descriptif); $tab_mots_descriptif=explode(" ",$liste_mots_descriptif); $communs=array_intersect($tab_mots_descriptif,$tab_mots_cles); $ajout_categorie_fab = str_ireplace($tab_mots_cles,$resu_mots_cles,$kvaleur); if(sizeof($communs) > 0) $total_similitude += bcpow("10",sizeof($communs)); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
taille communs %s -> Total similitude %s
",sizeof($communs),$total_similitude); } else { $ajout_categorie_fab=$kvaleur; } $categorie_fab[$key] .= $ajout_categorie_fab .", "; } $categorie_fab[$key]=substr($categorie_fab[$key],0,strlen($categorie_fab[$key])-2); //echo "

". $key."

"; //echo "

".$liste_fab[$key]."
"; //echo $categorie_fab[$key]."

"; $lien_interne.=$tab_fab[$key]['lien_interne']; $texte_paragraphe[$idp]=sprintf("

%s

%s
%s

",$tab_fab[$key]['url'],$key,$key,$key,$liste_fab[$key],$categorie_fab[$key]); //echo $texte_paragraphe[$idp]; if($total_similitude > 0) $similitude[$idp]=$total_similitude-$idp/100; else $similitude[$idp]= -$idp/100; //printf("
  • %s
    %s
    %s

  • ",$tab_fab[$key]['url'],$key,$liste_fab[$key],$categorie_fab[$key]); /*echo "
    "; */ $idp++; } // Trie des paragraphes à afficher arsort($similitude); foreach($similitude as $key => $value) { printf("%s",$texte_paragraphe[$key]); if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
    %s -> %s
    ",$key,$value); } // AFFICHAGE DES LIENS INTERNES echo "
    " . $lien_interne . "
    "; break; case 1: // Les catégories $resultatf = mysql_query($requetef); $num_rows = mysql_num_rows($resultatf); if($num_rows == 0) { printf("

    INFORMATION

    Les références produit du fabricant %s
    ne sont pas disponibles pour l'instant



    ",$nom); echo "
    TOUS NOS PRODUITS CLIQUEZ ICI"; } $idp=0; while($lignef = mysql_fetch_array($resultatf)) { $total_similitude = 0; //// $fabricant_nom=$lignef['fabricant_nom']; $famille=$lignef['famille']; $id_cat=$lignef['id']; $libelle=$lignef['categorie']; $encre = $famille ." / ". $libelle; $lien_interne[$encre]=sprintf("%s / ",$encre,$encre,$encre); $url = str_replace(" ","-",sprintf("http://informatique-discount.catalogue-produits.com/-%s/-%s/-%s/-%s.html",$id_cat,$famille,$libelle,$nom)); $requete_cat = " SELECT distinct ref as libelle from v_produits where id_cat = $id_cat and fabricant in (select ref_fab from v_fabricant where fabricant_tiret='$nom') order by libelle"; $resultat_cat = mysql_query($requete_cat); $descriptif = $encre . " -> REFERENCES DU CONSTRUCTEUR " . $fabricant_nom . ":
    XZXZX"; while($ligne_cat = mysql_fetch_array($resultat_cat)) { if($ligne_cat['libelle'] <> '') $descriptif .= " , " . $ligne_cat['libelle']; } $descriptif=str_replace("XZXZX ,","",$descriptif); if(sizeof($tab_mots_cles) > 0) { $liste_mots_descriptif=preg_replace("/([;:,?.'\/\-_])/"," ",$descriptif); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
    taille mots cles %s , longueur mots_cles %s
    ",sizeof($tab_mots_cles),strlen($liste_mots_cles)); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) print_r($tab_mots_cles); //$liste_mots_descriptif=strtoupper($liste_mots_descriptif); $tab_mots_descriptif=explode(" ",$liste_mots_descriptif); $communs=array_intersect($tab_mots_descriptif,$tab_mots_cles); $descriptif = str_ireplace($tab_mots_cles,$resu_mots_cles,$descriptif); //if(sizeof($communs) > 0) $total_similitude += bcpow("10",sizeof($communs)); if(sizeof($communs) > 0) $total_similitude += 10 * sizeof($communs); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
    taille communs %s -> Total similitude %s
    ",sizeof($communs),$total_similitude); } mysql_free_result($resultat_cat); //echo "

    ".$encre."

    "; //echo "

    ".$descriptif."

    "; $texte_paragraphe[$idp]=sprintf("

    %s

    %s

    ",$url,$encre,strtolower($encre),$encre,$descriptif); if($total_similitude > 0) $similitude[$idp]=$total_similitude-$idp/100; else $similitude[$idp]= -$idp/100; $idp++; } if($num_rows > 0) { // Trie des paragraphes à afficher arsort($similitude); foreach($similitude as $key => $value) { printf("%s",$texte_paragraphe[$key]); //if($_SERVER['REMOTE_ADDR'] == "82.66.186.154" && $debug == 1) printf("
    %s -> %s
    ",$key,$value); } // AFFICHAGE DES LIENS INTERNES foreach($lien_interne as $key => $value) { $affiche_lien_interne .= $value; } echo "
    " . $affiche_lien_interne . "
    "; } break; } mysql_free_result($resultatf); mysql_close(); include 'bandeau_bas.html'; ?>