44 lines
1021 B
PHP
Executable File
44 lines
1021 B
PHP
Executable File
<?php
|
|
require("../config/config.php");
|
|
require(CHEMIN."inc/inc-functions.php");
|
|
require(CHEMIN."inc/inc-display-functions.php");
|
|
require(CHEMIN."inc/classe_xml.php");
|
|
$xml=new classe_xml(MODELE_COLLECTION);
|
|
|
|
$action=array(
|
|
"titre"=>"Ajouter une collection",
|
|
"action"=>"ajouter_collection",
|
|
"submit"=>"Ajouter"
|
|
);
|
|
|
|
if(isset($_GET['xml'])){
|
|
$item=CHEMIN.DOSSIER_XML.$_GET['xml'];
|
|
$xml->lire_xml($item);
|
|
$action=array(
|
|
"titre"=>"Updater une collection",
|
|
"action"=>"updater_collection",
|
|
"submit"=>"Updater",
|
|
"delete"=>"oui");
|
|
}
|
|
$retour=$xml->traiter_formulaire(true);
|
|
|
|
//print_r($xml->messages);
|
|
|
|
if($retour=="update"){
|
|
display_mosaique_collection($xml);
|
|
supprimer_cache();
|
|
}
|
|
if($retour=="insert"){
|
|
display_mosaique_collection($xml);
|
|
supprimer_cache();
|
|
}
|
|
if($retour=="delete"){
|
|
// header('Location: '.URL.'index.php');
|
|
// die();
|
|
echo "delete";
|
|
supprimer_cache();
|
|
}
|
|
if($retour=="none"){
|
|
echo $xml->deployer_formulaire($action);
|
|
}
|
|
?>
|