//////////paramtres de connexion///////////////////
include ("../site/fr/parametres.php");
include("../web_manager/config/connect.php");
$con = conct();
$cat_mag=11;
$link_general="http://www.voyagetunisie.info/info/carnet.aspx";
$affiche='';
$affiche.='';
$affiche.='
';
$id_mag=get_param(id_mag);
$limit_art=5;
$requete="select distinct news.id,headline,item,min_resized,alt_min,place_min,image,sdate from news,news_cat_news where news.id=news_cat_news.id and id_cat_news='$cat_mag' and id_langue='$id_langue' and statut_news='t' ";
if($id_mag) $requete.=" and id!='$id_mag'";
$requete.= "order by sdate desc,id desc limit 0,$limit_art";
//echo $requete;
$req=query($requete);
$nb=mysql_num_rows($req);
$compt=1;
$req=query($requete);
while($rec=mysql_fetch_array($req))
{
$idt_article=$rec["id"];
$titre_article=$rec["headline"];
$resume_article=$rec["item"];
$image_min=$rec["min_resized"];
$alt_min=$rec["alt_min"];
$date_article=convertdate($rec["sdate"]);
$class_picture="photo_jetset";
$rep=$rep_magazine."/";
$link_article=$nom_de_domaine.$rep.reecritureUrl($titre_article).".".$article_detail_magazine.".".$idt_article.".html";
$link_article=$link_general;
if($image_min) $photo='
';
else $photo='';
$image_max=$rec["image"];
if($image_max) $photo_max='
';
else $photo_max='';
$chaine=explode(' ',$resume_article);
$k=0;
$resume='';
while($k<=13){
$resume.=$chaine[$k];
if($k<13) $resume.=' ';
$k++;
}
$titre=explode(':',$titre_article);
if($compt==1)
{
$affiche.='
| '.$photo_max.' |
'.$titre_article.' '.$resume_article.' |
 |
|
';
}
else
{
$affiche.='
| '.$photo.' |
'.$titre[0].':
'.$titre[1].'
Publié '.$date_article.'
 |
|
';
}
$compt++;
}
$affiche.='
';
$affiche=addslashes($affiche);
$affiche = str_replace(chr(10), " ", $affiche);
$affiche = str_replace(chr(13), " ", $affiche );
$affiche = str_replace("’", "\'", $affiche );
//$affiche=utf8_decode($affiche);
//echo $affiche;
echo "document.write('".$affiche."');";