����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/vidoe.top/skin/1video/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/vidoe.top/skin/1video/js/upload.js
$(function(){
    /*
     * For the sake keeping the code clean and the examples simple this file
     * contains only the plugin configuration & callbacks.
     *
     * UI functions ui_* can be located in: demo-ui.js
     */
    $('#drag-and-drop-zone').dmUploader({ //
        url: 'index.php?act=upload&code=local',
        maxFileSize: 10000000000, // 1000 MB
        allowedTypes: "video/mp4",
        extFilter: ["mp4"],
        onDragEnter: function(){
            // Happens when dragging something over the DnD area
            this.addClass('active');
        },
        onDragLeave: function(){
            // Happens when dragging something OUT of the DnD area
            this.removeClass('active');
        },
        onInit: function(){
            // Plugin is ready to use
            ui_add_log('Penguin initialized :)', 'info');
        },
        onComplete: function(){
            // All files in the queue are processed (success or error)
            ui_add_log('All pending tranfers finished');
        },
        onNewFile: function(id, file){
            // When a new file is added using the file selector or the DnD area
            ui_add_log('New file added #' + id);
            ui_multi_add_file(id, file);
        },
        onBeforeUpload: function(id){
            // about tho start uploading a file
            ui_add_log('Starting the upload of #' + id);

            ui_multi_update_file_status(id, 'uploading', 'Making thumbnail');
            ui_multi_update_file_progress(id, 0, '', true);
        },
        onUploadCanceled: function(id) {
            // Happens when a file is directly canceled by the user.
            ui_multi_update_file_status(id, 'warning', 'Canceled by User');
            ui_multi_update_file_progress(id, 0, 'warning', false);
        },
        onUploadProgress: function(id, percent){
            // Updating file progress
            ui_multi_update_file_progress(id, percent);
        },
        onUploadSuccess: function(id, data){
            // A file was successfully uploaded
            var obj = jQuery.parseJSON( data );
            $('#uploaderFile' + id).find('div.imgplace').html('<img src="'+obj.thumb+'" style="height: 94px;">');
            $('#uploaderFile' + id).find('span').html('Process video file').prop('class', 'status text-danger');
            $.ajax({
                type: 'GET',
                url: 'index.php',
                data: 'act=upload&code=make_ts&file_id='+id+'&file_name='+obj.file_name+'&duration='+obj.duration+'&thumb='+obj.thumb,
                dataType: 'json',
                success: function (res) {
                    if(res.status=='ok'){
                        $('#uploaderFile' + id).find('span').html('Uploading video file to server').prop('class', 'status text-danger');
                        $.ajax({
                            type: 'GET',
                            url: 'index.php',
                            data: 'act=upload&code=upload&file_id='+id+'&file_name='+res.file_name+'&duration='+res.duration+'&thumb='+res.thumb,
                            dataType: 'json',
                            success: function (res) {
                                if(res.status=='ok'){
                                    ui_add_log('Upload of file #' + id + ' COMPLETED', 'success');
                                    ui_multi_update_file_status(id, 'success', 'Upload Complete');
                                    ui_multi_update_file_progress(id, 100, 'success', false);
                                    $('#uploaderFile' + id).find('div.imgplace').html('<img src="'+res.thumb+'" style="height: 94px; cursor: pointer" onclick="window.location.href=\'?act=user&code=edit_video&id='+res.id_new+'\'">');
                                    $('#uploaderFile' + id).find('div#edit_video_aa').html('<a href="?act=user&code=edit_video&id='+res.id_new+'" target="_blank"><i class="fas fa fa-edit"></i></a>');
                                    $('#uploaderFile' + id).find('div#edit_video_bb').html('Your video is still not publish, please <a href="?act=user&code=edit_video&id='+res.id_new+'" target="_blank">update</a> some information until it\'s done. <a class="btn btn-sm btn-primary edit-infos" href="?act=user&code=edit_video&id='+res.id_new+'" target="_blank">Go to edit and publish.</a>');
                                }else{
                                    ui_multi_update_file_progress(id, 0, 'danger', false);
                                }
                            }
                        });
                    }else{
                        ui_multi_update_file_progress(id, 0, 'danger', false);
                    }
                }
            });

        },
        onUploadError: function(id, xhr, status, message){
            ui_multi_update_file_status(id, 'danger', message);
            ui_multi_update_file_progress(id, 0, 'danger', false);
        },
        onFallbackMode: function(){
            // When the browser doesn't support this plugin :(
            ui_add_log('Plugin cant be used here, running Fallback callback', 'danger');
        },
        onFileSizeError: function(file){
            ui_add_log('File \'' + file.name + '\' cannot be added: size excess limit', 'danger');
        }
    });
});
/*
 * Some helper functions to work with our UI and keep our code cleaner
 */

// Adds an entry to our debug area
function ui_add_log(message, color)
{
    var d = new Date();

    var dateString = (('0' + d.getHours())).slice(-2) + ':' +
        (('0' + d.getMinutes())).slice(-2) + ':' +
        (('0' + d.getSeconds())).slice(-2);

    color = (typeof color === 'undefined' ? 'muted' : color);

    var template = $('#debug-template').text();
    template = template.replace('%%date%%', dateString);
    template = template.replace('%%message%%', message);
    template = template.replace('%%color%%', color);

    $('#debug').find('li.empty').fadeOut(); // remove the 'no messages yet'
    $('#debug').prepend(template);
}

// Creates a new file and add it to our list
function ui_multi_add_file(id, file)
{
    var template = $('#files-template').text();
    template = template.replace('%%filename%%', file.name);

    template = $(template);
    template.prop('id', 'uploaderFile' + id);
    template.data('file-id', id);

    $('#files').find('li.empty').fadeOut(); // remove the 'no files yet'
    $('#files').prepend(template);
}

// Changes the status messages on our list
function ui_multi_update_file_status(id, status, message)
{
    $('#uploaderFile' + id).find('span').html(message).prop('class', 'status text-' + status);
}

// Updates a file progress, depending on the parameters it may animate it or change the color.
function ui_multi_update_file_progress(id, percent, color, active)
{
    color = (typeof color === 'undefined' ? false : color);
    active = (typeof active === 'undefined' ? true : active);

    var bar = $('#uploaderFile' + id).find('div.progress-bar');

    bar.width(percent + '%').attr('aria-valuenow', percent);
    bar.toggleClass('progress-bar-striped progress-bar-animated', active);

    if (percent === 0){
        bar.html('');
    } else {
        bar.html(percent + '%');
    }

    if (color !== false){
        bar.removeClass('bg-success bg-info bg-warning bg-danger');
        bar.addClass('bg-' + color);
    }
}

ZeroDay Forums Mini