require_once("db.php");
$db1 = new myDB();
$db1->connexion();
$db1->requete("Select * from actualite ORDER BY datea DESC");
//$db1->next();
//if($db1->nbrResult() > 3 )
//{
$i=1;
$dateAuj= date("Y-m-d");
$LaDate= $dateAuj;
$annee= substr($LaDate,0,4);
$nommois = substr($LaDate,5,2);
$jour = substr($LaDate,8,2);
$dateAuj= $jour."-".$nommois."-".$annee;
while ($i<2 && $db1->next())
{
$DateAct1=$db1->data->datea;
$LaDate= $DateAct1;
$annee= substr($LaDate,0,4);
$nommois = substr($LaDate,5,2);
$jour = substr($LaDate,8,2);
$DateAct1= $jour."-".$nommois."-".$annee;
echo' ';
echo '
';
echo ' '.$DateAct1.'
'.$db1->data->titre.' ';
//echo '';
if ($db1->data->Image1!='' )
{
echo ' ';
}
else
{
echo' ';
}
echo substr($db1->data->texte,0,200).' Suite... |
';
/*if ($db1->data->Image1!='' )
{
echo ' ';
}
else
{
echo' ';
}*/
//echo'
// ';
$i=$i+1;
// $db1->next();
echo'
';
}
$db1->requete("Select * from actualite where id_rubrique = '1' ORDER BY datea DESC limit 0,4");
echo '
';
//}
?>
|