$_REQUEST['sort_desc'] = 1; /* +- copy file / dir [ recursive ] +- rename(move) file / dir +- delete file / dir [ recursive ] +- chmod file / dir +- chown file / dir +- create file +- create dir */ switch ($_REQUEST['action']) { case 'copy': fm_copy($_REQUEST['source'], $_REQUEST['dest']); break; case 'rename': fm_rename($_REQUEST['source'], $_REQUEST['dest']); break; case 'delete': fm_delete($_REQUEST['source']); break; case 'chmod': fm_chmod($_REQUEST['source'], $_REQUEST['mode']); break; case 'chown': fm_chown($_REQUEST['source'], $_REQUEST['uid'], $_REQUEST['gid']); break; case 'create_file': fm_create_file($_REQUEST['source'], $_REQUEST['mode'] || FALSE); break; case 'create_dir': fm_create_dir($_REQUEST['source'], $_REQUEST['mode'] || FALSE);
function fm_move($old, $new, $overwrite = false) { return fm_rename($old, $new, $overwrite = false); }
$buffer .= '<strong style="color:#090;">Successful</strong>'; $acted[] = file2id($tfiletn); unset($_SESSION['clip'][$i]); } else { if (fm_exists($d . $tfiletn)) { $buffer .= '<strong style="color:#F00;">Failed, file/folder already exists</strong>'; $redir = false; } else { $buffer .= '<strong style="color:#F00;">Failed, permission error</strong>'; $redir = false; } } } if ($_SESSION['cliptype'] == 'm') { $buffer .= "<tr><td>Moving '" . filefrompath($tfilen) . "'...</td><td>"; if (fm_rename($tfilen, $d . filefrompath($tfilen), $conflict)) { $buffer .= '<strong style="color:#090;">Successful</strong>'; $acted[] = file2id(filefrompath($tfilen)); unset($_SESSION['clip'][$i]); } else { if (fm_exists($d . filefrompath($tfilen))) { $buffer .= '<strong style="color:#F00;">Failed, file/folder already exists</strong>'; $redir = false; } else { $buffer .= '<strong style="color:#F00;">Failed, permission error</strong>'; $redir = false; } } } } }