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;
}
예제 #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();
        }
    }
}
예제 #3
0
파일: file.php 프로젝트: sagamusix/s3m.it
                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"]);