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! basenews Here it is: ";
echo "$err";
}
$premier="";$deux=""; $trois=""; $quatre=""; $cinq=""; $six=""; $sept="";
$nb=0;
$prem=""; $ddeux=""; $ttrois=""; $qquatre=""; $ccinq=""; $ssix=""; $ssept="";
$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");
$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;
$comonn="";
$article="";
$id="";
$page="";
$prem=""; $ddeux=""; $ttrois=""; $qquatre=""; $ccinq=""; $ssix=""; $ssept="";
if (isset($_GET['article']))
{
$article =$_GET['article'];}
else{
if (isset($_GET['id']))
{
$article =$_GET['id'];
} }
if (isset($_POST['article']))
{
$article =$_POST['article'];
}else{
if (isset($_POST['id']))
{
$article =$_POST['id'];
} }
if (isset($_GET['Selecti']))
{
$Selecti =$_GET['Selecti'];}
else{
$Selecti ="";
}
if (isset($_GET['FRecherche']))
{
$FRecherche =$_GET['FRecherche'];}
else{
$FRecherche ="";
}
if (isset($_GET['Selecto']))
{
$Selecto =$_GET['Selecto'];}
else{
$Selecto ="";
}
$page ="";
$comonn="";
$operateur ="AND";
if ($article == "" )
{
echo("
Erreur d'imputation d'article - " .
"Ajoutez le numero d'article" ." puis appuyez sur la touche Enter" .
" ou cliquez sur retour et recommencez en ajoutant" . " le numéro de l'article souhaité
");
//echo "erreur d'imputation d'article ";
echo "Retour";
exit;
}
$resul=mysql_query("SELECT * FROM feed WHERE ID='$article' ");
if ($resul) {
$rech = mysql_fetch_array($resul);
}
$idfeed = $rech["ID"];
$qui = $rech["ID"];
$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);
$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"];
$jokebig = $rech["image_big"];
$lien = $rech["lien1"];
//$key1 = $rech["key1"];
$dte = $rech["date"];
$item = $rech["item"];
$img = $rech["img"];
$titaudio = $rech["titaudio"];
$audio = $rech["audio"];
$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($ns, $el) = split( ':', $element, 2);
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='';
}
$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","