$mes = copyFolder($dirname, $path . "/" . $dstname . "/" . basename($dirname)); alertMes($mes, $redirect); } elseif ($act == "cutFolder") { $str = <<<EOF \t<form action="index.php?act=doCutFolder" method="post"> \t将文件夹剪切到:<input type="text" name="dstname" placeholder="将文件剪切到"/> \t<input type="hidden" name="path" value="{$path}" /> \t<input type='hidden' name='dirname' value='{$dirname}' /> \t<input type="submit" value="剪切文件夹"/> \t</form> EOF; echo $str; } elseif ($act == "doCutFolder") { //echo "文件夹被剪切了"; $dstname = $_REQUEST['dstname']; $mes = cutFolder($dirname, $path . "/" . $dstname); alertMes($mes, $redirect); } elseif ($act == "delFolder") { //完成删除文件夹的操作 //echo "文件夹被删除了"; $mes = delFolder($dirname); alertMes($mes, $redirect); } elseif ($act == "copyFile") { $str = <<<EOF \t<form action="index.php?act=doCopyFile" method="post"> \t将文件复制到:<input type="text" name="dstname" placeholder="将文件复制到"/> \t<input type="hidden" name="path" value="{$path}" /> \t<input type='hidden' name='filename' value='{$filename}' /> \t<input type="submit" value="复制文件"/> \t</form> EOF;
$str = "\n <form action='index.php?mode=doCopyFolder' method='post'>\n <input type='hidden' name='filename' value='{$filename}' />\n <input type='hidden' name='path' value='{$path}' />\n <label>复制到:</label>\n <input type='text' name='disFile' placeholder='复制到'>\n <input type='submit' value='确定'/>\n </form>"; echo $str; } else { if ($mode == 'doCopyFolder') { $srcFile = $filename; $dis = $_REQUEST['disFile']; $msg = copyFolder($srcFile, 'file' . "/" . $dis); alertMsg($msg, $urlt); } elseif ($mode == 'cutFolder') { $str = "\n <form action='index.php?mode=doCutFolder' method='post'>\n <input type='hidden' name='filename' value='{$filename}' />\n <input type='hidden' name='path' value='{$path}' />\n <label>前切:</label>\n <input type='text' name='disFile' placeholder='前切到'>\n <input type='submit' value='确定'/>\n </form>"; echo $str; } else { if ($mode == 'doCutFolder') { $dirpath = $filename; $distpath = $_REQUEST['disFile']; $msg = cutFolder($dirpath, $path . "/" . $distpath); alertMsg($msg, $url); } else { if ($mode == 'deleteFolder') { $msg = deleteFolder($filename); alertMsg($msg, $url); } } } } } } } } ?> <!DOCTYPE html>
<?php require_once '../dir.func.php'; require_once '../file.func.php'; require_once '../common.func.php'; //目标目录 $mubiaopath = "../" . $_POST['mubiaopath']; //原路径 $sourcepath = $_POST['path']; //文件名 $folderp = $_REQUEST['folderp']; $filep = $_REQUEST['filep']; $folderp1 = explode(",", $folderp); $filep1 = explode(",", $filep); for ($i = 0; $i < count($folderp1); $i++) { cutFolder("../" . $folderp1[$i], $mubiaopath); } for ($i1 = 0; $i1 < count($filep1); $i1++) { cutFile("../" . $filep1[$i1], $mubiaopath); } echo "<script>parent.location.href='../file_gl.php?path=" . $sourcepath . "&info=操作成功'</script>";
$dstname = $_REQUEST['dstname']; $mes = copyFolder($dirname, $path . "/" . $dstname . "/" . basename($dirname)); alertMes($mes, $redirect); } elseif ($act == 'cutFolder') { $str = <<<EOF <form action="index.php?act=doCutFolder" method="post"> 将文件夹剪切到:<input type="text" name="dstname" placeholder="将文件夹剪切到" /> <input type="hidden" name="dirname" value="{$dirname}" /> <input type="hidden" name="path" value="{$path}" /> <input type="submit" value="剪切文件夹" /> </form> EOF; echo $str; } elseif ($act == 'doCutFolder') { $dstname = $_REQUEST['dstname']; $mes = cutFolder($dirname, $path . '/' . $dstname); alertMes($mes, $redirect); } elseif ($act == 'delFolder') { $mes = delFolder($dirname); alertMes($mes, $redirect); } elseif ($act == '创建文件') { $mes = createFile($path . '/' . $filename); alertMes($mes, $redirect); } elseif ($act == '创建文件夹') { $mes = createFolder($path . '/' . $dirname); alertMes($mes, $redirect); } elseif ($act == '上传文件') { $fileInfo = $_FILES['myFile']; $mes = uploadFile($fileInfo, $path); alertMes($mes, $redirect); }
<?php require_once '../dir.func.php'; require_once '../file.func.php'; require_once '../common.func.php'; //目标目录 $mubiaopath = "../" . $_POST['mubiaopath']; //原路径 $sourcepath = $_POST['path']; //文件名 $dirname = "../" . $_POST['dirname']; //echo $mubiaopath;die(); $mes = cutFolder($dirname, $mubiaopath); echo "<script>parent.location.href='../file_gl.php?path=" . $sourcepath . "&info=" . $mes . "'</script>";