*/ include("session.php"); require_once("class_functions.php"); require_once("class_db.php"); require_once("class_letterbox.php"); require_once("class_folders.php"); $func = new functions(); $folders = new folders(); //The frame $idframe = $_REQUEST['idframe']; //The Fileplan if(isset($_REQUEST['id'])) { $fileplanId = addslashes($func->wash($_REQUEST['id'], "no", _FILEPLAN)); } else { $fileplanId = ""; } //The folder if(isset($_REQUEST['folder_id'])) { $folderId = addslashes($func->wash($_REQUEST['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($_REQUEST['folder_id']) && !empty($_REQUEST['folder_id'])) { if($_REQUEST['do'] == "COPY" || $_REQUEST['do'] == "CUT") { //Reinitialiser le tableau des copier/couper: coller $_SESSION['folder'] = array(); $_SESSION['folder'] = $folders->getFolder($folderId, $_REQUEST['do'] ); } elseif($_REQUEST['do'] == "PASTE" ) { $folders->moveFolder($_SESSION['folder'], $fileplanId, $folderId ); //Purger le tableau des copier/couper: coller $_SESSION['folder'] = array(); $link = "index.php?page=fileplan_perso_up&id=".$fileplanId."&folder_id=".$folderId."&action=".$_GET['action']; echo ''; exit; } } else { $_SESSION['error'] = " "._SELECT_FOLDER_FIRST; } } $state = true; ?>