Ejemplo n.º 1
0
        $_SESSION['cut_files'] = isset($_POST['files']) ? $_POST['files'] : array();
        $_SESSION['cut_folders'] = isset($_POST['folders']) ? $_POST['folders'] : array();
        $_SESSION['copy_folders'] = array();
        $_SESSION['copy_files'] = array();
        $task = '';
        break;
    case 'copy':
        $_SESSION['copy_files'] = isset($_POST['files']) ? $_POST['files'] : array();
        $_SESSION['copy_folders'] = isset($_POST['folders']) ? $_POST['folders'] : array();
        $_SESSION['cut_folders'] = array();
        $_SESSION['cut_files'] = array();
        $task = '';
        break;
    case 'paste':
        while ($file = smartstrip(array_shift($_SESSION['cut_files']))) {
            $cms->move_file($file, $folder_id);
        }
        while ($file = smartstrip(array_shift($_SESSION['copy_files']))) {
            $cms->copy_file($file, $folder_id);
        }
        while ($folder = smartstrip(array_shift($_SESSION['cut_folders']))) {
            $cms->move_folder($folder, $folder_id);
        }
        while ($folder = smartstrip(array_shift($_SESSION['copy_folders']))) {
            $cms->copy_folder($folder, $folder_id);
        }
        break;
}
//set the page title for the header file
$page_title = $lang_modules['cms'];
//require the header file. This will draw the logo's and the menu