コード例 #1
0
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
ファイル: index.php プロジェクト: sansusan/yii2-monstabox
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"]);