*/ include("session.php"); require("test_param.php"); require_once("class_functions.php"); require_once("class_db.php"); require("class_folders.php"); $func = new functions(); $folders = new folders(); //The Fileplan if(isset($_GET['id'])) { $fileplanId = addslashes($func->wash($_GET['id'], "no", _FILEPLAN)); } else { $fileplanId = ""; } //The folder if(isset($_GET['folder_id'])) { $folderId = addslashes($func->wash($_GET['folder_id'], "no", _THE_FOLDER)); } else { $folderId = ""; } //Verifier si le plan appartient à l'utilisateur courant (sauf administrateur) if ($folders->fileplanOwner($fileplanId, $_SESSION['user']['UserId']) === false) { $_SESSION['error'] = _UNKNOWN_PARAM; echo ''; exit; } //The actions if(isset($_GET['do']) && !empty($_GET['do']) ) { if(isset($_GET['folder_id']) && !empty($_GET['folder_id'])) { if($_GET['do'] == "COPY" || $_GET['do'] == "CUT") { //Reinitialiser le tableau des copier/couper: coller $_SESSION['folder'] = array(); $_SESSION['folder'] = $folders->getFolder($folderId, $_GET['do'] ); } elseif($_GET['do'] == "PASTE" ) { //echo "COLLER MOI CA! + RELOAD DE LA PAGE"; print_r($_SESSION['folder']);echo $fileplanId."->".$folderId; $folders->moveFolder($_SESSION['folder'], $fileplanId, $folderId ); //Purger le tableau des copier/couper: coller $_SESSION['folder'] = array(); //echo $_SESSION['error'];exit; $link = "index.php?page=fileplan_up&id=".$fileplanId."&folder_id=".$folderId."&action=".$_GET['action']; echo ''; exit; } } else { $_SESSION['error'] = " "._SELECT_FOLDER_FIRST; } } //print_r($_SESSION['folder'] ); $folders->formfileplan("up", $fileplanId, $folderId); ?>