1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| <?php
$i=0;
$Bdd = new MySQL();
if(!$link = $Bdd -> connect($MySQL_Host, $MySQL_User, $MySQL_Passwd, $MySQL_Base))
die( $Bdd -> return_error() );
$Query = ' SELECT * FROM actualite ORDER BY num DESC';
if( !$Result = $Bdd -> Send_Query($Query, $link) )
die( $Bdd -> return_error());
while($annonce = $Bdd -> get_array($Result)) {
?>
<!-- CODE HTML -->
<span class="global_text">
<span class="text_bleu_left"></span>
<?php
$num= stripslashes($annonce['num']);
$elm1= stripslashes($annonce['elm1']);
if ($i < 3){
$elm1=substr($elm1, 0,700);
$i++;
}
else {
$elm1=substr($elm1, 0,160) ;
}
echo stripslashes($elm1);?>
</span>
<br/>
<!-- CODE HTML -->
<?php
}
$Bdd -> free_result($Result);
$Bdd -> close($link);
?> |
Partager