Public feed
#724426
if ($action==send) {
$msg_erreur = "";
$output = "<?xml version='1.0' encoding=\"UTF-8\" ?>\n";
$output .= "\t<news>\n";
for($x=0;$x<$_POST['counter'];$x++){
$headline = "headline_".$x;
$date = "date_".$x;
$description = "description_".$x;
$delete = "delete_".$x;
if (!$_POST["".$delete.""]) {
$newheadline = trim($_POST["".$headline.""]);
$newdate = trim($_POST["".$date.""]);
$newdescription = trim($_POST["".$description.""]);
if ( (empty($newheadline)) || (empty($newdate)) || (empty($newdescription)) ) {
$msg_erreur .= "-Vous n'avez pas rempli tous les champs de la news <em>".$newheadline."</em>";
} else {
$newheadline=htmlentities(stripslashes($newheadline));
$newdescription=htmlentities(stripslashes($newdescription));
$output.="\t\t<story>\r\n";
$output.="\t\t\t<headline>";
$output.=$newheadline;
$output.="</headline>\r\n";
$output.="\t\t\t<date>";
$output.=$newdate;
$output.="</date>\r\n";
$output.="\t\t\t<description>";
$output.=$newdescription;
$output.="</description>\r\n";
$output.="\t\t</story>\r\n";
}
}
}
echo $output;
}