├── .gitignore
├── storage
└── index.php
├── lib
├── view
│ ├── assets
│ │ ├── font
│ │ │ ├── servmask.eot
│ │ │ ├── servmask.ttf
│ │ │ └── servmask.woff
│ │ ├── img
│ │ │ ├── ajax-loader.gif
│ │ │ ├── logo-20x20.png
│ │ │ ├── logo-32x32.png
│ │ │ ├── logo-128x128.png
│ │ │ └── logo.svg
│ │ └── css
│ │ │ ├── updater.min.css
│ │ │ └── updater.min.rtl.css
│ ├── common
│ │ ├── http-authentication.php
│ │ ├── maintenance-mode.php
│ │ ├── share-buttons.php
│ │ ├── report-problem.php
│ │ └── leave-feedback.php
│ ├── export
│ │ ├── button-box.php
│ │ ├── button-ftp.php
│ │ ├── button-mega.php
│ │ ├── button-file.php
│ │ ├── button-dropbox.php
│ │ ├── button-pcloud.php
│ │ ├── button-s3.php
│ │ ├── button-b2.php
│ │ ├── button-onedrive.php
│ │ ├── button-gdrive.php
│ │ ├── button-glacier.php
│ │ ├── button-digitalocean.php
│ │ ├── button-gcloud-storage.php
│ │ ├── button-azure-storage.php
│ │ ├── export-buttons.php
│ │ ├── help-section.php
│ │ ├── find-replace.php
│ │ └── index.php
│ ├── import
│ │ ├── button-box.php
│ │ ├── button-ftp.php
│ │ ├── button-mega.php
│ │ ├── button-url.php
│ │ ├── button-dropbox.php
│ │ ├── button-pcloud.php
│ │ ├── button-s3.php
│ │ ├── button-b2.php
│ │ ├── button-onedrive.php
│ │ ├── button-gdrive.php
│ │ ├── button-glacier.php
│ │ ├── button-digitalocean.php
│ │ ├── button-gcloud-storage.php
│ │ ├── button-azure-storage.php
│ │ ├── button-file.php
│ │ ├── index.php
│ │ └── import-buttons.php
│ ├── updater
│ │ ├── check.php
│ │ └── modal.php
│ └── main
│ │ ├── get-support.php
│ │ ├── backups-path-notice.php
│ │ ├── storage-path-notice.php
│ │ ├── backups-index-notice.php
│ │ ├── storage-index-notice.php
│ │ ├── backups-htaccess-notice.php
│ │ ├── backups-webconfig-notice.php
│ │ ├── wordpress-htaccess-notice.php
│ │ ├── multisite-notice.php
│ │ └── admin-head.php
├── vendor
│ ├── bandar
│ │ └── bandar
│ │ │ ├── LICENSE
│ │ │ └── lib
│ │ │ └── Exceptions
│ │ │ └── TemplateDoesNotExistException.php
│ └── servmask
│ │ ├── iterator
│ │ ├── class-ai1wm-recursive-iterator-iterator.php
│ │ └── class-ai1wm-recursive-directory-iterator.php
│ │ ├── filesystem
│ │ ├── class-ai1wm-file-index.php
│ │ ├── class-ai1wm-file-webconfig.php
│ │ ├── class-ai1wm-file-htaccess.php
│ │ ├── class-ai1wm-directory.php
│ │ └── class-ai1wm-file.php
│ │ ├── filter
│ │ ├── class-ai1wm-recursive-newline-filter.php
│ │ ├── class-ai1wm-recursive-exclude-filter.php
│ │ └── class-ai1wm-recursive-extension-filter.php
│ │ ├── cron
│ │ └── class-ai1wm-cron.php
│ │ └── database
│ │ ├── class-ai1wm-database-mysql.php
│ │ └── class-ai1wm-database-mysqli.php
├── model
│ ├── class-ai1wm-deprecated.php
│ ├── export
│ │ ├── class-ai1wm-export-clean.php
│ │ ├── class-ai1wm-export-archive.php
│ │ ├── class-ai1wm-export-compatibility.php
│ │ ├── class-ai1wm-export-init.php
│ │ ├── class-ai1wm-export-download.php
│ │ ├── class-ai1wm-export-config-file.php
│ │ └── class-ai1wm-export-database-file.php
│ ├── import
│ │ ├── class-ai1wm-import-clean.php
│ │ ├── class-ai1wm-import-compatibility.php
│ │ ├── class-ai1wm-import-enumerate.php
│ │ ├── class-ai1wm-import-mu-plugins.php
│ │ ├── class-ai1wm-import-confirm.php
│ │ └── class-ai1wm-import-upload.php
│ ├── class-ai1wm-handler.php
│ ├── class-ai1wm-template.php
│ ├── class-ai1wm-message.php
│ ├── class-ai1wm-status.php
│ ├── class-ai1wm-report.php
│ ├── class-ai1wm-log.php
│ ├── class-ai1wm-compatibility.php
│ ├── class-ai1wm-feedback.php
│ ├── class-ai1wm-notification.php
│ └── class-ai1wm-backups.php
└── controller
│ ├── class-ai1wm-status-controller.php
│ ├── class-ai1wm-report-controller.php
│ ├── class-ai1wm-backups-controller.php
│ ├── class-ai1wm-feedback-controller.php
│ └── class-ai1wm-updater-controller.php
├── deprecated.php
├── README.md
├── uninstall.php
├── exceptions.php
└── all-in-one-wp-migration-wi.php
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 |
--------------------------------------------------------------------------------
/storage/index.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
--------------------------------------------------------------------------------
/lib/view/common/maintenance-mode.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
--------------------------------------------------------------------------------
/deprecated.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | function ai1wm_progress_path( $params ) {}
27 |
--------------------------------------------------------------------------------
/lib/view/export/button-box.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Box
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-ftp.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | FTP
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-mega.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Mega
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-box.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Box
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-ftp.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | FTP
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-mega.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Mega
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-url.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | URL
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-file.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-dropbox.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Dropbox
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-pcloud.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | pCloud
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-s3.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Amazon S3
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-dropbox.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Dropbox
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-pcloud.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | pCloud
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-s3.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Amazon S3
28 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-deprecated.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Abstract {}
27 | class Ai1wm_Import_Abstract {}
28 | class Ai1wm_Config {}
29 |
--------------------------------------------------------------------------------
/lib/view/export/button-b2.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Backblaze B2
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-onedrive.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | OneDrive
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-b2.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Backblaze B2
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-onedrive.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | OneDrive
28 |
--------------------------------------------------------------------------------
/lib/view/updater/check.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-gdrive.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Google Drive
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-gdrive.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Google Drive
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-glacier.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Amazon Glacier
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-glacier.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Amazon Glacier
28 |
--------------------------------------------------------------------------------
/lib/view/main/get-support.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-digitalocean.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | DigitalOcean
28 |
--------------------------------------------------------------------------------
/lib/view/export/button-gcloud-storage.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Google Cloud
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-digitalocean.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | DigitalOcean
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-gcloud-storage.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Google Cloud
28 |
--------------------------------------------------------------------------------
/lib/view/assets/img/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/lib/view/export/button-azure-storage.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Azure Storage
28 |
--------------------------------------------------------------------------------
/lib/view/import/button-azure-storage.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 | Azure Storage
28 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Recursive_Iterator_Iterator extends RecursiveIteratorIterator {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/lib/view/import/button-file.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-clean.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Clean {
27 |
28 | public static function execute( $params ) {
29 | Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
30 | exit;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-clean.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Clean {
27 |
28 | public static function execute( $params ) {
29 | Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
30 | exit;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filesystem/class-ai1wm-file-index.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_File_Index {
27 |
28 | /**
29 | * Create index.php file
30 | *
31 | * @param string $path Path to file
32 | * @return boolean
33 | */
34 | public static function create( $path ) {
35 | return Ai1wm_File::create( $path, '.
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Recursive_Newline_Filter extends RecursiveFilterIterator {
27 |
28 | public function accept() {
29 | return strpos( $this->getInnerIterator()->getSubPathname(), "\n" ) === false &&
30 | strpos( $this->getInnerIterator()->getSubPathname(), "\r" ) === false;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/view/main/backups-path-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s folder. ' .
33 | 'You will need to create this folder and grant it read/write/execute permissions (0777) ' .
34 | 'for the All in One WP Migration plugin to function properly.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_BACKUPS_PATH
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/storage-path-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s folder. ' .
33 | 'You will need to create this folder and grant it read/write/execute permissions (0777) ' .
34 | 'for the All in One WP Migration plugin to function properly.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_STORAGE_PATH
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/backups-index-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s file. ' .
33 | 'Try to change permissions of the parent folder or send us an email at ' .
34 | 'support@servmask.com for assistance.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_BACKUPS_INDEX
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/storage-index-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s file. ' .
33 | 'Try to change permissions of the parent folder or send us an email at ' .
34 | 'support@servmask.com for assistance.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_STORAGE_INDEX
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/backups-htaccess-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s file. ' .
33 | 'Try to change permissions of the parent folder or send us an email at ' .
34 | 'support@servmask.com for assistance.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_BACKUPS_HTACCESS
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/backups-webconfig-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s file. ' .
33 | 'Try to change permissions of the parent folder or send us an email at ' .
34 | 'support@servmask.com for assistance.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_BACKUPS_WEBCONFIG
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/view/main/wordpress-htaccess-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 | %s file. ' .
33 | 'Try to change permissions of the parent folder or send us an email at ' .
34 | 'support@servmask.com for assistance.',
35 | AI1WM_PLUGIN_NAME
36 | ),
37 | AI1WM_WORDPRESS_HTACCESS
38 | )
39 | ?>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # All In One WP Migration Fork
2 | *(from Version 6.77)*
3 |
4 | ## Notice
5 | This repository originates from [Servmask](https://servmask.com/)'s [All-In-One-WP-Migration Version 6.77](https://downloads.wordpress.org/plugin/all-in-one-wp-migration.6.77.zip), which has the GPLv2 license. I do not claim to be the original author, and I do not claim to have ever had any involvement with Servmask. The modifications that I have made are clearly stated below, and include only one minor change to `constants.php`.
6 |
7 |
8 | ### Why?
9 | This repository is a fork of the last version of the [All In One WP Migration](https://wordpress.org/plugins/all-in-one-wp-migration/) plugin that easily allows modification of the import file size, and it includes those modifications. By modifying this freely available older version, users can empower themselves to migrate larger sites than they otherwise would be able to. Use at your own risk, and delete the plugin post migration as this older version contains [unpatched security vulnerabilities](https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/all-in-one-wp-migration).
10 |
11 |
12 | ### How?
13 | The file upload size limit has been modified to be `32GB`. To change this you may define the limit in byes on line 284 in `constants.php` (if 32 Gigs doesn't float your boat).
14 |
15 | ```php
16 | // =================
17 | // = Max File Size =
18 | // =================
19 | define( 'AI1WM_MAX_FILE_SIZE', 34359738368 );
20 | ```
21 |
22 | ### More
23 | If you'd like to review the changes that Servmask has made to this plugin, please refer to the SVN Repository to browse the revision history yourself [here](https://plugins.trac.wordpress.org/log/all-in-one-wp-migration).
24 |
--------------------------------------------------------------------------------
/lib/view/main/multisite-notice.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
42 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-archive.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Archive {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Creating an empty archive...', AI1WM_PLUGIN_NAME ) );
32 |
33 | // Create empty archive file
34 | $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
35 | $archive->close();
36 |
37 | // Set progress
38 | Ai1wm_Status::info( __( 'Done creating an empty archive.', AI1WM_PLUGIN_NAME ) );
39 |
40 | return $params;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/uninstall.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | // Include plugin bootstrap file
27 | require_once dirname(__FILE__) .
28 | DIRECTORY_SEPARATOR .
29 | 'all-in-one-wp-migration-wi.php';
30 |
31 | /**
32 | * Trigger Uninstall process only if WP_UNINSTALL_PLUGIN is defined
33 | */
34 | if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) {
35 | global $wpdb, $wp_filesystem;
36 |
37 | // Delete any options or other data stored in the database here
38 | delete_option( AI1WM_STATUS );
39 | delete_option( AI1WM_SECRET_KEY );
40 | delete_option( AI1WM_AUTH_USER );
41 | delete_option( AI1WM_AUTH_PASSWORD );
42 | }
43 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Recursive_Exclude_Filter extends RecursiveFilterIterator {
27 |
28 | protected $exclude = array();
29 |
30 | public function __construct( RecursiveIterator $iterator, $exclude = array() ) {
31 | parent::__construct( $iterator );
32 |
33 | // Set exclude filter
34 | $this->exclude = $exclude;
35 | }
36 |
37 | public function accept() {
38 | return ! in_array( $this->getInnerIterator()->getSubPathname(), $this->exclude );
39 | }
40 |
41 | public function getChildren() {
42 | return new self( $this->getInnerIterator()->getChildren(), $this->exclude );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-compatibility.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Compatibility {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Checking extensions compatibility...', AI1WM_PLUGIN_NAME ) );
32 |
33 | // Get messages
34 | $messages = Ai1wm_Compatibility::get( $params );
35 |
36 | // Set messages
37 | if ( empty( $messages ) ) {
38 | return $params;
39 | }
40 |
41 | // Enable notifications
42 | add_filter( 'ai1wm_notification_error_toggle', '__return_true', 20 );
43 |
44 | // Error message
45 | throw new Ai1wm_Compatibility_Exception( implode( $messages ) );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-compatibility.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Compatibility {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Checking extensions compatibility...', AI1WM_PLUGIN_NAME ) );
32 |
33 | // Get messages
34 | $messages = Ai1wm_Compatibility::get( $params );
35 |
36 | // Set messages
37 | if ( empty( $messages ) ) {
38 | return $params;
39 | }
40 |
41 | // Enable notifications
42 | add_filter( 'ai1wm_notification_error_toggle', '__return_true', 20 );
43 |
44 | // Error message
45 | throw new Ai1wm_Compatibility_Exception( implode( $messages ) );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-init.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Init {
27 |
28 | public static function execute( $params ) {
29 |
30 | $blog_id = null;
31 |
32 | // Get subsite Blog ID
33 | if ( isset( $params['options']['sites'] ) && ( $sites = $params['options']['sites'] ) ) {
34 | if ( count( $sites ) === 1 ) {
35 | $blog_id = array_shift( $sites );
36 | }
37 | }
38 |
39 | // Set archive
40 | if ( empty( $params['archive'] ) ) {
41 | $params['archive'] = ai1wm_archive_file( $blog_id );
42 | }
43 |
44 | // Set storage
45 | if ( empty( $params['storage'] ) ) {
46 | $params['storage'] = ai1wm_storage_folder();
47 | }
48 |
49 | return $params;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/controller/class-ai1wm-status-controller.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Status_Controller {
27 |
28 | public static function status( $params = array() ) {
29 |
30 | // Set params
31 | if ( empty( $params ) ) {
32 | $params = stripslashes_deep( $_GET );
33 | }
34 |
35 | // Set secret key
36 | $secret_key = null;
37 | if ( isset( $params['secret_key'] ) ) {
38 | $secret_key = trim( $params['secret_key'] );
39 | }
40 |
41 | try {
42 | // Ensure that unauthorized people cannot access status action
43 | ai1wm_verify_secret_key( $secret_key );
44 | } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
45 | exit;
46 | }
47 |
48 | echo json_encode( get_option( AI1WM_STATUS, array() ) );
49 | exit;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-handler.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Handler {
27 |
28 | /**
29 | * Error handler
30 | *
31 | * @param integer $errno Error level
32 | * @param string $errstr Error message
33 | * @param string $errfile Error file
34 | * @param integer $errline Error line
35 | * @return void
36 | */
37 | public static function error( $errno, $errstr, $errfile, $errline ) {
38 | Ai1wm_Log::error( array(
39 | 'Number' => $errno,
40 | 'Message' => $errstr,
41 | 'File' => $errfile,
42 | 'Line' => $errline,
43 | ) );
44 | }
45 |
46 | /**
47 | * Shutdown handler
48 | *
49 | * @return void
50 | */
51 | public static function shutdown() {
52 | if ( ( $error = error_get_last() ) ) {
53 | Ai1wm_Log::error( $error );
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_File_Webconfig {
27 |
28 | /**
29 | * Create web.config file
30 | *
31 | * @param string $path Path to file
32 | * @return boolean
33 | */
34 | public static function create( $path ) {
35 | return Ai1wm_File::create( $path, implode( PHP_EOL, array(
36 | '',
37 | '',
38 | '',
39 | ' ',
40 | ' ',
41 | '',
42 | '',
43 | ' ',
44 | ' ',
45 | ' ',
46 | ' ',
47 | ' ',
48 | ' ',
49 | ) ) );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Recursive_Extension_Filter extends RecursiveFilterIterator {
27 |
28 | protected $include = array();
29 |
30 | public function __construct( RecursiveIterator $iterator, $include = array() ) {
31 | parent::__construct( $iterator );
32 |
33 | // Set include filter
34 | $this->include = $include;
35 | }
36 |
37 | public function accept() {
38 | if ( $this->getInnerIterator()->isFile() ) {
39 | if ( ! in_array( pathinfo( $this->getInnerIterator()->getFilename(), PATHINFO_EXTENSION ), $this->include ) ) {
40 | return false;
41 | }
42 | }
43 |
44 | return true;
45 | }
46 |
47 | public function getChildren() {
48 | return new self( $this->getInnerIterator()->getChildren(), $this->include );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-enumerate.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Enumerate {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Retrieving a list of all WordPress files...', AI1WM_PLUGIN_NAME ) );
32 |
33 | // Open the archive file for reading
34 | $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) );
35 |
36 | // Get total files count
37 | $params['total_files_count'] = $archive->get_total_files_count();
38 |
39 | // Get total files size
40 | $params['total_files_size'] = $archive->get_total_files_size();
41 |
42 | // Close the archive file
43 | $archive->close();
44 |
45 | // Set progress
46 | Ai1wm_Status::info( __( 'Done retrieving a list of all WordPress files.', AI1WM_PLUGIN_NAME ) );
47 |
48 | return $params;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/view/export/export-buttons.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
48 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-template.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Template extends Bandar {
27 |
28 | /**
29 | * Renders a file and returns its contents
30 | *
31 | * @param string $file View to render
32 | * @param array $args Set of arguments
33 | *
34 | * @return string Rendered view
35 | */
36 | public static function render( $view, $args = array(), $path = false ) {
37 | parent::render( $view, $args, $path );
38 | }
39 |
40 | /**
41 | * Returns link to an asset file
42 | *
43 | * @param string $asset Asset file
44 | *
45 | * @return string Asset URL
46 | */
47 | public static function asset_link( $asset, $prefix = 'AI1WM' ) {
48 | return constant( $prefix . '_URL' ) . '/lib/view/assets/' . $asset . '?v=' . constant( $prefix . '_VERSION' );
49 | }
50 |
51 | public static function get_content( $template, $args = array(), $path = false ) {
52 | return parent::getTemplateContent( $template, $args, $path );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/vendor/bandar/bandar/lib/Exceptions/TemplateDoesNotExistException.php:
--------------------------------------------------------------------------------
1 |
30 | * @copyright 2013 Yani Iliev
31 | * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT)
32 | * @version GIT: 3.0.0
33 | * @link https://github.com/yani-/bandar/
34 | */
35 |
36 | /**
37 | * TemplateDoesNotExistException
38 | *
39 | * @category Exceptions
40 | * @package Bandar
41 | * @author Yani Iliev
42 | * @copyright 2013 Yani Iliev
43 | * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT)
44 | * @version Release: 2.0.1
45 | * @link https://github.com/yani-/bandar/
46 | */
47 | class TemplateDoesNotExistException extends Exception
48 | {
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-message.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Message {
27 |
28 | public static function flash( $type, $message ) {
29 | if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) !== false ) {
30 | return update_option( AI1WM_MESSAGES, array_merge( $messages, array( $type => $message ) ) );
31 | }
32 |
33 | return false;
34 | }
35 |
36 | public static function has( $type ) {
37 | if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) ) {
38 | if ( isset( $messages[ $type ] ) ) {
39 | return true;
40 | }
41 | }
42 |
43 | return false;
44 | }
45 |
46 | public static function get( $type ) {
47 | $message = null;
48 | if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) ) {
49 | if ( isset( $messages[ $type ] ) && ( $message = $messages[ $type ] ) ) {
50 | unset( $messages[ $type ] );
51 | }
52 |
53 | // Set messages
54 | update_option( AI1WM_MESSAGES, $messages );
55 | }
56 |
57 | return $message;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_File_Htaccess {
27 |
28 | /**
29 | * Create .htaccess file (ServMask)
30 | *
31 | * @param string $path Path to file
32 | * @return boolean
33 | */
34 | public static function create( $path ) {
35 | return Ai1wm_File::create( $path, implode( PHP_EOL, array(
36 | '',
37 | 'AddType application/octet-stream .wpress',
38 | ' ',
39 | '',
40 | 'DirectoryIndex index.php',
41 | ' ',
42 | '',
43 | 'Options -Indexes',
44 | ' ',
45 | ) ) );
46 | }
47 |
48 | /**
49 | * Create .htaccess file (LiteSpeed)
50 | *
51 | * @param string $path Path to file
52 | * @return boolean
53 | */
54 | public static function litespeed( $path ) {
55 | return Ai1wm_File::create_with_markers( $path, 'LiteSpeed', array(
56 | '',
57 | 'SetEnv noabort 1',
58 | ' ',
59 | ) );
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-mu-plugins.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Mu_Plugins {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Activating mu-plugins...', AI1WM_PLUGIN_NAME ) );
32 |
33 | $exclude_files = array(
34 | AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_PAGE_CACHE_NAME,
35 | AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_PHP_EDGE_NAME,
36 | AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_BROWSER_CACHE_NAME,
37 | AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_GD_SYSTEM_PLUGIN_NAME,
38 | );
39 |
40 | // Open the archive file for reading
41 | $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) );
42 |
43 | // Unpack mu-plugins files
44 | $archive->extract_by_files_array( WP_CONTENT_DIR, array( AI1WM_MUPLUGINS_NAME ), $exclude_files );
45 |
46 | // Close the archive file
47 | $archive->close();
48 |
49 | // Set progress
50 | Ai1wm_Status::info( __( 'Done activating mu-plugins.', AI1WM_PLUGIN_NAME ) );
51 |
52 | return $params;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filesystem/class-ai1wm-directory.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Directory {
27 |
28 | /**
29 | * Create directory (recursively)
30 | *
31 | * @param string $path Path to the directory
32 | * @return boolean
33 | */
34 | public static function create( $path ) {
35 | return @mkdir( $path, 0777, true );
36 | }
37 |
38 | /**
39 | * Delete directory (recursively)
40 | *
41 | * @param string $path Path to the directory
42 | * @return boolean
43 | */
44 | public static function delete( $path ) {
45 | // Iterate over directory
46 | $iterator = new Ai1wm_Recursive_Directory_Iterator( $path );
47 |
48 | // Recursively iterate over directory
49 | $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );
50 |
51 | // Remove files and directories
52 | foreach ( $iterator as $item ) {
53 | if ( $item->isDir() ) {
54 | @rmdir( $item->getPathname() );
55 | } else {
56 | @unlink( $item->getPathname() );
57 | }
58 | }
59 |
60 | return @rmdir( $path );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Recursive_Directory_Iterator extends RecursiveDirectoryIterator {
27 |
28 | public function __construct( $path ) {
29 | parent::__construct( $path );
30 |
31 | // Skip current and parent directory
32 | $this->skipdots();
33 | }
34 |
35 | public function rewind() {
36 | parent::rewind();
37 |
38 | // Skip current and parent directory
39 | $this->skipdots();
40 | }
41 |
42 | public function next() {
43 | parent::next();
44 |
45 | // Skip current and parent directory
46 | $this->skipdots();
47 | }
48 |
49 | /**
50 | * Returns whether current entry is a directory and not '.' or '..'
51 | *
52 | * Explicitly set allow links flag, because RecursiveDirectoryIterator::FOLLOW_SYMLINKS
53 | * is not supported by <= PHP 5.3.0
54 | *
55 | * @return bool
56 | */
57 | public function hasChildren( $allow_links = true ) {
58 | return parent::hasChildren( $allow_links );
59 | }
60 |
61 | protected function skipdots() {
62 | while ( $this->isDot() ) {
63 | parent::next();
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/view/export/help-section.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/exceptions.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Archive_Exception extends Exception {}
27 | class Ai1wm_Backups_Exception extends Exception {}
28 | class Ai1wm_Export_Exception extends Exception {}
29 | class Ai1wm_Http_Exception extends Exception {}
30 | class Ai1wm_Import_Exception extends Exception {}
31 | class Ai1wm_Import_Retry_Exception extends Exception {}
32 | class Ai1wm_Not_Accessible_Exception extends Exception {}
33 | class Ai1wm_Not_Seekable_Exception extends Exception {}
34 | class Ai1wm_Not_Tellable_Exception extends Exception {}
35 | class Ai1wm_Not_Readable_Exception extends Exception {}
36 | class Ai1wm_Not_Writable_Exception extends Exception {}
37 | class Ai1wm_Not_Truncatable_Exception extends Exception {}
38 | class Ai1wm_Not_Closable_Exception extends Exception {}
39 | class Ai1wm_Not_Found_Exception extends Exception {}
40 | class Ai1wm_Not_Directory_Exception extends Exception {}
41 | class Ai1wm_Not_Valid_Secret_Key_Exception extends Exception {}
42 | class Ai1wm_Quota_Exceeded_Exception extends Exception {}
43 | class Ai1wm_Storage_Exception extends Exception {}
44 | class Ai1wm_Compatibility_Exception extends Exception {}
45 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-status.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Status {
27 |
28 | public static function error( $title, $message ) {
29 | self::log( array( 'type' => 'error', 'title' => $title, 'message' => $message ) );
30 | }
31 |
32 | public static function info( $message ) {
33 | self::log( array( 'type' => 'info', 'message' => $message ) );
34 | }
35 |
36 | public static function download( $message ) {
37 | self::log( array( 'type' => 'download', 'message' => $message ) );
38 | }
39 |
40 | public static function confirm( $message ) {
41 | self::log( array( 'type' => 'confirm', 'message' => $message ) );
42 | }
43 |
44 | public static function done( $title, $message ) {
45 | self::log( array( 'type' => 'done', 'title' => $title, 'message' => $message ) );
46 | }
47 |
48 | public static function blogs( $title, $message ) {
49 | self::log( array( 'type' => 'blogs', 'title' => $title, 'message' => $message ) );
50 | }
51 |
52 | public static function progress( $percent ) {
53 | self::log( array( 'type' => 'progress', 'percent' => $percent ) );
54 | }
55 |
56 | public static function log( $data ) {
57 | if ( ! ai1wm_is_scheduled_backup() ) {
58 | update_option( AI1WM_STATUS, $data );
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/filesystem/class-ai1wm-file.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_File {
27 |
28 | /**
29 | * Create a file with content
30 | *
31 | * @param string $path Path to the file
32 | * @param string $content Content of the file
33 | * @return boolean
34 | */
35 | public static function create( $path, $content ) {
36 | if ( ! @file_exists( $path ) ) {
37 | if ( ! @is_writable( dirname( $path ) ) ) {
38 | return false;
39 | }
40 |
41 | if ( ! @touch( $path ) ) {
42 | return false;
43 | }
44 | } elseif ( ! @is_writable( $path ) ) {
45 | return false;
46 | }
47 |
48 | $is_written = false;
49 | if ( ( $handle = @fopen( $path, 'w' ) ) !== false ) {
50 | if ( @fwrite( $handle, $content ) !== false ) {
51 | $is_written = true;
52 | }
53 |
54 | @fclose( $handle );
55 | }
56 |
57 | return $is_written;
58 | }
59 |
60 | /**
61 | * Create a file with marker and content
62 | *
63 | * @param string $path Path to the file
64 | * @param string $marker Name of the marker
65 | * @param string $content Content of the file
66 | * @return boolean
67 | */
68 | public static function create_with_markers( $path, $marker, $content ) {
69 | return @insert_with_markers( $path, $marker, $content );
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-report.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Report {
27 |
28 | /**
29 | * Submit customer report to servmask.com
30 | *
31 | * @param string $email User e-mail
32 | * @param string $message User message
33 | * @param integer $terms User accept terms
34 | *
35 | * @return array
36 | */
37 | public function add( $email, $message, $terms ) {
38 | $errors = array();
39 |
40 | // Submit report to ServMask
41 | if ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
42 | $errors[] = __( 'Your email is not valid.', AI1WM_PLUGIN_NAME );
43 | } elseif ( empty( $message ) ) {
44 | $errors[] = __( 'Please enter comments in the text area.', AI1WM_PLUGIN_NAME );
45 | } elseif ( empty( $terms ) ) {
46 | $errors[] = __( 'Please accept report term conditions.', AI1WM_PLUGIN_NAME );
47 | } else {
48 | $response = wp_remote_post(
49 | AI1WM_REPORT_URL,
50 | array(
51 | 'timeout' => 15,
52 | 'body' => array(
53 | 'email' => $email,
54 | 'message' => $message,
55 | ),
56 | )
57 | );
58 |
59 | if ( is_wp_error( $response ) ) {
60 | $errors[] = sprintf( __( 'Something went wrong: %s', AI1WM_PLUGIN_NAME ), $response->get_error_message() );
61 | }
62 | }
63 |
64 | return $errors;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/controller/class-ai1wm-report-controller.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Report_Controller {
27 |
28 | public static function report( $params = array() ) {
29 |
30 | // Set params
31 | if ( empty( $params ) ) {
32 | $params = stripslashes_deep( $_POST );
33 | }
34 |
35 | // Set secret key
36 | $secret_key = null;
37 | if ( isset( $params['secret_key'] ) ) {
38 | $secret_key = trim( $params['secret_key'] );
39 | }
40 |
41 | // Set e-mail
42 | $email = null;
43 | if ( isset( $params['ai1wm_email'] ) ) {
44 | $email = trim( $params['ai1wm_email'] );
45 | }
46 |
47 | // Set message
48 | $message = null;
49 | if ( isset( $params['ai1wm_message'] ) ) {
50 | $message = trim( $params['ai1wm_message'] );
51 | }
52 |
53 | // Set terms
54 | $terms = false;
55 | if ( isset( $params['ai1wm_terms'] ) ) {
56 | $terms = (bool) $params['ai1wm_terms'];
57 | }
58 |
59 | try {
60 | // Ensure that unauthorized people cannot access report action
61 | ai1wm_verify_secret_key( $secret_key );
62 | } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
63 | exit;
64 | }
65 |
66 | $model = new Ai1wm_Report;
67 |
68 | // Send report
69 | $errors = $model->add( $email, $message, $terms );
70 |
71 | echo json_encode( array( 'errors' => $errors ) );
72 | exit;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/view/export/find-replace.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-download.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Download {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set progress
31 | Ai1wm_Status::info( __( 'Renaming exported file...', AI1WM_PLUGIN_NAME ) );
32 |
33 | // Open the archive file for writing
34 | $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
35 |
36 | // Append EOF block
37 | $archive->close( true );
38 |
39 | // Rename archive file
40 | if ( rename( ai1wm_archive_path( $params ), ai1wm_backup_path( $params ) ) ) {
41 |
42 | $blog_id = null;
43 |
44 | // Get subsite Blog ID
45 | if ( isset( $params['options']['sites'] ) && ( $sites = $params['options']['sites'] ) ) {
46 | if ( count( $sites ) === 1 ) {
47 | $blog_id = array_shift( $sites );
48 | }
49 | }
50 |
51 | // Set archive details
52 | $link = ai1wm_backup_url( $params );
53 | $size = ai1wm_backup_size( $params );
54 | $name = ai1wm_site_name( $blog_id );
55 |
56 | // Set progress
57 | Ai1wm_Status::download(
58 | sprintf(
59 | __(
60 | '' .
61 | 'Download %s ' .
62 | 'Size: %s ' .
63 | ' ',
64 | AI1WM_PLUGIN_NAME
65 | ),
66 | $link,
67 | $name,
68 | $size
69 | )
70 | );
71 | }
72 |
73 | return $params;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/controller/class-ai1wm-backups-controller.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Backups_Controller {
27 |
28 | public static function index() {
29 | $model = new Ai1wm_Backups;
30 |
31 | Ai1wm_Template::render(
32 | 'backups/index',
33 | array(
34 | 'backups' => $model->get_files(),
35 | 'username' => get_option( AI1WM_AUTH_USER ),
36 | 'password' => get_option( AI1WM_AUTH_PASSWORD ),
37 | )
38 | );
39 | }
40 |
41 | public static function delete( $params = array() ) {
42 | $errors = array();
43 |
44 | // Set params
45 | if ( empty( $params ) ) {
46 | $params = stripslashes_deep( $_POST );
47 | }
48 |
49 | // Set secret key
50 | $secret_key = null;
51 | if ( isset( $params['secret_key'] ) ) {
52 | $secret_key = trim( $params['secret_key'] );
53 | }
54 |
55 | // Set archive
56 | $archive = null;
57 | if ( isset( $params['archive'] ) ) {
58 | $archive = trim( $params['archive'] );
59 | }
60 |
61 | try {
62 | // Ensure that unauthorized people cannot access delete action
63 | ai1wm_verify_secret_key( $secret_key );
64 | } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
65 | exit;
66 | }
67 |
68 | $model = new Ai1wm_Backups;
69 |
70 | try {
71 | // Delete file
72 | $model->delete_file( $archive );
73 | } catch ( Exception $e ) {
74 | $errors[] = $e->getMessage();
75 | }
76 |
77 | echo json_encode( array( 'errors' => $errors ) );
78 | exit;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/view/import/index.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-log.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Log {
27 |
28 | public static function export( $params ) {
29 | $data = array();
30 |
31 | // Add date
32 | $data[] = date( 'M d Y H:i:s' );
33 |
34 | // Add params
35 | $data[] = json_encode( $params );
36 |
37 | // Add empty line
38 | $data[] = PHP_EOL;
39 |
40 | // Write log data
41 | if ( $handle = ai1wm_open( ai1wm_export_path( $params ), 'a' ) ) {
42 | ai1wm_write( $handle, implode( PHP_EOL, $data ) );
43 | ai1wm_close( $handle );
44 | }
45 | }
46 |
47 | public static function import( $params ) {
48 | $data = array();
49 |
50 | // Add date
51 | $data[] = date( 'M d Y H:i:s' );
52 |
53 | // Add params
54 | $data[] = json_encode( $params );
55 |
56 | // Add empty line
57 | $data[] = PHP_EOL;
58 |
59 | // Write log data
60 | if ( $handle = ai1wm_open( ai1wm_import_path( $params ), 'a' ) ) {
61 | ai1wm_write( $handle, implode( PHP_EOL, $data ) );
62 | ai1wm_close( $handle );
63 | }
64 | }
65 |
66 | public static function error( $params ) {
67 | $data = array();
68 |
69 | // Add date
70 | $data[] = date( 'M d Y H:i:s' );
71 |
72 | // Add params
73 | $data[] = json_encode( $params );
74 |
75 | // Add empty line
76 | $data[] = PHP_EOL;
77 |
78 | // Write log data
79 | if ( $handle = ai1wm_open( ai1wm_error_path(), 'a' ) ) {
80 | ai1wm_write( $handle, implode( PHP_EOL, $data ) );
81 | ai1wm_close( $handle );
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/lib/view/export/index.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-compatibility.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Compatibility {
27 |
28 | public static function get( $params ) {
29 | $extensions = Ai1wm_Extensions::get();
30 |
31 | foreach ( $extensions as $extension_name => $extension_data ) {
32 | if ( ! isset( $params[ $extension_data['short'] ] ) ) {
33 | unset( $extensions[ $extension_name ] );
34 | }
35 | }
36 |
37 | // Get updater URL
38 | $updater_url = add_query_arg( array( 'ai1wm_updater' => 1 ), network_admin_url( 'plugins.php' ) );
39 |
40 | // If no extension is used, update everything that is available
41 | if ( empty( $extensions ) ) {
42 | $extensions = Ai1wm_Extensions::get();
43 | }
44 |
45 | $messages = array();
46 | foreach ( $extensions as $extension_name => $extension_data ) {
47 | if ( ! Ai1wm_Compatibility::check( $extension_data ) ) {
48 | $messages[] = sprintf(
49 | __(
50 | '%s is not the latest version. ' .
51 | 'You must update the plugin before you can use it. ',
52 | AI1WM_PLUGIN_NAME
53 | ),
54 | $extension_data['title'],
55 | $updater_url
56 | );
57 | }
58 | }
59 |
60 | return $messages;
61 | }
62 |
63 | public static function check( $extension ) {
64 | if ( $extension['version'] !== 'develop' ) {
65 | if ( version_compare( $extension['version'], $extension['requires'], '<' ) ) {
66 | return false;
67 | }
68 | }
69 |
70 | return true;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/controller/class-ai1wm-feedback-controller.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Feedback_Controller {
27 |
28 | public static function feedback( $params = array() ) {
29 |
30 | // Set params
31 | if ( empty( $params ) ) {
32 | $params = stripslashes_deep( $_POST );
33 | }
34 |
35 | // Set secret key
36 | $secret_key = null;
37 | if ( isset( $params['secret_key'] ) ) {
38 | $secret_key = trim( $params['secret_key'] );
39 | }
40 |
41 | // Set type
42 | $type = null;
43 | if ( isset( $params['ai1wm_type'] ) ) {
44 | $type = trim( $params['ai1wm_type'] );
45 | }
46 |
47 | // Set e-mail
48 | $email = null;
49 | if ( isset( $params['ai1wm_email'] ) ) {
50 | $email = trim( $params['ai1wm_email'] );
51 | }
52 |
53 | // Set message
54 | $message = null;
55 | if ( isset( $params['ai1wm_message'] ) ) {
56 | $message = trim( $params['ai1wm_message'] );
57 | }
58 |
59 | // Set terms
60 | $terms = false;
61 | if ( isset( $params['ai1wm_terms'] ) ) {
62 | $terms = (bool) $params['ai1wm_terms'];
63 | }
64 |
65 | try {
66 | // Ensure that unauthorized people cannot access feedback action
67 | ai1wm_verify_secret_key( $secret_key );
68 | } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) {
69 | exit;
70 | }
71 |
72 | $model = new Ai1wm_Feedback;
73 |
74 | // Send feedback
75 | $errors = $model->add( $type, $email, $message, $terms );
76 |
77 | echo json_encode( array( 'errors' => $errors ) );
78 | exit;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-feedback.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Feedback {
27 |
28 | /**
29 | * Submit customer feedback to servmask.com
30 | *
31 | * @param string $type Feedback type
32 | * @param string $email User e-mail
33 | * @param string $message User message
34 | * @param integer $terms User accept terms
35 | *
36 | * @return array
37 | */
38 | public function add( $type, $email, $message, $terms ) {
39 | $errors = array();
40 |
41 | // Submit feedback to ServMask
42 | if ( empty( $type ) ) {
43 | $errors[] = __( 'Feedback type is not valid.', AI1WM_PLUGIN_NAME );
44 | } elseif ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
45 | $errors[] = __( 'Your email is not valid.', AI1WM_PLUGIN_NAME );
46 | } elseif ( empty( $message ) ) {
47 | $errors[] = __( 'Please enter comments in the text area.', AI1WM_PLUGIN_NAME );
48 | } elseif ( empty( $terms ) ) {
49 | $errors[] = __( 'Please accept feedback term conditions.', AI1WM_PLUGIN_NAME );
50 | } else {
51 | $response = wp_remote_post(
52 | AI1WM_FEEDBACK_URL,
53 | array(
54 | 'timeout' => 15,
55 | 'body' => array(
56 | 'type' => $type,
57 | 'email' => $email,
58 | 'message' => $message,
59 | ),
60 | )
61 | );
62 |
63 | if ( is_wp_error( $response ) ) {
64 | $errors[] = sprintf( __( 'Something went wrong: %s', AI1WM_PLUGIN_NAME ), $response->get_error_message() );
65 | }
66 | }
67 |
68 | return $errors;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-confirm.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Confirm {
27 |
28 | public static function execute( $params ) {
29 |
30 | $messages = array();
31 |
32 | // Read package.json file
33 | $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' );
34 |
35 | // Parse package.json file
36 | $package = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) );
37 | $package = json_decode( $package, true );
38 |
39 | // Close handle
40 | ai1wm_close( $handle );
41 |
42 | // Set message
43 | $messages[] = __(
44 | 'The import process will overwrite your website including the database, media, plugins, and themes. ' .
45 | 'Please ensure that you have a backup of your data before proceeding to the next step.',
46 | AI1WM_PLUGIN_NAME
47 | );
48 |
49 | // Check compatibility of PHP versions
50 | if ( isset( $package['PHP']['Version'] ) ) {
51 | if ( version_compare( $package['PHP']['Version'], '7.0.0', '<' ) && version_compare( PHP_VERSION, '7.0.0', '>=' ) ) {
52 | $messages[] = __(
53 | 'Your backup is from a PHP 5 but the site that you are importing to is PHP 7. ' .
54 | 'This could cause the import to fail. Technical details ',
55 | AI1WM_PLUGIN_NAME
56 | );
57 | }
58 | }
59 |
60 | // Set progress
61 | Ai1wm_Status::confirm( implode( $messages ) );
62 | exit;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/cron/class-ai1wm-cron.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Cron {
27 |
28 | /**
29 | * Schedules a hook which will be executed by the WordPress
30 | * actions core on a specific interval
31 | *
32 | * @param string $hook Event hook
33 | * @param string $recurrence How often the event should reoccur
34 | * @param array $args Arguments to pass to the hook function(s)
35 | * @return mixed
36 | */
37 | public static function add( $hook, $recurrence, $args = array() ) {
38 | $args = array_slice( func_get_args(), 2 );
39 | $schedules = wp_get_schedules();
40 |
41 | if ( isset( $schedules[ $recurrence ] ) && ( $current = $schedules[ $recurrence ] ) ) {
42 | return wp_schedule_event( time() + $current['interval'], $recurrence, $hook, $args );
43 | }
44 | }
45 |
46 | /**
47 | * Un-schedules all previously-scheduled cron jobs using a particular
48 | * hook name or a specific combination of hook name and arguments.
49 | *
50 | * @param string $hook Event hook
51 | * @return boolean
52 | */
53 | public static function clear( $hook ) {
54 | $cron = get_option( AI1WM_CRON, array() );
55 | if ( empty( $cron ) ) {
56 | return false;
57 | }
58 |
59 | foreach ( $cron as $timestamp => $hooks ) {
60 | if ( isset( $hooks[ $hook ] ) ) {
61 | unset( $cron[ $timestamp ][ $hook ] );
62 |
63 | // Unset empty timestamps
64 | if ( empty( $cron[ $timestamp ] ) ) {
65 | unset( $cron[ $timestamp ] );
66 | }
67 | }
68 | }
69 |
70 | return update_option( AI1WM_CRON, $cron );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/view/common/share-buttons.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
37 |
51 |
52 |
77 |
--------------------------------------------------------------------------------
/lib/view/updater/modal.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | .
53 |
54 |
--------------------------------------------------------------------------------
/lib/controller/class-ai1wm-updater-controller.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Updater_Controller {
27 |
28 | public static function plugins_api( $result, $action = null, $args = null ) {
29 | return Ai1wm_Updater::plugins_api( $result, $action, $args );
30 | }
31 |
32 | public static function pre_update_plugins( $transient ) {
33 | if ( empty( $transient->checked ) ) {
34 | return $transient;
35 | }
36 |
37 | // Check for updates
38 | Ai1wm_Updater::check_for_updates();
39 |
40 | return $transient;
41 | }
42 |
43 | public static function update_plugins( $transient ) {
44 | return Ai1wm_Updater::update_plugins( $transient );
45 | }
46 |
47 | public static function check_for_updates() {
48 | return Ai1wm_Updater::check_for_updates();
49 | }
50 |
51 | public static function plugin_row_meta( $links, $file ) {
52 | return Ai1wm_Updater::plugin_row_meta( $links, $file );
53 | }
54 |
55 | public static function updater( $params = array() ) {
56 | ai1wm_setup_environment();
57 |
58 | // Set params
59 | if ( empty( $params ) ) {
60 | $params = stripslashes_deep( $_POST );
61 | }
62 |
63 | // Set uuid
64 | $uuid = null;
65 | if ( isset( $params['ai1wm_uuid'] ) ) {
66 | $uuid = trim( $params['ai1wm_uuid'] );
67 | }
68 |
69 | // Set extension
70 | $extension = null;
71 | if ( isset( $params['ai1wm_extension'] ) ) {
72 | $extension = trim( $params['ai1wm_extension'] );
73 | }
74 |
75 | $extensions = Ai1wm_Extensions::get();
76 |
77 | // Verify whether extension exists
78 | if ( isset( $extensions[ $extension ] ) ) {
79 | update_option( $extensions[ $extension ]['key'], $uuid );
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-notification.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Notification {
27 |
28 | public static function ok( $subject, $message ) {
29 | // Enable notifications
30 | if ( ! apply_filters( 'ai1wm_notification_ok_toggle', false ) ) {
31 | return;
32 | }
33 |
34 | // Set email
35 | if ( ! ( $email = apply_filters( 'ai1wm_notification_ok_email', get_option( 'admin_email', false ) ) ) ) {
36 | return;
37 | }
38 |
39 | // Set subject
40 | if ( ! ( $subject = apply_filters( 'ai1wm_notification_ok_subject', $subject ) ) ) {
41 | return;
42 | }
43 |
44 | // Set message
45 | if ( ! ( $message = apply_filters( 'ai1wm_notification_ok_message', $message ) ) ) {
46 | return;
47 | }
48 |
49 | // Send email
50 | if ( ai1wm_is_scheduled_backup() ) {
51 | wp_mail( $email, $subject, $message, array( 'Content-Type: text/html; charset=UTF-8' ) );
52 | }
53 | }
54 |
55 | public static function error( $subject, $message ) {
56 | // Enable notifications
57 | if ( ! apply_filters( 'ai1wm_notification_error_toggle', false ) ) {
58 | return;
59 | }
60 |
61 | // Set email
62 | if ( ! ( $email = apply_filters( 'ai1wm_notification_error_email', get_option( 'admin_email', false ) ) ) ) {
63 | return;
64 | }
65 |
66 | // Set subject
67 | if ( ! ( $subject = apply_filters( 'ai1wm_notification_error_subject', $subject ) ) ) {
68 | return;
69 | }
70 |
71 | // Set message
72 | if ( ! ( $message = apply_filters( 'ai1wm_notification_error_message', $message ) ) ) {
73 | return;
74 | }
75 |
76 | // Send email
77 | if ( ai1wm_is_scheduled_backup() ) {
78 | wp_mail( $email, $subject, $message, array( 'Content-Type: text/html; charset=UTF-8' ) );
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lib/view/common/report-problem.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
45 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/all-in-one-wp-migration-wi.php:
--------------------------------------------------------------------------------
1 | .
27 | *
28 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
29 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
30 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
31 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
32 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
33 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
34 | */
35 |
36 | // Check SSL Mode
37 | if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && ( $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) ) {
38 | $_SERVER['HTTPS'] = 'on';
39 | }
40 |
41 | // Plugin Basename
42 | define( 'AI1WM_PLUGIN_BASENAME', basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
43 |
44 | // Plugin Path
45 | define( 'AI1WM_PATH', dirname( __FILE__ ) );
46 |
47 | // Plugin Url
48 | define( 'AI1WM_URL', plugins_url( '', AI1WM_PLUGIN_BASENAME ) );
49 |
50 | // Plugin Storage Url
51 | define( 'AI1WM_STORAGE_URL', plugins_url( 'storage', AI1WM_PLUGIN_BASENAME ) );
52 |
53 | // Plugin Backups Url
54 | define( 'AI1WM_BACKUPS_URL', content_url( 'ai1wm-backups', AI1WM_PLUGIN_BASENAME ) );
55 |
56 | // Themes Absolute Path
57 | define( 'AI1WM_THEMES_PATH', get_theme_root() );
58 |
59 | // Include constants
60 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'constants.php';
61 |
62 | // Include deprecated
63 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'deprecated.php';
64 |
65 | // Include functions
66 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php';
67 |
68 | // Include exceptions
69 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'exceptions.php';
70 |
71 | // Include loader
72 | require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php';
73 |
74 | // =========================================================================
75 | // = All app initialization is done in Ai1wm_Main_Controller __constructor =
76 | // =========================================================================
77 | $main_controller = new Ai1wm_Main_Controller();
78 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/database/class-ai1wm-database-mysql.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Database_Mysql extends Ai1wm_Database {
27 |
28 | /**
29 | * Run MySQL query
30 | *
31 | * @param string $input SQL query
32 | * @return resource
33 | */
34 | public function query( $input ) {
35 | return mysql_query( $input, $this->wpdb->dbh );
36 | }
37 |
38 | /**
39 | * Escape string input for mysql query
40 | *
41 | * @param string $input String to escape
42 | * @return string
43 | */
44 | public function escape( $input ) {
45 | return mysql_real_escape_string( $input, $this->wpdb->dbh );
46 | }
47 |
48 | /**
49 | * Return the error code for the most recent function call
50 | *
51 | * @return integer
52 | */
53 | public function errno() {
54 | return mysql_errno( $this->wpdb->dbh );
55 | }
56 |
57 | /**
58 | * Return a string description of the last error
59 | *
60 | * @return string
61 | */
62 | public function error() {
63 | return mysql_error( $this->wpdb->dbh );
64 | }
65 |
66 | /**
67 | * Return server version
68 | *
69 | * @return string
70 | */
71 | public function version() {
72 | return mysql_get_server_info( $this->wpdb->dbh );
73 | }
74 |
75 | /**
76 | * Return the result from MySQL query as associative array
77 | *
78 | * @param resource $result MySQL resource
79 | * @return array
80 | */
81 | public function fetch_assoc( $result ) {
82 | return mysql_fetch_assoc( $result );
83 | }
84 |
85 | /**
86 | * Return the result from MySQL query as row
87 | *
88 | * @param resource $result MySQL resource
89 | * @return array
90 | */
91 | public function fetch_row( $result ) {
92 | return mysql_fetch_row( $result );
93 | }
94 |
95 | /**
96 | * Return the number for rows from MySQL results
97 | *
98 | * @param resource $result MySQL resource
99 | * @return integer
100 | */
101 | public function num_rows( $result ) {
102 | return mysql_num_rows( $result );
103 | }
104 |
105 | /**
106 | * Free MySQL result memory
107 | *
108 | * @param resource $result MySQL resource
109 | * @return boolean
110 | */
111 | public function free_result( $result ) {
112 | return mysql_free_result( $result );
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/lib/vendor/servmask/database/class-ai1wm-database-mysqli.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Database_Mysqli extends Ai1wm_Database {
27 |
28 | /**
29 | * Run MySQL query
30 | *
31 | * @param string $input SQL query
32 | * @return resource
33 | */
34 | public function query( $input ) {
35 | return mysqli_query( $this->wpdb->dbh, $input, MYSQLI_STORE_RESULT );
36 | }
37 |
38 | /**
39 | * Escape string input for mysql query
40 | *
41 | * @param string $input String to escape
42 | * @return string
43 | */
44 | public function escape( $input ) {
45 | return mysqli_real_escape_string( $this->wpdb->dbh, $input );
46 | }
47 |
48 | /**
49 | * Return the error code for the most recent function call
50 | *
51 | * @return integer
52 | */
53 | public function errno() {
54 | return mysqli_errno( $this->wpdb->dbh );
55 | }
56 |
57 | /**
58 | * Return a string description of the last error
59 | *
60 | * @return string
61 | */
62 | public function error() {
63 | return mysqli_error( $this->wpdb->dbh );
64 | }
65 |
66 | /**
67 | * Return server version
68 | *
69 | * @return string
70 | */
71 | public function version() {
72 | return mysqli_get_server_info( $this->wpdb->dbh );
73 | }
74 |
75 | /**
76 | * Return the result from MySQL query as associative array
77 | *
78 | * @param resource $result MySQL resource
79 | * @return array
80 | */
81 | public function fetch_assoc( $result ) {
82 | return mysqli_fetch_assoc( $result );
83 | }
84 |
85 | /**
86 | * Return the result from MySQL query as row
87 | *
88 | * @param resource $result MySQL resource
89 | * @return array
90 | */
91 | public function fetch_row( $result ) {
92 | return mysqli_fetch_row( $result );
93 | }
94 |
95 | /**
96 | * Return the number for rows from MySQL results
97 | *
98 | * @param resource $result MySQL resource
99 | * @return integer
100 | */
101 | public function num_rows( $result ) {
102 | return mysqli_num_rows( $result );
103 | }
104 |
105 | /**
106 | * Free MySQL result memory
107 | *
108 | * @param resource $result MySQL resource
109 | * @return boolean
110 | */
111 | public function free_result( $result ) {
112 | return mysqli_free_result( $result );
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/lib/view/import/import-buttons.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
28 |
29 |
30 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Site could not be imported!' .
80 | '
Please make sure that storage directory %s has read and write permissions.
',
81 | AI1WM_PLUGIN_NAME
82 | ),
83 | AI1WM_STORAGE_PATH
84 | );
85 | ?>
86 |
87 |
88 |
--------------------------------------------------------------------------------
/lib/model/class-ai1wm-backups.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Backups {
27 |
28 | /**
29 | * Get all backup files
30 | *
31 | * @return array
32 | */
33 | public function get_files() {
34 | $backups = array();
35 |
36 | // Iterate over directory
37 | $iterator = new Ai1wm_Recursive_Directory_Iterator( AI1WM_BACKUPS_PATH );
38 |
39 | // Filter by extensions
40 | $iterator = new Ai1wm_Recursive_Extension_Filter( $iterator, array( 'wpress' ) );
41 |
42 | // Recursively iterate over directory
43 | $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
44 |
45 | // Get backup files
46 | foreach ( $iterator as $item ) {
47 | try {
48 | if ( ai1wm_is_filesize_supported( $item->getPathname() ) ) {
49 | $backups[] = array(
50 | 'path' => $iterator->getSubPath(),
51 | 'filename' => $iterator->getSubPathname(),
52 | 'mtime' => $iterator->getMTime(),
53 | 'size' => $iterator->getSize(),
54 | );
55 | } else {
56 | $backups[] = array(
57 | 'path' => $iterator->getSubPath(),
58 | 'filename' => $iterator->getSubPathname(),
59 | 'mtime' => $iterator->getMTime(),
60 | 'size' => null,
61 | );
62 | }
63 | } catch ( Exception $e ) {
64 | $backups[] = array(
65 | 'path' => $iterator->getSubPath(),
66 | 'filename' => $iterator->getSubPathname(),
67 | 'mtime' => null,
68 | 'size' => null,
69 | );
70 | }
71 | }
72 |
73 | // Sort backups modified date
74 | usort( $backups, array( $this, 'compare' ) );
75 |
76 | return $backups;
77 | }
78 |
79 | /**
80 | * Delete file
81 | *
82 | * @param string $file File name
83 | * @return boolean
84 | */
85 | public function delete_file( $file ) {
86 | if ( validate_file( $file ) === 0 ) {
87 | return @unlink( ai1wm_backup_path( array( 'archive' => $file ) ) );
88 | }
89 | }
90 |
91 | /**
92 | * Compare backup files by modified time
93 | *
94 | * @param array $a File item A
95 | * @param array $b File item B
96 | * @return integer
97 | */
98 | public function compare( $a, $b ) {
99 | if ( $a['mtime'] === $b['mtime'] ) {
100 | return 0;
101 | }
102 |
103 | return ( $a['mtime'] > $b['mtime'] ) ? - 1 : 1;
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/lib/model/import/class-ai1wm-import-upload.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Import_Upload {
27 |
28 | private static function validate() {
29 | if ( ! array_key_exists( 'upload-file', $_FILES ) || ! is_array( $_FILES['upload-file'] ) ) {
30 | throw new Ai1wm_Import_Retry_Exception(
31 | __( 'Missing upload file.', AI1WM_PLUGIN_NAME ),
32 | 400
33 | );
34 | }
35 |
36 | if ( ! array_key_exists( 'error', $_FILES['upload-file'] ) ) {
37 | throw new Ai1wm_Import_Retry_Exception(
38 | __( 'Missing error key in upload file.', AI1WM_PLUGIN_NAME ),
39 | 400
40 | );
41 | }
42 |
43 | if ( ! array_key_exists( 'tmp_name', $_FILES['upload-file'] ) ) {
44 | throw new Ai1wm_Import_Retry_Exception(
45 | __( 'Missing tmp_name in upload file.', AI1WM_PLUGIN_NAME ),
46 | 400
47 | );
48 | }
49 | }
50 |
51 | public static function execute( $params ) {
52 | self::validate();
53 |
54 | $error = $_FILES['upload-file']['error'];
55 | $upload = $_FILES['upload-file']['tmp_name'];
56 | $archive = ai1wm_archive_path( $params );
57 |
58 | switch ( $error ) {
59 | case UPLOAD_ERR_OK:
60 | try {
61 | ai1wm_copy( $upload, $archive );
62 | ai1wm_unlink( $upload );
63 | } catch ( Exception $e ) {
64 | throw new Ai1wm_Import_Retry_Exception(
65 | sprintf(
66 | __( 'Unable to upload the file because %s', AI1WM_PLUGIN_NAME ),
67 | $e->getMessage()
68 | ),
69 | 400
70 | );
71 | }
72 | break;
73 | case UPLOAD_ERR_INI_SIZE:
74 | case UPLOAD_ERR_FORM_SIZE:
75 | case UPLOAD_ERR_PARTIAL:
76 | case UPLOAD_ERR_NO_FILE:
77 | // File is too large, reduce the size and try again
78 | throw new Ai1wm_Import_Retry_Exception(
79 | __( 'The file is too large, retrying with smaller size.', AI1WM_PLUGIN_NAME ),
80 | 413
81 | );
82 | case UPLOAD_ERR_NO_TMP_DIR:
83 | throw new Ai1wm_Import_Retry_Exception(
84 | __( 'Missing a temporary folder.', AI1WM_PLUGIN_NAME ),
85 | 400
86 | );
87 | case UPLOAD_ERR_CANT_WRITE:
88 | throw new Ai1wm_Import_Retry_Exception(
89 | __( 'Failed to write file to disk.', AI1WM_PLUGIN_NAME ),
90 | 400
91 | );
92 | case UPLOAD_ERR_EXTENSION:
93 | throw new Ai1wm_Import_Retry_Exception(
94 | __( 'A PHP extension stopped the file upload.', AI1WM_PLUGIN_NAME ),
95 | 400
96 | );
97 | default:
98 | throw new Ai1wm_Import_Retry_Exception(
99 | sprintf(
100 | __( 'Unrecognized error %s during upload.', AI1WM_PLUGIN_NAME ),
101 | $error
102 | ),
103 | 400
104 | );
105 | }
106 |
107 | echo json_encode( array( 'errors' => array() ) );
108 | exit;
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/lib/view/common/leave-feedback.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
78 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-config-file.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Config_File {
27 |
28 | public static function execute( $params ) {
29 |
30 | $package_bytes_written = 0;
31 |
32 | // Set archive bytes offset
33 | if ( isset( $params['archive_bytes_offset'] ) ) {
34 | $archive_bytes_offset = (int) $params['archive_bytes_offset'];
35 | } else {
36 | $archive_bytes_offset = ai1wm_archive_bytes( $params );
37 | }
38 |
39 | // Set package bytes offset
40 | if ( isset( $params['package_bytes_offset'] ) ) {
41 | $package_bytes_offset = (int) $params['package_bytes_offset'];
42 | } else {
43 | $package_bytes_offset = 0;
44 | }
45 |
46 | // Get total package size
47 | if ( isset( $params['total_package_size'] ) ) {
48 | $total_package_size = (int) $params['total_package_size'];
49 | } else {
50 | $total_package_size = ai1wm_package_bytes( $params );
51 | }
52 |
53 | // What percent of package have we processed?
54 | $progress = (int) min( ( $package_bytes_offset / $total_package_size ) * 100, 100 );
55 |
56 | // Set progress
57 | Ai1wm_Status::info( sprintf( __( 'Archiving configuration file... %d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
58 |
59 | // Open the archive file for writing
60 | $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
61 |
62 | // Set the file pointer to the one that we have saved
63 | $archive->set_file_pointer( $archive_bytes_offset );
64 |
65 | // Add package.json to archive
66 | if ( $archive->add_file( ai1wm_package_path( $params ), AI1WM_PACKAGE_NAME, $package_bytes_written, $package_bytes_offset ) ) {
67 |
68 | // Set progress
69 | Ai1wm_Status::info( __( 'Done archiving configuration file.', AI1WM_PLUGIN_NAME ) );
70 |
71 | // Unset archive bytes offset
72 | unset( $params['archive_bytes_offset'] );
73 |
74 | // Unset package bytes offset
75 | unset( $params['package_bytes_offset'] );
76 |
77 | // Unset total package size
78 | unset( $params['total_package_size'] );
79 |
80 | // Unset completed flag
81 | unset( $params['completed'] );
82 |
83 | } else {
84 |
85 | // Get archive bytes offset
86 | $archive_bytes_offset = $archive->get_file_pointer();
87 |
88 | // What percent of package have we processed?
89 | $progress = (int) min( ( $package_bytes_offset / $total_package_size ) * 100, 100 );
90 |
91 | // Set progress
92 | Ai1wm_Status::info( sprintf( __( 'Archiving configuration file... %d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
93 |
94 | // Set archive bytes offset
95 | $params['archive_bytes_offset'] = $archive_bytes_offset;
96 |
97 | // Set package bytes offset
98 | $params['package_bytes_offset'] = $package_bytes_offset;
99 |
100 | // Set total package size
101 | $params['total_package_size'] = $total_package_size;
102 |
103 | // Set completed flag
104 | $params['completed'] = false;
105 | }
106 |
107 | // Truncate the archive file
108 | $archive->truncate();
109 |
110 | // Close the archive file
111 | $archive->close();
112 |
113 | return $params;
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/lib/model/export/class-ai1wm-export-database-file.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 |
26 | class Ai1wm_Export_Database_File {
27 |
28 | public static function execute( $params ) {
29 |
30 | // Set exclude database
31 | if ( isset( $params['options']['no_database'] ) ) {
32 | return $params;
33 | }
34 |
35 | $database_bytes_written = 0;
36 |
37 | // Set archive bytes offset
38 | if ( isset( $params['archive_bytes_offset'] ) ) {
39 | $archive_bytes_offset = (int) $params['archive_bytes_offset'];
40 | } else {
41 | $archive_bytes_offset = ai1wm_archive_bytes( $params );
42 | }
43 |
44 | // Set database bytes offset
45 | if ( isset( $params['database_bytes_offset'] ) ) {
46 | $database_bytes_offset = (int) $params['database_bytes_offset'];
47 | } else {
48 | $database_bytes_offset = 0;
49 | }
50 |
51 | // Get total database size
52 | if ( isset( $params['total_database_size'] ) ) {
53 | $total_database_size = (int) $params['total_database_size'];
54 | } else {
55 | $total_database_size = ai1wm_database_bytes( $params );
56 | }
57 |
58 | // What percent of database have we processed?
59 | $progress = (int) min( ( $database_bytes_offset / $total_database_size ) * 100, 100 );
60 |
61 | // Set progress
62 | Ai1wm_Status::info( sprintf( __( 'Archiving database... %d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
63 |
64 | // Open the archive file for writing
65 | $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
66 |
67 | // Set the file pointer to the one that we have saved
68 | $archive->set_file_pointer( $archive_bytes_offset );
69 |
70 | // Add database.sql to archive
71 | if ( $archive->add_file( ai1wm_database_path( $params ), AI1WM_DATABASE_NAME, $database_bytes_written, $database_bytes_offset ) ) {
72 |
73 | // Set progress
74 | Ai1wm_Status::info( __( 'Done archiving database.', AI1WM_PLUGIN_NAME ) );
75 |
76 | // Unset archive bytes offset
77 | unset( $params['archive_bytes_offset'] );
78 |
79 | // Unset database bytes offset
80 | unset( $params['database_bytes_offset'] );
81 |
82 | // Unset total database size
83 | unset( $params['total_database_size'] );
84 |
85 | // Unset completed flag
86 | unset( $params['completed'] );
87 |
88 | } else {
89 |
90 | // Get archive bytes offset
91 | $archive_bytes_offset = $archive->get_file_pointer();
92 |
93 | // What percent of database have we processed?
94 | $progress = (int) min( ( $database_bytes_offset / $total_database_size ) * 100, 100 );
95 |
96 | // Set progress
97 | Ai1wm_Status::info( sprintf( __( 'Archiving database... %d%% complete', AI1WM_PLUGIN_NAME ), $progress ) );
98 |
99 | // Set archive bytes offset
100 | $params['archive_bytes_offset'] = $archive_bytes_offset;
101 |
102 | // Set database bytes offset
103 | $params['database_bytes_offset'] = $database_bytes_offset;
104 |
105 | // Set total database size
106 | $params['total_database_size'] = $total_database_size;
107 |
108 | // Set completed flag
109 | $params['completed'] = false;
110 | }
111 |
112 | // Truncate the archive file
113 | $archive->truncate();
114 |
115 | // Close the archive file
116 | $archive->close();
117 |
118 | return $params;
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/lib/view/assets/css/updater.min.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:392px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:420px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:left}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-left:1em}
--------------------------------------------------------------------------------
/lib/view/assets/css/updater.min.rtl.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:392px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:420px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:right}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-right:1em}
--------------------------------------------------------------------------------
/lib/view/main/admin-head.php:
--------------------------------------------------------------------------------
1 | .
17 | *
18 | * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19 | * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20 | * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21 | * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22 | * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23 | * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24 | */
25 | ?>
26 |
27 |
120 |
--------------------------------------------------------------------------------