<?php 
include('connexion_mysql.php');

	 
 $file_name = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS verif_exist,id FROM annonces WHERE valid = 'ok' AND reponse='non'"));

        if($file_name['verif_exist'] > 0)
		 { 
include('pagination_voir_annonces_all.php');
include('function_court.php');?>



<?php $retour = mysql_query('SELECT * FROM annonces WHERE valid = "ok" AND reponse="non" ORDER BY id DESC LIMIT '.$premiereEntree.', '.$messagesParPage.'');

while ($donnees = mysql_fetch_array($retour)) // On fait une boucle
{?> 

<?php $donnees['titre'] = mb_strtoupper($donnees['titre']); ?>
<br /><div class="consult" style="margin-top:-70px; background:transparent; width:600px;padding:20px; line-height:20px;">
<p><b>Code</b> : <font style="color	:#000;"><?php 
	$id = sprintf("%06d",$donnees['id']);
echo $id;
?></font></p>
<p><b>Date limite</b> :<span style="color:red;"> <?php 
echo $donnees['date_limite'];
?></span></p>
<p style="vertical-align:middle; margin-left:90px; margin-left:90px;"><a href="<?php echo "consulter_annonces_all.php?mark=".$donnees['id']."";?>"><span id="bout" style="padding-top:3px; height:20px; font-size:13px; width:130px; padding:5px;">Consulter l'annonce</span></a></p>
<p style="width:470px; text-align:center; margin-top:-10px; text-align:center; font-size:14px; color: #134579;"><b><?php echo mb_strtoupper($donnees['titre'], 'UTF-8'); ?></b></p>
<p style="width:470px; text-align:center; margin-top:-10px; text-align:left; font-size:14px; color: #134579; width:330px;"><?php $str = $donnees['contenu'];
$str = truncate($str, 100, '...', true);
echo $str; // salut tout le monde ... ?>
</p><br />


</div>



<?php
  }
 
 }
 
else
  {echo "<div style=\"float:left; display:inline; width:300px; height:200px; margin-left:-180px;color:rgba(0,0,0,0.7); font-family:'Century Gothic'; font-size:16px;\"><img src=\"img/vide.png\"><br>aucune annonce disponible</div>";}
  

?>





