[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.139.71.130: ~ $
/** This file is part of KCFinder project
  *
  *      @desc Upload files using drag and drop
  *   @package KCFinder
  *   @version 3.12
  *    @author Pavel Tzonkov
  * @copyright 2010-2014 KCFinder Project
  *   @license http://opensource.org/licenses/GPL-3.0 GPLv3
  *   @license http://opensource.org/licenses/LGPL-3.0 LGPLv3
  *      @link http://kcfinder.sunhater.com
  */

_.initDropUpload = function() {

    if (!_.access.files.upload)
        return;

    var files = $('#files'),
        folders = $('#folders').find('div.folder > a'),
        i, dlg, filesSize, uploaded, errors,

    precheck = function(e) {
        filesSize = uploaded = 0; errors = [];
        var fs = e.dataTransfer.files;
        for (i = 0; i < fs.length; i++)
            filesSize += fs[i].size;

        dlg = $('<div><div class="info count">&nbsp;</div><div class="bar count"></div><div class="info size">&nbsp;</div><div class="bar size"></div><div class="info errors">&nbsp;</div></div>');

        dlg.find('.bar.count').progressbar({max: fs.length, value: 0});
        dlg.find('.bar.size').progressbar({max: filesSize, value: 0});
        dlg.find('.info').css('padding', "5px 0").first().css('paddingTop', 0);
        dlg.find('.info').last().css('paddingBottom', 0);

        dlg = _.dialog(_.label("Uploading files"), dlg, {
            closeOnEscape: false,
            buttons: []
        });

        dlg.parent().css('paddingBottom', 0).find('.ui-dialog-titlebar button').css('visibility', 'hidden').get(0).disabled = true;

        return true;
    },

    localOptions = {
        param: "upload[]",
        maxFilesize: _.dropUploadMaxFilesize,

        begin: function(xhr, currentFile, count) {

            dlg.find('.info.count').html(_.label("Uploading file {current} of {count}", {
                current: currentFile,
                count: count
            }));

            dlg.find('.info.size').html(_.label("Uploaded {uploaded} of {total}", {
                uploaded: _.humanSize(uploaded),
                total: _.humanSize(filesSize)
            }));

            dlg.find('.info.errors').html(_.label("Errors:") + " " + errors.length);
            dlg.find('.bar.count').progressbar({value: currentFile});
            dlg.find('.bar.size').progressbar({value: uploaded});
        },

        success: function(xhr, currentFile, count) {
            uploaded += xhr.file.size;
            var response = xhr.responseText;
            if (response.substr(0, 1) != "/")
                errors.push($.$.htmlData(response));
        },

        error: function(xhr, currentFile, count) {
            uploaded += xhr.file.size;
            errors.push($.$.htmlData(xhr.file.name + ": " + _.label("Failed to upload {filename}!", {
                filename: xhr.file.name
            })));
        },

        abort: function(xhr, currentFile, filesCount) {
            uploaded += xhr.file.size;
            errors.push($.$.htmlData(xhr.file.name + ": " + _.label("Failed to upload {filename}!", {
                filename: xhr.file.name
            })));
        },

        filesizeCallback: function(xhr, currentFile, filesCount) {
            uploaded += xhr.file.size;
            errors.push($.$.htmlData(xhr.file.name + ": " + _.label("The uploaded file exceeds {size} bytes.", {
                size: _.dropUploadMaxFilesize
            })));
        },

        finish: function() {
            _.refresh();
            dlg.find('.bar.size').progressbar({value: uploaded});
            dlg.find('.info.size').html(_.label("Uploaded: {uploaded} of {total}", {
                uploaded: _.humanSize(uploaded),
                total: _.humanSize(filesSize)
            }));
            dlg.find('.info.errors').html(_.label("Errors:") + " " + errors.length);
            var err = errors;
            setTimeout(function() {
                dlg.dialog('destroy').detach();
                if (err.length)
                    _.alert(err.join('<br />'));
            }, 500);
        }
    },

    remoteOptions = {
        ajax: {
            success: function(data) {
                 _.refresh();
                if (data.error) {
                    _.alert(data.error)
                    return;
                }
            },
            error: function() {
                 _.refresh();
                 _.alert(_.label("Unknown error."));
            },
            abort: function() {
                 _.refresh();
            }
        }
    },

    url = "&dir=" + encodeURIComponent(_.dir);

    files.shDropUpload($.extend(localOptions, {
        url: _.getURL('upload') + url,
        precheck: function(e) {
            if (!$('#folders span.current').first().parent().data('writable')) {
                _.alert(_.label("Cannot write to upload folder."));
                return false;
            }
            return precheck(e);
        }
    }), $.extend(true, remoteOptions, {
        ajax: {
            url: _.getURL('dragUrl') + url
        }
    }));

    folders.each(function() {
        var folder = this,
            url = "&dir=" + encodeURIComponent($(folder).data('path'));
        $(folder).shDropUpload($.extend(localOptions, {
            url: _.getURL('upload') + url,
            precheck: function(e) {
                if (!$(folder).data('writable')) {
                    _.alert(_.label("Cannot write to upload folder."));
                    return false;
                }
                return precheck(e);
            }
        }), $.extend(true, remoteOptions, {
            ajax: {
                url: _.getURL('dragUrl') + url
            }
        }));
    });
};

Filemanager

Name Type Size Permission Actions
000._jquery.js File 94.12 KB 0644
002._jqueryui.js File 223.18 KB 0644
006.jquery.transForm.js File 36.02 KB 0644
006.jquery.uniform.js File 35.26 KB 0644
010.jquery.fixes.js File 1.09 KB 0644
020.jquery.rightClick.js File 844 B 0644
021.jquery.taphold.js File 4.55 KB 0644
022.jquery.shDropUpload.js File 13.03 KB 0644
029.jquery.agent.js File 2.96 KB 0644
030.jquery.helper.js File 9.55 KB 0644
031.jquery.md5.js File 9.27 KB 0644
040.object.js File 569 B 0644
041.dialogs.js File 5.89 KB 0644
050.init.js File 8.69 KB 0644
060.toolbar.js File 10.46 KB 0644
070.settings.js File 3.02 KB 0644
080.files.js File 8.06 KB 0644
090.folders.js File 7.2 KB 0644
091.menus.js File 20.64 KB 0644
091.viewImage.js File 7.39 KB 0644
100.clipboard.js File 6.2 KB 0644
110.dropUpload.js File 5.51 KB 0644
120.misc.js File 3.7 KB 0644
index.php File 549 B 0644