session_start(); include("include/config.php"); include("include/fonctions.php"); include("include/hpage.php"); // Edito tTbl(' '.TXT_TITRE_EDITO.' ', "left"); include("include/intro.php"); // Affichage des news tTbl(' '.TXT_TITRE_DERNIERES_NEWS.' ', "left"); $q1 = mysql_query("SELECT *, DATE_FORMAT(date, '$site_date_jh') AS dateh FROM news ORDER BY date DESC LIMIT ".$max_news_home); echo mysql_error(); while ($r1 = mysql_fetch_array($q1)) { echo "
".htmlentities($r1["titre"])."
\n".TXT_ENVOYE_PAR." ".htmlentities($r1["auteur"])." ".htmlentities($r1["dateh"])."
";
if (!empty($r1["img"]) && file_exists("images/news/".$r1["img"])) {
echo "";}
echo conv($r1["texte"]);
echo "
";
echo "";
$q2 = mysql_query("SELECT COUNT(*) AS num FROM commentaires WHERE type = 0 AND refer = ".$r1["idx"]." AND actif = 1");
$r2 = mysql_fetch_array($q2);
if ($r2["num"] > 1) {
echo $r2["num"]." ".TXT_COMMENTAIRES." ";}
elseif ($r2["num"] == 1) {
echo " ".TXT_1COMMENTAIRE." ";}
else {
echo " ".TXT_PAS_DE_COMMENTAIRE." ";}
mysql_free_result($q2);
echo "";
if (!empty($r1["suite"])) {
echo " - ".TXT_LIRE_LA_SUITE."";}
echo " - -