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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
// AFF ACTUALITES : GROSSES ACTU
$requete_video = "SELECT * from news order by date desc, heure desc limit 0,27";
$resultat_video = send_sql($requete_video);
// on distribue les résultats en 3 array : $col[0], $col[1] et $col[2]
// -> grâce au MODULO (x%y = reste de la division de x par y)
// ICI : ($index%3) renvoie alternativement : 0, 1 ou 2
$index = 0;
while($row = mysql_fetch_assoc($resultat_video)) {
$col[$index%5][] = $row;
$index++;
}
// affichage sur 3 colonnes
for ($i=0; $i<5; $i++)
{
?>
<div class="news3colonnes" style="border-top:0px;position:relative;">
<?php
$list_video = array(); // on vide (en créant un array vierge)
foreach($col[$i] as $list_video)
{
$requete_photo="SELECT fichier from news_photos as vp, photos as p where p.photo_id=vp.photo_id and vp.new_id='".$list_video['new_id']."'";
$resultat_photo=send_sql($requete_photo);
$list_photo=mysql_fetch_assoc($resultat_photo);
$requete_topic="SELECT count(topic_id) as cpt_commentaire from phpbb_posts where topic_id='".$list_video['topic_id']."'";
$resultat_topic=send_sql($requete_topic);
$list_topic=mysql_fetch_assoc($resultat_topic);
$size = resize_image_force($CONF_URL_SERV.'/images/'.str_replace('.jpg', '-thb.jpg', $list_photo['fichier']), 135, 76);
?>
<div class="slider_div3">
<div class="project_img3" style="overflow:hidden;">
<center>
<a class="lien_no" href="<?php echo link_actu($list_video['new_id']); ?>" title="<?php echo $list_video['titre']; ?>">
<img class="project_img3" src="<?php echo $CONF_URL_SERV.'images/'.str_replace('.jpg', '-thb.jpg', $list_photo['fichier']); ?>" alt="<?php echo $list_video['titre']; ?>" width="<?php echo $size['width']; ?>" height="<?php echo $size['height']; ?>" />
</a>
</center>
</div>
<h3>
<a href="<?php echo link_actu($list_video['new_id']); ?>" title="<?php echo $list_video['titre']; ?>">
<?php echo $list_video['titre']; ?>
</a>
</h3>
<div class="relative gris_clair size11" style="top:0px;width:296px;padding:5px 10px;">
<?php echo POSTED; ?><?php echo date_jjmmaaaa(convert_datetime($list_video['date']." ".$list_video['heure'])); ?> - <?php echo date_hhmmss(convert_datetime($list_video['date']." ".$list_video['heure'])); ?>
-
<a class="lien_deja_u gris_clair" style="font-size:11px;" href="<?php echo $CONF_URL_SERV."forum/".clean_url($list_video['titre'])."-t".$list_video['topic_id'].".html"; ?>" title="<?php echo $list['titre_fr']; ?>">
<?php echo READCOM; ?> (<?php echo ($list_topic['cpt_commentaire']-1); ?>)
</a>
</div>
<div class="relative" style="top:0px;width:296px;padding:5px 10px;">
<a href="<?php echo link_actu($list_video['new_id']); ?>" title="<?php echo $list_video['titre']; ?>">
<?php echo resize_txt(strip_tags($list_video['texte']), 240, 'oui'); ?>
</a>
<a class="lien_no gris_clair size11" href="<?php echo link_actu($list_video['new_id']); ?>" title="<?php echo $list_video['titre']; ?>">
<?php echo READALL; ?>
</a>
</div>
<?php // DEBUT SOCIAL BOUTONS?>
<div class="relative" style="height:20px;padding:10px;">
<div class="absolute" style="width:200px;margin:0px;float:left;">
<iframe scrolling="no" frameborder="0" style="width:200px;height:22px;background:none;" id="facebook-like-inner" src="http://www.facebook.com/plugins/like.php?href=<?php echo link_actu($list_video['new_id']); ?>&layout=button_count&show-faces=false&share=true&width=450&action=like&font=arial&colorscheme=light&locale=fr_FR"></iframe>
</div>
<div class="relative" style="float:right;margin:4px 0;">
<span class="relative black" >
<?php echo READ; ?><span class="bold size12"><?php echo $list_video['vu']; ?></span><?php echo READT; ?>
</span>
<td><img src="<?php echo $CONF_URL_IMAGE."global/pictonews-".$list_video['categorie_id'].".gif"; ?>" width="22" height="16" /></td>
</div>
</div>
<?php // FIN SOCIAL BOUTONS?>
</div>
<?php
} // fin foreach
?>
</div>
<?php
} // fin for
?>
<?php // FIN AFF ACTUALITES 1?> |
Partager