Rechercher :
Dans : Sur : News | Articles

"; } // RESULTATS if ($page == "resultat") { echo titre("Résultats de la recherche"); if ($dans_news) { if ($recherche_lieu == "titre") { $requete = mysql_query("SELECT * from news where titre like '%$recherche_texte%' order by id desc"); } elseif ($recherche_lieu == "description") { $requete = mysql_query("SELECT * from news where description like '%$recherche_texte%' order by id desc"); } else { $requete = mysql_query("SELECT * from news where titre like '%$recherche_texte%' or description like '%$recherche_texte%' order by id desc"); } $nbr_news = mysql_numrows($requete); if ($nbr_news != "0") { echo "

News
"; $i = "0"; WHILE ($i != $nbr_news) { $id_news = mysql_result($requete,$i,"id"); $titre_news = mysql_result($requete,$i,"titre"); echo "- "; echo lien($titre_news,"news.php?id=$id_news",$titre_news); echo "
"; $i++; } echo "

"; } } if ($dans_articles) { if ($recherche_lieu == "titre") { $requete = mysql_query("SELECT * from articles where titre like '%$recherche_texte%' order by id desc"); } elseif ($recherche_lieu == "description") { $requete = mysql_query("SELECT * from articles where description like '%$recherche_texte%' order by id desc"); } else { $requete = mysql_query("SELECT * from articles where titre like '%$recherche_texte%' or description like '%$recherche_texte%' order by id desc"); } $nbr_articles = mysql_numrows($requete); if ($nbr_articles != "0") { echo "

Articles
"; $i = "0"; WHILE ($i != $nbr_articles) { $id_article = mysql_result($requete,$i,"id"); $titre_article = mysql_result($requete,$i,"titre"); echo "- "; echo lien($titre_article,"articles.php?page=lire&id=$id_article",$titre_articles); echo "
"; $i++; } echo "

"; } } if ( ( (empty($dans_news)) || ($nbr_news == "0") ) && ( (empty($dans_articles)) || ($nbr_articles == "0") ) ) { echo "

La recherche n'a donné aucun résultat.

"; } } include 'interface_bas.php'; ?>