function fetchFilef($url, $path, $file)
{
    $data = fetchFile($url);
    if ($data) {
        $d = @fopen($path . '/' . $file, "wb");
        $ret = @fwrite($d, $data);
        @fclose($d);
        return $ret;
    }
    return false;
}
Exemplo n.º 2
0
function processActions()
{
    $ftpAction = $_POST["ftpAction"];
    if ($ftpAction == "") {
        $ftpAction = $_GET["ftpAction"];
    }
    // Open folder (always called)
    if (openFolder() == 1) {
        // New file
        if ($ftpAction == "newFile") {
            newFile();
        }
        // New folder
        if ($ftpAction == "newFolder") {
            newFolder();
        }
        // Upload file
        if ($ftpAction == "upload") {
            uploadFile();
        }
        // Cut
        if ($ftpAction == "cut") {
            cutFilesPre();
        }
        // Copy
        if ($ftpAction == "copy") {
            copyFilesPre();
        }
        // Paste
        if ($ftpAction == "paste") {
            pasteFiles();
        }
        // Delete
        if ($ftpAction == "delete") {
            deleteFiles();
        }
        // Rename
        if ($ftpAction == "rename") {
            renameFiles();
        }
        // Chmod
        if ($ftpAction == "chmod") {
            chmodFiles();
        }
        // Drag & Drop
        if ($ftpAction == "dragDrop") {
            dragDropFiles();
        }
        // Edit
        if ($ftpAction == "edit") {
            editFile();
        }
        // Fetch File
        if ($ftpAction == "fetchFile") {
            fetchFile();
        }
    }
}
Exemplo n.º 3
0
                return;
            } else {
                if (isset($_GET['uploadping'])) {
                    processUploadPing();
                    return;
                }
            }
        }
    }
}
if (ACCESS < ACCESS_HOST) {
    redirect(BASEDIR);
}
switch ($_GET["action"]) {
    case "fetchfile":
        fetchFile($_GET["which"]);
        break;
    case "delfile":
        deleteFile($_GET["which"]);
        break;
    case "fetchpack":
        fetchPack($_GET["which"]);
        break;
    case "delpack":
        deletePack($_GET["which"]);
        break;
}
function processUpload()
{
    global $mysqli;
    $compo = intval($_POST["compo"]);