//Autres auteurs : *@author Aucun *@copyright Tela-Botanica 2000-2007 *@version $Revision: 1.1 $ // +------------------------------------------------------------------------------------------------------+ */ // +------------------------------------------------------------------------------------------------------+ // | ENTETE du PROGRAMME | // +------------------------------------------------------------------------------------------------------+ // effectue le deplacement d un fichier, repond a un appel d arbreDocument.js // On se situe dans la methode run() de projetControleur // L url contient // id_projet=id_projet&service=serviceDeplacement&enfant=id_du_doc_a_deplacer&parent=id_du_repertoire_cible // $_GET['parent'] peut valoir 'root' auquel cas on remplace par 0, cela signifie // qu on deplace un fichier vers le repertoire racine du projet include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; $projet = new projet ($this->_db, $this->_id_projet) ; header ('Content-type:text/json'); if (isset($_GET['enfant'])) { $document = new document($_GET['enfant'], $this->_db, PROJET_CHEMIN_FICHIER) ; // On traite le cas où l'on vient de déplacer un fichier if (isset ($_GET['parent'])) { if ($_GET['parent'] == 'root') $id_cible = 0 ; else $id_cible = $_GET['parent']; if (!$document -> deplace ($id_cible, $projet->getNomRepertoire())) { echo 'echec du déplacement' ; } exit() ; } } exit(); ?>