Merci d'indiquer un nom de page.";
else
{
switch($_['action'])
{
case 'ajouter':
$xml_file = cleanName(LAST_KEY.'#'.str_replace("\'", " ", $_['titre']).'.xml');
copy('../modules/'.$_['type'].'/base.xml', '../data/pages/'.$xml_file);
ecriture_xml('../data/pages/'.$xml_file, 'nom', $_['titre']);
$input = preg_replace("<
>", "
", $_['input']);
$input = str_replace(" ", "", $_['input']);
ecriture_xml('../data/pages/'.$xml_file, 'contenu', $input, TRUE);
ecriture_xml('../data/pages/'.$xml_file, 'id', LAST_KEY);
ecriture_xml('../data/pages/'.$xml_file, 'ordre', LAST_ORDER);
(@$_['affichage']=="on")?ecriture_xml('../data/pages/'.$xml_file, 'etat', 1):ecriture_xml('../data/pages/'.$xml_file, 'etat', 0);
break;
case 'modifier':
$xml_file = cleanName($_['id'].'#'.str_replace("\'", " ", $_['titre']).'.xml');
rename('../data/pages/'.$lecture_pages[$_['id']].'.xml', '../data/pages/'.$xml_file);
ecriture_xml('../data/pages/'.$xml_file, 'nom', $_['titre']);
$input = preg_replace("<
>", "
", $_['input']);
$input = str_replace(" ", "", $_['input']);
ecriture_xml('../data/pages/'.$xml_file, 'contenu', $input, TRUE);
break;
}
}
echo "Page sauvegardée
";
}
if($_['action']=='modifier') { ?>Edition de la page