include"confcms2.php";
$db = mysql_connect("$dbchemin","$dbuser","$dbpass") or mysql_die("Connexion impossible");
$err = mysql_error();
if ($err) {
echo "Uh oh! There's an error! news Here it is: ";
echo "$err";
}
mysql_select_db("$dbname");
$err = mysql_error();
if ($err) {
echo "Uh oh! There's an error! news Here it is: ";
echo "$err";
}
$authors = mysql_query("SELECT id, Name FROM authors");
$cats = mysql_query("SELECT id, Name FROM categories");
$ans = mysql_query("SELECT id, Name FROM an");
$ans1 = mysql_query("SELECT id, Name FROM an");
$ans2 = mysql_query("SELECT id, Name FROM an");
$moi = mysql_query("SELECT id, Name FROM mois");
$mooi1 = mysql_query("SELECT id, Name FROM mois");
$mooi2 = mysql_query("SELECT id, Name FROM mois");
$mooi3 = mysql_query("SELECT id, Name FROM mois");
$mooi4 = mysql_query("SELECT id, Name FROM mois");
$comonn="";
$mot = mysql_query("SELECT id, Name FROM motcle3");
// Allow the user to edit the author with ID=$id
$premier= ""; $deux= ""; $trois= ""; $quatre= ""; $cinq= ""; $six= ""; $sept= "";
$nb=0;
$nb_t=0;
$prem=""; $ddeux=""; $ttrois=""; $qquatre=""; $ccinq=""; $ssix=""; $ssept="";
if (isset($_GET['article']))
{
$article =$_GET['article'];}
else{
if (isset($_GET['id']))
{
$article =$_GET['id'];
} }
if (isset($_GET['page']))
{
$page =$_GET['page'];}
else{
$page ="";
}
if (isset($_GET['Selecti']))
{
$Selecti =$_GET['Selecti'];}
else{
$Selecti ="";
}
//echo "article $article $id";
$resul=mysql_query("SELECT * FROM articles WHERE ID='$article' ");
$rech = mysql_fetch_array($resul);
$idte= $rech["ID"];
$qui = $rech["ID"];
$tite = $rech["tit"];
$tete = $rech["titre"];
/*
$tete = ereg_replace("é","é",$tete);
$tete = ereg_replace("à","à",$tete);
$tete = ereg_replace("ê","ê",$tete);
$tete = ereg_replace("î","î",$tete);
$tete = ereg_replace("Ï","ï",$tete);
$tete = ereg_replace("è","è",$tete);
$tete = ereg_replace("ç","ç",$tete);
$tete = ereg_replace("û","û",$tete);
$tete = ereg_replace("ù","ù",$tete);
$tete = ereg_replace("ô","ô",$tete);
$tete = ereg_replace("â","â",$tete);
*/
$titre = $rech["titre"];
/*
$titre = ereg_replace("é","é",$titre);
$titre = ereg_replace("à","à",$titre);
$titre = ereg_replace("ê","ê",$titre);
$titre = ereg_replace("î","î",$titre);
$titre = ereg_replace("Ï","ï",$titre);
$titre = ereg_replace("è","è",$titre);
$titre = ereg_replace("ç","ç",$titre);
$titre = ereg_replace("û","û",$titre);
$titre = ereg_replace("ù","ù",$titre);
$titre = ereg_replace("ô","ô",$titre);
$titre = ereg_replace("â","â",$titre);
*/
$joketext = $rech["texte_long"];
/*
$joketext = ereg_replace("é","é",$joketext);
$joketext = ereg_replace("à","à",$joketext);
$joketext = ereg_replace("ê","ê",$joketext);
$joketext = ereg_replace("î","î",$joketext);
$joketext = ereg_replace("Ï","ï",$joketext);
$joketext = ereg_replace("è","è",$joketext);
$joketext = ereg_replace("ç","ç",$joketext);
$joketext = ereg_replace("û","û",$joketext);
$joketext = ereg_replace("ù","ù",$joketext);
$joketext = ereg_replace("ô","ô",$joketext);
$joketext = ereg_replace("â","â",$joketext);
*/
$ref = $rech["reference"];
$dte = $rech["date"];
$item = $rech["item"];
$img = $rech["img"];
$titaudio = $rech["titaudio"];
$year1=substr($dte,0,4);
$mois1=substr($dte,5,2);
$jour1=substr($dte,8,2);
$jokedt = "$jour1-$mois1-$year1";
$key1 = $rech["key1"];
$plus=" ," ." ,". " ,". " ," ." ,"." ,";
$key1= "$key1" . "$plus";
list($premier, $deux, $trois, $quatre, $cinq, $six, $sept)=split('[,]',$key1,7);
$explode = explode(",", "$key1");
if ($premier != "" )
{
$explode1 = explode(" ", "$premier");
$premier = trim($premier);
$prem= "$premier";
}
if ($deux != "" )
{$ddeux= trim($deux);
}
if ($item =="") {
$item= trim($prem);
$item .= "+";
$item .= trim($ddeux);
if (!empty($item))
{
$mots = str_replace(" ", "+", $item); // on remplace les , par des espaces
$mots = str_replace(" de ", "", $mots); // on remplace les : par des espaces
$mots = str_replace(" des ", "", $mots); // on remplace les : par des espaces
$mots = str_replace(" le ", "", $mots); // on remplace les : par des espaces
$mots = str_replace(" les ", "", $mots); // on remplace les : par des espaces
$mots = str_replace(" la ", "", $mots); // on remplace les : par des espaces
//echo " $mots mot1";
$mots = str_replace("+++", "+", $mots); // on remplace les +++ par un +
$mots = str_replace("++", "+", $mots); // on remplace les ++ par un +
$item=$mots;
//echo " $item item";
}
}
$jokebig = $rech["image_big"];
if ($jokebig==" ") {
$jokebig='';
}
$lien = $rech["nom_lien1"];
$lienfo = $rech["lienfo"];
/*
$jokelien = ereg_replace("","",$lien);
$jokelien1 = ereg_replace("LIEN","",$jokelien);
$joketext = eregi_replace("\[b]","",$joketext);
$joketext = eregi_replace("\[eb]","",$joketext);
$joketext = eregi_replace("\[i]","",$joketext);
$joketext = eregi_replace("\[ei]","",$joketext);
// Paragraphs and line breaks
$joketext = ereg_replace("\r","",$joketext);
$joketext = ereg_replace("\n\n"," ",$joketext);
$joketext = ereg_replace("\n"," ",$joketext);
// Hyperlinks
$joketext = ereg_replace(
"\[L]([-_./a-zA-Z0-9!&%#?,'=:~]+)\[EL]",
"\\1", $joketext);
$joketext = ereg_replace(
"\[L=([-_./a-zA-Z0-9!&%#?,'=:~]+)]".
"([-_./a-zA-Z0-9 !&%#?,'=:~]+)\[EL]",
"\\2", $joketext);
*/
if($titaudio != ""){
$comonn .= ' | | Version pour Impression [Zoom>";
$resultat = mysql_query("select * from feed");
$nombre2 = mysql_num_rows($resultat);
$succ = mysql_data_seek($resultat,$nombre2-1);
$idnew2 ="$nombre2" -15;
$requete2 = "SELECT * FROM feed LIMIT $idnew2 , 15";
//$requete2="select * from articles where ID >='$idnew2' ";
$jokes = mysql_query($requete2);
while ($joke = mysql_fetch_array($jokes)) {
$titre = $joke["titre"];
/*
$titre = ereg_replace("é","é",$titre);
$titre = ereg_replace("à","à",$titre);
$titre = ereg_replace("ê","ê",$titre);
$titre = ereg_replace("î","î",$titre);
$titre = ereg_replace("Ï","ï",$titre);
$titre = ereg_replace("è","è",$titre);
$titre = ereg_replace("ç","ç",$titre);
$titre = ereg_replace("û","û",$titre);
$titre = ereg_replace("ù","ù",$titre);
$titre = ereg_replace("ô","ô",$titre);
$titre = ereg_replace("â","â",$titre);
*/
$idfeed = $joke["ID"];
$dtt = $joke["date"];
$dte = $joke["date"];
$year1=substr($dte,0,4);
$mois1=substr($dte,5,2);
$jour1=substr($dte,8,2);
$jokedt = "$jour1-$mois1-$year1";
$dtit = $joke["tit"];
echo ("$jokedt - $titre Lire ");
}
echo ('Plus de brèves');
echo' |